portable pc

This commit is contained in:
Thorn Avery 2024-01-29 16:43:33 +13:00
parent 031bee1627
commit 94ef32cb10
6 changed files with 53 additions and 10 deletions

View file

@ -1,7 +1,8 @@
; rst vectors (unused)
SECTION "rst0", ROM0[$0000]
rst $38
_Bankswitch::
jp Bankswitch
ds $08 - @, 0 ; unused

View file

@ -25,9 +25,10 @@ RedisplayStartMenu::
jr nz, .loop
; if the player pressed tried to go past the top item, wrap around to the bottom
CheckEvent EVENT_GOT_POKEDEX
ld a, 6 ; there are 7 menu items with the pokedex, so the max index is 6
ld a, 7 ; there are 8 menu items with the pokedex and pc, so the max index is 7
jr nz, .wrapMenuItemId
dec a ; there are only 6 menu items without the pokedex
;dec a ; there are only 6 menu items without the pokedex
ld a, 5
.wrapMenuItemId
ld [wCurrentMenuItem], a
call EraseMenuCursor
@ -38,9 +39,10 @@ RedisplayStartMenu::
; if the player pressed tried to go past the bottom item, wrap around to the top
CheckEvent EVENT_GOT_POKEDEX
ld a, [wCurrentMenuItem]
ld c, 7 ; there are 7 menu items with the pokedex
ld c, 8 ; there are 8 menu items with the pokedex and pc
jr nz, .checkIfPastBottom
dec c ; there are only 6 menu items without the pokedex
;dec c ; there are only 6 menu items without the pokedex
ld c, 6
.checkIfPastBottom
cp c
jr nz, .loop
@ -74,6 +76,8 @@ RedisplayStartMenu::
jp z, StartMenu_SaveReset
cp 5
jp z, StartMenu_Option
cp 6
jp z, StartMenu_PortablePC
; EXIT falls through to here
CloseStartMenu::