diff options
author | Rémi Calixte <remicalixte.rmc@gmail.com> | 2021-05-20 11:46:25 +0200 |
---|---|---|
committer | Rémi Calixte <remicalixte.rmc@gmail.com> | 2021-05-20 11:46:25 +0200 |
commit | 571d9a8d7cff6158e9fcd6327db602349e267d56 (patch) | |
tree | 3950d2a1a5b085c4a61b9e821684e47a3cf04492 /arm9/src/pokedex.c | |
parent | 8af497a617e45668f7c3c0badc1324ce45308183 (diff) | |
parent | 98f11489806b6dba4c6080c5429b2368d3092541 (diff) |
Merge branch 'master' into unk_02016B94
Diffstat (limited to 'arm9/src/pokedex.c')
-rw-r--r-- | arm9/src/pokedex.c | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/arm9/src/pokedex.c b/arm9/src/pokedex.c index bd1ea254..d86afa6a 100644 --- a/arm9/src/pokedex.c +++ b/arm9/src/pokedex.c @@ -226,12 +226,11 @@ void Pokedex_InitSeenDeoxysFormesArray(struct Pokedex * pokedex) static inline BOOL HasUnownLetterBeenSeen(struct Pokedex * pokedex, u8 letter) { - u8 * arr; s32 i; + u8 * arr; for (i = 0, arr = (u8 *)pokedex; i < 28; i++, arr++) { - u8 val = arr[0x010C]; - if (letter == val) + if (letter == *(arr + 0x10C)) return TRUE; } return FALSE; @@ -239,12 +238,11 @@ static inline BOOL HasUnownLetterBeenSeen(struct Pokedex * pokedex, u8 letter) static inline s32 FindFirstAvailableUnownLetterSlot(struct Pokedex * pokedex) { - u8 * arr; s32 i; + u8 * arr; for (i = 0, arr = (u8 *)pokedex; i < 28; i++, arr++) { - u8 val = arr[0x010C]; - if (val == 0xFF) + if (*(arr + 0x10C) == 0xFF) break; } return i; @@ -320,26 +318,26 @@ s32 FUN_020242C8(struct Pokedex * pokedex, u16 species, s32 r4) return r1; } -const u16 sSinnohDexMythicalMons[] = { - SPECIES_MANAPHY -}; - -const u16 sNationalDexMythicalMons[] = { - SPECIES_MEW, - SPECIES_LUGIA, - SPECIES_HO_OH, - SPECIES_CELEBI, - SPECIES_JIRACHI, - SPECIES_DEOXYS, - SPECIES_PHIONE, - SPECIES_MANAPHY, - SPECIES_DARKRAI, - SPECIES_SHAYMIN, - SPECIES_ARCEUS -}; - BOOL Pokedex_SpeciesIsNotMythical(u16 species) { + static const u16 sSinnohDexMythicalMons[] = { + SPECIES_MANAPHY + }; + + static const u16 sNationalDexMythicalMons[] = { + SPECIES_MEW, + SPECIES_LUGIA, + SPECIES_HO_OH, + SPECIES_CELEBI, + SPECIES_JIRACHI, + SPECIES_DEOXYS, + SPECIES_PHIONE, + SPECIES_MANAPHY, + SPECIES_DARKRAI, + SPECIES_SHAYMIN, + SPECIES_ARCEUS + }; + s32 i; BOOL ret = TRUE; for (i = 0; i < (s32)NELEMS(sNationalDexMythicalMons); i++) |