From 90b22d602f2c8498d94c37a7a0f6a81b90c98b35 Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 10 Jul 2018 17:18:23 -0400 Subject: [PATCH] Use more options constants --- constants/wram_constants.asm | 10 +++++----- engine/menus/options_menu.asm | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm index 9f9132a66..5889ca7a6 100644 --- a/constants/wram_constants.asm +++ b/constants/wram_constants.asm @@ -20,17 +20,17 @@ AUTO_INPUT EQU $ff 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 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 diff --git a/engine/menus/options_menu.asm b/engine/menus/options_menu.asm index 46fa33621..370eba3f6 100644 --- a/engine/menus/options_menu.asm +++ b/engine/menus/options_menu.asm @@ -165,7 +165,7 @@ GetTextSpeed: ; 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 @@ Options_Frame: dec a .Save: - and $7 + maskbits NUM_FRAMES ld [hl], a UpdateFrame: ld a, [wTextBoxFrame]