specify all per-game options

This commit is contained in:
4am 2018-04-01 18:44:00 -04:00
parent e914d76c78
commit 817e1d45b6
33 changed files with 109 additions and 18 deletions

View File

@ -35,5 +35,8 @@ R79.DEPROT.Z4=Release 79 / Serial number 851122
R77.DEPROT.Z4=Release 77 / Serial number 850814
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -26,6 +26,8 @@
R97.851218.Z3=Release 97 / Serial number 851218
[options]
ARTWORK=1
CLUES=1
VERSIONS=0
[eof]

View File

@ -47,5 +47,8 @@ R49.870917.Z5=Release 49 / Serial number 870917
R47.870915.Z5=Release 47 / Serial number 870915
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -53,6 +53,8 @@
R9.871008.Z5=Release 9 / Serial number 871008
[options]
ARTWORK=1
CLUES=1
VERSIONS=0
[eof]

View File

@ -44,5 +44,8 @@ R116.DEPROT.Z4=Release 116 / Licence number 870602
R86.DEPROT.Z4=Release 86 / Licence number 870212
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -25,6 +25,8 @@
R23.840809.Z3=Release 23 / Serial number 840809
[options]
ARTWORK=1
CLUES=1
VERSIONS=0
[eof]

View File

@ -28,5 +28,8 @@ R19.820427.Z3=Release 19 / Serial number 820427
R18.820311.Z3=Release 18 / Serial number 820311
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -28,5 +28,8 @@ R15.831107.Z3=Release 15 / Serial number 831107
R10.830810.Z3=Release 10 / Serial number 830810
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -35,5 +35,8 @@ R47.840914.Z3=Release 47 / Serial number 840914
R31.871119.Z5=Release 31 / Serial number 871119 (Solid Gold)
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -45,5 +45,8 @@ R37.861215.Z3=Release 37 / Serial number 861215
R235.861118.Z3=Release 235 / Serial number 861118
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -22,6 +22,8 @@
R22.830916.Z3=Release 22 / Serial number 830916
[options]
ARTWORK=1
CLUES=1
VERSIONS=0
[eof]

View File

@ -28,5 +28,8 @@ R50.860711.Z3=Release 50 / Serial number 860711
R4.880405.Z5=Release 4 / Serial number 880405 (Solid Gold)
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -42,5 +42,8 @@ R219.870912.Z3=Release 219 / Serial number 870912
R203.870506.Z3=Release 203 / Serial number 870506
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -30,5 +30,8 @@ R9.861022.Z3=Release 9 / Serial number 861022
R4.860918.Z3=Release 4 / Serial number 860918
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -46,6 +46,8 @@
R19.870722.Z4=Release 19 / Serial number 870722
[options]
ARTWORK=1
CLUES=1
VERSIONS=0
[eof]

View File

@ -29,5 +29,8 @@ R20.830708.Z3=Release 20 / Serial number 830708
R10.880531.Z5=Release 10 / Serial number 880531 (Solid Gold)
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -37,6 +37,8 @@
R26.870730.Z3=Release 26 / Serial number 870730
[options]
ARTWORK=1
CLUES=1
VERSIONS=0
[eof]

View File

@ -29,5 +29,8 @@ R15A.840501.Z3=Release 15 / Serial number 840501
R86.840320.Z3=Release 86 / Serial number 840320
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -52,5 +52,8 @@ R26.880127.Z5=Release 26 / Serial number 880127
R21.871214.Z5=Release 21 / Serial number 871214
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -29,5 +29,8 @@ R6.DEPROT.Z3=Release 6 / Serial number 840508
R4.DEPROT.Z3=Release 4 / Serial number 840131
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -30,5 +30,8 @@ R87.DEPROT.Z3=Release 87 / Serial number 860904
R63.DEPROT.Z3=Release 63 / Serial number 850916
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -22,5 +22,8 @@ R17.821021.Z3=Release 17 / Serial number 821021
R15.820901.Z3=Release 15 / Serial number 820901
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -45,6 +45,8 @@
R107.DEPROT.Z3=Release 107 / Serial number 870430
[options]
ARTWORK=1
CLUES=1
VERSIONS=0
[eof]

View File

@ -26,6 +26,8 @@
R14.841005.Z3=Release 14 / Serial number 841005
[options]
ARTWORK=1
CLUES=1
VERSIONS=0
[eof]

View File

@ -30,5 +30,8 @@ R7.830419.Z3=Release 7 / Seial number 830419
R5.830222.Z3=Release 5 / Serial number 830222
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -26,5 +26,8 @@ R12.860926.Z4=Release 12 / Serial number 860926
R11.860509.Z4=Release 11 / Serial number 860509
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -23,5 +23,8 @@ R68.850501.Z3=Release 68 / Serial number 850501
R23.880706.Z5=Release 23 / Serial number 880706 (Solid Gold)
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -30,5 +30,8 @@ R18.830910.Z3=Release 18 / Serial number 830910
R13.830524.Z3=Release 13 / Serial number 830524
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -35,5 +35,8 @@ R15.UG3AU5.Z2=Release 15 / Serial number UG3AU5
R5.000000.Z1=Release 5 / Serial number 000000
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -34,5 +34,8 @@ R15.820308.Z3=Release 15 / Serial number 820308
R7.UG3AU5.Z2=Release 7 / Serial number UG3AU5
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -30,5 +30,8 @@ R12.821025.Z3=Release 12 / Serial number 821025
R10.820818.Z3=Release 10 / Serial number 820818
[options]
ARTWORK=1
CLUES=1
VERSIONS=1
[eof]

View File

@ -7,6 +7,10 @@
; - PaintMain
; - RepaintMainIfDirty
;
; Public variables
; - gMainScreenPaintDirty
; - gViewInUse
;
MAGICRTS = $FF58 ; used to set overflow bit
@ -23,7 +27,7 @@ ID_DESCRIPTION = 9
gMainScreenPaintDirty
!byte 0 ; 0=false, 1=true
gViewHasActiveHotkey
gViewInUse
!byte 0,1,1,1,1,0,0,0,0,0,0,0,0,0,0
;------------------------------------------------------------------------------
@ -40,9 +44,9 @@ gViewHasActiveHotkey
PaintMain
ldx #WGReset
jsr WeeGUI
stz gViewHasActiveHotkey+ID_BOXART
stz gViewHasActiveHotkey+ID_HINTS
stz gViewHasActiveHotkey+ID_VERSIONS
stz gViewInUse+ID_BOXART
stz gViewInUse+ID_HINTS
stz gViewInUse+ID_VERSIONS
ldx #1 ; flag - clear screen before painting
stx gMainScreenPaintDirty
!byte $2C
@ -73,17 +77,17 @@ RepaintMainIfDirty
!word kViewPlay
.donePlayOrResume
jsr CreateConditionalButton ; create or destroy 'artwork' button
jsr CreateOrDestroyButton ; create or destroy 'artwork' button
!byte ID_BOXART
!word kViewBoxArt
!word kHasArtwork
jsr CreateConditionalButton ; create or destroy 'hints' button
jsr CreateOrDestroyButton ; create or destroy 'hints' button
!byte ID_HINTS
!word kViewHints
!word kHasHints
jsr CreateConditionalButton ; create or destroy 'revisions' button
jsr CreateOrDestroyButton ; create or destroy 'revisions' button
!byte ID_VERSIONS
!word kViewVersions
!word kHasVersions
@ -140,8 +144,9 @@ RepaintMainIfDirty
}
;------------------------------------------------------------------------------
; CreateConditionalButton
; conditionally create a WeeGUI Button, based on per-game options
; CreateOrDestroyButton
; create or destroy a WeeGUI Button view, based on per-game options
; and whether the button already exists
;
; in: WeeGUI loaded and initialized
; gOptionsStore populated
@ -152,7 +157,7 @@ RepaintMainIfDirty
; out: all registers and flags clobbered
;------------------------------------------------------------------------------
!zone {
CreateConditionalButton
CreateOrDestroyButton
+PARAMS_ON_STACK 5
ldy #1
@ -180,20 +185,21 @@ CreateConditionalButton
.viewID=*+1
ldx #$FD ; SMC (X = WeeGUI view ID)
jsr okvs_as_boolean
beq .no
lda gViewHasActiveHotkey,x
bne .done
beq .destroy
lda gViewInUse,x ; create button if it doesn't exist
bne .done ; oh it does exist, so we're done
lda #1
sta gViewHasActiveHotkey,x
sta gViewInUse,x
jsr CreateButton
.viewConfigurationRecord
!word $FDFD ; SMC
bra .done
.no lda gViewHasActiveHotkey,x
beq .done
.destroy lda gViewInUse,x ; destroy button if it exists
beq .done ; oh it doesn't exist, so we're done
lda #0
sta gViewHasActiveHotkey,x
sta gViewInUse,x
txa ; A = WeeGUI view ID
ldx #WGSelectView
jsr WeeGUI

View File

@ -97,7 +97,7 @@ HandleKey
bra .focusAndDoAction
.activateView
tax
ldy gViewHasActiveHotkey,x
ldy gViewInUse,x
beq .notFound
ldx #WGSelectView
jsr WeeGUI