Text speed options: INSTANT, FAST, MED

The options menu on the main menu currently doesn't work. Options menu in-game works fine.
This commit is contained in:
BlueZangoose 2023-07-03 23:50:46 +01:00
parent ee001744dc
commit a4f066d705
3 changed files with 20 additions and 20 deletions

View file

@ -9,9 +9,9 @@ DEF TRUE EQU 1
const FLAG_TEST ; 2
; wOptions
DEF TEXT_DELAY_FAST EQU %001 ; 1
DEF TEXT_DELAY_MEDIUM EQU %011 ; 3
DEF TEXT_DELAY_SLOW EQU %101 ; 5
DEF TEXT_DELAY_FAST EQU %000 ; 0
DEF TEXT_DELAY_MEDIUM EQU %001 ; 1
DEF TEXT_DELAY_SLOW EQU %011 ; 3
const_def 6
const BIT_BATTLE_SHIFT ; 6

View file

@ -28,7 +28,7 @@ IF DEF(_DEBUG)
ld de, DebugMenuOptions
call PlaceString
ld a, TEXT_DELAY_FAST
ld a, TEXT_DELAY_MEDIUM
ld [wOptions], a
ld a, A_BUTTON | B_BUTTON | START

View file

@ -127,7 +127,7 @@ MainMenu:
InitOptions:
ld a, TEXT_DELAY_FAST
ld [wLetterPrintingDelayFlags], a
ld a, TEXT_DELAY_FAST ; makes fasttext come up without the need to change settings
ld a, TEXT_DELAY_MEDIUM
ld [wOptions], a
ret
@ -561,32 +561,32 @@ DisplayOptionMenu:
jp .eraseOldMenuCursor
.pressedLeftInTextSpeed
ld a, [wOptionsTextSpeedCursorX] ; text speed cursor X coordinate
cp 1
cp 1 ; 1 = Instant
jr z, .updateTextSpeedXCoord
cp 7
jr nz, .fromSlowToMedium
sub 6
cp 9 ; 9 = Fast
jr nz, .fromMedToFast
sub 8 ; Fast to Instant
jr .updateTextSpeedXCoord
.fromSlowToMedium
sub 7
.fromMedToFast
sub 6 ; Med to Fast
jr .updateTextSpeedXCoord
.pressedRightInTextSpeed
ld a, [wOptionsTextSpeedCursorX] ; text speed cursor X coordinate
cp 14
cp 15 ; 15 = Med
jr z, .updateTextSpeedXCoord
cp 7
jr nz, .fromFastToMedium
add 7
cp 9 ; 9 = Fast
jr nz, .fromInstantToFast
add 6 ; Fast to Medium
jr .updateTextSpeedXCoord
.fromFastToMedium
add 6
.fromInstantToFast
add 8 ; Instant to Fast
.updateTextSpeedXCoord
ld [wOptionsTextSpeedCursorX], a ; text speed cursor X coordinate
jp .eraseOldMenuCursor
TextSpeedOptionText:
db "TEXT SPEED"
next " FAST MEDIUM SLOW@"
next " INSTANT FAST MED@"
BattleAnimationOptionText:
db "BATTLE ANIMATION"
@ -682,9 +682,9 @@ SetCursorPositionsFromOptions:
; 01: delay after printing a letter (in frames)
TextSpeedOptionData:
db 14, TEXT_DELAY_SLOW
db 7, TEXT_DELAY_MEDIUM
db 9, TEXT_DELAY_MEDIUM
db 1, TEXT_DELAY_FAST
db 7, -1 ; end (default X coordinate)
db 9, -1 ; end (default X coordinate)
CheckForPlayerNameInSRAM:
; Check if the player name data in SRAM has a string terminator character