From 4049ed7e2c6bef50f2551cc846e0b428fdf51bd1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 28 Oct 2017 22:03:33 -0400 Subject: Rename REGION_MAP constants to adopt MAPSEC names from Ruby --- include/region_map.h | 426 +++++++++++++++++++++++++-------------------------- 1 file changed, 213 insertions(+), 213 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 52e7376be..236416812 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -4,219 +4,219 @@ // Exported type declarations enum { - REGION_MAP_LITTLEROOT_TOWN, - REGION_MAP_OLDALE_TOWN, - REGION_MAP_DEWFORD_TOWN, - REGION_MAP_LAVARIDGE_TOWN, - REGION_MAP_FALLARBOR_TOWN, - REGION_MAP_VERDANTURF_TOWN, - REGION_MAP_PACIFIDLOG_TOWN, - REGION_MAP_PETALBURG_CITY, - REGION_MAP_SLATEPORT_CITY, - REGION_MAP_MAUVILLE_CITY, - REGION_MAP_RUSTBORO_CITY, - REGION_MAP_FORTREE_CITY, - REGION_MAP_LILYCOVE_CITY, - REGION_MAP_MOSSDEEP_CITY, - REGION_MAP_SOOTOPOLIS_CITY, - REGION_MAP_EVER_GRANDE_CITY, - REGION_MAP_ROUTE_101, - REGION_MAP_ROUTE_102, - REGION_MAP_ROUTE_103, - REGION_MAP_ROUTE_104, - REGION_MAP_ROUTE_105, - REGION_MAP_ROUTE_106, - REGION_MAP_ROUTE_107, - REGION_MAP_ROUTE_108, - REGION_MAP_ROUTE_109, - REGION_MAP_ROUTE_110, - REGION_MAP_ROUTE_111, - REGION_MAP_ROUTE_112, - REGION_MAP_ROUTE_113, - REGION_MAP_ROUTE_114, - REGION_MAP_ROUTE_115, - REGION_MAP_ROUTE_116, - REGION_MAP_ROUTE_117, - REGION_MAP_ROUTE_118, - REGION_MAP_ROUTE_119, - REGION_MAP_ROUTE_120, - REGION_MAP_ROUTE_121, - REGION_MAP_ROUTE_122, - REGION_MAP_ROUTE_123, - REGION_MAP_ROUTE_124, - REGION_MAP_ROUTE_125, - REGION_MAP_ROUTE_126, - REGION_MAP_ROUTE_127, - REGION_MAP_ROUTE_128, - REGION_MAP_ROUTE_129, - REGION_MAP_ROUTE_130, - REGION_MAP_ROUTE_131, - REGION_MAP_ROUTE_132, - REGION_MAP_ROUTE_133, - REGION_MAP_ROUTE_134, - REGION_MAP_UNDERWATER_124, - REGION_MAP_UNDERWATER_125, - REGION_MAP_UNDERWATER_126, - REGION_MAP_UNDERWATER_127, - REGION_MAP_UNDERWATER_128, - REGION_MAP_GRANITE_CAVE, - REGION_MAP_MT_CHIMNEY, - REGION_MAP_SAFARI_ZONE, - REGION_MAP_BATTLE_FRONTIER, - REGION_MAP_PETALBURG_WOODS, - REGION_MAP_RUSTURF_TUNNEL, - REGION_MAP_ABANDONED_SHIP, - REGION_MAP_NEW_MAUVILLE, - REGION_MAP_METEOR_FALLS, - REGION_MAP_METEOR_FALLS2, - REGION_MAP_MT_PYRE, - REGION_MAP_AQUA_HIDEOUT_OLD, - REGION_MAP_SHOAL_CAVE, - REGION_MAP_SEAFLOOR_CAVERN, - REGION_MAP_UNDERWATER, - REGION_MAP_VICTORY_ROAD, - REGION_MAP_MIRAGE_ISLAND, - REGION_MAP_CAVE_OF_ORIGIN, - REGION_MAP_SOUTHERN_ISLAND, - REGION_MAP_FIERY_PATH, - REGION_MAP_FIERY_PATH2, - REGION_MAP_JAGGED_PASS, - REGION_MAP_JAGGED_PASS2, - REGION_MAP_SEALED_CHAMBER, - REGION_MAP_UNDERWATER_SEALED_CHAMBER, - REGION_MAP_SCORCHED_SLAB, - REGION_MAP_ISLAND_CAVE, - REGION_MAP_DESERT_RUINS, - REGION_MAP_ANCIENT_TOMB, - REGION_MAP_INSIDE_OF_TRUCK, - REGION_MAP_SKY_PILLAR, - REGION_MAP_SECRET_BASE, - REGION_MAP_NONE, - REGION_MAP_PALLET_TOWN, - REGION_MAP_VIRIDIAN_CITY, - REGION_MAP_PEWTER_CITY, - REGION_MAP_CERULEAN_CITY, - REGION_MAP_LAVENDER_TOWN, - REGION_MAP_VERMILION_CITY, - REGION_MAP_CELADON_CITY, - REGION_MAP_FUCHSIA_CITY, - REGION_MAP_CINNABAR_ISLAND, - REGION_MAP_INDIGO_PLATEAU, - REGION_MAP_SAFFRON_CITY, - REGION_MAP_ROUTE_4, - REGION_MAP_ROUTE_10, - REGION_MAP_ROUTE_1, - REGION_MAP_ROUTE_2, - REGION_MAP_ROUTE_3, - REGION_MAP_ROUTE_4_2, - REGION_MAP_ROUTE_5, - REGION_MAP_ROUTE_6, - REGION_MAP_ROUTE_7, - REGION_MAP_ROUTE_8, - REGION_MAP_ROUTE_9, - REGION_MAP_ROUTE_10_2, - REGION_MAP_ROUTE_11, - REGION_MAP_ROUTE_12, - REGION_MAP_ROUTE_13, - REGION_MAP_ROUTE_14, - REGION_MAP_ROUTE_15, - REGION_MAP_ROUTE_16, - REGION_MAP_ROUTE_17, - REGION_MAP_ROUTE_18, - REGION_MAP_ROUTE_19, - REGION_MAP_ROUTE_20, - REGION_MAP_ROUTE_21, - REGION_MAP_ROUTE_22, - REGION_MAP_ROUTE_23, - REGION_MAP_ROUTE_24, - REGION_MAP_ROUTE_25, - REGION_MAP_VIRIDIAN_FOREST, - REGION_MAP_MT_MOON, - REGION_MAP_S_S_ANNE, - REGION_MAP_UNDERGROUND_PATH, - REGION_MAP_UNDERGROUND_PATH_2, - REGION_MAP_DIGLETTS_CAVE, - REGION_MAP_KANTO_VICTORY_ROAD, - REGION_MAP_ROCKET_HIDEOUT, - REGION_MAP_SILPH_CO, - REGION_MAP_POKEMON_MANSION, - REGION_MAP_KANTO_SAFARI_ZONE, - REGION_MAP_POKEMON_LEAGUE, - REGION_MAP_ROCK_TUNNEL, - REGION_MAP_SEAFOAM_ISLANDS, - REGION_MAP_POKEMON_TOWER, - REGION_MAP_CERULEAN_CAVE, - REGION_MAP_POWER_PLANT, - REGION_MAP_ONE_ISLAND, - REGION_MAP_TWO_ISLAND, - REGION_MAP_THREE_ISLAND, - REGION_MAP_FOUR_ISLAND, - REGION_MAP_FIVE_ISLAND, - REGION_MAP_SEVEN_ISLAND, - REGION_MAP_SIX_ISLAND, - REGION_MAP_KINDLE_ROAD, - REGION_MAP_TREASURE_BEACH, - REGION_MAP_CAPE_BRINK, - REGION_MAP_BOND_BRIDGE, - REGION_MAP_THREE_ISLE_PORT, - REGION_MAP_SEVII_ISLE_6, - REGION_MAP_SEVII_ISLE_7, - REGION_MAP_SEVII_ISLE_8, - REGION_MAP_SEVII_ISLE_9, - REGION_MAP_RESORT_GORGEOUS, - REGION_MAP_WATER_LABYRINTH, - REGION_MAP_FIVE_ISLE_MEADOW, - REGION_MAP_MEMORIAL_PILLAR, - REGION_MAP_OUTCAST_ISLAND, - REGION_MAP_GREEN_PATH, - REGION_MAP_WATER_PATH, - REGION_MAP_RUIN_VALLEY, - REGION_MAP_TRAINER_TOWER, - REGION_MAP_CANYON_ENTRANCE, - REGION_MAP_SEVAULT_CANYON, - REGION_MAP_TANOBY_RUINS, - REGION_MAP_SEVII_ISLE_22, - REGION_MAP_SEVII_ISLE_23, - REGION_MAP_SEVII_ISLE_24, - REGION_MAP_NAVEL_ROCK, - REGION_MAP_MT_EMBER, - REGION_MAP_BERRY_FOREST, - REGION_MAP_ICEFALL_CAVE, - REGION_MAP_ROCKET_WAREHOUSE, - REGION_MAP_TRAINER_TOWER_2, - REGION_MAP_DOTTED_HOLE, - REGION_MAP_LOST_CAVE, - REGION_MAP_PATTERN_BUSH, - REGION_MAP_ALTERING_CAVE, - REGION_MAP_TANOBY_CHAMBERS, - REGION_MAP_THREE_ISLE_PATH, - REGION_MAP_TANOBY_KEY, - REGION_MAP_BIRTH_ISLAND, - REGION_MAP_MONEAN_CHAMBER, - REGION_MAP_LIPTOO_CHAMBER, - REGION_MAP_WEEPTH_CHAMBER, - REGION_MAP_DILFORD_CHAMBER, - REGION_MAP_SCUFIB_CHAMBER, - REGION_MAP_RIXY_CHAMBER, - REGION_MAP_VIAPOIS_CHAMBER, - REGION_MAP_EMBER_SPA, - REGION_MAP_SPECIAL_AREA, - REGION_MAP_AQUA_HIDEOUT, - REGION_MAP_MAGMA_HIDEOUT, - REGION_MAP_MIRAGE_TOWER, - REGION_MAP_BIRTH_ISLAND_2, - REGION_MAP_FARAWAY_ISLAND, - REGION_MAP_ARTISAN_CAVE, - REGION_MAP_MARINE_CAVE, - REGION_MAP_UNDERWATER_MARINE_CAVE, - REGION_MAP_TERRA_CAVE, - REGION_MAP_UNDERWATER_TERRA_CAVE, - REGION_MAP_UNDERWATER_UNK1, - REGION_MAP_UNDERWATER_UNK2, - REGION_MAP_DESERT_UNDERPASS, - REGION_MAP_ALTERING_CAVE_2, - REGION_MAP_NAVEL_ROCK2, - REGION_MAP_TRAINER_HILL + MAPSEC_LITTLEROOT_TOWN, + MAPSEC_OLDALE_TOWN, + MAPSEC_DEWFORD_TOWN, + MAPSEC_LAVARIDGE_TOWN, + MAPSEC_FALLARBOR_TOWN, + MAPSEC_VERDANTURF_TOWN, + MAPSEC_PACIFIDLOG_TOWN, + MAPSEC_PETALBURG_CITY, + MAPSEC_SLATEPORT_CITY, + MAPSEC_MAUVILLE_CITY, + MAPSEC_RUSTBORO_CITY, + MAPSEC_FORTREE_CITY, + MAPSEC_LILYCOVE_CITY, + MAPSEC_MOSSDEEP_CITY, + MAPSEC_SOOTOPOLIS_CITY, + MAPSEC_EVER_GRANDE_CITY, + MAPSEC_ROUTE_101, + MAPSEC_ROUTE_102, + MAPSEC_ROUTE_103, + MAPSEC_ROUTE_104, + MAPSEC_ROUTE_105, + MAPSEC_ROUTE_106, + MAPSEC_ROUTE_107, + MAPSEC_ROUTE_108, + MAPSEC_ROUTE_109, + MAPSEC_ROUTE_110, + MAPSEC_ROUTE_111, + MAPSEC_ROUTE_112, + MAPSEC_ROUTE_113, + MAPSEC_ROUTE_114, + MAPSEC_ROUTE_115, + MAPSEC_ROUTE_116, + MAPSEC_ROUTE_117, + MAPSEC_ROUTE_118, + MAPSEC_ROUTE_119, + MAPSEC_ROUTE_120, + MAPSEC_ROUTE_121, + MAPSEC_ROUTE_122, + MAPSEC_ROUTE_123, + MAPSEC_ROUTE_124, + MAPSEC_ROUTE_125, + MAPSEC_ROUTE_126, + MAPSEC_ROUTE_127, + MAPSEC_ROUTE_128, + MAPSEC_ROUTE_129, + MAPSEC_ROUTE_130, + MAPSEC_ROUTE_131, + MAPSEC_ROUTE_132, + MAPSEC_ROUTE_133, + MAPSEC_ROUTE_134, + MAPSEC_UNDERWATER_124, + MAPSEC_UNDERWATER_125, + MAPSEC_UNDERWATER_126, + MAPSEC_UNDERWATER_127, + MAPSEC_UNDERWATER_128, + MAPSEC_GRANITE_CAVE, + MAPSEC_MT_CHIMNEY, + MAPSEC_SAFARI_ZONE, + MAPSEC_BATTLE_FRONTIER, + MAPSEC_PETALBURG_WOODS, + MAPSEC_RUSTURF_TUNNEL, + MAPSEC_ABANDONED_SHIP, + MAPSEC_NEW_MAUVILLE, + MAPSEC_METEOR_FALLS, + MAPSEC_METEOR_FALLS2, + MAPSEC_MT_PYRE, + MAPSEC_AQUA_HIDEOUT_OLD, + MAPSEC_SHOAL_CAVE, + MAPSEC_SEAFLOOR_CAVERN, + MAPSEC_UNDERWATER, + MAPSEC_VICTORY_ROAD, + MAPSEC_MIRAGE_ISLAND, + MAPSEC_CAVE_OF_ORIGIN, + MAPSEC_SOUTHERN_ISLAND, + MAPSEC_FIERY_PATH, + MAPSEC_FIERY_PATH2, + MAPSEC_JAGGED_PASS, + MAPSEC_JAGGED_PASS2, + MAPSEC_SEALED_CHAMBER, + MAPSEC_UNDERWATER_SEALED_CHAMBER, + MAPSEC_SCORCHED_SLAB, + MAPSEC_ISLAND_CAVE, + MAPSEC_DESERT_RUINS, + MAPSEC_ANCIENT_TOMB, + MAPSEC_INSIDE_OF_TRUCK, + MAPSEC_SKY_PILLAR, + MAPSEC_SECRET_BASE, + MAPSEC_NONE, + MAPSEC_PALLET_TOWN, + MAPSEC_VIRIDIAN_CITY, + MAPSEC_PEWTER_CITY, + MAPSEC_CERULEAN_CITY, + MAPSEC_LAVENDER_TOWN, + MAPSEC_VERMILION_CITY, + MAPSEC_CELADON_CITY, + MAPSEC_FUCHSIA_CITY, + MAPSEC_CINNABAR_ISLAND, + MAPSEC_INDIGO_PLATEAU, + MAPSEC_SAFFRON_CITY, + MAPSEC_ROUTE_4, + MAPSEC_ROUTE_10, + MAPSEC_ROUTE_1, + MAPSEC_ROUTE_2, + MAPSEC_ROUTE_3, + MAPSEC_ROUTE_4_2, + MAPSEC_ROUTE_5, + MAPSEC_ROUTE_6, + MAPSEC_ROUTE_7, + MAPSEC_ROUTE_8, + MAPSEC_ROUTE_9, + MAPSEC_ROUTE_10_2, + MAPSEC_ROUTE_11, + MAPSEC_ROUTE_12, + MAPSEC_ROUTE_13, + MAPSEC_ROUTE_14, + MAPSEC_ROUTE_15, + MAPSEC_ROUTE_16, + MAPSEC_ROUTE_17, + MAPSEC_ROUTE_18, + MAPSEC_ROUTE_19, + MAPSEC_ROUTE_20, + MAPSEC_ROUTE_21, + MAPSEC_ROUTE_22, + MAPSEC_ROUTE_23, + MAPSEC_ROUTE_24, + MAPSEC_ROUTE_25, + MAPSEC_VIRIDIAN_FOREST, + MAPSEC_MT_MOON, + MAPSEC_S_S_ANNE, + MAPSEC_UNDERGROUND_PATH, + MAPSEC_UNDERGROUND_PATH_2, + MAPSEC_DIGLETTS_CAVE, + MAPSEC_KANTO_VICTORY_ROAD, + MAPSEC_ROCKET_HIDEOUT, + MAPSEC_SILPH_CO, + MAPSEC_POKEMON_MANSION, + MAPSEC_KANTO_SAFARI_ZONE, + MAPSEC_POKEMON_LEAGUE, + MAPSEC_ROCK_TUNNEL, + MAPSEC_SEAFOAM_ISLANDS, + MAPSEC_POKEMON_TOWER, + MAPSEC_CERULEAN_CAVE, + MAPSEC_POWER_PLANT, + MAPSEC_ONE_ISLAND, + MAPSEC_TWO_ISLAND, + MAPSEC_THREE_ISLAND, + MAPSEC_FOUR_ISLAND, + MAPSEC_FIVE_ISLAND, + MAPSEC_SEVEN_ISLAND, + MAPSEC_SIX_ISLAND, + MAPSEC_KINDLE_ROAD, + MAPSEC_TREASURE_BEACH, + MAPSEC_CAPE_BRINK, + MAPSEC_BOND_BRIDGE, + MAPSEC_THREE_ISLE_PORT, + MAPSEC_SEVII_ISLE_6, + MAPSEC_SEVII_ISLE_7, + MAPSEC_SEVII_ISLE_8, + MAPSEC_SEVII_ISLE_9, + MAPSEC_RESORT_GORGEOUS, + MAPSEC_WATER_LABYRINTH, + MAPSEC_FIVE_ISLE_MEADOW, + MAPSEC_MEMORIAL_PILLAR, + MAPSEC_OUTCAST_ISLAND, + MAPSEC_GREEN_PATH, + MAPSEC_WATER_PATH, + MAPSEC_RUIN_VALLEY, + MAPSEC_TRAINER_TOWER, + MAPSEC_CANYON_ENTRANCE, + MAPSEC_SEVAULT_CANYON, + MAPSEC_TANOBY_RUINS, + MAPSEC_SEVII_ISLE_22, + MAPSEC_SEVII_ISLE_23, + MAPSEC_SEVII_ISLE_24, + MAPSEC_NAVEL_ROCK, + MAPSEC_MT_EMBER, + MAPSEC_BERRY_FOREST, + MAPSEC_ICEFALL_CAVE, + MAPSEC_ROCKET_WAREHOUSE, + MAPSEC_TRAINER_TOWER_2, + MAPSEC_DOTTED_HOLE, + MAPSEC_LOST_CAVE, + MAPSEC_PATTERN_BUSH, + MAPSEC_ALTERING_CAVE, + MAPSEC_TANOBY_CHAMBERS, + MAPSEC_THREE_ISLE_PATH, + MAPSEC_TANOBY_KEY, + MAPSEC_BIRTH_ISLAND, + MAPSEC_MONEAN_CHAMBER, + MAPSEC_LIPTOO_CHAMBER, + MAPSEC_WEEPTH_CHAMBER, + MAPSEC_DILFORD_CHAMBER, + MAPSEC_SCUFIB_CHAMBER, + MAPSEC_RIXY_CHAMBER, + MAPSEC_VIAPOIS_CHAMBER, + MAPSEC_EMBER_SPA, + MAPSEC_SPECIAL_AREA, + MAPSEC_AQUA_HIDEOUT, + MAPSEC_MAGMA_HIDEOUT, + MAPSEC_MIRAGE_TOWER, + MAPSEC_BIRTH_ISLAND_2, + MAPSEC_FARAWAY_ISLAND, + MAPSEC_ARTISAN_CAVE, + MAPSEC_MARINE_CAVE, + MAPSEC_UNDERWATER_MARINE_CAVE, + MAPSEC_TERRA_CAVE, + MAPSEC_UNDERWATER_TERRA_CAVE, + MAPSEC_UNDERWATER_UNK1, + MAPSEC_UNDERWATER_UNK2, + MAPSEC_DESERT_UNDERPASS, + MAPSEC_ALTERING_CAVE_2, + MAPSEC_NAVEL_ROCK2, + MAPSEC_TRAINER_HILL }; // Exported RAM declarations -- cgit v1.2.3 From 929638f572ceba01ffd528eb024a2f124ca4224e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 29 Oct 2017 10:58:33 -0400 Subject: sub_8170290 --- include/region_map.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 236416812..5eeb3a95f 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -223,5 +223,10 @@ enum { // Exported ROM declarations void GetMapName(u8 *, u16, u16); +void sub_8122CDC(void *data, u8 argument); +void sub_8124288(u16 x, u16 y); +void sub_81240D4(u16 x, u16 y); +u8 sub_81230AC(void); +void sub_812305C(void); #endif //GUARD_REGION_MAP_H -- cgit v1.2.3 From 6e10e8caad9d6920c6a1451c0ec63edf529ce17a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 29 Oct 2017 11:05:42 -0400 Subject: sub_8170428 --- include/region_map.h | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 5eeb3a95f..20756404c 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -219,11 +219,66 @@ enum { MAPSEC_TRAINER_HILL }; +struct RegionMap { + u8 unk_00; + u8 unk_01; + bool8 unk_02; + u8 unk_03; + u8 mapSecName[0x14]; + u16 mapSecId; + u8 unk16; + u8 everGrandeCityArea; + u8 (*inputCallback)(void); + struct Sprite *cursorSprite; + struct Sprite *playerIconSprite; + s32 bg2x; + s32 bg2y; + u32 unk2C; // + u32 unk30; // Map rotation parameters + u32 unk34; // Likely a scrapped feature + u32 unk38; // + s32 unk3C; + s32 unk40; + s32 unk44; + s32 unk48; + s32 unk4C; + s32 unk50; + u16 cursorPosX; + u16 cursorPosY; + u16 cursorTileTag; + u16 cursorPaletteTag; + s16 scrollX; + s16 scrollY; + s16 unk60; + s16 unk62; + u16 unk64; + u16 unk66; + u16 unk68; + u16 unk6A; + u16 unk6C; + u16 unk6E; + u16 playerIconTileTag; + u16 playerIconPaletteTag; + u16 unk74; + u16 unk76; + bool8 zoomed; + u8 initStep; + s8 unk7A; + s8 cursorDeltaX; + s8 cursorDeltaY; + bool8 needUpdateVideoRegs; + bool8 blinkPlayerIcon; + bool8 playerIsInCave; + /*0x084*/ u8 filler80[0x100]; + /*0x184*/ u8 cursorSmallImage[0x100]; + /*0x284*/ u8 cursorLargeImage[0x600]; +}; // size = 0x884 + // Exported RAM declarations // Exported ROM declarations void GetMapName(u8 *, u16, u16); -void sub_8122CDC(void *data, u8 argument); +void sub_8122CDC(struct RegionMap *regionMap, u8 argument); void sub_8124288(u16 x, u16 y); void sub_81240D4(u16 x, u16 y); u8 sub_81230AC(void); -- cgit v1.2.3 From 76bb397e83ca5d8b4f7a501f2517e83e4a9eccec Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 29 Oct 2017 19:33:53 -0400 Subject: region_map.c through sub_8122CF8 --- include/region_map.h | 75 +++++++++++++++------------------------------------- 1 file changed, 22 insertions(+), 53 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 20756404c..478a4faaa 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -219,66 +219,35 @@ enum { MAPSEC_TRAINER_HILL }; +struct UnkStruct_8122CF8 { + u32 unk_0_0:2; + u32 unk_0_2:2; + u32 unk_0_4:5; +}; + struct RegionMap { - u8 unk_00; - u8 unk_01; - bool8 unk_02; - u8 unk_03; - u8 mapSecName[0x14]; - u16 mapSecId; - u8 unk16; - u8 everGrandeCityArea; - u8 (*inputCallback)(void); - struct Sprite *cursorSprite; - struct Sprite *playerIconSprite; - s32 bg2x; - s32 bg2y; - u32 unk2C; // - u32 unk30; // Map rotation parameters - u32 unk34; // Likely a scrapped feature - u32 unk38; // - s32 unk3C; - s32 unk40; - s32 unk44; - s32 unk48; - s32 unk4C; - s32 unk50; - u16 cursorPosX; - u16 cursorPosY; - u16 cursorTileTag; - u16 cursorPaletteTag; - s16 scrollX; - s16 scrollY; - s16 unk60; - s16 unk62; - u16 unk64; - u16 unk66; - u16 unk68; - u16 unk6A; - u16 unk6C; - u16 unk6E; - u16 playerIconTileTag; - u16 playerIconPaletteTag; - u16 unk74; - u16 unk76; - bool8 zoomed; - u8 initStep; - s8 unk7A; - s8 cursorDeltaX; - s8 cursorDeltaY; - bool8 needUpdateVideoRegs; - bool8 blinkPlayerIcon; - bool8 playerIsInCave; - /*0x084*/ u8 filler80[0x100]; - /*0x184*/ u8 cursorSmallImage[0x100]; - /*0x284*/ u8 cursorLargeImage[0x600]; + /*0x000*/ u8 unk_00; + /*0x001*/ u8 unk_01; + /*0x002*/ bool8 unk_02; + /*0x003*/ u8 unk_03; + /*0x004*/ u8 mapSecName[0x14]; + /*0x018*/ u8 (*inputCallback)(void); + /*0x01c*/ u8 filler_01c[0x5c]; + /*0x078*/ u8 unk_078; + /*0x079*/ bool8 unk_079; + /*0x07a*/ u8 filler_07a[6]; + /*0x080*/ u8 unk_080; + /*0x081*/ u8 unk_081; + /*0x082*/ u8 unk_082; + /*0x083*/ bool8 unk_083; + /*0x084*/ u8 filler_084[0x800]; }; // size = 0x884 // Exported RAM declarations // Exported ROM declarations void GetMapName(u8 *, u16, u16); -void sub_8122CDC(struct RegionMap *regionMap, u8 argument); +void sub_8122CDC(struct RegionMap *regionMap, bool8 argument); void sub_8124288(u16 x, u16 y); void sub_81240D4(u16 x, u16 y); u8 sub_81230AC(void); -- cgit v1.2.3 From 6f68e5af95295d10b8dc956d6c621999002377de Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 29 Oct 2017 20:49:49 -0400 Subject: sub_8122DB0 --- include/region_map.h | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 478a4faaa..316b6f3a1 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -226,28 +226,45 @@ struct UnkStruct_8122CF8 { }; struct RegionMap { - /*0x000*/ u8 unk_00; - /*0x001*/ u8 unk_01; - /*0x002*/ bool8 unk_02; - /*0x003*/ u8 unk_03; + /*0x000*/ u16 mapSecId; + /*0x002*/ u8 unk_002; + /*0x003*/ u8 unk_003; /*0x004*/ u8 mapSecName[0x14]; /*0x018*/ u8 (*inputCallback)(void); - /*0x01c*/ u8 filler_01c[0x5c]; + /*0x01c*/ u32 unk_01c; + /*0x020*/ u32 unk_020; + /*0x024*/ u8 filler_024[0x30]; + /*0x054*/ u16 unk_054; + /*0x056*/ u16 unk_056; + /*0x058*/ u8 filler_058[0x4]; + /*0x05c*/ s16 unk_05c; + /*0x05e*/ s16 unk_05e; + /*0x060*/ u8 filler_060[0x4]; + /*0x064*/ u16 unk_064; + /*0x066*/ u16 unk_066; + /*0x068*/ u8 filler_068[0xc]; + /*0x074*/ u16 unk_074; + /*0x076*/ u16 unk_076; /*0x078*/ u8 unk_078; - /*0x079*/ bool8 unk_079; - /*0x07a*/ u8 filler_07a[6]; + /*0x079*/ u8 unk_079; + /*0x07a*/ u8 unk_07a; + /*0x07b*/ u8 filler_07b[3]; + /*0x07e*/ u8 unk_07e; + /*0x07f*/ u8 filler_07f[1]; /*0x080*/ u8 unk_080; /*0x081*/ u8 unk_081; /*0x082*/ u8 unk_082; /*0x083*/ bool8 unk_083; - /*0x084*/ u8 filler_084[0x800]; + /*0x084*/ u8 filler_084[0x100]; + /*0x184*/ u8 unk_184[0x100]; + /*0x284*/ u8 unk_284[0x600]; }; // size = 0x884 // Exported RAM declarations // Exported ROM declarations void GetMapName(u8 *, u16, u16); -void sub_8122CDC(struct RegionMap *regionMap, bool8 argument); +void sub_8122CDC(struct RegionMap *regionMap, u8 argument); void sub_8124288(u16 x, u16 y); void sub_81240D4(u16 x, u16 y); u8 sub_81230AC(void); -- cgit v1.2.3 From a9afb8b13082fbc8090a6f8c14a6e6489d317998 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 29 Oct 2017 20:58:53 -0400 Subject: through sub_81230AC --- include/region_map.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 316b6f3a1..dfcfbc913 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -231,18 +231,21 @@ struct RegionMap { /*0x003*/ u8 unk_003; /*0x004*/ u8 mapSecName[0x14]; /*0x018*/ u8 (*inputCallback)(void); - /*0x01c*/ u32 unk_01c; - /*0x020*/ u32 unk_020; + /*0x01c*/ struct Sprite *unk_01c; + /*0x020*/ struct Sprite *unk_020; /*0x024*/ u8 filler_024[0x30]; /*0x054*/ u16 unk_054; /*0x056*/ u16 unk_056; - /*0x058*/ u8 filler_058[0x4]; + /*0x058*/ u16 unk_058; + /*0x05a*/ u16 unk_05a; /*0x05c*/ s16 unk_05c; /*0x05e*/ s16 unk_05e; /*0x060*/ u8 filler_060[0x4]; /*0x064*/ u16 unk_064; /*0x066*/ u16 unk_066; - /*0x068*/ u8 filler_068[0xc]; + /*0x068*/ u8 filler_068[0x8]; + /*0x070*/ u16 unk_070; + /*0x072*/ u16 unk_072; /*0x074*/ u16 unk_074; /*0x076*/ u16 unk_076; /*0x078*/ u8 unk_078; -- cgit v1.2.3 From f07307dc73ef7e7a04c9c7091428a73303f8714c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 29 Oct 2017 21:14:53 -0400 Subject: sub_81230C4 --- include/region_map.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index dfcfbc913..79e217f1f 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -250,10 +250,12 @@ struct RegionMap { /*0x076*/ u16 unk_076; /*0x078*/ u8 unk_078; /*0x079*/ u8 unk_079; - /*0x07a*/ u8 unk_07a; - /*0x07b*/ u8 filler_07b[3]; + /*0x07a*/ s8 unk_07a; + /*0x07b*/ s8 unk_07b; + /*0x07c*/ u8 unk_07c; + /*0x07d*/ u8 unk_07d; /*0x07e*/ u8 unk_07e; - /*0x07f*/ u8 filler_07f[1]; + /*0x07f*/ u8 unk_07f; /*0x080*/ u8 unk_080; /*0x081*/ u8 unk_081; /*0x082*/ u8 unk_082; @@ -266,6 +268,8 @@ struct RegionMap { // Exported RAM declarations // Exported ROM declarations +void sub_8122CF8(struct RegionMap *regionMap, struct UnkStruct_8122CF8 *arg1, bool8 arg2); +bool8 sub_8122DB0(void); void GetMapName(u8 *, u16, u16); void sub_8122CDC(struct RegionMap *regionMap, u8 argument); void sub_8124288(u16 x, u16 y); -- cgit v1.2.3 From 8d35bf1c9e93c11f0e8d6e4d7933e3b1761072a6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 29 Oct 2017 21:31:38 -0400 Subject: _swiopen --- include/region_map.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 79e217f1f..1f1f218f5 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -252,7 +252,7 @@ struct RegionMap { /*0x079*/ u8 unk_079; /*0x07a*/ s8 unk_07a; /*0x07b*/ s8 unk_07b; - /*0x07c*/ u8 unk_07c; + /*0x07c*/ s8 unk_07c; /*0x07d*/ u8 unk_07d; /*0x07e*/ u8 unk_07e; /*0x07f*/ u8 unk_07f; @@ -265,6 +265,16 @@ struct RegionMap { /*0x284*/ u8 unk_284[0x600]; }; // size = 0x884 +enum +{ + INPUT_EVENT_NONE, + INPUT_EVENT_MOVE_START, + INPUT_EVENT_MOVE_CONT, + INPUT_EVENT_MOVE_END, + INPUT_EVENT_A_BUTTON, + INPUT_EVENT_B_BUTTON, +}; + // Exported RAM declarations // Exported ROM declarations -- cgit v1.2.3 From 16c5a58f352f8daaf59e19e0dda93a3651a71ed2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 29 Oct 2017 21:38:45 -0400 Subject: sub_8123254 --- include/region_map.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 1f1f218f5..e9919e59e 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -243,7 +243,10 @@ struct RegionMap { /*0x060*/ u8 filler_060[0x4]; /*0x064*/ u16 unk_064; /*0x066*/ u16 unk_066; - /*0x068*/ u8 filler_068[0x8]; + /*0x068*/ s16 unk_068; + /*0x06a*/ s16 unk_06a; + /*0x06c*/ u16 unk_06c; + /*0x06e*/ u8 filler_06e[2]; /*0x070*/ u16 unk_070; /*0x072*/ u16 unk_072; /*0x074*/ u16 unk_074; -- cgit v1.2.3 From 159728469472464c1aaaf0c8e154dcab36acbac5 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 29 Oct 2017 22:05:15 -0400 Subject: sub_8123334 --- include/region_map.h | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index e9919e59e..e2cac942c 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -231,41 +231,41 @@ struct RegionMap { /*0x003*/ u8 unk_003; /*0x004*/ u8 mapSecName[0x14]; /*0x018*/ u8 (*inputCallback)(void); - /*0x01c*/ struct Sprite *unk_01c; - /*0x020*/ struct Sprite *unk_020; + /*0x01c*/ struct Sprite *cursorSprite; + /*0x020*/ struct Sprite *playerIconSprite; /*0x024*/ u8 filler_024[0x30]; - /*0x054*/ u16 unk_054; - /*0x056*/ u16 unk_056; - /*0x058*/ u16 unk_058; - /*0x05a*/ u16 unk_05a; - /*0x05c*/ s16 unk_05c; - /*0x05e*/ s16 unk_05e; + /*0x054*/ u16 cursorPosX; + /*0x056*/ u16 cursorPosY; + /*0x058*/ u16 cursorTileTag; + /*0x05a*/ u16 cursorPaletteTag; + /*0x05c*/ s16 scrollX; + /*0x05e*/ s16 scrollY; /*0x060*/ u8 filler_060[0x4]; /*0x064*/ u16 unk_064; /*0x066*/ u16 unk_066; - /*0x068*/ s16 unk_068; - /*0x06a*/ s16 unk_06a; - /*0x06c*/ u16 unk_06c; + /*0x068*/ s16 zoomedCursorDeltaY; + /*0x06a*/ s16 zoomedCursorDeltaX; + /*0x06c*/ u16 zoomedCursorMovementFrameCounter; /*0x06e*/ u8 filler_06e[2]; - /*0x070*/ u16 unk_070; - /*0x072*/ u16 unk_072; + /*0x070*/ u16 playerIconTileTag; + /*0x072*/ u16 playerIconPaletteTag; /*0x074*/ u16 unk_074; /*0x076*/ u16 unk_076; - /*0x078*/ u8 unk_078; - /*0x079*/ u8 unk_079; - /*0x07a*/ s8 unk_07a; - /*0x07b*/ s8 unk_07b; - /*0x07c*/ s8 unk_07c; - /*0x07d*/ u8 unk_07d; - /*0x07e*/ u8 unk_07e; - /*0x07f*/ u8 unk_07f; - /*0x080*/ u8 unk_080; + /*0x078*/ bool8 zoomed; + /*0x079*/ u8 initStep; + /*0x07a*/ s8 cursorMovementFrameCounter; + /*0x07b*/ s8 cursorDeltaX; + /*0x07c*/ s8 cursorDeltaY; + /*0x07d*/ bool8 unk_07d; + /*0x07e*/ bool8 blinkPlayerIcon; + /*0x07f*/ bool8 unk_07f; + /*0x080*/ u8 bgNum; /*0x081*/ u8 unk_081; /*0x082*/ u8 unk_082; /*0x083*/ bool8 unk_083; /*0x084*/ u8 filler_084[0x100]; - /*0x184*/ u8 unk_184[0x100]; - /*0x284*/ u8 unk_284[0x600]; + /*0x184*/ u8 cursorSmallImage[0x100]; + /*0x284*/ u8 cursorLargeImage[0x600]; }; // size = 0x884 enum -- cgit v1.2.3 From 35a6d2046a65cfa9532d5c303c1b1b33c39e1687 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 29 Oct 2017 23:08:06 -0400 Subject: sub_8123418 --- include/region_map.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index e2cac942c..2269d21fa 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -233,20 +233,27 @@ struct RegionMap { /*0x018*/ u8 (*inputCallback)(void); /*0x01c*/ struct Sprite *cursorSprite; /*0x020*/ struct Sprite *playerIconSprite; - /*0x024*/ u8 filler_024[0x30]; + /*0x024*/ u8 filler_024[0x18]; + /*0x03c*/ s32 unk_03c; + /*0x040*/ s32 unk_040; + /*0x044*/ s32 unk_044; + /*0x048*/ s32 unk_048; + /*0x04c*/ s32 unk_04c; + /*0x050*/ s32 unk_050; /*0x054*/ u16 cursorPosX; /*0x056*/ u16 cursorPosY; /*0x058*/ u16 cursorTileTag; /*0x05a*/ u16 cursorPaletteTag; /*0x05c*/ s16 scrollX; /*0x05e*/ s16 scrollY; - /*0x060*/ u8 filler_060[0x4]; + /*0x060*/ s16 unk_060; + /*0x062*/ s16 unk_062; /*0x064*/ u16 unk_064; /*0x066*/ u16 unk_066; /*0x068*/ s16 zoomedCursorDeltaY; /*0x06a*/ s16 zoomedCursorDeltaX; /*0x06c*/ u16 zoomedCursorMovementFrameCounter; - /*0x06e*/ u8 filler_06e[2]; + /*0x06e*/ u16 unk_06e; /*0x070*/ u16 playerIconTileTag; /*0x072*/ u16 playerIconPaletteTag; /*0x074*/ u16 unk_074; -- cgit v1.2.3 From 474df271368917b79071ab101c36857fcab72c4b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 30 Oct 2017 08:39:39 -0400 Subject: through CalcZoomScrollParams --- include/region_map.h | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 2269d21fa..92bf0946e 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -1,6 +1,8 @@ #ifndef GUARD_REGION_MAP_H #define GUARD_REGION_MAP_H +#include "bg.h" + // Exported type declarations enum { @@ -219,12 +221,6 @@ enum { MAPSEC_TRAINER_HILL }; -struct UnkStruct_8122CF8 { - u32 unk_0_0:2; - u32 unk_0_2:2; - u32 unk_0_4:5; -}; - struct RegionMap { /*0x000*/ u16 mapSecId; /*0x002*/ u8 unk_002; @@ -233,7 +229,12 @@ struct RegionMap { /*0x018*/ u8 (*inputCallback)(void); /*0x01c*/ struct Sprite *cursorSprite; /*0x020*/ struct Sprite *playerIconSprite; - /*0x024*/ u8 filler_024[0x18]; + /*0x024*/ s32 bg2x; + /*0x028*/ s32 bg2y; + /*0x02c*/ u32 bg2pa; + /*0x030*/ u32 bg2pb; + /*0x034*/ u32 bg2pc; + /*0x038*/ u32 bg2pd; /*0x03c*/ s32 unk_03c; /*0x040*/ s32 unk_040; /*0x044*/ s32 unk_044; @@ -263,13 +264,13 @@ struct RegionMap { /*0x07a*/ s8 cursorMovementFrameCounter; /*0x07b*/ s8 cursorDeltaX; /*0x07c*/ s8 cursorDeltaY; - /*0x07d*/ bool8 unk_07d; + /*0x07d*/ bool8 needUpdateVideoRegs; /*0x07e*/ bool8 blinkPlayerIcon; /*0x07f*/ bool8 unk_07f; /*0x080*/ u8 bgNum; - /*0x081*/ u8 unk_081; - /*0x082*/ u8 unk_082; - /*0x083*/ bool8 unk_083; + /*0x081*/ u8 charBaseIdx; + /*0x082*/ u8 mapBaseIdx; + /*0x083*/ bool8 bgManaged; /*0x084*/ u8 filler_084[0x100]; /*0x184*/ u8 cursorSmallImage[0x100]; /*0x284*/ u8 cursorLargeImage[0x600]; @@ -288,13 +289,13 @@ enum // Exported RAM declarations // Exported ROM declarations -void sub_8122CF8(struct RegionMap *regionMap, struct UnkStruct_8122CF8 *arg1, bool8 arg2); +void sub_8122CF8(struct RegionMap *regionMap, struct BgTemplate *template, bool8 zoomed); bool8 sub_8122DB0(void); void GetMapName(u8 *, u16, u16); -void sub_8122CDC(struct RegionMap *regionMap, u8 argument); +void InitRegionMap(struct RegionMap *regionMap, u8 argument); void sub_8124288(u16 x, u16 y); -void sub_81240D4(u16 x, u16 y); +void CreateRegionMapCursor(u16 x, u16 y); u8 sub_81230AC(void); -void sub_812305C(void); +void FreeRegionMapIconResources(void); #endif //GUARD_REGION_MAP_H -- cgit v1.2.3 From f6a55433a2d93898b03e3ee3a65a2061ceda6a9a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 30 Oct 2017 08:46:36 -0400 Subject: through sub_81237B4 --- include/region_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 92bf0946e..eb8bb3222 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -232,8 +232,8 @@ struct RegionMap { /*0x024*/ s32 bg2x; /*0x028*/ s32 bg2y; /*0x02c*/ u32 bg2pa; - /*0x030*/ u32 bg2pb; /*0x034*/ u32 bg2pc; + /*0x030*/ u32 bg2pb; /*0x038*/ u32 bg2pd; /*0x03c*/ s32 unk_03c; /*0x040*/ s32 unk_040; -- cgit v1.2.3 From c324722987e48fa43fd4bad81555b22439e3e932 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 30 Oct 2017 08:58:43 -0400 Subject: through GetRegionMapSectionIdAt --- include/region_map.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index eb8bb3222..b784e26ec 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -218,7 +218,8 @@ enum { MAPSEC_DESERT_UNDERPASS, MAPSEC_ALTERING_CAVE_2, MAPSEC_NAVEL_ROCK2, - MAPSEC_TRAINER_HILL + MAPSEC_TRAINER_HILL, + MAPSEC_NONE2 }; struct RegionMap { -- cgit v1.2.3 From 525b17a110ee0099391eb91d9c99b4a6b88e46d8 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 30 Oct 2017 21:08:28 -0400 Subject: sub_81238AC --- include/region_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index b784e26ec..3bb836fa1 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -267,7 +267,7 @@ struct RegionMap { /*0x07c*/ s8 cursorDeltaY; /*0x07d*/ bool8 needUpdateVideoRegs; /*0x07e*/ bool8 blinkPlayerIcon; - /*0x07f*/ bool8 unk_07f; + /*0x07f*/ bool8 playerIsInCave; /*0x080*/ u8 bgNum; /*0x081*/ u8 charBaseIdx; /*0x082*/ u8 mapBaseIdx; -- cgit v1.2.3 From 7b6792230a770dd67c94a3b34aecba87ad9a05db Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 30 Oct 2017 21:34:19 -0400 Subject: sub_8123EB4 --- include/region_map.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 3bb836fa1..cdec23e7a 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -224,7 +224,7 @@ enum { struct RegionMap { /*0x000*/ u16 mapSecId; - /*0x002*/ u8 unk_002; + /*0x002*/ u8 iconDrawType; /*0x003*/ u8 unk_003; /*0x004*/ u8 mapSecName[0x14]; /*0x018*/ u8 (*inputCallback)(void); @@ -287,16 +287,25 @@ enum INPUT_EVENT_B_BUTTON, }; +enum { + MAPSECTYPE_NONE, + MAPSECTYPE_PLAIN, + MAPSECTYPE_CITY_CANFLY, + MAPSECTYPE_CITY_CANTFLY, + MAPSECTYPE_BATTLE_FRONTIER +}; + // Exported RAM declarations // Exported ROM declarations void sub_8122CF8(struct RegionMap *regionMap, struct BgTemplate *template, bool8 zoomed); bool8 sub_8122DB0(void); -void GetMapName(u8 *, u16, u16); void InitRegionMap(struct RegionMap *regionMap, u8 argument); -void sub_8124288(u16 x, u16 y); -void CreateRegionMapCursor(u16 x, u16 y); u8 sub_81230AC(void); void FreeRegionMapIconResources(void); +u16 sub_8123E9C(u16 x, u16 y); +void GetMapName(u8 *, u16, u16); +void sub_8124288(u16 x, u16 y); +void CreateRegionMapCursor(u16 x, u16 y); #endif //GUARD_REGION_MAP_H -- cgit v1.2.3 From 4db83e00971029fe97282496f76432e3c88d1ba7 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 30 Oct 2017 22:20:09 -0400 Subject: through sub_8123F9C --- include/region_map.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index cdec23e7a..9399328b5 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -300,6 +300,7 @@ enum { // Exported ROM declarations void sub_8122CF8(struct RegionMap *regionMap, struct BgTemplate *template, bool8 zoomed); bool8 sub_8122DB0(void); +void UpdateRegionMapVideoRegs(void); void InitRegionMap(struct RegionMap *regionMap, u8 argument); u8 sub_81230AC(void); void FreeRegionMapIconResources(void); -- cgit v1.2.3 From 853ced668731a5107be87bbe69aa8d1891504865 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 30 Oct 2017 22:35:28 -0400 Subject: sub_8123FB0 --- include/region_map.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 9399328b5..428ad17c2 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -93,7 +93,7 @@ enum { MAPSEC_INSIDE_OF_TRUCK, MAPSEC_SKY_PILLAR, MAPSEC_SECRET_BASE, - MAPSEC_NONE, + MAPSEC_UNK_0x57, MAPSEC_PALLET_TOWN, MAPSEC_VIRIDIAN_CITY, MAPSEC_PEWTER_CITY, @@ -219,7 +219,7 @@ enum { MAPSEC_ALTERING_CAVE_2, MAPSEC_NAVEL_ROCK2, MAPSEC_TRAINER_HILL, - MAPSEC_NONE2 + MAPSEC_NONE }; struct RegionMap { @@ -250,8 +250,8 @@ struct RegionMap { /*0x05e*/ s16 scrollY; /*0x060*/ s16 unk_060; /*0x062*/ s16 unk_062; - /*0x064*/ u16 unk_064; - /*0x066*/ u16 unk_066; + /*0x064*/ u16 zoomedCursorPosX; + /*0x066*/ u16 zoomedCursorPosY; /*0x068*/ s16 zoomedCursorDeltaY; /*0x06a*/ s16 zoomedCursorDeltaX; /*0x06c*/ u16 zoomedCursorMovementFrameCounter; -- cgit v1.2.3 From 6cd0086bf95f570b2876961fdd71537a915ce897 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 31 Oct 2017 08:38:17 -0400 Subject: through CreateRegionMapCursor --- include/region_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 428ad17c2..17ba262eb 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -307,6 +307,6 @@ void FreeRegionMapIconResources(void); u16 sub_8123E9C(u16 x, u16 y); void GetMapName(u8 *, u16, u16); void sub_8124288(u16 x, u16 y); -void CreateRegionMapCursor(u16 x, u16 y); +void CreateRegionMapCursor(u16 tileTag, u16 paletteTag); #endif //GUARD_REGION_MAP_H -- cgit v1.2.3 From 7d7c8e8ba67801381e6bc49026f97231777b22f5 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 31 Oct 2017 19:40:35 -0400 Subject: sub_8124288 --- include/region_map.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 17ba262eb..272ffd5b5 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -258,8 +258,8 @@ struct RegionMap { /*0x06e*/ u16 unk_06e; /*0x070*/ u16 playerIconTileTag; /*0x072*/ u16 playerIconPaletteTag; - /*0x074*/ u16 unk_074; - /*0x076*/ u16 unk_076; + /*0x074*/ u16 playerIconSpritePosX; + /*0x076*/ u16 playerIconSpritePosY; /*0x078*/ bool8 zoomed; /*0x079*/ u8 initStep; /*0x07a*/ s8 cursorMovementFrameCounter; @@ -305,8 +305,9 @@ void InitRegionMap(struct RegionMap *regionMap, u8 argument); u8 sub_81230AC(void); void FreeRegionMapIconResources(void); u16 sub_8123E9C(u16 x, u16 y); -void GetMapName(u8 *, u16, u16); void sub_8124288(u16 x, u16 y); void CreateRegionMapCursor(u16 tileTag, u16 paletteTag); +bool32 sub_8124668(u16 mapSecId); +void GetMapName(u8 *, u16, u16); #endif //GUARD_REGION_MAP_H -- cgit v1.2.3 From 968ff8c3c8d6b5ee4b5af4b60489d8bf42bfd56f Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 31 Oct 2017 20:58:47 -0400 Subject: through UnhideRegionMapPlayerIcon --- include/region_map.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 272ffd5b5..bcd94ea9d 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -225,7 +225,7 @@ enum { struct RegionMap { /*0x000*/ u16 mapSecId; /*0x002*/ u8 iconDrawType; - /*0x003*/ u8 unk_003; + /*0x003*/ u8 posWithinMapSec; /*0x004*/ u8 mapSecName[0x14]; /*0x018*/ u8 (*inputCallback)(void); /*0x01c*/ struct Sprite *cursorSprite; @@ -303,9 +303,10 @@ bool8 sub_8122DB0(void); void UpdateRegionMapVideoRegs(void); void InitRegionMap(struct RegionMap *regionMap, u8 argument); u8 sub_81230AC(void); +bool8 sub_8123514(void); void FreeRegionMapIconResources(void); -u16 sub_8123E9C(u16 x, u16 y); -void sub_8124288(u16 x, u16 y); +u16 GetRegionMapSectionIdAt(u16 x, u16 y); +void CreateRegionMapPlayerIcon(u16 x, u16 y); void CreateRegionMapCursor(u16 tileTag, u16 paletteTag); bool32 sub_8124668(u16 mapSecId); void GetMapName(u8 *, u16, u16); -- cgit v1.2.3 From ef535b98b5e1384ce5f663a4ab4dfcb003fbe1c7 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 31 Oct 2017 21:51:11 -0400 Subject: through GetMapName --- include/region_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index bcd94ea9d..25f9b820a 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -309,6 +309,6 @@ u16 GetRegionMapSectionIdAt(u16 x, u16 y); void CreateRegionMapPlayerIcon(u16 x, u16 y); void CreateRegionMapCursor(u16 tileTag, u16 paletteTag); bool32 sub_8124668(u16 mapSecId); -void GetMapName(u8 *, u16, u16); +u8 *GetMapName(u8 *, u16, u16); #endif //GUARD_REGION_MAP_H -- cgit v1.2.3 From c3c08bf0379e172b8d7dd1b233947ebca83a3c3c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 31 Oct 2017 21:55:57 -0400 Subject: through sub_8124610 --- include/region_map.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 25f9b820a..5eb3901d0 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -93,7 +93,7 @@ enum { MAPSEC_INSIDE_OF_TRUCK, MAPSEC_SKY_PILLAR, MAPSEC_SECRET_BASE, - MAPSEC_UNK_0x57, + MAPSEC_SS_TIDAL, MAPSEC_PALLET_TOWN, MAPSEC_VIRIDIAN_CITY, MAPSEC_PEWTER_CITY, @@ -308,7 +308,7 @@ void FreeRegionMapIconResources(void); u16 GetRegionMapSectionIdAt(u16 x, u16 y); void CreateRegionMapPlayerIcon(u16 x, u16 y); void CreateRegionMapCursor(u16 tileTag, u16 paletteTag); -bool32 sub_8124668(u16 mapSecId); u8 *GetMapName(u8 *, u16, u16); +bool32 sub_8124668(u16 mapSecId); #endif //GUARD_REGION_MAP_H -- cgit v1.2.3 From f6d1e5a96506b5d370180682105e5ae2d5aed083 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 31 Oct 2017 22:05:23 -0400 Subject: through sub_8124668 --- include/region_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 5eb3901d0..1db811083 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -309,6 +309,6 @@ u16 GetRegionMapSectionIdAt(u16 x, u16 y); void CreateRegionMapPlayerIcon(u16 x, u16 y); void CreateRegionMapCursor(u16 tileTag, u16 paletteTag); u8 *GetMapName(u8 *, u16, u16); -bool32 sub_8124668(u16 mapSecId); +bool32 sub_8124668(u8 mapSecId); #endif //GUARD_REGION_MAP_H -- cgit v1.2.3 From 8c73c1450f67e4a0ee41583b1d2c8ccca6eb6925 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 31 Oct 2017 23:11:48 -0400 Subject: sub_8124904 --- include/region_map.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 1db811083..2df818a44 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -222,6 +222,24 @@ enum { MAPSEC_NONE }; +enum +{ + INPUT_EVENT_NONE, + INPUT_EVENT_MOVE_START, + INPUT_EVENT_MOVE_CONT, + INPUT_EVENT_MOVE_END, + INPUT_EVENT_A_BUTTON, + INPUT_EVENT_B_BUTTON, +}; + +enum { + MAPSECTYPE_NONE, + MAPSECTYPE_PLAIN, + MAPSECTYPE_CITY_CANFLY, + MAPSECTYPE_CITY_CANTFLY, + MAPSECTYPE_BATTLE_FRONTIER +}; + struct RegionMap { /*0x000*/ u16 mapSecId; /*0x002*/ u8 iconDrawType; @@ -277,24 +295,6 @@ struct RegionMap { /*0x284*/ u8 cursorLargeImage[0x600]; }; // size = 0x884 -enum -{ - INPUT_EVENT_NONE, - INPUT_EVENT_MOVE_START, - INPUT_EVENT_MOVE_CONT, - INPUT_EVENT_MOVE_END, - INPUT_EVENT_A_BUTTON, - INPUT_EVENT_B_BUTTON, -}; - -enum { - MAPSECTYPE_NONE, - MAPSECTYPE_PLAIN, - MAPSECTYPE_CITY_CANFLY, - MAPSECTYPE_CITY_CANTFLY, - MAPSECTYPE_BATTLE_FRONTIER -}; - // Exported RAM declarations // Exported ROM declarations -- cgit v1.2.3 From 4ff03f85a97f7048d46b1200f1daeea9ecedcc68 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 1 Nov 2017 22:07:30 -0400 Subject: Decompile data related to Emerald-specific areas --- include/region_map.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 2df818a44..90c81931a 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -60,7 +60,7 @@ enum { MAPSEC_UNDERWATER_125, MAPSEC_UNDERWATER_126, MAPSEC_UNDERWATER_127, - MAPSEC_UNDERWATER_128, + MAPSEC_UNDERWATER_SOOTOPOLIS, MAPSEC_GRANITE_CAVE, MAPSEC_MT_CHIMNEY, MAPSEC_SAFARI_ZONE, @@ -75,7 +75,7 @@ enum { MAPSEC_AQUA_HIDEOUT_OLD, MAPSEC_SHOAL_CAVE, MAPSEC_SEAFLOOR_CAVERN, - MAPSEC_UNDERWATER, + MAPSEC_UNDERWATER_128, MAPSEC_VICTORY_ROAD, MAPSEC_MIRAGE_ISLAND, MAPSEC_CAVE_OF_ORIGIN, @@ -214,7 +214,7 @@ enum { MAPSEC_TERRA_CAVE, MAPSEC_UNDERWATER_TERRA_CAVE, MAPSEC_UNDERWATER_UNK1, - MAPSEC_UNDERWATER_UNK2, + MAPSEC_UNDERWATER_129, MAPSEC_DESERT_UNDERPASS, MAPSEC_ALTERING_CAVE_2, MAPSEC_NAVEL_ROCK2, -- cgit v1.2.3 From 79609d52c8d8489b490589a1150b0754c0f61568 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 12 Nov 2017 21:39:44 -0500 Subject: MAPSEC_DYNAMIC --- include/region_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/region_map.h') diff --git a/include/region_map.h b/include/region_map.h index 90c81931a..91384d166 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -93,7 +93,7 @@ enum { MAPSEC_INSIDE_OF_TRUCK, MAPSEC_SKY_PILLAR, MAPSEC_SECRET_BASE, - MAPSEC_SS_TIDAL, + MAPSEC_DYNAMIC, MAPSEC_PALLET_TOWN, MAPSEC_VIRIDIAN_CITY, MAPSEC_PEWTER_CITY, -- cgit v1.2.3