Remove magic numbers.

This commit is contained in:
Meowsy 2018-12-17 12:28:11 -05:00
parent 83c3f13655
commit 62c4379a21
2 changed files with 4 additions and 4 deletions

View File

@ -8648,7 +8648,7 @@ static void atkAE_healpartystatus(void)
u16 species = GetMonData(&party[i], MON_DATA_SPECIES2); u16 species = GetMonData(&party[i], MON_DATA_SPECIES2);
u8 abilityBit = GetMonData(&party[i], MON_DATA_ALT_ABILITY); u8 abilityBit = GetMonData(&party[i], MON_DATA_ALT_ABILITY);
if (species != 0 && species != SPECIES_EGG) if (species != SPECIES_NONE && species != SPECIES_EGG)
{ {
u8 ability; u8 ability;

View File

@ -5935,13 +5935,13 @@ u16 HoennToNationalOrder(u16 hoennNum)
u16 SpeciesToCryId(u16 species) u16 SpeciesToCryId(u16 species)
{ {
if (species <= 250) if (species <= SPECIES_CELEBI - 1)
return species; return species;
if (species < 276) if (species < SPECIES_TREECKO - 1)
return 200; return 200;
return gSpeciesIdToCryId[species - 276]; return gSpeciesIdToCryId[species - (SPECIES_TREECKO - 1)];
} }
void sub_806D544(u16 species, u32 personality, u8 *dest) void sub_806D544(u16 species, u32 personality, u8 *dest)