53 virtual void render(
void *sdlSurface) = 0;
76 [[deprecated(
"This function is not compatible with contexts. Use tcod::Timer instead.")]]
89 [[deprecated(
"This function is not compatible with contexts. Use tcod::Timer instead.")]]
93 [[deprecated(
"This function is not compatible with contexts. Use tcod::Timer or SDL timing functions instead.")]]
107 [[deprecated(
"Use SDL_Delay instead.")]]
120 [[deprecated(
"Use SDL_GetTicks instead.")]]
133 [[deprecated(
"Use SDL_GetTicks instead.")]]
136 TCODLIB_BEGIN_IGNORE_DEPRECATIONS
172 [[deprecated(
"This API is deprecated, use SDL_WaitEvent instead.")]]
207 [[deprecated(
"This API is deprecated, use SDL_PollEvent instead.")]]
209 TCODLIB_END_IGNORE_DEPRECATIONS
223 [[deprecated(
"This function is not compatible with contexts.")]]
236 TCOD_DEPRECATED_NOMESSAGE
246 TCOD_DEPRECATED_NOMESSAGE
256 TCOD_DEPRECATED_NOMESSAGE
266 TCOD_DEPRECATED_NOMESSAGE
279 TCOD_DEPRECATED_NOMESSAGE
299 TCOD_DEPRECATED_NOMESSAGE
324 TCOD_DEPRECATED_NOMESSAGE
325 static bool readFile(
const char *filename,
unsigned char **buf,
size_t *size);
340 TCOD_DEPRECATED_NOMESSAGE
341 static bool writeFile(
const char *filename,
unsigned char *buf, uint32_t size);
384 TCOD_DEPRECATED_NOMESSAGE
426 [[deprecated(
"This function is not compatible with contexts.")]]
439 [[deprecated(
"This function is not compatible with contexts.")]]
450 [[deprecated(
"This function is not compatible with contexts.")]]
463 [[deprecated(
"This function is not compatible with contexts.")]]
478 [[deprecated(
"This function is not compatible with contexts.")]]
495 [[deprecated(
"This function is not compatible with contexts.")]]
506 [[deprecated(
"This function is not compatible with contexts.")]]
521 TCOD_DEPRECATED_NOMESSAGE
532 TCOD_DEPRECATED_NOMESSAGE
535#ifndef TCOD_NO_THREADS
537 TCOD_DEPRECATED_NOMESSAGE
538 static int getNumCores();
539 TCOD_DEPRECATED_NOMESSAGE
540 static TCOD_thread_t newThread(
int (*func)(
void *),
void *data);
541 TCOD_DEPRECATED_NOMESSAGE
542 static void deleteThread(TCOD_thread_t th);
543 TCOD_DEPRECATED_NOMESSAGE
544 static void waitThread(TCOD_thread_t th);
546 TCOD_DEPRECATED_NOMESSAGE
547 static TCOD_mutex_t newMutex();
548 TCOD_DEPRECATED_NOMESSAGE
549 static void mutexIn(TCOD_mutex_t mut);
550 TCOD_DEPRECATED_NOMESSAGE
551 static void mutexOut(TCOD_mutex_t mut);
552 TCOD_DEPRECATED_NOMESSAGE
553 static void deleteMutex(TCOD_mutex_t mut);
555 TCOD_DEPRECATED_NOMESSAGE
556 static TCOD_semaphore_t newSemaphore(
int initVal);
557 TCOD_DEPRECATED_NOMESSAGE
558 static void lockSemaphore(TCOD_semaphore_t sem);
559 TCOD_DEPRECATED_NOMESSAGE
560 static void unlockSemaphore(TCOD_semaphore_t sem);
561 TCOD_DEPRECATED_NOMESSAGE
562 static void deleteSemaphore( TCOD_semaphore_t sem);
564 TCOD_DEPRECATED_NOMESSAGE
565 static TCOD_cond_t newCondition();
566 TCOD_DEPRECATED_NOMESSAGE
567 static void signalCondition(TCOD_cond_t sem);
568 TCOD_DEPRECATED_NOMESSAGE
569 static void broadcastCondition(TCOD_cond_t sem);
570 TCOD_DEPRECATED_NOMESSAGE
571 static void waitCondition(TCOD_cond_t sem, TCOD_mutex_t mut);
572 TCOD_DEPRECATED_NOMESSAGE
573 static void deleteCondition( TCOD_cond_t sem);
static bool setClipboard(const char *value)
Takes UTF-8 text and copies it into the system clipboard. On Linux, because an application cannot acc...
static bool readFile(const char *filename, unsigned char **buf, size_t *size)
This is a portable function to read the content of a file from disk or from the application apk (andr...
static bool deleteFile(const char *path)
static void updateChar(int asciiCode, int font_x, int font_y, const TCODImage *img, int x, int y)
You can dynamically change the bitmap of a character in the font.
static void setFps(int val)
The setFps function allows you to limit the number of frames per second. If a frame is rendered faste...
static float getLastFrameLength()
Return the duration of the last frame in seconds.
static void setRenderer(TCOD_renderer_t renderer)
As of 1.5.1, libtcod contains 3 different renderers : SDL : historic libtcod renderer.
static char * getClipboard()
Returns the UTF-8 text currently in the system clipboard.
static TCODLIB_END_IGNORE_DEPRECATIONS void saveScreenshot(const char *filename)
This function allows you to save the current game screen in a png file, or possibly a bmp file if you...
static void sleepMilli(uint32_t val)
Use this function to stop the program execution for a specified number of milliseconds.
static bool writeFile(const char *filename, unsigned char *buf, uint32_t size)
This is a portable function to write some data to a file.
static void registerSDLRenderer(ITCODSDLRenderer *renderer)
To disable the custom renderer, call the same method with a NULL parameter. Note that to keep libtcod...
static TCODLIB_BEGIN_IGNORE_DEPRECATIONS TCOD_event_t waitForEvent(int eventMask, TCOD_key_t *key, TCOD_mouse_t *mouse, bool flush)
This function waits for an event from the user.
static uint32_t getElapsedMilli()
This function returns the number of milliseconds since the program has started.
static TCOD_list_t getDirectoryContent(const char *path, const char *pattern)
To get the list of entries in a directory (including sub-directories, except .
static void getCurrentResolution(int *width, int *height)
You can get the current screen resolution with getCurrentResolution.
static bool isDirectory(const char *path)
static void getCharSize(int *w, int *h)
You can get the size of the characters in the font.
static bool createDirectory(const char *path)
static float getElapsedSeconds()
This function returns the number of seconds since the program has started.
static void forceFullscreenResolution(int width, int height)
libtcod is not aware of the part of the screen your SDL renderer has updated.
static bool deleteDirectory(const char *path)
static void getFullscreenOffsets(int *offset_x, int *offset_y)
If the fullscreen resolution does not matches the console size in pixels, black borders are added.
static TCOD_event_t checkForEvent(int eventMask, TCOD_key_t *key, TCOD_mouse_t *mouse)
This function checks if an event from the user is in the buffer.
static bool fileExists(const char *filename,...)
In order to check whether a given file exists in the filesystem.
static int getFps()
The value returned by this function is updated every second.
TCOD_renderer_t
Libtcod rendering modes.
Definition console_types.h:491
Deprecated mouse functions.
Libtcod key event data, as a keycode or text character.
Definition console_types.h:207
Mouse state provided by the libtcod event system.
Definition mouse_types.h:50
Deprecated low-level functions.