Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
fs_txt.c File Reference

Functions

char * loadTxt (cnfsFileIdx_t fIdx, 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 ( cnfsFileIdx_t fIdx,
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
fIdxThe cnfsFileIdx_t 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