Function TCOD_save_xp_to_memory¶
Defined in File console_rexpaint.h
Function Documentation¶
-
int TCOD_save_xp_to_memory(int n_consoles, const TCOD_Console *const *consoles, int n_out, unsigned char *out, int compression_level)
Save an array of consoles to a REXPaint file in memory.
Partially initialized consoles are released on failures.
New in version 1.18.
- Parameters
n_consoles – The length of the input
consoles
array.consoles – An array of tcod consoles, can not be NULL.
n_out – The size of the
out
buffer, if this is zero then upper bound to be returned.out – A pointer to an output buffer, can be NULL.
compression_level – A compression level for the zlib library.
- Returns
If
out=NULL
then returns the upper bound of the buffer size needed. Otherwise this returns the number of bytes actually filled. On an error a negative error code is returned.