< index < 2. Console emulator < 2.1 Initializing the console |
===================================== |
C++ : static void TCODConsole::initRoot(int w, int h, const char * title, bool fullscreen = false) C : void TCOD_console_init_root(int w, int h, const char * title, bool fullscreen) Py : console_init_root(w,h,title,fullscreen)This will either create a new window in your desktop or switch to full screen. Once this function has been called, you access the root console in C++ with TCODConsole::root, in C by using a NULL console handler.
typedef enum { false, true } bool;
Parameter | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
w, h | size of the console(in characters). The default characters size in libtcod is 8x8. Here are the resulting resolutions :
| ||||||||||||||
title | title of the window. It's not visible when you are in fullscreen. | ||||||||||||||
fullscreen | wether you start in windowed or fullscreen mode. |
C++ : TCODConsole::initRoot(80,50,"The Chronicles Of Doryen v0.1",false); C : TCOD_console_init_root(80,50,"The Chronicles Of Doryen v0.1",false); Py : libtcod.console_init_root(80,50,"The Chronicles Of Doryen v0.1",False)