summaryrefslogtreecommitdiff
path: root/home/list_menu.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-11-23 21:19:29 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2021-11-23 21:19:29 -0500
commit7574e186e7505e237efc3ab0969fed60bec6eb9d (patch)
tree527ec48412989e98cca7827c5e31d89cdf742b05 /home/list_menu.asm
parent70baa4f3e80bceedd00cafbbab219665eb189225 (diff)
parent09e92c554c7563b52a9484b26d96d903c7635b0d (diff)
Merge remote-tracking branch 'remotes/pokered/master'
Diffstat (limited to 'home/list_menu.asm')
-rw-r--r--home/list_menu.asm16
1 files changed, 8 insertions, 8 deletions
diff --git a/home/list_menu.asm b/home/list_menu.asm
index a7398135..13bcec59 100644
--- a/home/list_menu.asm
+++ b/home/list_menu.asm
@@ -84,7 +84,7 @@ DisplayListMenuIDLoop::
push af
call PlaceMenuCursor
pop af
- bit 0, a ; was the A button pressed?
+ bit BIT_A_BUTTON, a
jp z, .checkOtherKeys
.buttonAPressed
ld a, [wCurrentMenuItem]
@@ -168,12 +168,12 @@ DisplayListMenuIDLoop::
res 6, [hl] ; turn on letter printing delay
jp BankswitchBack
.checkOtherKeys ; check B, SELECT, Up, and Down keys
- bit 1, a ; was the B button pressed?
+ bit BIT_B_BUTTON, a
jp nz, ExitListMenu ; if so, exit the menu
- bit 2, a ; was the select button pressed?
+ bit BIT_SELECT, a
jp nz, HandleItemListSwapping ; if so, allow the player to swap menu entries
ld b, a
- bit 7, b ; was Down pressed?
+ bit BIT_D_DOWN, b
ld hl, wListScrollOffset
jr z, .upPressed
.downPressed
@@ -218,13 +218,13 @@ DisplayChooseQuantityMenu::
.waitForKeyPressLoop
call JoypadLowSensitivity
ldh a, [hJoyPressed] ; newly pressed buttons
- bit 0, a ; was the A button pressed?
+ bit BIT_A_BUTTON, a
jp nz, .buttonAPressed
- bit 1, a ; was the B button pressed?
+ bit BIT_B_BUTTON, a
jp nz, .buttonBPressed
- bit 6, a ; was Up pressed?
+ bit BIT_D_UP, a
jr nz, .incrementQuantity
- bit 7, a ; was Down pressed?
+ bit BIT_D_DOWN, a
jr nz, .decrementQuantity
jr .waitForKeyPressLoop
.incrementQuantity