summaryrefslogtreecommitdiff
path: root/engine/menu/start_menu.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/menu/start_menu.asm')
-rwxr-xr-xengine/menu/start_menu.asm13
1 files changed, 5 insertions, 8 deletions
diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm
index 3c3b837c..60010d9c 100755
--- a/engine/menu/start_menu.asm
+++ b/engine/menu/start_menu.asm
@@ -8,7 +8,7 @@ DisplayStartMenu:: ; 29d1 (0:29d1)
RedisplayStartMenu:: ; 29e1 (0:29e1)
callba DrawStartMenu
callba PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone
- call UpdateSprites ; move sprites
+ call UpdateSprites
.loop
call HandleMenuInput
ld b,a
@@ -22,8 +22,7 @@ RedisplayStartMenu:: ; 29e1 (0:29e1)
and a
jr nz,.loop
; if the player pressed tried to go past the top item, wrap around to the bottom
- ld a,[wd74b]
- bit 5,a ; does the player have the pokedex?
+ CheckEvent EVENT_GOT_POKEDEX
ld a,6 ; there are 7 menu items with the pokedex, so the max index is 6
jr nz,.wrapMenuItemId
dec a ; there are only 6 menu items without the pokedex
@@ -35,8 +34,7 @@ RedisplayStartMenu:: ; 29e1 (0:29e1)
bit 7,a
jr z,.buttonPressed
; if the player pressed tried to go past the bottom item, wrap around to the top
- ld a,[wd74b]
- bit 5,a ; does the player have the pokedex?
+ CheckEvent EVENT_GOT_POKEDEX
ld a,[wCurrentMenuItem]
ld c,7 ; there are 7 menu items with the pokedex
jr nz,.checkIfPastBottom
@@ -52,13 +50,12 @@ RedisplayStartMenu:: ; 29e1 (0:29e1)
.buttonPressed ; A, B, or Start button pressed
call PlaceUnfilledArrowMenuCursor
ld a,[wCurrentMenuItem]
- ld [wcc2d],a ; save current menu item ID
+ ld [wBattleAndStartSavedMenuItem],a ; save current menu selection
ld a,b
and a,%00001010 ; was the Start button or B button pressed?
jp nz,CloseStartMenu
call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2
- ld a,[wd74b]
- bit 5,a ; does the player have the pokedex?
+ CheckEvent EVENT_GOT_POKEDEX
ld a,[wCurrentMenuItem]
jr nz,.displayMenuItem
inc a ; adjust position to account for missing pokedex menu item