diff --git a/Makefile b/Makefile index 293edc54f..c55f53f07 100644 --- a/Makefile +++ b/Makefile @@ -70,8 +70,8 @@ dsk: md asm cp res/_FileInformation.txt build/ >>build/log $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "build/LAUNCHER.SYSTEM" >>build/log $(CADIUS) CREATEFOLDER build/"$(DISK)" "/${VOLUME}/X/" >>build/log -# cp res/prefs-sample.conf build/PREFS.CONF >>build/log - cp res/prefs.conf build/PREFS.CONF >>build/log + cp res/prefs-sample.conf build/PREFS.CONF >>build/log +# cp res/prefs.conf build/PREFS.CONF >>build/log $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "build/PREFS.CONF" >>build/log $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/GAMES.CONF" >>build/log $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/ATTRACT.CONF" >>build/log diff --git a/src/4cade.init.a b/src/4cade.init.a index 53b8a8dc0..258dc8fa4 100644 --- a/src/4cade.init.a +++ b/src/4cade.init.a @@ -100,6 +100,19 @@ OneTimeSetup +LDAY SRC +STAY gSlideshowStore ; save pointer to free space for next store + jsr okvs_get ; get next attract-mode module from prefs + !word gGlobalPrefsStore + !word kNextAttract + bcs @noattract + +STAY @attract + jsr okvs_get + !word gAttractModeStore +@attract !word $FDFD ; SMC + bcc + +@noattract + ldx #0 ++ stx gAttractIndex + jsr okvs_get ; get next HGR transition effect from prefs !word gGlobalPrefsStore !word kNextFX diff --git a/src/ui.attract.mode.a b/src/ui.attract.mode.a index 28f0b5fe0..aa240c92d 100644 --- a/src/ui.attract.mode.a +++ b/src/ui.attract.mode.a @@ -7,23 +7,40 @@ ; - AttractMode ; ; Public variables +; - gAttractIndex ; [byte] numeric index of Mega-Attract Module ; - gFXIndex ; [byte] numeric index of HGR transition effect ; - gDFXIndex ; [byte] numeric index of DHGR transition effect AttractMode jsr okvs_nth ; get filename of next attract-mode module !word gAttractModeStore -@index !byte 0 +gAttractIndex + !byte 0 +STAY @key - inc @index ; increment module index for next time + inc gAttractIndex ; increment module index for next time jsr okvs_len !word gAttractModeStore - cmp @index + cmp gAttractIndex bne + lda #0 - sta @index + sta gAttractIndex + + lda gAttractIndex + sta @nexti + jsr okvs_nth ; get name of next attract-mode module + !word gAttractModeStore +@nexti !byte $FD ; SMC + +STAY @nextattract + + jsr okvs_update ; save name of next attract-mode module in prefs store + !word gGlobalPrefsStore + !word kNextAttract +@nextattract + !word $FDFD ; SMC + +; jsr SaveGlobalPreferences ; write prefs store to disk + jsr okvs_get !word gAttractModeStore @key !word $FDFD