diff options
Diffstat (limited to 'src/pokemon.c')
-rw-r--r-- | src/pokemon.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/pokemon.c b/src/pokemon.c index ac0699e56..fda83ee3d 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -25,11 +25,9 @@ #include "field_specials.h" #include "constants/items.h" #include "constants/item_effects.h" -#include "constants/species.h" #include "constants/hoenn_cries.h" #include "constants/pokemon.h" #include "constants/abilities.h" -#include "constants/flags.h" #include "constants/moves.h" #include "constants/songs.h" #include "constants/trainer_classes.h" @@ -5020,10 +5018,10 @@ static u16 HoennPokedexNumToSpecies(u16 var) species = 0; - while (species < POKEMON_SLOTS_NUMBER - 1 && sSpeciesToHoennPokedexNum[species] != var) + while (species < NUM_SPECIES - 1 && sSpeciesToHoennPokedexNum[species] != var) species++; - if (species == POKEMON_SLOTS_NUMBER - 1) + if (species == NUM_SPECIES - 1) return 0; return species + 1; @@ -5038,10 +5036,10 @@ u16 NationalPokedexNumToSpecies(u16 nationalNum) species = 0; - while (species < POKEMON_SLOTS_NUMBER - 1 && sSpeciesToNationalPokedexNum[species] != nationalNum) + while (species < NUM_SPECIES - 1 && sSpeciesToNationalPokedexNum[species] != nationalNum) species++; - if (species == POKEMON_SLOTS_NUMBER - 1) + if (species == NUM_SPECIES - 1) return 0; return species + 1; @@ -5056,10 +5054,10 @@ static u16 NationalToHoennOrder(u16 nationalNum) hoennNum = 0; - while (hoennNum < POKEMON_SLOTS_NUMBER - 1 && sHoennToNationalOrder[hoennNum] != nationalNum) + while (hoennNum < NUM_SPECIES - 1 && sHoennToNationalOrder[hoennNum] != nationalNum) hoennNum++; - if (hoennNum == POKEMON_SLOTS_NUMBER - 1) + if (hoennNum == NUM_SPECIES - 1) return 0; return hoennNum + 1; |