ref: b40181db416b0b2bcd7b8c2616572314ff14f1bf
parent: f01434f2c0d7895d3520c5d18913a382e6684c80
author: Remy Oukaour <[email protected]>
date: Sat Dec 30 07:35:50 EST 2017
Use input constants
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -875,10 +875,10 @@
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)
--- a/engine/mon_menu.asm
+++ b/engine/mon_menu.asm
@@ -89,9 +89,9 @@
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
--- a/engine/scrolling_menu.asm
+++ b/engine/scrolling_menu.asm
@@ -65,21 +65,21 @@
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
--- a/home.asm
+++ b/home.asm
@@ -332,7 +332,7 @@
jr .updatedelay
.fast
- ld a, 1
+ ld a, TEXT_DELAY_FAST
.updatedelay
ld [TextDelayFrames], a
@@ -347,11 +347,11 @@
; 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