35#ifndef TCOD_CONSOLE_ETC_H_
36#define TCOD_CONSOLE_ETC_H_
56#define TCOD_BKGND_ALPHA(alpha) ((TCOD_bkgnd_flag_t)(TCOD_BKGND_ALPH | (((uint8_t)(alpha * 255)) << 8)))
57#define TCOD_BKGND_ADDALPHA(alpha) ((TCOD_bkgnd_flag_t)(TCOD_BKGND_ADDA | (((uint8_t)(alpha * 255)) << 8)))
60 "This function is not compatible with contexts. Consider using tcod::load_tilesheet or TCOD_tileset_load instead."
61 " https://libtcod.readthedocs.io/en/latest/upgrading.html")
63TCOD_console_set_custom_font(const
char* fontFile,
int flags,
int nb_char_horiz,
int nb_char_vertic);
64TCOD_DEPRECATED(
"This function is not compatible with contexts.")
65TCODLIB_API
void TCOD_console_map_ascii_code_to_font(
int asciiCode,
int fontCharX,
int fontCharY);
66TCOD_DEPRECATED(
"This function is not compatible with contexts.")
67TCODLIB_API
void TCOD_console_map_ascii_codes_to_font(
int asciiCode,
int nbCodes,
int fontCharX,
int fontCharY);
68TCOD_DEPRECATED(
"This function is not compatible with contexts.")
69TCODLIB_API
void TCOD_console_map_string_to_font(const
char* s,
int fontCharX,
int fontCharY);
71TCOD_DEPRECATED(
"This function is not compatible with contexts.")
72TCODLIB_API
void TCOD_console_map_string_to_font_utf(const
wchar_t* s,
int fontCharX,
int fontCharY);
75TCOD_DEPRECATED(
"This function does nothing.")
76TCODLIB_API
void TCOD_console_set_dirty(
int x,
int y,
int w,
int h);
102TCOD_DEPRECATED(
"Use SDL to check the keyboard state.")
106TCODLIB_API TCOD_console_t TCOD_console_from_file(const
char* filename);
107TCODLIB_API
bool TCOD_console_load_asc(TCOD_console_t con, const
char* filename);
108TCODLIB_API
bool TCOD_console_load_apf(TCOD_console_t con, const
char* filename);
109TCODLIB_API
bool TCOD_console_save_asc(TCOD_console_t con, const
char* filename);
110TCODLIB_API
bool TCOD_console_save_apf(TCOD_console_t con, const
char* filename);
113TCODLIB_BEGIN_IGNORE_DEPRECATIONS
121TCOD_DEPRECATED(
"This API is deprecated, use SDL_PollEvent instead.")
132TCOD_DEPRECATED(
"This API is deprecated, use SDL_WaitEvent instead.")
135TCOD_DEPRECATED(
"This function does not support contexts. Consider using `TCOD_console_credits_render_ex`.")
136TCODLIB_API
void TCOD_console_credits(
void);
137TCOD_DEPRECATED(
"This function does not support contexts.")
138TCODLIB_API
void TCOD_console_credits_reset(
void);
139TCOD_DEPRECATED(
"This function does not support contexts. Consider using `TCOD_console_credits_render_ex`.")
140TCODLIB_API
bool TCOD_console_credits_render(
int x,
int y,
bool alpha);
141TCODLIB_END_IGNORE_DEPRECATIONS
158TCOD_DEPRECATED(
"This function is a stub and will do nothing.")
159TCODLIB_API
void TCOD_console_set_keyboard_repeat(
int initial_delay,
int interval);
160TCOD_DEPRECATED(
"This function is a stub and will do nothing.")
161TCODLIB_API
void TCOD_console_disable_keyboard_repeat(
void);
174TCOD_DEPRECATED(
"This function does not support contexts.")
Various console functions.
TCOD_Error TCOD_console_flush(void)
Render and present the root console to the active display.
TCODLIB_END_IGNORE_DEPRECATIONS bool TCOD_console_credits_render_ex(TCOD_Console *console, int x, int y, bool alpha, float delta_time)
Render a libtcod credit animation to a console.
TCODLIB_BEGIN_IGNORE_DEPRECATIONS TCOD_key_t TCOD_console_check_for_keypress(int flags)
Return immediately with a recently pressed key.
bool TCOD_console_is_key_pressed(TCOD_keycode_t key)
Return True if the libtcod keycode is held.
uint8_t TCOD_console_get_fade(void)
Return the fade value.
void TCOD_console_set_fade(uint8_t val, TCOD_color_t fade_color)
Fade the color of the display.
TCOD_key_t TCOD_console_wait_for_keypress(bool flush)
Wait for a key press event, then return it.
TCOD_color_t TCOD_console_get_fading_color(void)
Return the fade color.
TCOD_Error TCOD_console_flush_ex(TCOD_Console *console, struct TCOD_ViewportOptions *viewport)
Render and present a console with optional viewport options.
C types for console functions.
TCOD_keycode_t
Libtcod specific codes representing keys on the keyboard.
Definition console_types.h:126
Libtcod display management context.
TCOD_Error
An enum of libtcod error codes.
Definition error.h:48
Deprecated libtcod list module.
A libtcod console containing a grid of tiles with {ch, fg, bg} information.
Definition console.h:125
Viewport options for the rendering context.
Definition context_viewport.h:48
Libtcod key event data, as a keycode or text character.
Definition console_types.h:207