Function TCOD_tileset_render_to_surface¶
Defined in File tileset_render.h
Function Documentation¶
-
TCOD_Error TCOD_tileset_render_to_surface(const TCOD_Tileset *tileset, const TCOD_Console *console, TCOD_Console **cache, struct SDL_Surface **surface_out)
Render a console to a SDL_Surface with a software renderer.
tileset
is the tiles to render with, must not be NULL.console
is the console to render, must not be NULL.cache
is an optional pointer to a consoled used as a cache. The console at*cache
will be created or modified. Thecache
will be used to skip drawing already drawn tiles on any subsequent calls.surface_out
is a pointer to where to put the surface will be managed. The surface at*surface_out
will be created or modified and will change to match the size ofconsole
andtileset
. The pixel format will be SDL_PIXELFORMAT_RGBA32.Returns a negative value on error, see
TCOD_get_error
.New in version 1.16.