summaryrefslogtreecommitdiff
path: root/engine/menu/pokedex.asm
diff options
context:
space:
mode:
authordannye <corrnondacqb@yahoo.com>2016-08-12 13:41:52 -0500
committerdannye <corrnondacqb@yahoo.com>2016-08-12 13:41:52 -0500
commit3feff214d6ce2e3c6b4ae504c50bcdf09b47eac9 (patch)
treeb5c62e6af4cac0ee4a2031da318750241131b313 /engine/menu/pokedex.asm
parentaa1e3eac34137d88d6bc1df4fac6f32ceab404b6 (diff)
Remove redundant index conversionpokedex-order
Diffstat (limited to 'engine/menu/pokedex.asm')
-rwxr-xr-xengine/menu/pokedex.asm42
1 files changed, 0 insertions, 42 deletions
diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm
index 2da3a0f6..4c5479a5 100755
--- a/engine/menu/pokedex.asm
+++ b/engine/menu/pokedex.asm
@@ -77,7 +77,6 @@ HandlePokedexSideMenu:
call IsPokemonBitSet
ld b,2
jr z,.exitSideMenu
- call PokedexToIndex
ld hl,wTopMenuItemY
ld a,10
ld [hli],a ; top menu item Y
@@ -265,7 +264,6 @@ HandlePokedexListMenu:
.dashedLine ; for unseen pokemon in the list
db "----------@"
.getPokemonName
- call PokedexToIndex
call GetMonName
.skipGettingName
pop hl
@@ -473,7 +471,6 @@ ShowPokedexDataInternal:
push de
ld a,[wd11e]
push af
- call IndexToPokedex
coord hl, 2, 8
ld a, "№"
@@ -624,42 +621,3 @@ DrawTileLine:
ret
INCLUDE "data/pokedex_entries.asm"
-
-PokedexToIndex:
- ; 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:
- ; 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"