mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2024-06-26 15:29:31 +00:00
.
This commit is contained in:
parent
0af8117251
commit
f035b99059
|
@ -9,7 +9,8 @@
|
||||||
; - CreateButton
|
; - CreateButton
|
||||||
; - CreateTitleView
|
; - CreateTitleView
|
||||||
; - PaintTitleView
|
; - PaintTitleView
|
||||||
; - DeleteAllViews
|
; - SetCheckboxByPref
|
||||||
|
; - SetPrefByCheckbox
|
||||||
;
|
;
|
||||||
|
|
||||||
; ROM routines
|
; ROM routines
|
||||||
|
@ -78,14 +79,44 @@ viewTitle
|
||||||
!byte 1 ; height
|
!byte 1 ; height
|
||||||
.stringTitle
|
.stringTitle
|
||||||
!raw " Pitch Dark ",0
|
!raw " Pitch Dark ",0
|
||||||
|
}
|
||||||
|
|
||||||
DeleteAllViews
|
!zone {
|
||||||
lda #15
|
SetCheckboxByPref
|
||||||
- ldx #WGSelectView
|
+PARAMS_ON_STACK 3
|
||||||
|
|
||||||
|
ldy #1
|
||||||
|
lda (PARAM),y
|
||||||
|
sta .id
|
||||||
|
iny
|
||||||
|
lda (PARAM),y
|
||||||
|
sta .key
|
||||||
|
iny
|
||||||
|
lda (PARAM),y
|
||||||
|
sta .key+1
|
||||||
|
|
||||||
|
jsr okvs_get
|
||||||
|
!word gPrefsStore
|
||||||
|
.key !word $FDFD ; set at runtime
|
||||||
|
bcs .exit
|
||||||
|
|
||||||
|
jsr okvs_as_boolean
|
||||||
|
beq .exit
|
||||||
|
|
||||||
|
ldx #WGSelectView
|
||||||
|
.id=*+1
|
||||||
|
lda #$FD ; set at runtime
|
||||||
jsr WeeGUI
|
jsr WeeGUI
|
||||||
ldx #WGDeleteView
|
ldx #WGSetState
|
||||||
|
lda #1
|
||||||
|
sta PARAM0
|
||||||
jsr WeeGUI
|
jsr WeeGUI
|
||||||
dec
|
.exit rts
|
||||||
bpl -
|
}
|
||||||
|
|
||||||
|
!zone {
|
||||||
|
SetPrefByCheckbox
|
||||||
|
+PARAMS_ON_STACK 3
|
||||||
|
|
||||||
rts
|
rts
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,59 +59,19 @@ OptionsDialog
|
||||||
!word .viewScriptToFile
|
!word .viewScriptToFile
|
||||||
jsr CreateCheckbox
|
jsr CreateCheckbox
|
||||||
!word .viewAutoScript
|
!word .viewAutoScript
|
||||||
; set initial state of checkboxes based on preferences
|
|
||||||
jsr okvs_get
|
jsr SetCheckboxByPref ; set initial state of checkboxes based on preferences
|
||||||
!word gPrefsStore
|
!byte ID_OPTIONS_FORCE40
|
||||||
!word kForce40
|
!word kForce40
|
||||||
jsr okvs_as_boolean
|
jsr SetCheckboxByPref
|
||||||
beq +
|
!byte ID_OPTIONS_FORCEUPPER
|
||||||
ldx #WGSelectView
|
|
||||||
lda #ID_OPTIONS_FORCE40
|
|
||||||
jsr WeeGUI
|
|
||||||
ldx #WGSetState
|
|
||||||
lda #1
|
|
||||||
sta PARAM0
|
|
||||||
jsr WeeGUI
|
|
||||||
+
|
|
||||||
jsr okvs_get
|
|
||||||
!word gPrefsStore
|
|
||||||
!word kForceUpper
|
!word kForceUpper
|
||||||
jsr okvs_as_boolean
|
jsr SetCheckboxByPref
|
||||||
beq +
|
!byte ID_OPTIONS_SCRIPTTOFILE
|
||||||
ldx #WGSelectView
|
|
||||||
lda #ID_OPTIONS_FORCEUPPER
|
|
||||||
jsr WeeGUI
|
|
||||||
ldx #WGSetState
|
|
||||||
lda #1
|
|
||||||
sta PARAM0
|
|
||||||
jsr WeeGUI
|
|
||||||
+
|
|
||||||
jsr okvs_get
|
|
||||||
!word gPrefsStore
|
|
||||||
!word kScriptToFile
|
!word kScriptToFile
|
||||||
jsr okvs_as_boolean
|
jsr SetCheckboxByPref
|
||||||
beq +
|
!byte ID_OPTIONS_AUTOSCRIPT
|
||||||
ldx #WGSelectView
|
|
||||||
lda #ID_OPTIONS_SCRIPTTOFILE
|
|
||||||
jsr WeeGUI
|
|
||||||
ldx #WGSetState
|
|
||||||
lda #1
|
|
||||||
sta PARAM0
|
|
||||||
jsr WeeGUI
|
|
||||||
+
|
|
||||||
jsr okvs_get
|
|
||||||
!word gPrefsStore
|
|
||||||
!word kAutoScript
|
!word kAutoScript
|
||||||
jsr okvs_as_boolean
|
|
||||||
beq +
|
|
||||||
ldx #WGSelectView
|
|
||||||
lda #ID_OPTIONS_AUTOSCRIPT
|
|
||||||
jsr WeeGUI
|
|
||||||
ldx #WGSetState
|
|
||||||
lda #1
|
|
||||||
sta PARAM0
|
|
||||||
jsr WeeGUI
|
|
||||||
+
|
|
||||||
|
|
||||||
ldx #WGDesktop ; paint background
|
ldx #WGDesktop ; paint background
|
||||||
jsr WeeGUI
|
jsr WeeGUI
|
||||||
|
@ -223,7 +183,19 @@ HandleOptionsKey
|
||||||
jmp WeeGUI
|
jmp WeeGUI
|
||||||
|
|
||||||
callback_options_ok
|
callback_options_ok
|
||||||
; TODO set preferences
|
jsr SetPrefByCheckbox
|
||||||
|
!byte ID_OPTIONS_FORCE40
|
||||||
|
!word kForce40
|
||||||
|
jsr SetPrefByCheckbox
|
||||||
|
!byte ID_OPTIONS_FORCEUPPER
|
||||||
|
!word kForceUpper
|
||||||
|
jsr SetPrefByCheckbox
|
||||||
|
!byte ID_OPTIONS_SCRIPTTOFILE
|
||||||
|
!word kScriptToFile
|
||||||
|
jsr SetPrefByCheckbox
|
||||||
|
!byte ID_OPTIONS_AUTOSCRIPT
|
||||||
|
!word kAutoScript
|
||||||
|
; execution falls through here
|
||||||
callback_options_cancel
|
callback_options_cancel
|
||||||
jmp MainScreen
|
jmp MainScreen
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user