Stereo and Fast text are now default options

Making Stereo the default was weirdly taxing. I don't know how or where this is usually initialised, I searched for like 2 hours and came up empty-handed...so I made a virus in the intro sequence instead. Tested with an empty save file.

Fast text was just a case of adding it to defaultoptions. I have no idea how or why this worked, as it only seems to be called when save files corrupt, and adding the stereo bit there didn't let it work in the same way. Oh well...
This commit is contained in:
Llinos Evans 2025-01-03 16:45:44 +00:00
parent 6ea2aaba50
commit 2a14a32533
5 changed files with 19 additions and 7 deletions

View file

@ -1,6 +1,6 @@
DefaultOptions:
; wOptions: med text speed
db TEXT_DELAY_MED
; wOptions: fast text speed
db TEXT_DELAY_FAST
; wSaveFileExists: no
db FALSE
; wTextboxFrame: frame 1

View file

@ -9,9 +9,6 @@ Intro_MainMenu:
farcall MainMenu
jp StartTitleScreen
IntroMenu_DummyFunction: ; unreferenced
ret
PrintDayOfWeek:
push de
ld hl, .Days
@ -1000,6 +997,16 @@ Intro_PlacePlayerSprite:
DEF NUM_TITLESCREENOPTIONS EQU const_value
IntroSequence:
; Stupid hacky way to make stereo the default option.
; There's probably a better way to do this, but data\default_options.asm seems to be used for more than simply the options, and the function itself is only called when save files corrupt (and adding an extra function above that call only worked with deliberately corrupted save files). What a bother!
; It *works*, it just adds a few machine cycles to the intro sequence and is thus inefficient and BAD!!! GRAAAAARGH!
; If you know a more intelligent way to do this, then definitely do it, but this method is technically harmless.
ld a, [wSaveFileExists]
and a
jr nz, .nope ; Verifying if there's a save file and some wacko is using mono.
ld hl, wOptions ; If there is no save file, let's make stereo the default.
set STEREO, [hl]
.nope
callfar SplashScreen
jr c, StartTitleScreen
farcall CrystalIntro

View file

@ -70,7 +70,7 @@ MainMenu:
db "OPTION@"
db "MYSTERY GIFT@"
db "MOBILE@"
db "MOBILE STUDIUM@"
db "MOBILE STADIUM@" ; as far as I know this will never be used
if DEF(_DEBUG)
db "DEBUG ROOM@"
endc

View file

@ -11,7 +11,7 @@
DEF NUM_OPTIONS EQU const_value ; 8
_Option:
; BUG: Options menu fails to clear joypad state on initialization (see docs/bugs_and_glitches.md)
call ClearJoypad ; fixing a bug that would cause left+right inputs on the same frame to cause problems, mainly an emulator or modded gb thing.
ld hl, hInMenu
ld a, [hl]
push af

View file

@ -378,6 +378,7 @@ SaveData:
call _SaveData
ret
; Do not delete, it's likely to be used sometime.
Function14d6c: ; unreferenced
ld a, BANK(s4_a60b) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
call OpenSRAM
@ -393,6 +394,7 @@ Function14d6c: ; unreferenced
call CloseSRAM
ret
; Same here.
Function14d83: ; unreferenced
ld a, BANK(s4_a60c) ; aka BANK(s4_a60d) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
call OpenSRAM
@ -402,6 +404,7 @@ Function14d83: ; unreferenced
call CloseSRAM
ret
; yep
Function14d93: ; unreferenced
ld a, BANK(s7_a000) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
call OpenSRAM
@ -706,6 +709,8 @@ TryLoadSaveData:
ret
.corrupt
ld hl, wOptions
set STEREO, [hl]
ld hl, DefaultOptions
ld de, wOptions
ld bc, wOptionsEnd - wOptions