|
Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
|
Functions | |
| bool | initCnfs (void) |
| Initialize the CNFS file system. This is used to store assets like WSGs and fonts. | |
| bool | deinitCnfs (void) |
| De-initialize the CNFS file system (right now a noop) | |
| const uint8_t * | cnfsGetFile (cnfsFileIdx_t fIdx, size_t *flen) |
| Get a pointer to a file, without needing to read it. Same rules that apply to cnfsGetFile, and under the hood, cnfsGetFile uses this function. | |
| uint8_t * | cnfsReadFile (cnfsFileIdx_t fIdx, size_t *outsize, bool readToSpiRam) |
| Read a file from CNFS into an output array. Files that are in the assets_image folder before compilation and flashing will automatically be included in the firmware. | |
| bool initCnfs | ( | void | ) |
Initialize the CNFS file system. This is used to store assets like WSGs and fonts.
| bool deinitCnfs | ( | void | ) |
De-initialize the CNFS file system (right now a noop)
| const uint8_t * cnfsGetFile | ( | cnfsFileIdx_t | fIdx, |
| size_t * | flen ) |
Get a pointer to a file, without needing to read it. Same rules that apply to cnfsGetFile, and under the hood, cnfsGetFile uses this function.
| fIdx | the cnfsFileIdx_t of the file to get |
| flen | A pointer to a size_t to return the size of the file. |
| uint8_t * cnfsReadFile | ( | cnfsFileIdx_t | fIdx, |
| size_t * | outsize, | ||
| bool | readToSpiRam ) |
Read a file from CNFS into an output array. Files that are in the assets_image folder before compilation and flashing will automatically be included in the firmware.
| fIdx | The cnfsFileIdx_t of the file to load |
| outsize | A pointer to a size_t to return how much data was read |
| readToSpiRam | true to use SPI RAM, false to use normal RAM |