libnds
|
nds stdio support. More...
Data Structures | |
struct | ConsoleFont |
a font struct for the console. More... | |
struct | PrintConsole |
console structure used to store the state of a console render context. More... | |
Typedefs | |
typedef struct ConsoleFont | ConsoleFont |
a font struct for the console. | |
typedef struct PrintConsole | PrintConsole |
console structure used to store the state of a console render context. More... | |
Enumerations |
Functions | |
void | consoleClear (void) |
Clears the screan by using iprintf("\x1b[2J");. | |
void | consoleDebugInit (DebugDevice device) |
Initializes debug console output on stderr to the specified device. More... | |
PrintConsole * | consoleDemoInit (void) |
Initialize the console to a default state for prototyping. This function sets the console to use sub display, VRAM_C, and BG0 and enables MODE_0_2D on the sub display. It is intended for use in prototyping applications which need print ability and not actual game use. Print functionality can be utilized with just this call. More... | |
PrintConsole * | consoleGetDefault (void) |
Gets a pointer to the console with the default values this should only be used when using a single console or without changing the console that is returned, other wise use consoleInit() More... | |
PrintConsole * | consoleInit (PrintConsole *console, int layer, BgType type, BgSize size, int mapBase, int tileBase, bool mainDisplay, bool loadGraphics) |
Initialise the console. More... | |
PrintConsole * | consoleSelect (PrintConsole *console) |
Make the specified console the render target. More... | |
void | consoleSetFont (PrintConsole *console, ConsoleFont *font) |
Loads the font into the console. More... | |
void | consoleSetWindow (PrintConsole *console, int x, int y, int width, int height) |
Sets the print window. More... | |
nds stdio support.
consoleDebugInit(DebugDevice_NOCASH); fprintf(stderr, "debug message in no$gba window %i", stuff);
OR
consoleDebugInit(DebugDevice_CONSOLE); fprintf(stderr, "debug message on DS console screen");
typedef struct PrintConsole PrintConsole |
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 };
enum DebugDevice |
void consoleDebugInit | ( | DebugDevice | device | ) |
Initializes debug console output on stderr to the specified device.
device | The debug device (or devices) to output debug print statements to |
PrintConsole* consoleDemoInit | ( | void | ) |
Initialize the console to a default state for prototyping. This function sets the console to use sub display, VRAM_C, and BG0 and enables MODE_0_2D on the sub display. It is intended for use in prototyping applications which need print ability and not actual game use. Print functionality can be utilized with just this call.
PrintConsole* consoleGetDefault | ( | void | ) |
Gets a pointer to the console with the default values this should only be used when using a single console or without changing the console that is returned, other wise use consoleInit()
PrintConsole* consoleInit | ( | PrintConsole * | console, |
int | layer, | ||
BgType | type, | ||
BgSize | size, | ||
int | mapBase, | ||
int | tileBase, | ||
bool | mainDisplay, | ||
bool | loadGraphics | ||
) |
Initialise the console.
console | A pointer to the console data to initialze (if it's NULL, the default console will be used) |
layer | background layer to use |
type | the type of the background |
size | the size of the background |
mapBase | the map base |
tileBase | the tile graphics base |
mainDisplay | if true main engine is used, otherwise false |
loadGraphics | if true the default font graphics will be loaded into the layer |
PrintConsole* consoleSelect | ( | PrintConsole * | console | ) |
Make the specified console the render target.
console | A pointer to the console struct (must have been initialized with consoleInit(PrintConsole* console) |
void consoleSetFont | ( | PrintConsole * | console, |
ConsoleFont * | font | ||
) |
Loads the font into the console.
console | pointer to the console to update, if NULL it will update the current console |
font | the font to load |
void consoleSetWindow | ( | PrintConsole * | console, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
Sets the print window.
console | console to set, if NULL it will set the current console window |
x | x location of the window |
y | y location of the window |
width | width of the window |
height | height of the window |