|
libtcod
|
Miscellaneous deprecated functions. More...
#include <stdbool.h>#include <wchar.h>#include "color.h"#include "config.h"#include "console.h"#include "console_types.h"#include "context.h"#include "error.h"#include "image.h"#include "list.h"Go to the source code of this file.
Macros | |
| #define | TCOD_BKGND_ALPHA(alpha) |
| #define | TCOD_BKGND_ADDALPHA(alpha) |
Functions | |
| TCOD_Error | TCOD_console_set_custom_font (const char *fontFile, int flags, int nb_char_horiz, int nb_char_vertic) |
| void | TCOD_console_map_ascii_code_to_font (int asciiCode, int fontCharX, int fontCharY) |
| void | TCOD_console_map_ascii_codes_to_font (int asciiCode, int nbCodes, int fontCharX, int fontCharY) |
| void | TCOD_console_map_string_to_font (const char *s, int fontCharX, int fontCharY) |
| void | TCOD_console_map_string_to_font_utf (const wchar_t *s, int fontCharX, int fontCharY) |
| void | TCOD_console_set_dirty (int x, int y, int w, int h) |
| TCOD_Error | TCOD_console_flush_ex (TCOD_Console *console, struct TCOD_ViewportOptions *viewport) |
| Render and present a console with optional viewport options. | |
| TCOD_Error | TCOD_console_flush (void) |
| Render and present the root console to the active display. | |
| bool | TCOD_console_is_key_pressed (TCOD_keycode_t key) |
| Return True if the libtcod keycode is held. | |
| TCOD_console_t | TCOD_console_from_file (const char *filename) |
| bool | TCOD_console_load_asc (TCOD_console_t con, const char *filename) |
| bool | TCOD_console_load_apf (TCOD_console_t con, const char *filename) |
| bool | TCOD_console_save_asc (TCOD_console_t con, const char *filename) |
| bool | TCOD_console_save_apf (TCOD_console_t con, const char *filename) |
| TCODLIB_BEGIN_IGNORE_DEPRECATIONS TCOD_key_t | TCOD_console_check_for_keypress (int flags) |
| Return immediately with a recently pressed key. | |
| TCOD_key_t | TCOD_console_wait_for_keypress (bool flush) |
| Wait for a key press event, then return it. | |
| void | TCOD_console_credits (void) |
| void | TCOD_console_credits_reset (void) |
| bool | TCOD_console_credits_render (int x, int y, bool alpha) |
| 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. | |
| void | TCOD_console_set_keyboard_repeat (int initial_delay, int interval) |
| void | TCOD_console_disable_keyboard_repeat (void) |
| void | TCOD_console_set_fade (uint8_t val, TCOD_color_t fade_color) |
| Fade the color of the display. | |
| uint8_t | TCOD_console_get_fade (void) |
| Return the fade value. | |
| TCOD_color_t | TCOD_console_get_fading_color (void) |
| Return the fade color. | |
Miscellaneous deprecated functions.
| #define TCOD_BKGND_ADDALPHA | ( | alpha | ) |
| #define TCOD_BKGND_ALPHA | ( | alpha | ) |
| TCODLIB_BEGIN_IGNORE_DEPRECATIONS TCOD_key_t TCOD_console_check_for_keypress | ( | int | flags | ) |
Return immediately with a recently pressed key.
| flags | A TCOD_event_t bit-field, for example: TCOD_EVENT_KEY_PRESS |
| 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.
| console | The console to render to. |
| x | |
| y | |
| alpha | |
| delta_time | Delta time in seconds. |
embed:rst:leading-asterisk .. versionadded:: 1.19
| TCOD_Error TCOD_console_flush_ex | ( | TCOD_Console * | console, |
| struct TCOD_ViewportOptions * | viewport ) |
Render and present a console with optional viewport options.
console is the console to render.
viewport is optional.
Returns a negative values on error. See TCOD_get_error.
embed:rst:leading-asterisk .. versionadded:: 1.16
| uint8_t TCOD_console_get_fade | ( | void | ) |
Return the fade value.
| TCOD_color_t TCOD_console_get_fading_color | ( | void | ) |
Return the fade color.
| bool TCOD_console_is_key_pressed | ( | TCOD_keycode_t | key | ) |
Return True if the libtcod keycode is held.
embed:rst:leading-asterisk
.. deprecated:: 1.16
You should instead use SDL_GetKeyboardState to check if keys are held.
| void TCOD_console_set_fade | ( | uint8_t | val, |
| TCOD_color_t | fade_color ) |
Fade the color of the display.
| val | Where at 255 colors are normal and at 0 colors are completely faded. |
| fade_color | Color to fade towards. embed:rst:leading-asterisk
.. deprecated:: 1.19
This function will not work with libtcod contexts.
|
| TCOD_key_t TCOD_console_wait_for_keypress | ( | bool | flush | ) |
Wait for a key press event, then return it.
| flush | If 1 then the event queue will be cleared before waiting for the next event. This should always be 0. |
Do not solve input lag issues by arbitrarily dropping events!