ref: 90b22d602f2c8498d94c37a7a0f6a81b90c98b35
parent: 146fa1be515510dd6e7b9dea698aa453b0bc3920
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Tue Jul 10 13:18:23 EDT 2018
Use more options constants
--- a/constants/wram_constants.asm
+++ b/constants/wram_constants.asm
@@ -20,7 +20,8 @@
GAMETIMERPAUSE_TIMER_PAUSED_F EQU 0
GAMETIMERPAUSE_MOBILE_7_F EQU 7
-; wOptions:: (bits 4-7) ; cfcc
+; wOptions:: ; cfcc
+TEXT_DELAY_MASK EQU %111
const_def 4
const NO_TEXT_SCROLL ; 4
const STEREO ; 5
@@ -27,10 +28,9 @@
const BATTLE_SHIFT ; 6
const BATTLE_SCENE ; 7
-; wOptions:: (bits 0-2) ; cfcc
-TEXT_DELAY_FAST EQU 1
-TEXT_DELAY_MED EQU 3
-TEXT_DELAY_SLOW EQU 5
+TEXT_DELAY_FAST EQU %001 ; 1
+TEXT_DELAY_MED EQU %011 ; 3
+TEXT_DELAY_SLOW EQU %101 ; 5
; wTextBoxFrame:: ; cfce
const_def
--- a/engine/menus/options_menu.asm
+++ b/engine/menus/options_menu.asm
@@ -165,7 +165,7 @@
; converts TEXT_DELAY_* value in a to OPT_TEXT_SPEED_* value in c,
; with previous/next TEXT_DELAY_* values in d/e
ld a, [wOptions]
- and $7
+ and TEXT_DELAY_MASK
cp TEXT_DELAY_SLOW
jr z, .slow
cp TEXT_DELAY_FAST
@@ -467,7 +467,7 @@
dec a
.Save:
- and $7
+ maskbits NUM_FRAMES
ld [hl], a
UpdateFrame:
ld a, [wTextBoxFrame]