mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-22 15:12:18 +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
|
|
@ -15,7 +15,7 @@ RedisplayStartMenu::
|
|||
call HandleMenuInput
|
||||
ld b, a
|
||||
.checkIfUpPressed
|
||||
bit 6, a ; was Up pressed?
|
||||
bit BIT_D_UP, a
|
||||
jr z, .checkIfDownPressed
|
||||
ld a, [wCurrentMenuItem] ; menu selection
|
||||
and a
|
||||
|
|
@ -54,7 +54,7 @@ RedisplayStartMenu::
|
|||
ld a, [wCurrentMenuItem]
|
||||
ld [wBattleAndStartSavedMenuItem], a ; save current menu selection
|
||||
ld a, b
|
||||
and %00001010 ; was the Start button or B button pressed?
|
||||
and B_BUTTON | START ; was the Start button or B button pressed?
|
||||
jp nz, CloseStartMenu
|
||||
call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2
|
||||
CheckEvent EVENT_GOT_POKEDEX
|
||||
|
|
@ -79,7 +79,7 @@ RedisplayStartMenu::
|
|||
CloseStartMenu::
|
||||
call Joypad
|
||||
ldh a, [hJoyPressed]
|
||||
bit 0, a ; was A button newly pressed?
|
||||
bit BIT_A_BUTTON, a
|
||||
jr nz, CloseStartMenu
|
||||
call LoadTextBoxTilePatterns
|
||||
jp CloseTextDisplay
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue