State - cressie176/Load64 GitHub Wiki

1. Overview

Captures data that persists across sessions. Divided into application-level UI state and per-game state.

2. Tables

UserInterfaceState

Field Type PK FK Nullable Unique Description
last_game_id integer yes The last game the user had selected. Restored on startup.
last_compilation_id integer yes The last compilation the user was browsing. Restored on startup.
last_window_width integer yes Last window width in pixels. Used to restore window dimensions.
last_window_height integer yes Last window height in pixels. Used to restore window dimensions.

GameState

Per-game state updated by the audit process and during gameplay. Can be extended in future to record statistics such as play count and total play time.

Field Type PK FK Nullable Unique Description
game_id integer yes Game.id The game this state belongs to.
launch_available boolean Whether the game can be launched. false if the game directory or ROMs are missing.
quickstart_available boolean Whether a quickstart.vsf file exists. Updated by audit and when LoadC64 creates/deletes one.
continue_available boolean Whether at least one autosave exists. Updated by audit and when LoadC64 creates/deletes one.
cover_available boolean Whether media/cover-thumbnail.png exists.
gameplay_screen_available boolean Whether media/gameplay-screen.png exists.
loading_screen_available boolean Whether media/loading-screen.png exists.
title_screen_available boolean Whether media/title-screen.png exists.

3. Example

user_interface_state

last_game_id last_compilation_id last_window_width last_window_height
1 2 1280 800

game_state

game_id launch_available quickstart_available continue_available cover_available gameplay_screen_available loading_screen_available title_screen_available
1 true true true true true true true
2 true false true true false false true
3 false false false false false false false
⚠️ **GitHub.com Fallback** ⚠️