summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-10-31 21:55:57 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2017-10-31 21:55:57 -0400
commitc3c08bf0379e172b8d7dd1b233947ebca83a3c3c (patch)
tree3a9f25df908ec635e53915bbb08586f5182603f7
parentef535b98b5e1384ce5f663a4ab4dfcb003fbe1c7 (diff)
through sub_8124610
-rw-r--r--asm/region_map.s44
-rw-r--r--include/region_map.h4
-rw-r--r--include/strings.h3
-rw-r--r--src/region_map.c28
-rw-r--r--src/tv.c4
5 files changed, 34 insertions, 49 deletions
diff --git a/asm/region_map.s b/asm/region_map.s
index b7d8f8b2c..55d6996a8 100644
--- a/asm/region_map.s
+++ b/asm/region_map.s
@@ -5,50 +5,6 @@
.text
- thumb_func_start sub_81245DC
-sub_81245DC: @ 81245DC
- push {lr}
- lsls r1, 16
- lsrs r1, 16
- cmp r1, 0x56
- beq _081245F8
- cmp r1, 0x57
- bne _08124604
- ldr r1, =gText_Ferry
- bl StringCopy
- b _0812460A
- .pool
-_081245F8:
- ldr r1, =gText_SecretBase
- bl StringCopy
- b _0812460A
- .pool
-_08124604:
- movs r2, 0
- bl GetMapName
-_0812460A:
- pop {r1}
- bx r1
- thumb_func_end sub_81245DC
-
- thumb_func_start sub_8124610
-sub_8124610: @ 8124610
- push {lr}
- lsls r1, 16
- lsrs r1, 16
- cmp r1, 0x42
- beq _08124620
- bl sub_81245DC
- b _08124626
-_08124620:
- ldr r1, =gText_Hideout
- bl StringCopy
-_08124626:
- pop {r1}
- bx r1
- .pool
- thumb_func_end sub_8124610
-
thumb_func_start sub_8124630
sub_8124630: @ 8124630
push {r4,r5,lr}
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
diff --git a/include/strings.h b/include/strings.h
index f06a962b9..56e34a5c7 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -71,5 +71,8 @@ extern const u8 gText_Decorate[];
extern const u8 gText_PutAway[];
extern const u8 gText_Toss2[];
extern const u8 gText_Hoenn[];
+extern const u8 gText_Ferry[];
+extern const u8 gText_SecretBase[];
+extern const u8 gText_Hideout[];
#endif //GUARD_STRINGS_H
diff --git a/src/region_map.c b/src/region_map.c
index 5284922cc..cd0f0b87c 100644
--- a/src/region_map.c
+++ b/src/region_map.c
@@ -13,6 +13,7 @@
#include "rom6.h"
#include "secret_base.h"
#include "string_util.h"
+#include "strings.h"
#include "text.h"
#include "region_map.h"
@@ -632,7 +633,7 @@ static void RegionMap_InitializeStateBasedOnPlayerLocation(void)
case 8:
gRegionMap->mapSecId = gMapHeader.regionMapSectionId;
- if (gRegionMap->mapSecId != MAPSEC_UNK_0x57)
+ if (gRegionMap->mapSecId != MAPSEC_SS_TIDAL)
{
r4 = &gSaveBlock1Ptr->warp4;
mapHeader = get_mapheader_by_bank_and_number(r4->mapGroup, r4->mapNum);
@@ -1208,3 +1209,28 @@ u8 *GetMapName(u8 *dest, u16 regionMapId, u16 padLength)
}
return str;
}
+
+u8 *sub_81245DC(u8 *dest, u16 mapSecId)
+{
+ switch (mapSecId)
+ {
+ case MAPSEC_SS_TIDAL:
+ return StringCopy(dest, gText_Ferry);
+ case MAPSEC_SECRET_BASE:
+ return StringCopy(dest, gText_SecretBase);
+ default:
+ return GetMapName(dest, mapSecId, 0);
+ }
+}
+
+u8 *sub_8124610(u8 *dest, u16 mapSecId)
+{
+ if (mapSecId == MAPSEC_AQUA_HIDEOUT_OLD)
+ {
+ return StringCopy(dest, gText_Hideout);
+ }
+ else
+ {
+ return sub_81245DC(dest, mapSecId);
+ }
+}
diff --git a/src/tv.c b/src/tv.c
index 87aa6e01a..933b9c0b8 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -6435,7 +6435,7 @@ void DoTVShowTodaysRivalTrainer(void)
case MAPSEC_SECRET_BASE:
sTVShowState = 8;
break;
- case MAPSEC_UNK_0x57:
+ case MAPSEC_SS_TIDAL:
switch (show->rivalTrainer.mapDataId)
{
case 0x115 ... 0x117:
@@ -6633,7 +6633,7 @@ void DoTVShowHoennTreasureInvestigators(void)
{
case 0:
StringCopy(gStringVar1, ItemId_GetItem(show->treasureInvestigators.item)->name);
- if (show->treasureInvestigators.location == MAPSEC_UNK_0x57)
+ if (show->treasureInvestigators.location == MAPSEC_SS_TIDAL)
{
switch (show->treasureInvestigators.mapDataId)
{