|
Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
|
Functions | |
| bool | loadWsg (cnfsFileIdx_t fIdx, wsg_t *wsg, bool spiRam) |
| Load a WSG from ROM to RAM. WSGs placed in the assets_image folder before compilation will be automatically flashed to ROM. | |
| bool | loadWsgInplace (cnfsFileIdx_t fIdx, wsg_t *wsg, bool spiRam, uint8_t *decompressedBuf, heatshrink_decoder *hsd) |
| Load a WSG from ROM to RAM. WSGs placed in the assets_image folder before compilation will be automatically flashed to ROM. You must provide a decoder and decode space to this function. It's useful when creating one decoder & space to decode many consecutive WSGs. | |
| bool | loadWsgNvs (const char *namespace, const char *key, wsg_t *wsg, bool spiRam) |
| bool | saveWsgNvs (const char *namespace, const char *key, const wsg_t *wsg) |
| void | freeWsg (wsg_t *wsg) |
| Free the memory for a loaded WSG. | |
| bool loadWsg | ( | cnfsFileIdx_t | fIdx, |
| wsg_t * | wsg, | ||
| bool | spiRam ) |
Load a WSG from ROM to RAM. WSGs placed in the assets_image folder before compilation will be automatically flashed to ROM.
| fIdx | The cnfsFileIdx_t the WSG to load |
| wsg | A handle to load the WSG to |
| spiRam | true to load to SPI RAM, false to load to normal RAM. SPI RAM is more plentiful but slower to access than normal RAM |
| bool loadWsgInplace | ( | cnfsFileIdx_t | fIdx, |
| wsg_t * | wsg, | ||
| bool | spiRam, | ||
| uint8_t * | decompressedBuf, | ||
| heatshrink_decoder * | hsd ) |
Load a WSG from ROM to RAM. WSGs placed in the assets_image folder before compilation will be automatically flashed to ROM. You must provide a decoder and decode space to this function. It's useful when creating one decoder & space to decode many consecutive WSGs.
| fIdx | The cnfsFileIdx_t the WSG to load |
| wsg | A handle to load the WSG to |
| spiRam | true to load to SPI RAM, false to load to normal RAM. SPI RAM is more plentiful but slower to access than normal RAM |
| decompressedBuf | Memory to store decoded data. This must be as large as the decoded data |
| hsd | A heatshrink decoder |
| bool loadWsgNvs | ( | const char * | namespace, |
| const char * | key, | ||
| wsg_t * | wsg, | ||
| bool | spiRam ) |
| bool saveWsgNvs | ( | const char * | namespace, |
| const char * | key, | ||
| const wsg_t * | wsg ) |
| void freeWsg | ( | wsg_t * | wsg | ) |
Free the memory for a loaded WSG.
| wsg | The WSG handle to free memory from |