From 24e3ca267b2c1e5c6833f0c4bea7403dbf894f8b Mon Sep 17 00:00:00 2001 From: psf <77138753+pkmnsnfrn@users.noreply.github.com> Date: Wed, 10 Apr 2024 00:10:37 -0700 Subject: [PATCH] Add OW_HIDE_REPEAT_MAP_POPUP config (#4370) * Added first working version * Fixed spacing and set config to false * Update src/overworld.c Updated spacing per https://github.com/rh-hideout/pokeemerald-expansion/pull/4370#discussion_r1555917636 Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com> --------- Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com> --- include/config/overworld.h | 1 + src/overworld.c | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/config/overworld.h b/include/config/overworld.h index ca7a25311c..ee1c1658dd 100644 --- a/include/config/overworld.h +++ b/include/config/overworld.h @@ -8,6 +8,7 @@ #define OW_POISON_DAMAGE GEN_LATEST // In Gen4, Pokémon no longer faint from Poison in the overworld. In Gen5+, they no longer take damage at all. #define OW_TIMES_OF_DAY GEN_LATEST // Different generations have the times of day change at different times. #define OW_DOUBLE_APPROACH_WITH_ONE_MON FALSE // If enabled, you can be spotted by two trainers at the same time even if you only have one eligible Pokémon in your party. +#define OW_HIDE_REPEAT_MAP_POPUP FALSE // If enabled, map popups will not appear if entering a map with the same Map Section Id as the last. // These generational defines only make a distinction for Berries and the OW_PC_MOVE_ORDER #define GEN_6_XY GEN_6 diff --git a/src/overworld.c b/src/overworld.c index e53e556302..8878af8748 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -851,9 +851,17 @@ if (I_VS_SEEKER_CHARGING != 0) ResetFieldTasksArgs(); RunOnResumeMapScript(); - if (gMapHeader.regionMapSectionId != MAPSEC_BATTLE_FRONTIER - || gMapHeader.regionMapSectionId != sLastMapSectionId) - ShowMapNamePopup(); + if (OW_HIDE_REPEAT_MAP_POPUP) + { + if (gMapHeader.regionMapSectionId != sLastMapSectionId) + ShowMapNamePopup(); + } + else + { + if (gMapHeader.regionMapSectionId != MAPSEC_BATTLE_FRONTIER + || gMapHeader.regionMapSectionId != sLastMapSectionId) + ShowMapNamePopup(); + } } static void LoadMapFromWarp(bool32 a1)