through sub_80C4E08
This commit is contained in:
+2
-2
@@ -3119,7 +3119,7 @@ static const u16 *sub_8113FBC(const u16 *a0)
|
||||
StringCopy(gStringVar1, ItemId_GetName(r5[0]));
|
||||
if (r5[0] == ITEM_ESCAPE_ROPE)
|
||||
{
|
||||
GetMapNameGeneric(gStringVar2, r5[2]);
|
||||
GetMapNameGeneric(gStringVar2, (u8)r5[2]);
|
||||
StringExpandPlaceholders(gStringVar4, gUnknown_841AFA6);
|
||||
}
|
||||
else if (r5[1] != 0xFFFF)
|
||||
@@ -4373,7 +4373,7 @@ static u16 *sub_81157DC(u16 *a0, const u16 *a1)
|
||||
static const u16 *sub_8115800(const u16 *a0)
|
||||
{
|
||||
const u16 *r4 = sub_8113E88(42, a0);
|
||||
GetMapNameGeneric(gStringVar1, r4[0]);
|
||||
GetMapNameGeneric(gStringVar1, (u8)r4[0]);
|
||||
StringExpandPlaceholders(gStringVar4, gUnknown_841B064);
|
||||
return r4 + 1;
|
||||
}
|
||||
|
||||
@@ -3213,3 +3213,59 @@ void sub_80C4D30(void)
|
||||
sub_80C4BB8();
|
||||
sub_80C4BE4();
|
||||
}
|
||||
|
||||
bool32 sub_80C4D40(u16 a0)
|
||||
{
|
||||
if (gUnknown_20399D4 != NULL)
|
||||
return FALSE;
|
||||
if (a0 != MAPSEC_CELADON_CITY)
|
||||
return FALSE;
|
||||
if (gSaveBlock1Ptr->location.mapGroup != MAP_GROUP(CELADON_CITY_DEPARTMENT_STORE_1F))
|
||||
return FALSE;
|
||||
if (gSaveBlock1Ptr->location.mapNum != MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_1F)
|
||||
&& gSaveBlock1Ptr->location.mapNum != MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_2F)
|
||||
&& gSaveBlock1Ptr->location.mapNum != MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_3F)
|
||||
&& gSaveBlock1Ptr->location.mapNum != MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_4F)
|
||||
&& gSaveBlock1Ptr->location.mapNum != MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_5F)
|
||||
&& gSaveBlock1Ptr->location.mapNum != MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_ROOF)
|
||||
&& gSaveBlock1Ptr->location.mapNum != MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_ELEVATOR))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u8 *GetMapName(u8 *dst0, u16 mapsec, u16 fill)
|
||||
{
|
||||
u8 *dst;
|
||||
u16 i;
|
||||
u16 idx;;
|
||||
if ((idx = mapsec - MAPSECS_KANTO) <= MAPSEC_SPECIAL_AREA - MAPSECS_KANTO)
|
||||
{
|
||||
if (sub_80C4D40(mapsec) == TRUE)
|
||||
dst = StringCopy(dst0, gMapSecName_CeladonDept);
|
||||
else
|
||||
dst = StringCopy(dst0, gUnknown_83F1CAC[idx]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fill == 0)
|
||||
fill = 18;
|
||||
return StringFill(dst0, CHAR_SPACE, fill);
|
||||
}
|
||||
if (fill != 0)
|
||||
{
|
||||
for (i = dst - dst0; i < fill; i++)
|
||||
*dst++ = CHAR_SPACE;
|
||||
*dst = EOS;
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
|
||||
u8 *GetMapNameGeneric(u8 *dest, u16 mapsec)
|
||||
{
|
||||
return GetMapName(dest, mapsec, 0);
|
||||
}
|
||||
|
||||
u8 *sub_80C4E08(u8 *dest, u16 mapsec)
|
||||
{
|
||||
return GetMapNameGeneric(dest, mapsec);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user