Review pokemon storage system chaanges

This commit is contained in:
DizzyEggg 2018-12-21 22:35:01 +01:00
parent ecee02816d
commit 1374c11a1c
3 changed files with 815 additions and 809 deletions

View File

@ -4722,7 +4722,7 @@ u8 SendMonToPC(struct Pokemon* mon)
do do
{ {
for (boxPos = 0; boxPos < 30; boxPos++) for (boxPos = 0; boxPos < IN_BOX_COUNT; boxPos++)
{ {
struct BoxPokemon* checkingMon = GetBoxedMonPtr(boxNo, boxPos); struct BoxPokemon* checkingMon = GetBoxedMonPtr(boxNo, boxPos);
if (GetBoxMonData(checkingMon, MON_DATA_SPECIES, NULL) == SPECIES_NONE) if (GetBoxMonData(checkingMon, MON_DATA_SPECIES, NULL) == SPECIES_NONE)
@ -4739,7 +4739,7 @@ u8 SendMonToPC(struct Pokemon* mon)
} }
boxNo++; boxNo++;
if (boxNo == 14) if (boxNo == TOTAL_BOXES_COUNT)
boxNo = 0; boxNo = 0;
} while (boxNo != StorageGetCurrentBox()); } while (boxNo != StorageGetCurrentBox());
@ -4889,8 +4889,8 @@ bool8 IsPokemonStorageFull(void)
{ {
s32 i, j; s32 i, j;
for (i = 0; i < 14; i++) for (i = 0; i < TOTAL_BOXES_COUNT; i++)
for (j = 0; j < 30; j++) for (j = 0; j < IN_BOX_COUNT; j++)
if (GetBoxMonDataAt(i, j, MON_DATA_SPECIES) == SPECIES_NONE) if (GetBoxMonDataAt(i, j, MON_DATA_SPECIES) == SPECIES_NONE)
return FALSE; return FALSE;

View File

@ -1123,7 +1123,7 @@ u16 sub_80D2E84(u16 species)
else else
{ {
if (species > (SPECIES_UNOWN_B - 1)) if (species > (SPECIES_UNOWN_B - 1))
species = 260; species = SPECIES_OLD_UNOWN_J; // That's an oddly specific species.
return GetIconSpecies(species, 0); return GetIconSpecies(species, 0);
} }
} }

File diff suppressed because it is too large Load Diff