コード例 #1
0
        override public void Core_Update()
        {
            Pointer[] pointers = new Pointer[6]
            {
                Core.GetPointer("Small World Map Tileset"),
                Core.GetPointer("Small World Map Palette"),
                Core.GetPointer("Small World Map TSA"),
                Core.GetPointer("Large World Map Tileset"),
                Core.GetPointer("Large World Map Palette"),
                Core.GetPointer("Large World Map TSA"),
            };

            try
            {
                Core_LoadValues(pointers);
            }
            catch (Exception ex)
            {
                Program.ShowError("Could not properly load world map pointers.", ex);
            }

            try
            {
                CurrentSmallMap = new WorldMap_FE7_Small(
                    pointers[SMALLMAP_PALETTE],
                    pointers[SMALLMAP_TILESET],
                    pointers[SMALLMAP_TSA]);
                SmallMap_ImageBox.Load(CurrentSmallMap);
                SmallMap_PaletteBox.Load(Palette.Merge(CurrentSmallMap.Palettes));
            }
            catch (Exception ex)
            {
                Program.ShowError("Could not load the small World Map.", ex);
                SmallMap_ImageBox.Reset();
                SmallMap_PaletteBox.Reset();
            }

            try
            {
                CurrentLargeMap = new WorldMap_FE7_Large(
                    pointers[LARGEMAP_PALETTE],
                    pointers[LARGEMAP_TILESET],
                    pointers[LARGEMAP_TSA]);
                LargeMap_ImageBox.Load(CurrentLargeMap);
                LargeMap_PaletteBox.Load(Palette.Merge(CurrentLargeMap.Palettes));
            }
            catch (Exception ex)
            {
                Program.ShowError("Could not load the large World Map.", ex);
                LargeMap_ImageBox.Reset();
                LargeMap_PaletteBox.Reset();
            }
        }
コード例 #2
0
        override public void Core_Update()
        {
            Pointer[] pointers = new Pointer[8]
            {
                Core.GetPointer("Mini World Map Tileset"),
                Core.GetPointer("Mini World Map Palette"),
                Core.GetPointer("Small World Map Tileset"),
                Core.GetPointer("Small World Map Palette"),
                Core.GetPointer("Small World Map TSA"),
                Core.GetPointer("Large World Map Tileset"),
                Core.GetPointer("Large World Map Palette"),
                Core.GetPointer("Large World Map TSA"),
            };

            try
            {
                Core_LoadValues(pointers);
            }
            catch (Exception ex)
            {
                Program.ShowError("Could not properly load world map pointers.", ex);
            }

            try
            {
                CurrentMiniMap = new WorldMap_FE8_Mini(
                    pointers[MINI_MAP_PALETTE],
                    (Core.CurrentROM.Version == GameVersion.EUR) ?
                    Core.ReadPointer(pointers[MINI_MAP_TILESET] + (int)Mini_Map_NumberBox.Value * 4) :
                    pointers[MINI_MAP_TILESET]);
                Mini_Map_ImageBox.Load(CurrentMiniMap);
                Mini_Map_PaletteBox.Load(CurrentMiniMap.Colors);
            }
            catch (Exception ex)
            {
                Program.ShowError("Could not load the mini World Map.", ex);
                Mini_Map_ImageBox.Reset();
                Mini_Map_PaletteBox.Reset();
            }

            try
            {
                CurrentSmallMap = new WorldMap_FE8_Small(
                    pointers[SMALLMAP_PALETTE],
                    pointers[SMALLMAP_TILESET],
                    pointers[SMALLMAP_TSA]);
                SmallMap_ImageBox.Load(CurrentSmallMap);
                SmallMap_PaletteBox.Load(Palette.Merge(CurrentSmallMap.Palettes));
            }
            catch (Exception ex)
            {
                Program.ShowError("Could not load the small World Map.", ex);
                SmallMap_ImageBox.Reset();
                SmallMap_PaletteBox.Reset();
            }

            try
            {
                CurrentLargeMap = new WorldMap_FE8_Large(
                    pointers[LARGEMAP_PALETTE],
                    pointers[LARGEMAP_TILESET],
                    pointers[LARGEMAP_TSA]);
                LargeMap_ImageBox.Load(CurrentLargeMap);
                LargeMap_PaletteBox.Load(Palette.Merge(CurrentLargeMap.Palettes));
            }
            catch (Exception ex)
            {
                Program.ShowError("Could not load the large World Map.", ex);
                LargeMap_ImageBox.Reset();
                LargeMap_PaletteBox.Reset();
            }
        }