From 2f80fe9774d05845570ad30a3eceae7f05a6c52c Mon Sep 17 00:00:00 2001 From: pkmnsnfrn Date: Mon, 8 Apr 2024 06:30:09 -0700 Subject: [PATCH 1/3] Added first working version --- include/config/overworld.h | 1 + src/overworld.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/include/config/overworld.h b/include/config/overworld.h index fcbcf707d845..28c08073a4b9 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 TRUE // If enabled, map popups will not appear if entering a map with the same Map Section Id as the last. // PC settings #define OW_PC_PRESS_B GEN_LATEST // In Gen4, pressing B when holding a Pokémon is equivalent to placing it. In Gen3, it gives the "You're holding a Pokémon!" error. diff --git a/src/overworld.c b/src/overworld.c index e53e556302aa..5d15ece0900f 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -851,9 +851,17 @@ if (I_VS_SEEKER_CHARGING != 0) ResetFieldTasksArgs(); RunOnResumeMapScript(); + 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) From 2818ab2fb84b46459e0fcbcc6bc2cb0808e2cc6f Mon Sep 17 00:00:00 2001 From: pkmnsnfrn Date: Mon, 8 Apr 2024 06:47:17 -0700 Subject: [PATCH 2/3] Fixed spacing and set config to false --- include/config/overworld.h | 2 +- src/overworld.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/config/overworld.h b/include/config/overworld.h index 28c08073a4b9..2eef3346d4ee 100644 --- a/include/config/overworld.h +++ b/include/config/overworld.h @@ -8,7 +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 TRUE // If enabled, map popups will not appear if entering a map with the same Map Section Id as the last. +#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. // PC settings #define OW_PC_PRESS_B GEN_LATEST // In Gen4, pressing B when holding a Pokémon is equivalent to placing it. In Gen3, it gives the "You're holding a Pokémon!" error. diff --git a/src/overworld.c b/src/overworld.c index 5d15ece0900f..0ed84e7b6cea 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -858,9 +858,9 @@ if (I_VS_SEEKER_CHARGING != 0) } else { - if (gMapHeader.regionMapSectionId != MAPSEC_BATTLE_FRONTIER - || gMapHeader.regionMapSectionId != sLastMapSectionId) - ShowMapNamePopup(); + if (gMapHeader.regionMapSectionId != MAPSEC_BATTLE_FRONTIER + || gMapHeader.regionMapSectionId != sLastMapSectionId) + ShowMapNamePopup(); } } From be75032010f28b244d2cb857ad9299a16b95af86 Mon Sep 17 00:00:00 2001 From: psf <77138753+pkmnsnfrn@users.noreply.github.com> Date: Mon, 8 Apr 2024 07:57:32 -0700 Subject: [PATCH 3/3] 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> --- src/overworld.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/overworld.c b/src/overworld.c index 0ed84e7b6cea..8878af87487a 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -851,17 +851,17 @@ if (I_VS_SEEKER_CHARGING != 0) ResetFieldTasksArgs(); RunOnResumeMapScript(); - if (OW_HIDE_REPEAT_MAP_POPUP) - { - if (gMapHeader.regionMapSectionId != sLastMapSectionId) - ShowMapNamePopup(); - } - else - { - 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)