diff options
author | dannye <corrnondacqb@yahoo.com> | 2015-08-23 23:21:54 -0500 |
---|---|---|
committer | dannye <corrnondacqb@yahoo.com> | 2015-08-23 23:21:54 -0500 |
commit | 9b0b36bf3c57b02552d140f465c97172c71a0085 (patch) | |
tree | dc5c14d14d979ecb7aee0ca92d78541eb15995f6 /engine/menu | |
parent | d9eea7dd660eeb428717f21861ef5f05e1a74418 (diff) |
Remove redundant index conversionpokedex-order
Diffstat (limited to 'engine/menu')
-rwxr-xr-x | engine/menu/pokedex.asm | 42 | ||||
-rwxr-xr-x | engine/menu/status_screen.asm | 1 |
2 files changed, 0 insertions, 43 deletions
diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm index a58523e8..1215bbe4 100755 --- a/engine/menu/pokedex.asm +++ b/engine/menu/pokedex.asm @@ -77,7 +77,6 @@ HandlePokedexSideMenu: ; 4006d (10:406d) call IsPokemonBitSet ld b,2 jr z,.exitSideMenu - call PokedexToIndex ld hl,wTopMenuItemY ld a,10 ld [hli],a ; top menu item Y @@ -260,7 +259,6 @@ HandlePokedexListMenu: ; 40111 (10:4111) .dashedLine ; for unseen pokemon in the list db "----------@" .getPokemonName - call PokedexToIndex call GetMonName .skipGettingName pop hl @@ -460,7 +458,6 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) push de ld a,[wd11e] push af - call IndexToPokedex coord hl, 2, 8 ld a, "№" ld [hli],a @@ -604,42 +601,3 @@ DrawTileLine: ; 40474 (10:4474) ret INCLUDE "data/pokedex_entries.asm" - -PokedexToIndex: ; 40ff9 (10:4ff9) - ; converts the Pokédex number at wd11e to an index - push bc - push hl - ld a,[wd11e] - ld b,a - ld c,0 - ld hl,PokedexOrder - -.loop ; go through the list until we find an entry with a matching dex number - inc c - ld a,[hli] - cp b - jr nz,.loop - - ld a,c - ld [wd11e],a - pop hl - pop bc - ret - -IndexToPokedex: ; 41010 (10:5010) - ; converts the indexédex number at wd11e to a Pokédex number - push bc - push hl - ld a,[wd11e] - dec a - ld hl,PokedexOrder - ld b,0 - ld c,a - add hl,bc - ld a,[hl] - ld [wd11e],a - pop hl - pop bc - ret - -INCLUDE "data/pokedex_order.asm" diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index c91d5eda..e22ccfb3 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -141,7 +141,6 @@ StatusScreen: ; 12953 (4:6953) ld a, [W_MONHINDEX] ld [wd11e], a ld [wd0b5], a - predef IndexToPokedex coord hl, 3, 7 ld de, wd11e lb bc, LEADING_ZEROES | 1, 3 |