# SaveLoadParams Struct Reference

The saveload struct, containing reader-writer functions, bufffer, version, etc. More...

## Data Fields

SaveLoadAction | action
| are we doing a save or a load atm.
NeedLength | need_length
| working in NeedLength (Autolength) mode?
byte | block_mode
| ???
bool | error
| did an error occur or not
size_t | obj_len
| the length of the current object we are busy with
int | array_index
int | last_array_index
| in the case of an array, the current and last positions
size_t | offs_base
| the offset in number of bytes since we started writing data (eg uncompressed savegame size)
WriterProc * | write_bytes
| savegame writer function
ReaderProc * | read_bytes
| savegame loader function
byte * | bufp
byte * | bufe
| bufp(ointer) gives the current position in the buffer bufe(nd) gives the end of the buffer
byte * | buf
| pointer to temporary memory to read/write, initialized by SaveLoadFormat->initread/write
byte * | buf_ori
| pointer to the original memory location of buf, used to free it afterwards
uint | bufsize
| the size of the temporary memory *buf
FILE * | fh
| the file from which is read or written to
void(* | excpt_uninit )()
| the function to execute on any encountered error
StringID | error_str
| the translateable error message to show
char * | extra_msg
| the error message

## Detailed Description

The saveload struct, containing reader-writer functions, bufffer, version, etc.

Definition at line 76 of file saveload.cpp.

The documentation for this struct was generated from the following file:

- src/saveload/saveload.cpp