diff options
author | Diegoisawesome <Diegoisawesome@users.noreply.github.com> | 2019-08-25 23:56:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-25 23:56:09 -0500 |
commit | ad941680d85d1b280786f5c4a7a246f4d87dd5e9 (patch) | |
tree | 92e702bcf1380708eecf76d57f3e81ef81936a42 /src | |
parent | 8e7abad720481b46da460d1072ca5a84671fd3a3 (diff) | |
parent | d3ea25ee7f40c3334a7acdefec8afd65ed7ec56c (diff) |
Merge pull request #788 from ultima-soul/documentation
Synchronize with pokefirered pokedex.c.
Diffstat (limited to 'src')
-rw-r--r-- | src/diploma.c | 2 | ||||
-rw-r--r-- | src/pokedex.c | 54 |
2 files changed, 28 insertions, 28 deletions
diff --git a/src/diploma.c b/src/diploma.c index 92c7df703..8e0901fa8 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -127,7 +127,7 @@ static void Task_DiplomaFadeOut(u8 taskId) static void DisplayDiplomaText(void) { - if (sub_80C0944()) + if (HasAllMons()) { SetGpuReg(REG_OFFSET_BG1HOFS, DISPCNT_BG0_ON); StringCopy(gStringVar1, gText_DexNational); diff --git a/src/pokedex.c b/src/pokedex.c index 0e532ed92..c1787ef6a 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4249,12 +4249,12 @@ u16 GetPokedexHeightWeight(u16 dexNum, u8 data) { switch (data) { - case 0: // height - return gPokedexEntries[dexNum].height; - case 1: // weight - return gPokedexEntries[dexNum].weight; - default: - return 1; + case 0: // height + return gPokedexEntries[dexNum].height; + case 1: // weight + return gPokedexEntries[dexNum].weight; + default: + return 1; } } @@ -4360,23 +4360,23 @@ u16 GetHoennPokedexCount(u8 caseID) return count; } -u16 sub_80C089C(u8 caseID) +u16 GetKantoPokedexCount(u8 caseID) { u16 count = 0; u16 i; - for (i = 0; i < 151; i++) + for (i = 0; i < KANTO_DEX_COUNT; i++) { switch (caseID) { - case FLAG_GET_SEEN: - if (GetSetPokedexFlag(i + 1, FLAG_GET_SEEN)) - count++; - break; - case FLAG_GET_CAUGHT: - if (GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT)) - count++; - break; + case FLAG_GET_SEEN: + if (GetSetPokedexFlag(i + 1, FLAG_GET_SEEN)) + count++; + break; + case FLAG_GET_CAUGHT: + if (GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT)) + count++; + break; } } return count; @@ -4386,7 +4386,7 @@ bool16 HasAllHoennMons(void) { u16 i; - for (i = 0; i < 200; i++) + for (i = 0; i < HOENN_DEX_COUNT - 2; i++) { if (!GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_CAUGHT)) return FALSE; @@ -4394,11 +4394,11 @@ bool16 HasAllHoennMons(void) return TRUE; } -bool8 sub_80C0918(void) +bool8 HasAllKantoMons(void) { u16 i; - for (i = 0; i < 150; i++) + for (i = 0; i < KANTO_DEX_COUNT - 1; i++) { if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT)) return FALSE; @@ -4406,26 +4406,26 @@ bool8 sub_80C0918(void) return TRUE; } -u16 sub_80C0944(void) +bool16 HasAllMons(void) { u16 i; - for (i = 0; i < 150; i++) + for (i = 0; i < NATIONAL_DEX_MEWTWO; i++) { if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT)) - return 0; + return FALSE; } - for (i = 151; i < 248; i++) + for (i = NATIONAL_DEX_MEW; i < NATIONAL_DEX_TYRANITAR; i++) { if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT)) - return 0; + return FALSE; } - for (i = 251; i < 384; i++) + for (i = NATIONAL_DEX_CELEBI; i < NATIONAL_DEX_RAYQUAZA; i++) { if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT)) - return 0; + return FALSE; } - return 1; + return TRUE; } void sub_80C09B0(u16 a) |