mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-22 21:32:39 +00:00
read NEXTATTRACT from prefs on startup
This commit is contained in:
parent
dd36021ed4
commit
a130581c17
4
Makefile
4
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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user