From 5ae3ccf19c6e37e44f086a2a2966cb6afc13fcce Mon Sep 17 00:00:00 2001 From: Chikorita Lover Date: Sat, 11 Sep 2021 20:55:00 -0500 Subject: Add diff for showing dex number on stats screen --- "Custom-order-for-the-Old-Pok\303\251dex-mode.md" | 28 ++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git "a/Custom-order-for-the-Old-Pok\303\251dex-mode.md" "b/Custom-order-for-the-Old-Pok\303\251dex-mode.md" index 69ffd2d..44197d7 100644 --- "a/Custom-order-for-the-Old-Pok\303\251dex-mode.md" +++ "b/Custom-order-for-the-Old-Pok\303\251dex-mode.md" @@ -164,4 +164,30 @@ Edit [pokedex_2.asm](../blob/master/engine/pokedex/pokedex_2.asm): call PrintNum ``` -Build and test! All Pokemon will now show a correct Pokedex number corresponding to dex_order_old.asm! \ No newline at end of file +Build and test! All Pokemon will now show a correct Pokedex number corresponding to dex_order_old.asm! + +If you want the number to also be reflected on the Pokémon's stats page, make the following changes to [engine/pokemon/stats_screen.asm](../blob/master/engine/pokemon/stats_screen.asm): + +```diff +… +StatsScreen_InitUpperHalf: + call .PlaceHPBar + xor a + ldh [hBGMapMode], a + ld a, [wBaseDexNo] + ld [wTextDecimalByte], a + ld [wCurSpecies], a + hlcoord 8, 0 + ld [hl], "№" + inc hl + ld [hl], "." + inc hl +- hlcoord 10, 0 ++ farcall Pokedex_GetDexNumber + lb bc, PRINTNUM_LEADINGZEROS | 1, 3 +- ld de, wTextDecimalByte ++ ld de, wUnusedBCDNumber ++ hlcoord 10, 0 + call PrintNum +… +``` \ No newline at end of file -- cgit v1.2.3