OpenTTD Source 20260206-master-g4d4e37dbf1
SaveLoadParams Struct Reference

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

Data Fields

SaveLoadAction action
 are we doing a save or a load atm.
NeedLength need_length
 working in NeedLength (Autolength) mode?
uint8_t 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
bool expect_table_header
 In the case of a table, if the header is saved/loaded.
std::unique_ptr< MemoryDumperdumper
 Memory dumper to write the savegame to.
std::shared_ptr< SaveFiltersf
 Filter to write the savegame to.
std::unique_ptr< ReadBufferreader
 Savegame reading buffer.
std::shared_ptr< LoadFilterlf
 Filter to read the savegame from.
StringID error_str
 the translatable error message to show
std::string extra_msg
 the error message
bool saveinprogress
 Whether there is currently a save in progress.

Detailed Description

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

Definition at line 196 of file saveload.cpp.

Field Documentation

◆ action

SaveLoadAction SaveLoadParams::action

are we doing a save or a load atm.

Definition at line 197 of file saveload.cpp.

◆ array_index

int SaveLoadParams::array_index

Definition at line 203 of file saveload.cpp.

◆ block_mode

uint8_t SaveLoadParams::block_mode

???

Definition at line 199 of file saveload.cpp.

◆ dumper

std::unique_ptr<MemoryDumper> SaveLoadParams::dumper

Memory dumper to write the savegame to.

Definition at line 206 of file saveload.cpp.

◆ error

bool SaveLoadParams::error

did an error occur or not

Definition at line 200 of file saveload.cpp.

◆ error_str

StringID SaveLoadParams::error_str

the translatable error message to show

Definition at line 212 of file saveload.cpp.

◆ expect_table_header

bool SaveLoadParams::expect_table_header

In the case of a table, if the header is saved/loaded.

Definition at line 204 of file saveload.cpp.

◆ extra_msg

std::string SaveLoadParams::extra_msg

the error message

Definition at line 213 of file saveload.cpp.

◆ last_array_index

int SaveLoadParams::last_array_index

in the case of an array, the current and last positions

Definition at line 203 of file saveload.cpp.

◆ lf

std::shared_ptr<LoadFilter> SaveLoadParams::lf

Filter to read the savegame from.

Definition at line 210 of file saveload.cpp.

◆ need_length

NeedLength SaveLoadParams::need_length

working in NeedLength (Autolength) mode?

Definition at line 198 of file saveload.cpp.

◆ obj_len

size_t SaveLoadParams::obj_len

the length of the current object we are busy with

Definition at line 202 of file saveload.cpp.

◆ reader

std::unique_ptr<ReadBuffer> SaveLoadParams::reader

Savegame reading buffer.

Definition at line 209 of file saveload.cpp.

◆ saveinprogress

bool SaveLoadParams::saveinprogress

Whether there is currently a save in progress.

Definition at line 215 of file saveload.cpp.

◆ sf

std::shared_ptr<SaveFilter> SaveLoadParams::sf

Filter to write the savegame to.

Definition at line 207 of file saveload.cpp.


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