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 /engine/battle/core.asm | |
parent | b44a10a43a1fa4a558b4c593d0a610571ecb3a50 (diff) |
Refactorize check button pressed (#340)
Diffstat (limited to 'engine/battle/core.asm')
-rw-r--r-- | engine/battle/core.asm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 57303776..6c0585b6 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -2087,7 +2087,7 @@ DisplayBattleMenu:: ld [hli], a ; wMaxMenuItem ld [hl], D_RIGHT | A_BUTTON ; wMenuWatchedKeys call HandleMenuInput - bit 4, a ; check if right was pressed + bit BIT_D_RIGHT, a jr nz, .rightColumn jr .AButtonPressed ; the A button was pressed .rightColumn ; put cursor in right column of menu @@ -2350,7 +2350,7 @@ PartyMenuOrRockOrRun: xor a ld [hl], a ; wLastMenuItem call HandleMenuInput - bit 1, a ; was A pressed? + bit BIT_B_BUTTON, a jr nz, .partyMonDeselected ; if B was pressed, jump ; A was pressed call PlaceUnfilledArrowMenuCursor @@ -6745,7 +6745,7 @@ DetermineWildOpponent: bit 1, a jr z, .asm_3ef2f ldh a, [hJoyHeld] - bit 1, a ; B button pressed? + bit BIT_B_BUTTON, a ret nz .asm_3ef2f ld a, [wNumberOfNoRandomBattleStepsLeft] |