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.
tilesetis the tiles to render with, must not be NULL.consoleis the console to render, must not be NULL.cacheis an optional pointer to a consoled used as a cache. The console at*cachewill be created or modified. Thecachewill be used to skip drawing already drawn tiles on any subsequent calls.surface_outis a pointer to where to put the surface will be managed. The surface at*surface_outwill be created or modified and will change to match the size ofconsoleandtileset. The pixel format will be SDL_PIXELFORMAT_RGBA32.Returns a negative value on error, see
TCOD_get_error.Added in version 1.16.