libtcoddocumentation

3.2. Easy screenshots

This function allows you to save the current game screen in a png file, or possibly a bmp file if you provide a filename ending with .bmp.

static void TCODSystem::saveScreenshot(const char *filename)

void TCOD_sys_save_screenshot(const char *filename)

sys_save_screenshot(filename)

static void TCODSystem::saveScreenshot(string filename);

tcod.system.saveScreenshot(filename)

ParameterDescription
filenameName of the file. If NULL, a filename is automatically generated with the form "./screenshotNNN.png", NNN being the first free number (if a file named screenshot000.png already exist, screenshot001.png will be used, and so on...).