mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Refactorize check button pressed (#340)
This commit is contained in:
parent
b44a10a43a
commit
8349bfd8e6
23 changed files with 71 additions and 71 deletions
|
|
@ -65,7 +65,7 @@ StartMenu_Pokemon::
|
|||
push af
|
||||
call LoadScreenTilesFromBuffer1 ; restore saved screen
|
||||
pop af
|
||||
bit 1, a ; was the B button pressed?
|
||||
bit BIT_B_BUTTON, a
|
||||
jp nz, .loop
|
||||
; if the B button wasn't pressed
|
||||
ld a, [wMaxMenuItem]
|
||||
|
|
@ -360,7 +360,7 @@ StartMenu_Item::
|
|||
ld [hl], a ; old menu item id
|
||||
call HandleMenuInput
|
||||
call PlaceUnfilledArrowMenuCursor
|
||||
bit 1, a ; was the B button pressed?
|
||||
bit BIT_B_BUTTON, a
|
||||
jr z, .useOrTossItem
|
||||
jp ItemMenuLoop
|
||||
.useOrTossItem ; if the player made the choice to use or toss the item
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue