Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
|
These functions load and free WSG assets which are images that are compressed and compiled into the filesystem into RAM. Once decompressed loaded into RAM, WSGs may be drawn to the display.
For more information about using WSGs, see wsg.h.
For information on asset processing, see assets_preprocessor.
Load WSGs from the filesystem to RAM using loadWsg(). WSGs may be loaded to normal RAM, which is smaller and faster, or SPI RAM, which is larger and slower.
Free when done using freeWsg(). If a wsg is not freed, the memory will leak.
Go to the source code of this file.
Functions | |
bool | loadWsg (const char *name, 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 | 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 | ( | const char * | name, |
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.
name | The filename of 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 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 |