summaryrefslogtreecommitdiff
path: root/src/pokemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pokemon.c')
-rw-r--r--src/pokemon.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/pokemon.c b/src/pokemon.c
index 640d70776..6700ef553 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -4091,13 +4091,13 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
case MON_DATA_LANGUAGE:
retVal = boxMon->language;
break;
- case MON_DATA_SANITY_BIT1:
+ case MON_DATA_SANITY_IS_BAD_EGG:
retVal = boxMon->isBadEgg;
break;
- case MON_DATA_SANITY_BIT2:
+ case MON_DATA_SANITY_HAS_SPECIES:
retVal = boxMon->hasSpecies;
break;
- case MON_DATA_SANITY_BIT3:
+ case MON_DATA_SANITY_IS_EGG:
retVal = boxMon->isEgg;
break;
case MON_DATA_OT_NAME:
@@ -4298,7 +4298,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
u16 *moves = (u16 *)data;
s32 i = 0;
- while (moves[i] != 355)
+ while (moves[i] != MOVES_COUNT)
{
u16 move = moves[i];
if (substruct1->moves[0] == move
@@ -4460,13 +4460,13 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
case MON_DATA_LANGUAGE:
SET8(boxMon->language);
break;
- case MON_DATA_SANITY_BIT1:
+ case MON_DATA_SANITY_IS_BAD_EGG:
SET8(boxMon->isBadEgg);
break;
- case MON_DATA_SANITY_BIT2:
+ case MON_DATA_SANITY_HAS_SPECIES:
SET8(boxMon->hasSpecies);
break;
- case MON_DATA_SANITY_BIT3:
+ case MON_DATA_SANITY_IS_EGG:
SET8(boxMon->isEgg);
break;
case MON_DATA_OT_NAME:
@@ -4722,7 +4722,7 @@ u8 SendMonToPC(struct Pokemon* mon)
do
{
- for (boxPos = 0; boxPos < 30; boxPos++)
+ for (boxPos = 0; boxPos < IN_BOX_COUNT; boxPos++)
{
struct BoxPokemon* checkingMon = GetBoxedMonPtr(boxNo, boxPos);
if (GetBoxMonData(checkingMon, MON_DATA_SPECIES, NULL) == SPECIES_NONE)
@@ -4739,7 +4739,7 @@ u8 SendMonToPC(struct Pokemon* mon)
}
boxNo++;
- if (boxNo == 14)
+ if (boxNo == TOTAL_BOXES_COUNT)
boxNo = 0;
} while (boxNo != StorageGetCurrentBox());
@@ -4889,9 +4889,9 @@ bool8 IsPokemonStorageFull(void)
{
s32 i, j;
- for (i = 0; i < 14; i++)
- for (j = 0; j < 30; j++)
- if (GetBoxMonDataFromAnyBox(i, j, MON_DATA_SPECIES) == SPECIES_NONE)
+ for (i = 0; i < TOTAL_BOXES_COUNT; i++)
+ for (j = 0; j < IN_BOX_COUNT; j++)
+ if (GetBoxMonDataAt(i, j, MON_DATA_SPECIES) == SPECIES_NONE)
return FALSE;
return TRUE;
@@ -6847,7 +6847,7 @@ void SetWildMonHeldItem(void)
u16 species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, 0);
u16 var1 = 45;
u16 var2 = 95;
- if (!GetMonData(&gPlayerParty[0], MON_DATA_SANITY_BIT3, 0)
+ if (!GetMonData(&gPlayerParty[0], MON_DATA_SANITY_IS_EGG, 0)
&& GetMonAbility(&gPlayerParty[0]) == ABILITY_COMPOUND_EYES)
{
var1 = 20;