From b40181db416b0b2bcd7b8c2616572314ff14f1bf Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sat, 30 Dec 2017 12:35:50 -0500 Subject: [PATCH] Use input constants --- engine/events.asm | 4 ++-- engine/mon_menu.asm | 4 ++-- engine/scrolling_menu.asm | 16 ++++++++-------- home.asm | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/engine/events.asm b/engine/events.asm index 55d02ee93..7356a8910 100644 --- a/engine/events.asm +++ b/engine/events.asm @@ -875,10 +875,10 @@ CheckMenuOW: ; 96b30 ld [hMenuReturn + 1], a ld a, [hJoyPressed] - bit 2, a ; SELECT + bit SELECT_F, a jr nz, .Select - bit 3, a ; START + bit START_F, a jr z, .NoMenu ld a, BANK(StartMenuScript) diff --git a/engine/mon_menu.asm b/engine/mon_menu.asm index dc6cd5cc8..e3570ab70 100755 --- a/engine/mon_menu.asm +++ b/engine/mon_menu.asm @@ -89,9 +89,9 @@ MonMenuLoop: ; 24d59 ld de, SFX_READ_TEXT_2 call PlaySFX ld a, [hJoyPressed] - bit 0, a ; A + bit A_BUTTON_F, a jr nz, .select - bit 1, a ; B + bit B_BUTTON_F, a jr nz, .cancel jr .loop diff --git a/engine/scrolling_menu.asm b/engine/scrolling_menu.asm index 08a718df1..32f22188a 100755 --- a/engine/scrolling_menu.asm +++ b/engine/scrolling_menu.asm @@ -65,21 +65,21 @@ ScrollingMenuJoyAction: ; 24609 ld a, [hJoyPressed] and BUTTONS or b - bit 0, a ; A + bit A_BUTTON_F, a jp nz, .a_button - bit 1, a ; B + bit B_BUTTON_F, a jp nz, .b_button - bit 2, a ; Select + bit SELECT_F, a jp nz, .select - bit 3, a ; Start + bit START_F, a jp nz, .start - bit 4, a ; Right + bit D_RIGHT_F, a jp nz, .d_right - bit 5, a ; Left + bit D_LEFT_F, a jp nz, .d_left - bit 6, a ; Up + bit D_UP_F, a jp nz, .d_up - bit 7, a ; Down + bit D_DOWN_F, a jp nz, .d_down jr .loop ; 24640 diff --git a/home.asm b/home.asm index 7893acaa5..4c59d1d1a 100644 --- a/home.asm +++ b/home.asm @@ -332,7 +332,7 @@ PrintLetterDelay:: ; 313d jr .updatedelay .fast - ld a, 1 + ld a, TEXT_DELAY_FAST .updatedelay ld [TextDelayFrames], a @@ -347,11 +347,11 @@ PrintLetterDelay:: ; 313d ; Wait one frame if holding A or B. ld a, [hJoyDown] - bit 0, a ; A_BUTTON + bit A_BUTTON_F, a jr z, .checkb jr .delay .checkb - bit 1, a ; B_BUTTON + bit B_BUTTON_F, a jr z, .wait .delay