mirror of
https://github.com/a2-4am/4cade.git
synced 2025-02-17 07:31:19 +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
|
cp res/_FileInformation.txt build/ >>build/log
|
||||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "build/LAUNCHER.SYSTEM" >>build/log
|
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "build/LAUNCHER.SYSTEM" >>build/log
|
||||||
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/${VOLUME}/X/" >>build/log
|
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/${VOLUME}/X/" >>build/log
|
||||||
# cp res/prefs-sample.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
|
# cp res/prefs.conf build/PREFS.CONF >>build/log
|
||||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "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/GAMES.CONF" >>build/log
|
||||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/ATTRACT.CONF" >>build/log
|
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/ATTRACT.CONF" >>build/log
|
||||||
|
@ -100,6 +100,19 @@ OneTimeSetup
|
|||||||
+LDAY SRC
|
+LDAY SRC
|
||||||
+STAY gSlideshowStore ; save pointer to free space for next store
|
+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
|
jsr okvs_get ; get next HGR transition effect from prefs
|
||||||
!word gGlobalPrefsStore
|
!word gGlobalPrefsStore
|
||||||
!word kNextFX
|
!word kNextFX
|
||||||
|
@ -7,23 +7,40 @@
|
|||||||
; - AttractMode
|
; - AttractMode
|
||||||
;
|
;
|
||||||
; Public variables
|
; Public variables
|
||||||
|
; - gAttractIndex ; [byte] numeric index of Mega-Attract Module
|
||||||
; - gFXIndex ; [byte] numeric index of HGR transition effect
|
; - gFXIndex ; [byte] numeric index of HGR transition effect
|
||||||
; - gDFXIndex ; [byte] numeric index of DHGR transition effect
|
; - gDFXIndex ; [byte] numeric index of DHGR transition effect
|
||||||
|
|
||||||
AttractMode
|
AttractMode
|
||||||
jsr okvs_nth ; get filename of next attract-mode module
|
jsr okvs_nth ; get filename of next attract-mode module
|
||||||
!word gAttractModeStore
|
!word gAttractModeStore
|
||||||
@index !byte 0
|
gAttractIndex
|
||||||
|
!byte 0
|
||||||
+STAY @key
|
+STAY @key
|
||||||
|
|
||||||
inc @index ; increment module index for next time
|
inc gAttractIndex ; increment module index for next time
|
||||||
jsr okvs_len
|
jsr okvs_len
|
||||||
!word gAttractModeStore
|
!word gAttractModeStore
|
||||||
cmp @index
|
cmp gAttractIndex
|
||||||
bne +
|
bne +
|
||||||
lda #0
|
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
|
jsr okvs_get
|
||||||
!word gAttractModeStore
|
!word gAttractModeStore
|
||||||
@key !word $FDFD
|
@key !word $FDFD
|
||||||
|
Loading…
x
Reference in New Issue
Block a user