diff options
author | Yoann Fievez <yoann.fievez@gmail.com> | 2021-11-05 20:40:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-05 15:40:15 -0400 |
commit | 8349bfd8e646002105dfd6a7f997c26cf0e0624b (patch) | |
tree | 8586363ba32075ec9c7ddf07e384507679658b11 /home/start_menu.asm | |
parent | b44a10a43a1fa4a558b4c593d0a610571ecb3a50 (diff) |
Refactorize check button pressed (#340)
Diffstat (limited to 'home/start_menu.asm')
-rw-r--r-- | home/start_menu.asm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/home/start_menu.asm b/home/start_menu.asm index 5b29f67a..ed3d9470 100644 --- a/home/start_menu.asm +++ b/home/start_menu.asm @@ -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 |