libnds
Data Fields
PrintConsole Struct Reference

Console structure used to store the state of a console render context. More...

#include <console.h>

Data Fields

int bgId
 bgId, should be set with a call to bgInit() or bgInitSub()
 
u8 bgLayer
 Bg layer used by the background.
 
int consoleHeight
 Height of the console hardware layer in tiles.
 
bool consoleInitialised
 True if the console is initialized.
 
int consoleWidth
 Width of the console hardware layer in tiles.
 
int cursorX
 Current X location of the cursor (as a tile offset by default)
 
int cursorY
 Current Y location of the cursor (as a tile offset by default)
 
ConsoleFont font
 Font of the console.
 
u16fontBgGfx
 Pointer to the bg layer graphics if used. Is set by bgInit if bgId is valid.
 
u16fontBgMap
 Pointer to the bg layer map if used. Is set by bgInit if bgId is valid.
 
u16 fontCharOffset
 Offset to the first graphics tile in background memory (in case your font is not loaded at a graphics base boundary)
 
u16 fontCurPal
 The current palette used by the engine (only applies to 4bpp text backgrounds)
 
u8 gfxBase
 Tile graphics base set by console init based on background setup.
 
bool loadGraphics
 True if consoleInit should attempt to load font graphics into background memory.
 
u8 mapBase
 Map base set by console init based on background setup.
 
int prevCursorX
 Internal state.
 
int prevCursorY
 Internal state.
 
ConsolePrint PrintChar
 Callback for printing a character. It should return true if it has handled rendering the graphics (else the print engine will attempt to render via tiles)
 
int tabSize
 Size of a tab.
 
int windowHeight
 Window height in tiles (not implemented)
 
int windowWidth
 Window width in tiles (not implemented)
 
int windowX
 Window X location in tiles (not implemented)
 
int windowY
 Window Y location in tiles (not implemented)
 

Detailed Description

Console structure used to store the state of a console render context.

Default values from consoleGetDefault();

PrintConsole defaultConsole =
{
// Font:
{
(u16 *)default_font_bin, // Font gfx
0, // Font palette
0, // Font color count
4, // bpp
0, // First ascii character in the set
128, // Number of characters in the font set
true, // Convert to single color
},
0, // Font background map
0, // Font background gfx
31, // Map base
0, // Char base
0, // BG layer in use
-1, // BG id
0, 0, // CursorX cursorY
0, 0, // PrevcursorX prevcursorY
32, // Console width
24, // Console height
0, // Window x
0, // Window y
32, // Window width
24, // Window height
3, // Tab size
0, // Font character offset
0, // Selected palette
0, // Print callback
false, // Console initialized
true, // Load graphics
};
uint16_t u16
16 bit unsigned integer.
Definition: ndstypes.h:97
Console structure used to store the state of a console render context.
Definition: console.h:113

The documentation for this struct was generated from the following file: