libtcod
Loading...
Searching...
No Matches
Consoles (C++)

Classes

class  TCODConsole
 Classic turn by turn game loop:TCODConsole::initRoot(80,50,"my game",false); while (!endGame && !TCODConsoleisWindowClosed()) { ... draw on TCODConsole::root TCODConsole::flush(); TCOD_key_t key; TCODConsole::waitForEvent(TCOD_EVENT_KEY_PRESS,&key,NULL,true); ... update world, using key }. More...
 

Functions

void tcod::blit (TCOD_Console &dest, const TCOD_Console &source, const std::array< int, 2 > &dest_xy={0, 0}, std::array< int, 4 > source_rect={0, 0, 0, 0}, float foreground_alpha=1.0f, float background_alpha=1.0f)
 Blit a region of tiles from one console to another.
 

Detailed Description

Function Documentation

◆ blit()

void tcod::blit ( TCOD_Console & dest,
const TCOD_Console & source,
const std::array< int, 2 > & dest_xy = {0, 0},
std::array< int, 4 > source_rect = {0, 0, 0, 0},
float foreground_alpha = 1.0f,
float background_alpha = 1.0f )
inline

Blit a region of tiles from one console to another.

Parameters
destThe destination console.
sourceThe source console to blit from.
dest_xyThe upper-left position of the destination console to blit to.
source_rectThe source region {left, top, width, height} to blit from. A width or height of zero will use the entire console.
foreground_alpha
background_alpha