mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
through sub_8124610
This commit is contained in:
parent
ef535b98b5
commit
c3c08bf037
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
4
src/tv.c
4
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user