mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2025-02-07 12:31:00 +00:00
.
This commit is contained in:
parent
a1a16882b8
commit
46be7d0a5c
@ -196,6 +196,8 @@ callback_next
|
||||
!word kLastPlayed
|
||||
.gameptr !word $FDFD ; set at runtime
|
||||
.loadNewGameInfoAndRepaint
|
||||
lda #1
|
||||
sta gNeedToSavePrefs
|
||||
jsr LoadGameInfo
|
||||
jmp RepaintSomeViews
|
||||
}
|
||||
|
18
src/prefs.a
18
src/prefs.a
@ -9,6 +9,7 @@
|
||||
;
|
||||
; Public variables
|
||||
; - gCurrentGame byte 0..kNumberOfGames-1
|
||||
; - gNeedToSavePrefs byte 0=false, 1=true
|
||||
;
|
||||
; Public constants
|
||||
; - kForce40
|
||||
@ -24,6 +25,9 @@ kDefaultGame = 30 ; Zork I
|
||||
gCurrentGame
|
||||
!byte 0
|
||||
|
||||
gNeedToSavePrefs
|
||||
!byte 0
|
||||
|
||||
kForce40
|
||||
!byte 14
|
||||
!raw "FORCE40COLUMNS"
|
||||
@ -47,6 +51,8 @@ kLastPlayed
|
||||
; out: all registers and flags clobbered
|
||||
;------------------------------------------------------------------------------
|
||||
LoadGlobalPreferences
|
||||
stz gNeedToSavePrefs
|
||||
|
||||
jsr okvs_init
|
||||
!word gPrefsStore
|
||||
|
||||
@ -146,10 +152,11 @@ LoadGlobalPreferences
|
||||
.val !fill 15
|
||||
|
||||
SaveGlobalPreferences
|
||||
lda #$00
|
||||
sta $FE
|
||||
sta .prefslen
|
||||
sta .prefslen+1
|
||||
lda gNeedToSavePrefs
|
||||
bne +
|
||||
rts
|
||||
+
|
||||
stz $FE
|
||||
lda #$20
|
||||
sta $FF
|
||||
|
||||
@ -207,6 +214,7 @@ SaveGlobalPreferences
|
||||
sec
|
||||
sbc #$20
|
||||
sta .prefslen+1
|
||||
|
||||
jsr SaveFile
|
||||
!word .globalPrefsFilename
|
||||
!byte 4 ; filetype=TXT
|
||||
@ -215,6 +223,8 @@ SaveGlobalPreferences
|
||||
.prefslen
|
||||
!word $FDFD ; set at runtime
|
||||
!word kProDOSFileBuffer
|
||||
stz gNeedToSavePrefs
|
||||
|
||||
rts
|
||||
|
||||
addBooleanFromStore
|
||||
|
@ -195,6 +195,8 @@ callback_options_ok
|
||||
jsr SetPrefByCheckbox
|
||||
!byte ID_OPTIONS_AUTOSCRIPT
|
||||
!word kAutoScript
|
||||
lda #1
|
||||
sta gNeedToSavePrefs
|
||||
jsr SaveGlobalPreferences
|
||||
; execution falls through here
|
||||
callback_options_cancel
|
||||
|
Loading…
x
Reference in New Issue
Block a user