System layer

Note

These docs are incomplete. Several functions and features are better documented by the older 1.6.4 docs which you can find here.

Time functions

uint32_t TCOD_sys_elapsed_milli(void)
float TCOD_sys_elapsed_seconds(void)
void TCOD_sys_sleep_milli(uint32_t val)
void TCOD_sys_set_fps(int val)
int TCOD_sys_get_fps(void)
float TCOD_sys_get_last_frame_length(void)

Easy screenshots

void TCOD_sys_save_screenshot(const char *filename)

Miscellaneous utilities

struct SDL_Window *TCOD_sys_get_sdl_window(void)

Return an SDL_Window pointer if one is in use, returns NULL otherwise.

New in version 1.11.

struct SDL_Renderer *TCOD_sys_get_sdl_renderer(void)

Return an SDL_Renderer pointer if one is in use, returns NULL otherwise.

New in version 1.11.