summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Harding <corrnondacqb@yahoo.com>2015-02-20 01:19:55 -0500
committerDaniel Harding <corrnondacqb@yahoo.com>2015-02-20 01:19:55 -0500
commitd8d0893d94e652c8c5ebf347498e86a369bf1051 (patch)
tree9a79ad35940fa484c1faead3b95bf0820bc18c53
parentb65c6e815643a1cbce8c7c3cd48fc9881bb56d01 (diff)
parent084c8407d879e114453147b737528da46f3b1cb5 (diff)
Merge pull request #80 from dannye/master
Remove hard-coded wPokedexOwned/wPokedexSeen array size
-rwxr-xr-xengine/menu/pokedex.asm2
-rwxr-xr-xscripts/oakslab.asm2
2 files changed, 2 insertions, 2 deletions
diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm
index e636e59d..4351ae4c 100755
--- a/engine/menu/pokedex.asm
+++ b/engine/menu/pokedex.asm
@@ -194,7 +194,7 @@ HandlePokedexListMenu: ; 40111 (10:4111)
call PlaceString
; find the highest pokedex number among the pokemon the player has seen
ld hl,wPokedexSeenEnd - 1
- ld b,153
+ ld b,(wPokedexSeenEnd - wPokedexSeen) * 8 + 1
.maxSeenPokemonLoop
ld a,[hld]
ld c,8
diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm
index 6b7d5e1e..8f23cd3e 100755
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -944,7 +944,7 @@ OaksLabText5: ; 1d248 (7:5248)
bit 6, a
jr nz, .asm_50e81 ; 0x1d24e
ld hl, wPokedexOwned
- ld b, $13
+ ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
ld a, [wd11e]
cp $2