From af2c39860d9f7fdb8f0d381f3520a407ce97e444 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Tue, 8 Jan 2019 13:40:11 -0600 Subject: [PATCH] Rename non-mapsec constants --- include/constants/region_map_sections.h | 8 +++---- src/map_name_popup.c | 32 ++++++++++++------------- src/pokemon_summary_screen.c | 8 +++---- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/include/constants/region_map_sections.h b/include/constants/region_map_sections.h index 12c894367..bba76939c 100644 --- a/include/constants/region_map_sections.h +++ b/include/constants/region_map_sections.h @@ -216,10 +216,10 @@ #define MAPSEC_TRAINER_HILL 0xD4 #define MAPSEC_NONE 0xD5 -#define MAPSEC_SPECIAL_EGG 0xFD -#define MAPSEC_IN_GAME_TRADE 0xFE -#define MAPSEC_FATEFUL_ENCOUNTER 0xFF +#define METLOC_SPECIAL_EGG 0xFD +#define METLOC_IN_GAME_TRADE 0xFE +#define METLOC_FATEFUL_ENCOUNTER 0xFF -#define MAPSEC_SUBTRACT_KANTO (MAPSEC_SPECIAL_AREA - MAPSEC_DYNAMIC) +#define KANTO_MAPSEC_COUNT (MAPSEC_SPECIAL_AREA - MAPSEC_DYNAMIC) #endif //GUARD_REGIONMAPSEC_H diff --git a/src/map_name_popup.c b/src/map_name_popup.c index ab52cb37e..c13747006 100644 --- a/src/map_name_popup.c +++ b/src/map_name_popup.c @@ -157,22 +157,22 @@ static const u8 gRegionMapSectionId_To_PopUpThemeIdMapping[] = [MAPSEC_SKY_PILLAR] = MAPPOPUP_THEME_STONE, [MAPSEC_SECRET_BASE] = MAPPOPUP_THEME_STONE, [MAPSEC_DYNAMIC] = MAPPOPUP_THEME_MARBLE, - [MAPSEC_AQUA_HIDEOUT - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE, - [MAPSEC_MAGMA_HIDEOUT - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE, - [MAPSEC_MIRAGE_TOWER - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE, - [MAPSEC_BIRTH_ISLAND_2 - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_WOOD, - [MAPSEC_FARAWAY_ISLAND - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_WOOD, - [MAPSEC_ARTISAN_CAVE - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE, - [MAPSEC_MARINE_CAVE - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE, - [MAPSEC_UNDERWATER_MARINE_CAVE - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE2, - [MAPSEC_TERRA_CAVE - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE, - [MAPSEC_UNDERWATER_TERRA_CAVE - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE2, - [MAPSEC_UNDERWATER_UNK1 - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE2, - [MAPSEC_UNDERWATER_129 - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE2, - [MAPSEC_DESERT_UNDERPASS - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE, - [MAPSEC_ALTERING_CAVE_2 - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE, - [MAPSEC_NAVEL_ROCK2 - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_STONE, - [MAPSEC_TRAINER_HILL - MAPSEC_SUBTRACT_KANTO] = MAPPOPUP_THEME_MARBLE + [MAPSEC_AQUA_HIDEOUT - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, + [MAPSEC_MAGMA_HIDEOUT - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, + [MAPSEC_MIRAGE_TOWER - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, + [MAPSEC_BIRTH_ISLAND_2 - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_WOOD, + [MAPSEC_FARAWAY_ISLAND - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_WOOD, + [MAPSEC_ARTISAN_CAVE - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, + [MAPSEC_MARINE_CAVE - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, + [MAPSEC_UNDERWATER_MARINE_CAVE - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE2, + [MAPSEC_TERRA_CAVE - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, + [MAPSEC_UNDERWATER_TERRA_CAVE - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE2, + [MAPSEC_UNDERWATER_UNK1 - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE2, + [MAPSEC_UNDERWATER_129 - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE2, + [MAPSEC_DESERT_UNDERPASS - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, + [MAPSEC_ALTERING_CAVE_2 - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, + [MAPSEC_NAVEL_ROCK2 - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, + [MAPSEC_TRAINER_HILL - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_MARBLE }; static const u8 gText_PyramidFloor1[] = _("PYRAMID FLOOR 1"); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 14d5aa9dc..14bfba4ad 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -3048,11 +3048,11 @@ static void BufferMonTrainerMemo(void) else text = (sum->metLocation >= MAPSEC_NONE) ? gText_XNatureMetSomewhereAt : gText_XNatureMetAtYZ; } - else if (sum->metLocation == MAPSEC_FATEFUL_ENCOUNTER) + else if (sum->metLocation == METLOC_FATEFUL_ENCOUNTER) { text = gText_XNatureFatefulEncounter; } - else if (sum->metLocation != MAPSEC_IN_GAME_TRADE && DidMonComeFromGBAGames()) + else if (sum->metLocation != METLOC_IN_GAME_TRADE && DidMonComeFromGBAGames()) { text = (sum->metLocation >= MAPSEC_NONE) ? gText_XNatureObtainedInTrade : gText_XNatureProbablyMetAt; } @@ -3183,11 +3183,11 @@ static void PrintEggMemo(void) if (pssData->summary.sanity != 1) { - if (sum->metLocation == MAPSEC_FATEFUL_ENCOUNTER) + if (sum->metLocation == METLOC_FATEFUL_ENCOUNTER) text = gText_PeculiarEggNicePlace; else if (DidMonComeFromGBAGames() == FALSE || DoesMonOTMatchOwner() == FALSE) text = gText_PeculiarEggTrade; - else if (sum->metLocation == MAPSEC_SPECIAL_EGG) + else if (sum->metLocation == METLOC_SPECIAL_EGG) text = (DidMonComeFromRSE() == TRUE) ? gText_EggFromHotSprings : gText_EggFromTraveler; else text = gText_OddEggFoundByCouple;