summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Custom-order-for-the-Old-Pokédex-mode.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/Custom-order-for-the-Old-Pokédex-mode.md b/Custom-order-for-the-Old-Pokédex-mode.md
index c41a413..4e803cb 100644
--- a/Custom-order-for-the-Old-Pokédex-mode.md
+++ b/Custom-order-for-the-Old-Pokédex-mode.md
@@ -101,7 +101,7 @@ INCLUDE "engine/pokedex/pokedex.asm"
INCLUDE "engine/pokedex/pokedex_2.asm"
```
-There should be plenty of space in that bacnk for both Pokedex ASMs. With this code, as I have it, you'll need to have them in the same bank, so with that done, move on to [engine/pokedex/pokedex.asm](../blob/master/engine/pokedex/pokedex.asm):
+There should be plenty of space in that bank for both Pokedex ASMs. With this code, as I have it, you'll need to have them in the same bank, so with that done, move on to [engine/pokedex/pokedex.asm](../blob/master/engine/pokedex/pokedex.asm):
```diff
Pokedex_PrintNumberIfOldMode:
ld a, [wCurDexMode]
@@ -127,21 +127,21 @@ And add this code to any safe place in the file. I put it right before OldPokede
Pokedex_GetDexNumber:
; Get the intended number of the selected Pokémon.
push bc
- push hl ;Store bc and hl to the stack
+ push hl
ld a, [wTempSpecies] ;a = current mon (internal number)
ld b, a ;b = Needed mon (a and b must be matched)
ld c, 0 ;c = index
- ld hl,OldPokedexOrder ;hl = OldDexOrder
+ ld hl,OldPokedexOrder
.loop
inc c
- ld a, [hli] ;save index of hl to a
- cp b ;does a match b?
- jr nz, .loop ;if not, loop
+ ld a, [hli]
+ cp b
+ jr nz, .loop
ld a, c
ld [wc296], a
- pop hl ;Restore bc and hl in reverse order to keep the stack correct.
+ pop hl
pop bc
ret
```