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

Functions

char * loadTxt (const char *name, bool spiRam)
 Load a TXT from ROM to RAM. TXTs placed in the assets_image folder before compilation will be automatically flashed to ROM.
 
void freeTxt (char *txtStr)
 Free an allocated TXT string.
 

Function Documentation

◆ loadTxt()

char * loadTxt ( const char * name,
bool spiRam )

Load a TXT from ROM to RAM. TXTs placed in the assets_image folder before compilation will be automatically flashed to ROM.

Parameters
nameThe filename of the TXT to load
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
A pointer to a null terminated TXT string. May be NULL if the load fails. Must be freed after use

◆ freeTxt()

void freeTxt ( char * txtStr)

Free an allocated TXT string.

Parameters
txtStrthe TXT string to free