shithub: pokecrystal

Download patch

ref: e1a672e427f0e18d35b9025b94186d74fd437cbf
parent: 9f017cbab8e6856680c35278829c6388e9fdf697
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Fri Dec 29 08:18:17 EST 2017

Constants for TextBoxFlags

--- a/constants/wram_constants.asm
+++ b/constants/wram_constants.asm
@@ -29,6 +29,11 @@
 	const FRAME_7 ; 6
 	const FRAME_8 ; 7
 
+; TextBoxFlags:
+	const_def
+	const TEXT_DELAY_F    ; 0
+	const NO_TEXT_DELAY_F ; 1
+
 ; Options2:
 	const_def
 	const MENU_ACCOUNT ; 0
--- a/data/default_options.asm
+++ b/data/default_options.asm
@@ -5,12 +5,12 @@
 	db $00
 ; TextBoxFrame: frame 1
 	db FRAME_1
-; TextBoxFlags: ??
-	db $01
+; TextBoxFlags: use text speed
+	db 1 << TEXT_DELAY_F
 ; GBPrinter: normal brightness
 	db GBPRINTER_NORMAL
 ; Options2: menu account on
-	db $01
+	db 1 << MENU_ACCOUNT
 ; $cfd2: ??
 	db $00
 ; $cfd3: ??
--- a/home.asm
+++ b/home.asm
@@ -306,7 +306,7 @@
 
 ; non-scrolling text?
 	ld a, [TextBoxFlags]
-	bit 1, a
+	bit NO_TEXT_DELAY_F, a
 	ret z
 
 	push hl
@@ -323,7 +323,7 @@
 
 ; force fast scroll?
 	ld a, [TextBoxFlags]
-	bit 0, a
+	bit TEXT_DELAY_F, a
 	jr z, .fast
 
 ; text speed
--- a/home/text.asm
+++ b/home/text.asm
@@ -697,7 +697,7 @@
 PlaceHLTextAtBC:: ; 13e5
 	ld a, [TextBoxFlags]
 	push af
-	set 1, a
+	set NO_TEXT_DELAY_F, a
 	ld [TextBoxFlags], a
 
 	call DoTextUntilTerminator
--- a/wram.asm
+++ b/wram.asm
@@ -1480,7 +1480,10 @@
 TextBoxFrame:: ; cfce
 ; bits 0-2: textbox frame 0-7
 	db
-TextBoxFlags:: db
+TextBoxFlags::
+; bit 0: 1-frame text delay
+; bit 4: no text delay
+	db
 GBPrinter:: ; cfd0
 ; bit 0-6: brightness
 ;   lightest: $00