Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
|
These functions load and free plaintext assets which are compiled into the filesystem into RAM. Once loaded into RAM, the text data is a string that may be used for whatever purpose.
For information on asset processing, see assets_preprocessor.
Load text from the filesystem to RAM using loadTxt(). Text may be loaded to normal RAM, which is smaller and faster, or SPI RAM, which is larger and slower.
Free when done using freeTxt(). If text is not freed, the memory will leak.
Go to the source code of this file.
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. | |
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.
name | The filename of the TXT to load |
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 |
void freeTxt | ( | char * | txtStr | ) |
Free an allocated TXT string.
txtStr | the TXT string to free |