;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" }