|
libnds
|
Console structure used to store the state of a console render context. More...
#include <console.h>
Data Fields | |
| s8 | bgId |
| Background ID. Initialized by consoleInit(). | |
| u16 | consoleHeight |
| Height of the console hardware layer in tiles. | |
| u16 | consoleWidth |
| Width of the console hardware layer in tiles. | |
| s16 | cursorX |
| Current X location of the cursor. Initialized by consoleInit(). | |
| s16 | cursorY |
| Current Y location of the cursor. Initialized by consoleInit(). | |
| ConsoleFont | font |
| Font of the console. | |
| u16 * | fontBgGfx |
| Pointer to the bg layer graphics if used. Initialized by consoleInit(). | |
| u16 * | fontBgMap |
| Pointer to the bg layer map if used. Initialized by consoleInit(). | |
| u16 | fontCharOffset |
| Offset to the first graphics tile in background memory (in case your font is not loaded at a graphics base boundary). Initialized by consoleInit(). | |
| u8 | fontPalIndex |
| Palette index where a custom palette is loaded. Initialized by consoleInit(). | |
| ConsoleHandleEscape | HandleEscapeSequence |
| This is an optional hook that is called whenever an unknown escape sequence is detected. Note that the initial ESC character isn't passed to the hook. | |
| ConsoleHandleSgr | HandleSgrCodes |
| Handler of SGR commands that change text attributes like color. If it's NULL, it will use the legacy handler of libnds. | |
| s16 | prevCursorX |
| Internal. Used by "\x1b[s" and "\x1b[u". Initialized by consoleInit(). | |
| s16 | prevCursorY |
| Internal. Used by "\x1b[s" and "\x1b[u". Initialized by consoleInit(). | |
| ConsolePrint | PrintChar |
| Callback for printing a character. | |
| u8 | tabSize |
| Size of a TAB character. | |
| void * | userData |
| Pointer available for custom user data related to this console. | |
| u16 | windowHeight |
| Window height in tiles. | |
| u16 | windowWidth |
| Window width in tiles. | |
| u16 | windowX |
| Window X location in tiles. | |
| u16 | windowY |
| Window Y location in tiles. | |
Console structure used to store the state of a console render context.
Many of the values in this struct are actually initialized by libnds, and the user should leave them as 0 when consoleInit() is called.
Default values from consoleGetDefault():
| ConsolePrint PrintConsole::PrintChar |
Callback for printing a character.
It should return true if it has handled rendering the graphics. If not, the print engine will attempt to render via tiles).
| void* PrintConsole::userData |
Pointer available for custom user data related to this console.
This is useful if the PrintChar hook requires more information than the available in this struct. libnds ignores this field, it doesn't use it or tries to free it.