|
libtcod
|
Various console functions. More...
#include <stdbool.h>#include <algorithm>#include <array>#include <memory>#include <optional>#include <stdexcept>#include <utility>#include "error.hpp"#include "color.h"#include "config.h"#include "error.h"#include "tileset.h"Go to the source code of this file.
Classes | |
| struct | TCOD_ConsoleTile |
| The raw data for a single TCOD_Console tile. More... | |
| struct | TCOD_Console |
| A libtcod console containing a grid of tiles with {ch, fg, bg} information. More... | |
Typedefs | |
| typedef enum TCOD_bkgnd_flag_t | TCOD_bkgnd_flag_t |
| typedef enum TCOD_alignment_t | TCOD_alignment_t |
| typedef struct TCOD_ConsoleTile | TCOD_ConsoleTile |
| The raw data for a single TCOD_Console tile. | |
| typedef struct TCOD_Console | TCOD_Console |
| typedef struct TCOD_Console * | TCOD_console_t |
Enumerations | |
| enum | TCOD_bkgnd_flag_t { TCOD_BKGND_NONE , TCOD_BKGND_SET , TCOD_BKGND_MULTIPLY , TCOD_BKGND_LIGHTEN , TCOD_BKGND_DARKEN , TCOD_BKGND_SCREEN , TCOD_BKGND_COLOR_DODGE , TCOD_BKGND_COLOR_BURN , TCOD_BKGND_ADD , TCOD_BKGND_ADDA , TCOD_BKGND_BURN , TCOD_BKGND_OVERLAY , TCOD_BKGND_ALPH , TCOD_BKGND_DEFAULT } |
| Background color blend modes. | |
| enum | TCOD_alignment_t { TCOD_LEFT , TCOD_RIGHT , TCOD_CENTER } |
| Print justification options. | |
Functions | |
| TCOD_Console * | TCOD_console_new (int w, int h) |
| Return a new console with a specific number of columns and rows. | |
| int | TCOD_console_get_width (const TCOD_Console *con) |
| Return the width of a console. | |
| int | TCOD_console_get_height (const TCOD_Console *con) |
| Return the height of a console. | |
| void | TCOD_console_set_key_color (TCOD_Console *con, TCOD_color_t col) |
| void | TCOD_console_blit (const TCOD_Console *src, int xSrc, int ySrc, int wSrc, int hSrc, TCOD_Console *dst, int xDst, int yDst, float foreground_alpha, float background_alpha) |
| Blit from one console to another. | |
| void | TCOD_console_blit_key_color (const TCOD_Console *src, int xSrc, int ySrc, int wSrc, int hSrc, TCOD_Console *dst, int xDst, int yDst, float foreground_alpha, float background_alpha, const TCOD_color_t *key_color) |
| void | TCOD_console_delete (TCOD_Console *console) |
| Delete a console. | |
| void | TCOD_console_set_default_background (TCOD_Console *con, TCOD_color_t col) |
| void | TCOD_console_set_default_foreground (TCOD_Console *con, TCOD_color_t col) |
| void | TCOD_console_clear (TCOD_Console *con) |
| Clear a console to its default colors and the space character code. | |
| void | TCOD_console_set_char_background (TCOD_Console *con, int x, int y, TCOD_color_t col, TCOD_bkgnd_flag_t flag) |
| Blend a background color onto a console tile. | |
| void | TCOD_console_set_char_foreground (TCOD_Console *con, int x, int y, TCOD_color_t col) |
| Change the foreground color of a console tile. | |
| void | TCOD_console_set_char (TCOD_Console *con, int x, int y, int c) |
| Change a character on a console tile, without changing its colors. | |
| void | TCOD_console_put_char (TCOD_Console *con, int x, int y, int c, TCOD_bkgnd_flag_t flag) |
| Draw a character on a console using the default colors. | |
| void | TCOD_console_put_char_ex (TCOD_Console *con, int x, int y, int c, TCOD_color_t fore, TCOD_color_t back) |
| Draw a character on the console with the given colors. | |
| void | TCOD_console_set_background_flag (TCOD_Console *con, TCOD_bkgnd_flag_t flag) |
| Set a consoles default background flag. | |
| TCOD_bkgnd_flag_t | TCOD_console_get_background_flag (TCOD_Console *con) |
| Return a consoles default background flag. | |
| void | TCOD_console_set_alignment (TCOD_Console *con, TCOD_alignment_t alignment) |
| Set a consoles default alignment. | |
| TCOD_alignment_t | TCOD_console_get_alignment (TCOD_Console *con) |
| Return a consoles default alignment. | |
| TCOD_color_t | TCOD_console_get_default_background (TCOD_Console *con) |
| TCOD_color_t | TCOD_console_get_default_foreground (TCOD_Console *con) |
| TCOD_color_t | TCOD_console_get_char_background (const TCOD_Console *con, int x, int y) |
| Return the background color of a console at x,y. | |
| TCOD_color_t | TCOD_console_get_char_foreground (const TCOD_Console *con, int x, int y) |
| Return the foreground color of a console at x,y. | |
| int | TCOD_console_get_char (const TCOD_Console *con, int x, int y) |
| Return a character code of a console at x,y. | |
Various console functions.