diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/field_specials.c | 3 | ||||
-rw-r--r-- | src/pokedex.c | 2 | ||||
-rw-r--r-- | src/pokemon.c | 9 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/field_specials.c b/src/field_specials.c index d97a17a7d..0a7236913 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -932,9 +932,8 @@ u16 GetWeekCount(void) { u16 weekCount = gLocalTime.days / 7; if (weekCount > 9999) - { weekCount = 9999; - } + return weekCount; } diff --git a/src/pokedex.c b/src/pokedex.c index b41937302..206782e59 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -1512,7 +1512,7 @@ void ResetPokedex(void) gSaveBlock2Ptr->pokedex.spindaPersonality = 0; gSaveBlock2Ptr->pokedex.unknown3 = 0; DisableNationalPokedex(); - for (i = 0; i < DEX_FLAGS_NO; i++) + for (i = 0; i < NUM_DEX_FLAG_BYTES; i++) { gSaveBlock2Ptr->pokedex.owned[i] = 0; gSaveBlock2Ptr->pokedex.seen[i] = 0; diff --git a/src/pokemon.c b/src/pokemon.c index 939c2429d..9476dbb2e 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -88,11 +88,14 @@ static const struct CombinedMove sCombinedMoves[2] = {0xFFFF, 0xFFFF, 0xFFFF} }; +// NOTE: The order of the elements in the 3 arrays below is irrelevant. +// To reorder the pokedex, see the values in include/constants/pokedex.h. + #define SPECIES_TO_HOENN(name) [SPECIES_##name - 1] = HOENN_DEX_##name #define SPECIES_TO_NATIONAL(name) [SPECIES_##name - 1] = NATIONAL_DEX_##name #define HOENN_TO_NATIONAL(name) [HOENN_DEX_##name - 1] = NATIONAL_DEX_##name - // Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex) +// Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex) static const u16 sSpeciesToHoennPokedexNum[NUM_SPECIES - 1] = { SPECIES_TO_HOENN(BULBASAUR), @@ -508,7 +511,7 @@ static const u16 sSpeciesToHoennPokedexNum[NUM_SPECIES - 1] = SPECIES_TO_HOENN(CHIMECHO), }; - // Assigns all species to the National Dex Index (Summary No. for National Dex) +// Assigns all species to the National Dex Index (Summary No. for National Dex) static const u16 sSpeciesToNationalPokedexNum[NUM_SPECIES - 1] = { SPECIES_TO_NATIONAL(BULBASAUR), @@ -924,7 +927,7 @@ static const u16 sSpeciesToNationalPokedexNum[NUM_SPECIES - 1] = SPECIES_TO_NATIONAL(CHIMECHO), }; - // Assigns all Hoenn Dex Indexes to a National Dex Index +// Assigns all Hoenn Dex Indexes to a National Dex Index static const u16 sHoennToNationalOrder[NUM_SPECIES - 1] = { HOENN_TO_NATIONAL(TREECKO), |