Esempio n. 1
0
 public Chest(GBHL.GBFile g, bool overWorld, byte dung, byte Map)
 {
     gb        = g;
     dungeon   = dung;
     map       = Map;
     overworld = overWorld;
     loadChestData();
 }
Esempio n. 2
0
        public MinimapEditor(GBHL.GBFile g, Image map, byte[] roomindexes, byte[, ,] graphicsdata, byte[] minimapdata, bool overWorld, byte[] overworldPal, byte dungeon)
        {
            InitializeComponent();
            gb   = g;
            dung = dungeon;
            if (!overWorld)
            {
                this.Width            = 215;
                this.Height           = 263;
                gBoxDungeon.Visible   = true;
                gBoxOverWorld.Visible = false;
                gBoxDungeon.Location  = new Point(4, 4);
                pMinimap.Image        = map;
                roomIndexes           = roomindexes;
                if (dungeon == 0xFF)
                {
                    nMap.Maximum        = 0x15;
                    gb.BufferLocation   = 0x19B3;
                    nDeathMinimap.Value = gb.ReadByte();
                    gb.BufferLocation   = 0x50E3D;
                    nDeathDungeon.Value = gb.ReadByte();
                    nDeathMap.Value     = gb.ReadByte();
                    gb.BufferLocation   = 0x6E8D + (0xF * 2);
                    nArrow.Value        = gb.ReadByte() - 0xB;
                }
                else
                {
                    gb.BufferLocation   = 0x50E41 + dungeon;
                    nDeathMinimap.Value = gb.ReadByte();
                    gb.BufferLocation   = 0x6E8D + (dungeon * 2);
                    nArrow.Value        = gb.ReadByte() - 0xB;
                    gb.BufferLocation   = 0x50DF2 + (dungeon * 5);
                    nDeathDungeon.Value = gb.ReadByte();
                    nDeathMap.Value     = gb.ReadByte();
                }
            }
            else
            {
                gb.BufferLocation = 0x8786E;
                for (int i = 0; i < 8; i++)
                {
                    for (int k = 0; k < 4; k++)
                    {
                        palette[i, k] = GetColor(gb.BufferLocation);
                    }
                }
                pMinimapO.Image = map;
                overworldpal    = overworldPal;
            }
            graphicsData = graphicsdata;
            minimapData  = minimapdata;

            if (!overWorld)
            {
                drawDungeonItems();
            }
            else
            {
                pTile.Image = drawOverworldTile();
            }
        }