Exemplo n.º 1
0
        private void drawMapAndTiles()
        {
            TileDrawer tileDrawer = new TileDrawer();

            tilesetLoader.loadPalette();

            gridBoxTileset.Image = tileDrawer.drawTileset(tilesetLoader.loadTileset(), tilesetLoader.paletteTiles, tilesetLoader.formationData, tilesetLoader.palette);

            byte[] mapData = new byte[80];
            if (LAGame.overworldFlag)
            {
                for (int i = 0; i < 80; i++)
                {
                    mapData[i] = (byte)(numericUpDownPresetTiles.Value);
                }
            }
            else
            {
                loadWalls();
                byte b = (byte)numericUpDownPresetTiles.Value;
                for (int i = 0; i < 80; i++)
                {
                    mapData[i] = (byte)((b) & 0x0F);
                }
                for (int i = 0; i < 64; i++)
                {
                    CollisionObject o = wallTiles[(byte)(b >> 4), i];
                    if (o != null)
                    {
                        mapData[o.xPos + (o.yPos * 10)] = (byte)o.id;
                    }
                }
            }
            gridBoxMap.Image = tileDrawer.drawMap((Bitmap)gridBoxTileset.Image, mapData);
        }
Exemplo n.º 2
0
        private void loadMinimaps()
        {
            MinimapLoader minimapLoader = new MinimapLoader(LAGame);
            TileDrawer    tileDrawer    = new TileDrawer();

            if (LAGame.overworldFlag)
            {
                pMinimapO.Image  = tileDrawer.drawOverworldMinimapTiles(minimapLoader.loadMinimapOverworld(), minimapLoader.minimapGraphics, minimapLoader.overworldPal, minimapLoader.palette);
                overworldPalette = minimapLoader.overworldPal;
            }
            else
            {
                minimapLoader.loadMinimapDData();
                pMinimapD.Image = tileDrawer.drawDungeonMinimapTiles(minimapLoader.loadMinimapDungeon(), minimapLoader.minimapGraphics);
            }

            minimapData = minimapLoader.minimapGraphics;
            roomIndexes = minimapLoader.roomIndexes;
        }
Exemplo n.º 3
0
        public PaletteEditor(Game game)
        {
            LAGame        = new Game(game);
            tilesetLoader = new TilesetLoader(LAGame);
            tileDrawer    = new TileDrawer();

            originalDungeon = LAGame.dungeon;
            originalMap     = LAGame.map;

            InitializeComponent();

            if (LAGame.overworldFlag)
            {
                nDungeon.Enabled = false;
            }
            else
            {
                nIndex.Enabled = false;
            }

            loadPalette();
            loadTileset();
        }