Struct TCOD_Console

Struct Documentation

struct TCOD_Console

A libtcod console containing a grid of tiles with {ch, fg, bg} information.

In C++ this struct has several convience methods to make working with consoles easier. Note that all tile references are to TCOD_ConsoleTile structs and will include an alpha channel.

For C++ code examples see tcod::Console.

Added in version 1.19.

Public Members

int w

Console width and height in tiles.

int h
TCOD_ConsoleTile *tiles

A contiguous array of console tiles.

TCOD_bkgnd_flag_t bkgnd_flag

Default background operator for print & print_rect functions.

TCOD_alignment_t alignment

Default alignment for print & print_rect functions.

TCOD_color_t fore

Foreground (text) and background colors.

TCOD_color_t back
bool has_key_color

True if a key color is being used.

TCOD_color_t key_color

The current key color for this console.

int elements

The total length of the tiles array.

Same as w * h.

Added in version 1.16.

void *userdata

A userdata attribute which can be repurposed.

Added in version 1.16.

void (*on_delete)(struct TCOD_Console *self)

Internal use.