mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2024-06-03 14:29:27 +00:00
38 lines
959 B
Plaintext
38 lines
959 B
Plaintext
;license:MIT
|
|
;(c) 2018 by 4am
|
|
;
|
|
; Parser for game list file
|
|
;
|
|
; Public functions
|
|
; - LoadGameList
|
|
;
|
|
|
|
;------------------------------------------------------------------------------
|
|
; LoadGameList
|
|
; load file with master game list
|
|
;
|
|
; in: current ProDOS prefix is the same as the GAMES.CONF file
|
|
; out: gGamesListStore populated
|
|
; all registers and flags clobbered
|
|
;------------------------------------------------------------------------------
|
|
!zone {
|
|
LoadGameList
|
|
jsr LoadFile ; load prefs file at $2000
|
|
!word .gamesListFilename
|
|
.handle !word $2000
|
|
!word kProDOSFileBuffer
|
|
|
|
jsr ParseKeyValueText ; parse contents into games list store
|
|
!word gGamesListStore
|
|
!word .handle
|
|
!byte 0
|
|
|
|
+LDAY SRC
|
|
+STAY gGlobalPrefsStore ; save pointer to free space for next store
|
|
rts
|
|
|
|
.gamesListFilename
|
|
!byte 10
|
|
!raw "GAMES.CONF"
|
|
}
|