Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
fs_wsg.c File Reference

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.
 

Function Documentation

◆ loadWsg()

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.

Parameters
nameThe filename of the WSG to load
wsgA handle to load the WSG to
spiRamtrue to load to SPI RAM, false to load to normal RAM. SPI RAM is more plentiful but slower to access than normal RAM
Returns
true if the WSG was loaded successfully, false if the WSG load failed and should not be used

◆ loadWsgNvs()

bool loadWsgNvs ( const char * namespace,
const char * key,
wsg_t * wsg,
bool spiRam )

◆ saveWsgNvs()

bool saveWsgNvs ( const char * namespace,
const char * key,
const wsg_t * wsg )

◆ freeWsg()

void freeWsg ( wsg_t * wsg)

Free the memory for a loaded WSG.

Parameters
wsgThe WSG handle to free memory from