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 consolNew():

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

Graphics/Printing/console_windows/source/main.c, Graphics/Printing/custom_font/source/main.c, Graphics/Printing/print_both_screens/source/template.c, and Graphics/Printing/rotscale_text/source/main.c.


Field Documentation

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

Examples:
Graphics/Printing/rotscale_text/source/main.c.

Bg layer used by the background

Height of the console hardware layer in tiles

True if the console is initialized

Width of the console hardware layer in tiles

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

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

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

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

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

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

Tile graphics base set by console init based on background setup

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

Map base set by console init based on background setup

Internal state

Internal state

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)

Size of a tab

Window height in tiles (not implemented)

Window width in tiles (not implemented)

Window X location in tiles (not implemented)

Window Y location in tiles (not implemented)


The documentation for this struct was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated on Sat Oct 2 12:55:14 2010 for libnds by  doxygen 1.6.3