diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/help_system_812B1E0.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/help_system_812B1E0.c b/src/help_system_812B1E0.c index f1d55276b..4477352d9 100644 --- a/src/help_system_812B1E0.c +++ b/src/help_system_812B1E0.c @@ -1,11 +1,17 @@ #include "global.h" #include "event_data.h" +#include "constants/maps.h" EWRAM_DATA u16 gUnknown_203B0EC = 0; EWRAM_DATA u8 gUnknown_203B0EE = 0; u16 gUnknown_3005EA0; +bool32 sub_812B27C(const u16 * mapIdxs); + +extern const u16 gUnknown_845C594[]; // marts +extern const u16 gUnknown_845C5BC[]; // gyms + void sub_812B1E0(u8 a0) { gUnknown_203B0EC = a0; @@ -42,3 +48,28 @@ void sub_812B248(void) { gUnknown_203B0EC = gUnknown_3005EA0; } + +bool32 sub_812B25C(void) +{ + return sub_812B27C(gUnknown_845C594); +} + +bool32 sub_812B26C(void) +{ + return sub_812B27C(gUnknown_845C5BC); +} + +bool32 sub_812B27C(const u16 * mapIdxs) +{ + u16 mapIdx = (gSaveBlock1Ptr->location.mapGroup << 8) + gSaveBlock1Ptr->location.mapNum; + s32 i; + + for (i = 0; mapIdxs[i] != MAP_UNDEFINED; i++) + { + if (mapIdxs[i] == mapIdx) + return TRUE; + } + + return FALSE; +} + |