diff options
-rw-r--r-- | asm/battle_2.s | 6 | ||||
-rw-r--r-- | asm/battle_4.s | 8 | ||||
-rw-r--r-- | asm/battle_tower.s | 4 | ||||
-rw-r--r-- | asm/contest_link_80C2020.s | 2 | ||||
-rw-r--r-- | asm/easy_chat.s | 2 | ||||
-rw-r--r-- | asm/egg_hatch.s | 4 | ||||
-rw-r--r-- | asm/evolution_scene.s | 12 | ||||
-rw-r--r-- | asm/mystery_event_script.s | 4 | ||||
-rw-r--r-- | asm/pokedex.s | 18 | ||||
-rw-r--r-- | asm/trade.s | 4 | ||||
-rw-r--r-- | asm/tv.s | 4 | ||||
-rw-r--r-- | data/text/pokedex_rating.inc | 63 | ||||
-rw-r--r-- | include/pokedex.h | 2 | ||||
-rw-r--r-- | src/battle_interface.c | 4 | ||||
-rw-r--r-- | src/birch_pc.c | 105 | ||||
-rw-r--r-- | src/credits.c | 2 | ||||
-rw-r--r-- | src/easy_chat.c | 2 | ||||
-rw-r--r-- | src/pokedex.c | 22 | ||||
-rw-r--r-- | src/script_pokemon_util_80C4BF0.c | 4 |
19 files changed, 126 insertions, 146 deletions
diff --git a/asm/battle_2.s b/asm/battle_2.s index f1c865a49..7d199fff2 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -3074,7 +3074,7 @@ _080114FE: lsls r0, 16 lsrs r0, 16 movs r1, 0x2 - bl sub_8090D90 + bl GetNationalPokedexFlag b _08011588 .align 2, 0 _08011530: .4byte gBaseStats @@ -3105,7 +3105,7 @@ _0801154C: lsls r0, 16 lsrs r0, 16 movs r1, 0x2 - bl sub_8090D90 + bl GetNationalPokedexFlag movs r0, 0 bl dp01_build_cmdbuf_x04_4_4_4 ldrb r0, [r4] @@ -3550,7 +3550,7 @@ _080118DE: lsls r0, 16 lsrs r0, 16 movs r1, 0x2 - bl sub_8090D90 + bl GetNationalPokedexFlag _08011912: ldrb r0, [r4] adds r0, 0x1 diff --git a/asm/battle_4.s b/asm/battle_4.s index 0581d1e7d..aed5058b4 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -13392,7 +13392,7 @@ sub_8022784: @ 8022784 lsls r0, 16 lsrs r0, 16 movs r1, 0x2 - bl sub_8090D90 + bl GetNationalPokedexFlag _080227D0: ldr r2, _08022824 @ =gUnknown_02024C0C ldr r1, _08022828 @ =gBitTable @@ -31340,7 +31340,7 @@ _0802B73C: lsls r0, 16 lsrs r0, 16 movs r1, 0x1 - bl sub_8090D90 + bl GetNationalPokedexFlag lsls r0, 24 movs r4, 0xA cmp r0, 0 @@ -31657,7 +31657,7 @@ sub_802B9E0: @ 802B9E0 lsls r0, 16 lsrs r0, 16 movs r1, 0x1 - bl sub_8090D90 + bl GetNationalPokedexFlag lsls r0, 24 cmp r0, 0 beq _0802BA2C @@ -31688,7 +31688,7 @@ _0802BA2C: lsls r0, 16 lsrs r0, 16 movs r1, 0x3 - bl sub_8090D90 + bl GetNationalPokedexFlag ldrb r0, [r6] adds r2, r0, 0 muls r2, r5 diff --git a/asm/battle_tower.s b/asm/battle_tower.s index 9dfce6c1c..c50903de5 100644 --- a/asm/battle_tower.s +++ b/asm/battle_tower.s @@ -1522,7 +1522,7 @@ _081350AE: lsls r0, 16 lsrs r0, 16 movs r1, 0x1 - bl sub_8090D90 + bl GetNationalPokedexFlag lsls r0, 24 cmp r0, 0 beq _081350C6 @@ -1555,7 +1555,7 @@ AppendBattleTowerBannedSpeciesName: @ 81350E0 lsls r0, 16 lsrs r0, 16 movs r1, 0x1 - bl sub_8090D90 + bl GetNationalPokedexFlag lsls r0, 24 cmp r0, 0 beq _081351E6 diff --git a/asm/contest_link_80C2020.s b/asm/contest_link_80C2020.s index 672eb4c1a..7bd7de240 100644 --- a/asm/contest_link_80C2020.s +++ b/asm/contest_link_80C2020.s @@ -1601,7 +1601,7 @@ _080C2D42: lsls r0, 16 lsrs r0, 16 movs r1, 0x2 - bl sub_8090D90 + bl GetNationalPokedexFlag adds r5, 0x40 subs r4, 0x1 cmp r4, 0 diff --git a/asm/easy_chat.s b/asm/easy_chat.s index b9f27b895..d1106ab0d 100644 --- a/asm/easy_chat.s +++ b/asm/easy_chat.s @@ -9975,7 +9975,7 @@ _080EAE50: lsls r0, 16 lsrs r0, 16 movs r1, 0 - bl sub_8090D90 + bl GetNationalPokedexFlag b _080EAE7C _080EAE62: ldr r0, _080EAE74 @ =gUnknown_083DB694 diff --git a/asm/egg_hatch.s b/asm/egg_hatch.s index 90ae6aaf7..aa16203dc 100644 --- a/asm/egg_hatch.s +++ b/asm/egg_hatch.s @@ -46,10 +46,10 @@ AddHatchedMonToParty: @ 80429EC lsrs r4, 16 adds r0, r4, 0 movs r1, 0x2 - bl sub_8090D90 + bl GetNationalPokedexFlag adds r0, r4, 0 movs r1, 0x3 - bl sub_8090D90 + bl GetNationalPokedexFlag ldr r1, _08042AA4 @ =gStringVar1 adds r0, r5, 0 bl pokemon_get_nick diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index 404270195..002cf6527 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -1233,13 +1233,13 @@ _08112354: lsls r0, 16 lsrs r0, 16 movs r1, 0x2 - bl sub_8090D90 + bl GetNationalPokedexFlag ldrh r0, [r4, 0xC] bl SpeciesToNationalPokedexNum lsls r0, 16 lsrs r0, 16 movs r1, 0x3 - bl sub_8090D90 + bl GetNationalPokedexFlag adds r0, r5, 0 movs r1, 0xB bl GetMonData @@ -1739,13 +1739,13 @@ _081127BE: lsls r0, 16 lsrs r0, 16 movs r1, 0x2 - bl sub_8090D90 + bl GetNationalPokedexFlag ldrh r0, [r4, 0x10] bl SpeciesToNationalPokedexNum lsls r0, 16 lsrs r0, 16 movs r1, 0x3 - bl sub_8090D90 + bl GetNationalPokedexFlag movs r0, 0xE bl IncrementGameStat b _08112FD0 @@ -3047,13 +3047,13 @@ _08113316: lsls r0, 16 lsrs r0, 16 movs r1, 0x2 - bl sub_8090D90 + bl GetNationalPokedexFlag ldrh r0, [r4, 0x10] bl SpeciesToNationalPokedexNum lsls r0, 16 lsrs r0, 16 movs r1, 0x3 - bl sub_8090D90 + bl GetNationalPokedexFlag movs r0, 0xE bl IncrementGameStat b _08113B3A diff --git a/asm/mystery_event_script.s b/asm/mystery_event_script.s index 93abd97bc..02b6a0a48 100644 --- a/asm/mystery_event_script.s +++ b/asm/mystery_event_script.s @@ -667,10 +667,10 @@ _0812668C: lsrs r4, 16 adds r0, r4, 0 movs r1, 0x2 - bl sub_8090D90 + bl GetNationalPokedexFlag adds r0, r4, 0 movs r1, 0x3 - bl sub_8090D90 + bl GetNationalPokedexFlag _081266C6: adds r0, r7, 0 movs r1, 0xC diff --git a/asm/pokedex.s b/asm/pokedex.s index 8fd971840..6416bf938 100644 --- a/asm/pokedex.s +++ b/asm/pokedex.s @@ -756,8 +756,8 @@ _08090D88: _08090D8C: .4byte gPokedexEntries thumb_func_end GetPokedexHeightWeight - thumb_func_start sub_8090D90 -sub_8090D90: @ 8090D90 + thumb_func_start GetNationalPokedexFlag +GetNationalPokedexFlag: @ 8090D90 push {r4-r7,lr} lsls r0, 16 lsls r1, 24 @@ -951,7 +951,7 @@ _08090F0A: bx r1 .align 2, 0 _08090F14: .4byte gSaveBlock2 - thumb_func_end sub_8090D90 + thumb_func_end GetNationalPokedexFlag thumb_func_start GetNationalPokedexCount GetNationalPokedexCount: @ 8090F18 @@ -982,7 +982,7 @@ _08090F3E: lsrs r0, 16 movs r1, 0x1 _08090F46: - bl sub_8090D90 + bl GetNationalPokedexFlag lsls r0, 24 cmp r0, 0 beq _08090F56 @@ -1032,7 +1032,7 @@ _08090F90: lsrs r0, 16 movs r1, 0x1 _08090FA0: - bl sub_8090D90 + bl GetNationalPokedexFlag lsls r0, 24 cmp r0, 0 beq _08090FB0 @@ -1063,7 +1063,7 @@ _08090FC4: lsls r0, 16 lsrs r0, 16 movs r1, 0x1 - bl sub_8090D90 + bl GetNationalPokedexFlag lsls r0, 24 cmp r0, 0 bne _08090FE4 @@ -1090,7 +1090,7 @@ _08090FF8: lsrs r4, r0, 16 adds r0, r4, 0 movs r1, 0x1 - bl sub_8090D90 + bl GetNationalPokedexFlag lsls r0, 24 cmp r0, 0 beq _08091046 @@ -1104,7 +1104,7 @@ _08091014: lsrs r4, r0, 16 adds r0, r4, 0 movs r1, 0x1 - bl sub_8090D90 + bl GetNationalPokedexFlag lsls r0, 24 cmp r0, 0 beq _08091046 @@ -1119,7 +1119,7 @@ _08091032: lsrs r4, r0, 16 adds r0, r4, 0 movs r1, 0x1 - bl sub_8090D90 + bl GetNationalPokedexFlag lsls r0, 24 cmp r0, 0 bne _08091050 diff --git a/asm/trade.s b/asm/trade.s index 756423ee7..61bf2ea3e 100644 --- a/asm/trade.s +++ b/asm/trade.s @@ -7560,10 +7560,10 @@ sub_804BA18: @ 804BA18 lsrs r4, 16 adds r0, r4, 0 movs r1, 0x2 - bl sub_8090D90 + bl GetNationalPokedexFlag adds r0, r4, 0 movs r1, 0x3 - bl sub_8090D90 + bl GetNationalPokedexFlag _0804BA5A: pop {r4} pop {r0} @@ -3456,7 +3456,7 @@ _080BF6B2: lsls r0, 16 lsrs r0, 16 movs r1, 0 - bl sub_8090D90 + bl GetNationalPokedexFlag lsls r0, 24 asrs r0, 24 cmp r0, 0x1 @@ -5178,7 +5178,7 @@ sub_80C03C8: @ 80C03C8 lsls r0, 16 lsrs r0, 16 movs r1, 0 - bl sub_8090D90 + bl GetNationalPokedexFlag lsls r0, 24 asrs r2, r0, 24 cmp r2, 0 diff --git a/data/text/pokedex_rating.inc b/data/text/pokedex_rating.inc index d816799b6..bcf57eb5b 100644 --- a/data/text/pokedex_rating.inc +++ b/data/text/pokedex_rating.inc @@ -12,111 +12,90 @@ Route101_Text_1C44DC:: @ 81C44DC .string "So, you’ve seen {STR_VAR_1} POKéMON,\n" .string "and you’ve caught {STR_VAR_2} POKéMON...$" -gUnknown_081C4520:: @ 81C4520 -UnknownString_81C4520: @ 81C4520 +gBirchDexRatingText_LessThan10:: @ 81C4520 .string "You should go into grassy areas more\n" .string "and look for POKéMON more carefully.$" -gUnknown_081C456A:: @ 81C456A -UnknownString_81C456A: @ 81C456A +gBirchDexRatingText_LessThan20:: @ 81C456A .string "I guess you’re getting the hang of it.\n" .string "But, it gets harder from here.$" -gUnknown_081C45B0:: @ 81C45B0 -UnknownString_81C45B0: @ 81C45B0 +gBirchDexRatingText_LessThan30:: @ 81C45B0 .string "Some POKéMON only appear in certain\n" .string "areas. You’ll need to be persistent.$" -gUnknown_081C45F9:: @ 81C45F9 -UnknownString_81C45F9: @ 81C45F9 +gBirchDexRatingText_LessThan40:: @ 81C45F9 .string "Well, it could use more quantity, but\n" .string "this is looking more like a POKéDEX now.$" -gUnknown_081C4648:: @ 81C4648 -UnknownString_81C4648: @ 81C4648 +gBirchDexRatingText_LessThan50:: @ 81C4648 .string "This is coming along pretty good.\n" .string "Keep up the effort.$" -gUnknown_081C467E:: @ 81C467E -UnknownString_81C467E: @ 81C467E +gBirchDexRatingText_LessThan60:: @ 81C467E .string "Are you using any RODS?\n" .string "There are many POKéMON in the sea.$" -gUnknown_081C46B9:: @ 81C46B9 -UnknownString_81C46B9: @ 81C46B9 +gBirchDexRatingText_LessThan70:: @ 81C46B9 .string "Instead of just catching POKéMON,\n" .string "how about making them evolve, too?$" -gUnknown_081C46FE:: @ 81C46FE -UnknownString_81C46FE: @ 81C46FE +gBirchDexRatingText_LessThan80:: @ 81C46FE .string "This is going to be a fantastic POKéDEX.\n" .string "That’s the feeling I’m getting.$" -gUnknown_081C4747:: @ 81C4747 -UnknownString_81C4747: @ 81C4747 +gBirchDexRatingText_LessThan90:: @ 81C4747 .string "You’ve collected this many...\n" .string "Your talent is remarkable!$" -gUnknown_081C4780:: @ 81C4780 -UnknownString_81C4780: @ 81C4780 +gBirchDexRatingText_LessThan100:: @ 81C4780 .string "Have you visited the SAFARI ZONE?\p" .string "I hear there are some POKéMON that\n" .string "can only be caught there.$" -gUnknown_081C47DF:: @ 81C47DF -UnknownString_81C47DF: @ 81C47DF +gBirchDexRatingText_LessThan110:: @ 81C47DF .string "You’ve finally reached the 100-kind\n" .string "mark. This is an impressive POKéDEX!$" -gUnknown_081C4828:: @ 81C4828 -UnknownString_81C4828: @ 81C4828 +gBirchDexRatingText_LessThan120:: @ 81C4828 .string "There might be POKéMON that can be\n" .string "found using ROCK SMASH.$" -gUnknown_081C4863:: @ 81C4863 -UnknownString_81C4863: @ 81C4863 +gBirchDexRatingText_LessThan130:: @ 81C4863 .string "You should get some more POKéMON by\n" .string "trading with others.$" -gUnknown_081C489C:: @ 81C489C -UnknownString_81C489C: @ 81C489C +gBirchDexRatingText_LessThan140:: @ 81C489C .string "I’ve heard of POKéMON that evolve when\n" .string "they come to fully love their TRAINERS.$" -gUnknown_081C48EB:: @ 81C48EB -UnknownString_81C48EB: @ 81C48EB +gBirchDexRatingText_LessThan150:: @ 81C48EB .string "I had no idea that there were so many\n" .string "POKéMON species in the HOENN region.$" -gUnknown_081C4936:: @ 81C4936 -UnknownString_81C4936: @ 81C4936 +gBirchDexRatingText_LessThan160:: @ 81C4936 .string "On occasion, some POKéMON appear in\n" .string "large numbers like wild outbreaks.\l" .string "Don’t miss opportunities like those.$" -gUnknown_081C49A2:: @ 81C49A2 -UnknownString_81C49A2: @ 81C49A2 +gBirchDexRatingText_LessThan170:: @ 81C49A2 .string "One can get a very good idea about the\n" .string "POKéMON of the HOENN region by looking\l" .string "through your POKéDEX.$" -gUnknown_081C4A06:: @ 81C4A06 -UnknownString_81C4A06: @ 81C4A06 +gBirchDexRatingText_LessThan180:: @ 81C4A06 .string "I’d say you already qualify as a POKéMON\n" .string "PROFESSOR, and a good one, too!$" -gUnknown_081C4A4F:: @ 81C4A4F -UnknownString_81C4A4F: @ 81C4A4F +gBirchDexRatingText_LessThan190:: @ 81C4A4F .string "With a POKéDEX this complete, you’re\n" .string "a real professional at this!$" -gUnknown_081C4A91:: @ 81C4A91 -UnknownString_81C4A91: @ 81C4A91 +gBirchDexRatingText_LessThan200:: @ 81C4A91 .string "You’re very close to completing this\n" .string "POKéDEX. I can feel it in my bones!$" -gUnknown_081C4ADA:: @ 81C4ADA -UnknownString_81C4ADA: @ 81C4ADA +gBirchDexRatingText_DexCompleted:: @ 81C4ADA .string "Congratulations!\n" .string "Your POKéDEX is complete!$" diff --git a/include/pokedex.h b/include/pokedex.h index 5dd44cd2f..d67fa29a6 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -135,7 +135,7 @@ void sub_8090A3C(u8); void sub_8090C68(void); u8 *GetPokemonCategory(u16); -bool8 sub_8090D90(u16, u8); +bool8 GetNationalPokedexFlag(u16, u8); u16 GetNationalPokedexCount(u8); u16 GetHoennPokedexCount(u8); bool8 sub_8090FC0(void); diff --git a/src/battle_interface.c b/src/battle_interface.c index 9938c4b54..a9175ac10 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -8,6 +8,7 @@ #include "songs.h" #include "battle.h" #include "palette.h" +#include "pokedex.h" struct UnknownStruct5 { @@ -104,7 +105,6 @@ extern const u16 gBattleInterfaceStatusIcons_DynPal[]; #define MACRO1(n) ((n) - (n) / 8 * 8) + 64 * ((n) / 8) extern int sub_8040D3C(); -extern u8 sub_8090D90(); extern void load_gfxc_health_bar(); static void sub_8043D5C(struct Sprite *); @@ -2534,7 +2534,7 @@ static void sub_8045458(u8 a, u8 b) if (battle_side_get_owner(r4) != 0) { u16 species = GetMonData(&gEnemyParty[gUnknown_02024A6A[r4]], MON_DATA_SPECIES); - if (sub_8090D90(SpeciesToNationalPokedexNum(species), 1) != 0) + if (GetNationalPokedexFlag(SpeciesToNationalPokedexNum(species), 1) != 0) { r4 = gSprites[a].data5; if (b != 0) diff --git a/src/birch_pc.c b/src/birch_pc.c index 89eafc0ce..79070b5a8 100644 --- a/src/birch_pc.c +++ b/src/birch_pc.c @@ -9,31 +9,31 @@ extern u16 gSpecialVar_0x8004; extern u16 gSpecialVar_0x8005; extern u16 gSpecialVar_0x8006; -extern const u8 gUnknown_081C4520[]; -extern const u8 gUnknown_081C456A[]; -extern const u8 gUnknown_081C45B0[]; -extern const u8 gUnknown_081C45F9[]; -extern const u8 gUnknown_081C4648[]; -extern const u8 gUnknown_081C467E[]; -extern const u8 gUnknown_081C46B9[]; -extern const u8 gUnknown_081C46FE[]; -extern const u8 gUnknown_081C4747[]; -extern const u8 gUnknown_081C4780[]; -extern const u8 gUnknown_081C47DF[]; -extern const u8 gUnknown_081C4828[]; -extern const u8 gUnknown_081C4863[]; -extern const u8 gUnknown_081C489C[]; -extern const u8 gUnknown_081C48EB[]; -extern const u8 gUnknown_081C4936[]; -extern const u8 gUnknown_081C49A2[]; -extern const u8 gUnknown_081C4A06[]; -extern const u8 gUnknown_081C4A4F[]; -extern const u8 gUnknown_081C4A91[]; -extern const u8 gUnknown_081C4ADA[]; +extern const u8 gBirchDexRatingText_LessThan10[]; +extern const u8 gBirchDexRatingText_LessThan20[]; +extern const u8 gBirchDexRatingText_LessThan30[]; +extern const u8 gBirchDexRatingText_LessThan40[]; +extern const u8 gBirchDexRatingText_LessThan50[]; +extern const u8 gBirchDexRatingText_LessThan60[]; +extern const u8 gBirchDexRatingText_LessThan70[]; +extern const u8 gBirchDexRatingText_LessThan80[]; +extern const u8 gBirchDexRatingText_LessThan90[]; +extern const u8 gBirchDexRatingText_LessThan100[]; +extern const u8 gBirchDexRatingText_LessThan110[]; +extern const u8 gBirchDexRatingText_LessThan120[]; +extern const u8 gBirchDexRatingText_LessThan130[]; +extern const u8 gBirchDexRatingText_LessThan140[]; +extern const u8 gBirchDexRatingText_LessThan150[]; +extern const u8 gBirchDexRatingText_LessThan160[]; +extern const u8 gBirchDexRatingText_LessThan170[]; +extern const u8 gBirchDexRatingText_LessThan180[]; +extern const u8 gBirchDexRatingText_LessThan190[]; +extern const u8 gBirchDexRatingText_LessThan200[]; +extern const u8 gBirchDexRatingText_DexCompleted[]; bool16 ScriptGetPokedexInfo(void) { - if (!gSpecialVar_0x8004) + if (gSpecialVar_0x8004 == 0) // is national dex not present? { gSpecialVar_0x8005 = GetHoennPokedexCount(0); gSpecialVar_0x8006 = GetHoennPokedexCount(1); @@ -47,65 +47,66 @@ bool16 ScriptGetPokedexInfo(void) return IsNationalPokedexEnabled(); } +// This shows your Hoenn Pokedex rating and NOT your National Dex. const u8 *GetPokedexRatingText(u16 count) { if (count < 10) - return gUnknown_081C4520; + return gBirchDexRatingText_LessThan10; if (count < 20) - return gUnknown_081C456A; + return gBirchDexRatingText_LessThan20; if (count < 30) - return gUnknown_081C45B0; + return gBirchDexRatingText_LessThan30; if (count < 40) - return gUnknown_081C45F9; + return gBirchDexRatingText_LessThan40; if (count < 50) - return gUnknown_081C4648; + return gBirchDexRatingText_LessThan50; if (count < 60) - return gUnknown_081C467E; + return gBirchDexRatingText_LessThan60; if (count < 70) - return gUnknown_081C46B9; + return gBirchDexRatingText_LessThan70; if (count < 80) - return gUnknown_081C46FE; + return gBirchDexRatingText_LessThan80; if (count < 90) - return gUnknown_081C4747; + return gBirchDexRatingText_LessThan90; if (count < 100) - return gUnknown_081C4780; + return gBirchDexRatingText_LessThan100; if (count < 110) - return gUnknown_081C47DF; + return gBirchDexRatingText_LessThan110; if (count < 120) - return gUnknown_081C4828; + return gBirchDexRatingText_LessThan120; if (count < 130) - return gUnknown_081C4863; + return gBirchDexRatingText_LessThan130; if (count < 140) - return gUnknown_081C489C; + return gBirchDexRatingText_LessThan140; if (count < 150) - return gUnknown_081C48EB; + return gBirchDexRatingText_LessThan150; if (count < 160) - return gUnknown_081C4936; + return gBirchDexRatingText_LessThan160; if (count < 170) - return gUnknown_081C49A2; + return gBirchDexRatingText_LessThan170; if (count < 180) - return gUnknown_081C4A06; + return gBirchDexRatingText_LessThan180; if (count < 190) - return gUnknown_081C4A4F; + return gBirchDexRatingText_LessThan190; if (count < 200) - return gUnknown_081C4A91; + return gBirchDexRatingText_LessThan200; if (count == 200) { - if (sub_8090D90(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), 1) - || sub_8090D90(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), 1)) - return gUnknown_081C4A91; - return gUnknown_081C4ADA; + if (GetNationalPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), 1) + || GetNationalPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), 1)) // Jirachi or Deoxys is not counted towards the dex completion. + return gBirchDexRatingText_LessThan200; + return gBirchDexRatingText_DexCompleted; } if (count == 201) { - if (sub_8090D90(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), 1) - && sub_8090D90(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), 1)) - return gUnknown_081C4A91; - return gUnknown_081C4ADA; + if (GetNationalPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), 1) + && GetNationalPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), 1)) + return gBirchDexRatingText_LessThan200; + return gBirchDexRatingText_DexCompleted; } if (count == 202) - return gUnknown_081C4ADA; - return gUnknown_081C4520; + return gBirchDexRatingText_DexCompleted; + return gBirchDexRatingText_LessThan10; } void ShowPokedexRatingMessage(void) diff --git a/src/credits.c b/src/credits.c index 01af78bce..ffb7554ba 100644 --- a/src/credits.c +++ b/src/credits.c @@ -2044,7 +2044,7 @@ void sub_81458DC(void) _0814590E:\n\ adds r0, r4, 0\n\ movs r1, 0x1\n\ - bl sub_8090D90\n\ + bl GetNationalPokedexFlag\n\ lsls r0, 24\n\ adds r6, r7, 0\n\ adds r6, 0x90\n\ diff --git a/src/easy_chat.c b/src/easy_chat.c index 380fe6e4d..33d7678bb 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -243,7 +243,7 @@ static u16 sub_80EB9D8(void) { { const u16 dexNum = SpeciesToNationalPokedexNum(*speciesList); - const u8 local2 = sub_8090D90(dexNum, 0); + const u8 local2 = GetNationalPokedexFlag(dexNum, 0); if (local2) { diff --git a/src/pokedex.c b/src/pokedex.c index 5ea1f9938..83b87906d 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -855,8 +855,8 @@ void SortPokedex(u8 dexMode, u8 sortMode) { vars[2] = HoennToNationalOrder(i + 1); gPokedexView->unk0[i].dexNum = vars[2]; - gPokedexView->unk0[i].seen = sub_8090D90(vars[2], 0); - gPokedexView->unk0[i].owned = sub_8090D90(vars[2], 1); + gPokedexView->unk0[i].seen = GetNationalPokedexFlag(vars[2], 0); + gPokedexView->unk0[i].owned = GetNationalPokedexFlag(vars[2], 1); if (gPokedexView->unk0[i].seen) gPokedexView->unk60C = i + 1; } @@ -870,14 +870,14 @@ void SortPokedex(u8 dexMode, u8 sortMode) for (i = 0; i < vars[0]; i++) { vars[2] = i + 1; - if (sub_8090D90(vars[2], 0)) + if (GetNationalPokedexFlag(vars[2], 0)) r10 = 1; if (r10) { asm(""); //Needed to match for some reason gPokedexView->unk0[r5].dexNum = vars[2]; - gPokedexView->unk0[r5].seen = sub_8090D90(vars[2], 0); - gPokedexView->unk0[r5].owned = sub_8090D90(vars[2], 1); + gPokedexView->unk0[r5].seen = GetNationalPokedexFlag(vars[2], 0); + gPokedexView->unk0[r5].owned = GetNationalPokedexFlag(vars[2], 1); if (gPokedexView->unk0[r5].seen) gPokedexView->unk60C = r5 + 1; r5++; @@ -891,11 +891,11 @@ void SortPokedex(u8 dexMode, u8 sortMode) { vars[2] = gPokedexOrder_Alphabetical[i]; - if (NationalToHoennOrder(vars[2]) <= vars[0] && sub_8090D90(vars[2], 0)) + if (NationalToHoennOrder(vars[2]) <= vars[0] && GetNationalPokedexFlag(vars[2], 0)) { gPokedexView->unk0[gPokedexView->unk60C].dexNum = vars[2]; gPokedexView->unk0[gPokedexView->unk60C].seen = 1; - gPokedexView->unk0[gPokedexView->unk60C].owned = sub_8090D90(vars[2], 1); + gPokedexView->unk0[gPokedexView->unk60C].owned = GetNationalPokedexFlag(vars[2], 1); gPokedexView->unk60C++; } } @@ -905,7 +905,7 @@ void SortPokedex(u8 dexMode, u8 sortMode) { vars[2] = gPokedexOrder_Weight[i]; - if (NationalToHoennOrder(vars[2]) <= vars[0] && sub_8090D90(vars[2], 1)) + if (NationalToHoennOrder(vars[2]) <= vars[0] && GetNationalPokedexFlag(vars[2], 1)) { gPokedexView->unk0[gPokedexView->unk60C].dexNum = vars[2]; gPokedexView->unk0[gPokedexView->unk60C].seen = 1; @@ -919,7 +919,7 @@ void SortPokedex(u8 dexMode, u8 sortMode) { vars[2] = gPokedexOrder_Weight[i]; - if (NationalToHoennOrder(vars[2]) <= vars[0] && sub_8090D90(vars[2], 1)) + if (NationalToHoennOrder(vars[2]) <= vars[0] && GetNationalPokedexFlag(vars[2], 1)) { gPokedexView->unk0[gPokedexView->unk60C].dexNum = vars[2]; gPokedexView->unk0[gPokedexView->unk60C].seen = 1; @@ -933,7 +933,7 @@ void SortPokedex(u8 dexMode, u8 sortMode) { vars[2] = gPokedexOrder_Height[i]; - if (NationalToHoennOrder(vars[2]) <= vars[0] && sub_8090D90(vars[2], 1)) + if (NationalToHoennOrder(vars[2]) <= vars[0] && GetNationalPokedexFlag(vars[2], 1)) { gPokedexView->unk0[gPokedexView->unk60C].dexNum = vars[2]; gPokedexView->unk0[gPokedexView->unk60C].seen = 1; @@ -947,7 +947,7 @@ void SortPokedex(u8 dexMode, u8 sortMode) { vars[2] = gPokedexOrder_Height[i]; - if (NationalToHoennOrder(vars[2]) <= vars[0] && sub_8090D90(vars[2], 1)) + if (NationalToHoennOrder(vars[2]) <= vars[0] && GetNationalPokedexFlag(vars[2], 1)) { gPokedexView->unk0[gPokedexView->unk60C].dexNum = vars[2]; gPokedexView->unk0[gPokedexView->unk60C].seen = 1; diff --git a/src/script_pokemon_util_80C4BF0.c b/src/script_pokemon_util_80C4BF0.c index 912458655..d1e401e18 100644 --- a/src/script_pokemon_util_80C4BF0.c +++ b/src/script_pokemon_util_80C4BF0.c @@ -568,8 +568,8 @@ u8 ScriptGiveMon(u16 species, u8 var, u16 item, u32 var3, u32 var4, u8 var5) if(sentToPc >= 0) { // set both the seen and caught flags - sub_8090D90(nationalSpecies, 2); - sub_8090D90(nationalSpecies, 3); + GetNationalPokedexFlag(nationalSpecies, 2); + GetNationalPokedexFlag(nationalSpecies, 3); } } return sentToPc; |