NightFox’s Lib
Data Structures | Macros | Functions | Variables
nf_text.h File Reference

Text support functions. More...

#include <nds.h>

Data Structures

struct  NF_TYPE_TEXT_INFO
 Struct that holds text layer information. More...
 

Macros

#define NF_TEXT_FONT_CHARS   127
 Number of characters available in a font.
 
#define NF_TEXT_FONT_LAST_VALID_CHAR   113
 Last valid character in a font.
 

Functions

void NF_InitTextSys (int screen)
 Initialize the text engine for the selected screen. More...
 
void NF_LoadTextFont (const char *file, const char *name, u32 width, u32 height, u32 rotation)
 Load font and palette files from the filesystem to RAM. More...
 
void NF_UnloadTextFont (const char *name)
 Delete from RAM the font with the specified name. More...
 
void NF_CreateTextLayer (int screen, u32 layer, u32 rotation, const char *name)
 Create a special tiled background to write text on it. More...
 
void NF_DeleteTextLayer (int screen, u32 layer)
 Delete a text layer. More...
 
void NF_WriteText (int screen, u32 layer, u32 x, u32 y, const char *text)
 Write text in a layer at the specified coordinates. More...
 
void NF_UpdateTextLayers (void)
 Copy the temporary text buffers of both screens to VRAM. More...
 
void NF_ClearTextLayer (int screen, u32 layer)
 Clears the contents of a text layer filling it with zeroes. More...
 
void NF_DefineTextColor (int screen, u32 layer, u32 color, u32 r, u32 g, u32 b)
 Defines a RGB color to be used later as a text color. More...
 

Variables

NF_TYPE_TEXT_INFO NF_TEXT [2][4]
 Information of all text layers.
 

Detailed Description

Text support functions.