diff options
author | yenatch <yenatch@gmail.com> | 2017-01-08 22:16:03 -0500 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2017-01-08 22:16:03 -0500 |
commit | fbd1fd48497de181cb55bbf6f978473be2a2aaf7 (patch) | |
tree | a70141ad769b18b25ccf407fd7e5d378a5970779 /src | |
parent | 5474b260ddd7dfd1fdb7514e4850d04abe35074e (diff) |
enum the species constants
Diffstat (limited to 'src')
-rw-r--r-- | src/pokemon_2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pokemon_2.c b/src/pokemon_2.c index 8b55baaba..f6bd432c7 100644 --- a/src/pokemon_2.c +++ b/src/pokemon_2.c @@ -484,7 +484,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) retVal = boxMon->unknown; break; case MON_DATA_SPECIES: - retVal = boxMon->isBadEgg ? 412 : substruct0->species; + retVal = boxMon->isBadEgg ? SPECIES_EGG : substruct0->species; break; case MON_DATA_HELD_ITEM: retVal = substruct0->heldItem; @@ -645,7 +645,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) case MON_DATA_SPECIES2: retVal = substruct0->species; if (substruct0->species && (substruct3->isEgg || boxMon->isBadEgg)) - retVal = 412; + retVal = SPECIES_EGG; break; case MON_DATA_IVS: retVal = substruct3->hpIV | (substruct3->attackIV << 5) | (substruct3->defenseIV << 10) | (substruct3->speedIV << 15) | (substruct3->spAttackIV << 20) | (substruct3->spDefenseIV << 25); @@ -1130,7 +1130,7 @@ u8 sub_803DAA0(void) { if (GetMonData(&gPlayerParty[i], MON_DATA_HP, NULL) != 0 && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_NONE - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != 412) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG) aliveCount++; } @@ -1232,7 +1232,7 @@ void GetSpeciesName(u8 *name, u16 species) for (i = 0; i <= POKEMON_NAME_LENGTH; i++) { - if (species > 412) + if (species > NUM_SPECIES) name[i] = gSpeciesNames[0][i]; else name[i] = gSpeciesNames[species][i]; |