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
 
u8 bgLayer
 
int consoleHeight
 
bool consoleInitialised
 
int consoleWidth
 
int cursorX
 
int cursorY
 
ConsoleFont font
 font of the console.
 
u16fontBgGfx
 
u16fontBgMap
 
u16 fontCharOffset
 
u16 fontCurPal
 
u8 gfxBase
 
bool loadGraphics
 
u8 mapBase
 
int prevCursorX
 
int prevCursorY
 
ConsolePrint PrintChar
 
int tabSize
 
int windowHeight
 
int windowWidth
 
int windowX
 
int windowY
 

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
};

Field Documentation

int PrintConsole::bgId

bgId, should be set with a call to bgInit() or bgInitSub()

u8 PrintConsole::bgLayer

Bg layer used by the background

int PrintConsole::consoleHeight

Height of the console hardware layer in tiles

bool PrintConsole::consoleInitialised

True if the console is initialized

int PrintConsole::consoleWidth

Width of the console hardware layer in tiles

int PrintConsole::cursorX

Current X location of the cursor (as a tile offset by default)

int PrintConsole::cursorY

Current Y location of the cursor (as a tile offset by default)

u16* PrintConsole::fontBgGfx

Pointer to the bg layer graphics if used. Is set by bgInit if bgId is valid

u16* PrintConsole::fontBgMap

Pointer to the bg layer map if used. Is set by bgInit if bgId is valid

u16 PrintConsole::fontCharOffset

Offset to the first graphics tile in background memory (in case your font is not loaded at a graphics base boundary)

u16 PrintConsole::fontCurPal

The current palette used by the engine (only applies to 4bpp text backgrounds)

u8 PrintConsole::gfxBase

Tile graphics base set by console init based on background setup

bool PrintConsole::loadGraphics

True if consoleInit should attempt to load font graphics into background memory

u8 PrintConsole::mapBase

Map base set by console init based on background setup

int PrintConsole::prevCursorX

Internal state

int PrintConsole::prevCursorY

Internal state

ConsolePrint PrintConsole::PrintChar

callback for printing a character. Should return true if it has handled rendering the graphics (else the print engine will attempt to render via tiles)

int PrintConsole::tabSize

Size of a tab

int PrintConsole::windowHeight

Window height in tiles (not implemented)

int PrintConsole::windowWidth

Window width in tiles (not implemented)

int PrintConsole::windowX

Window X location in tiles (not implemented)

int PrintConsole::windowY

Window Y location in tiles (not implemented)


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