![]() |
CHGame 0.3.0
Libraries for the CHGame handheld
|
save::: a game's options and progress in flash, with a CRC, kept across power cycles and re-uploads. More...
Namespaces | |
| namespace | save |
| Saved records: load, store, and the raw read/write underneath. | |
save::: a game's options and progress in flash, with a CRC, kept across power cycles and re-uploads.
Change the version when SaveData changes shape: old records are then ignored instead of misread. A flag byte travels in the header (most of the casino games mark "a game in progress" with it).
The page is built in CHGfx's chunk scratch, so store() must run between gfx_wait() and the next flush. read() points straight into flash: a game can take just the part it needs.