Clean up save related files
This commit is contained in:
@@ -9,21 +9,18 @@
|
||||
|
||||
static bool32 IsCurMapInLocationList(const u16 *list)
|
||||
{
|
||||
s32 i;
|
||||
u16 locSum = (gSaveBlock1Ptr->location.mapGroup << 8) + (gSaveBlock1Ptr->location.mapNum);
|
||||
|
||||
// im sure it was written a different way, but for the love of christ I cant figure out how to write it different where it still matches.
|
||||
if (*list != 0xFFFF)
|
||||
for (i = 0; list[i] != 0xFFFF; i++)
|
||||
{
|
||||
u16 termValue = 0xFFFF;
|
||||
const u16 *localList;
|
||||
for (localList = list; *localList != termValue; localList++)
|
||||
if (*localList == locSum)
|
||||
return TRUE;
|
||||
if (list[i] == locSum)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// TODO: Not require a packed u16 array for these lists
|
||||
static const u16 sSaveLocationPokeCenterList[] =
|
||||
{
|
||||
MAP_OLDALE_TOWN_POKEMON_CENTER_1F,
|
||||
@@ -72,7 +69,7 @@ static bool32 IsCurMapPokeCenter(void)
|
||||
return IsCurMapInLocationList(sSaveLocationPokeCenterList);
|
||||
}
|
||||
|
||||
static const u16 sSaveLocationReloadLocList[] = // there's only 1 location, and it's presumed its for the save reload feature for battle tower
|
||||
static const u16 sSaveLocationReloadLocList[] = // There's only 1 location, and it's presumed its for the save reload feature for battle tower.
|
||||
{
|
||||
MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY,
|
||||
0xFFFF,
|
||||
@@ -83,13 +80,13 @@ static bool32 IsCurMapReloadLocation(void)
|
||||
return IsCurMapInLocationList(sSaveLocationReloadLocList);
|
||||
}
|
||||
|
||||
// nulled out list. unknown what this would have been
|
||||
// Nulled out list. Unknown what this would have been.
|
||||
static const u16 sUnknown_0861440E[] =
|
||||
{
|
||||
0xFFFF,
|
||||
};
|
||||
|
||||
bool32 sub_81AFCEC(void)
|
||||
static bool32 sub_81AFCEC(void)
|
||||
{
|
||||
return IsCurMapInLocationList(sUnknown_0861440E);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user