OpenTTD Source 20241224-master-gf74b0cf984
|
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< MemoryDumper > | dumper |
Memory dumper to write the savegame to. | |
std::shared_ptr< SaveFilter > | sf |
Filter to write the savegame to. | |
std::unique_ptr< ReadBuffer > | reader |
Savegame reading buffer. | |
std::shared_ptr< LoadFilter > | lf |
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. | |
The saveload struct, containing reader-writer functions, buffer, version, etc.
Definition at line 178 of file saveload.cpp.
SaveLoadAction SaveLoadParams::action |
are we doing a save or a load atm.
Definition at line 179 of file saveload.cpp.
Referenced by GetSaveLoadErrorType(), IntToReference(), LoadWithFilter(), ReferenceToInt(), SaveOrLoad(), SaveWithFilter(), SlArray(), SlAutolength(), SlCompatTableHeader(), SlCopy(), SlCopyBytes(), SlCopyInternal(), SlDeque(), SlError(), SlFixPointers(), SlNullPointers(), SlStorageHelper< Tstorage, Tvar, Tallocator >::SlSaveLoad(), SlSaveLoadConv(), SlSaveLoadRef(), SlSetLength(), SlStdString(), SlTableHeader(), and SlVector().
int SaveLoadParams::array_index |
Definition at line 185 of file saveload.cpp.
uint8_t SaveLoadParams::block_mode |
???
Definition at line 181 of file saveload.cpp.
Referenced by ChunkHandler::LoadCheck(), SlCompatTableHeader(), SlIterateArray(), SlLoadCheckChunk(), SlLoadChunk(), SlSaveChunk(), SlSetLength(), and SlTableHeader().
std::unique_ptr<MemoryDumper> SaveLoadParams::dumper |
Memory dumper to write the savegame to.
Definition at line 188 of file saveload.cpp.
Referenced by ClearSaveLoadState(), DoSave(), SaveFileToDisk(), SlAutolength(), and SlWriteByte().
bool SaveLoadParams::error |
did an error occur or not
Definition at line 182 of file saveload.cpp.
StringID SaveLoadParams::error_str |
the translatable error message to show
Definition at line 194 of file saveload.cpp.
Referenced by GetSaveLoadErrorMessage(), SaveFileToDisk(), SetSaveLoadError(), and SlError().
bool SaveLoadParams::expect_table_header |
In the case of a table, if the header is saved/loaded.
Definition at line 186 of file saveload.cpp.
Referenced by SlIterateArray(), SlLoadCheckChunk(), SlLoadChunk(), SlSaveChunk(), and SlSetLength().
std::string SaveLoadParams::extra_msg |
the error message
Definition at line 195 of file saveload.cpp.
Referenced by GetSaveLoadErrorMessage(), and SlError().
int SaveLoadParams::last_array_index |
in the case of an array, the current and last positions
Definition at line 185 of file saveload.cpp.
Referenced by SlSaveChunk(), and SlSetLength().
std::shared_ptr<LoadFilter> SaveLoadParams::lf |
Filter to read the savegame from.
Definition at line 192 of file saveload.cpp.
Referenced by ClearSaveLoadState(), DetermineSaveLoadFormat(), and DoLoad().
NeedLength SaveLoadParams::need_length |
working in NeedLength (Autolength) mode?
Definition at line 180 of file saveload.cpp.
Referenced by SlAutolength(), SlCopy(), SlObject(), SlRefList(), SlRefVector(), SlSaveChunk(), SlSetLength(), SlSetStructListLength(), and SlTableHeader().
size_t SaveLoadParams::obj_len |
the length of the current object we are busy with
Definition at line 184 of file saveload.cpp.
Referenced by SlAutolength(), SlGetFieldLength(), SlIterateArray(), SlLoadCheckChunk(), SlLoadChunk(), and SlSetLength().
std::unique_ptr<ReadBuffer> SaveLoadParams::reader |
Savegame reading buffer.
Definition at line 191 of file saveload.cpp.
Referenced by ClearSaveLoadState(), DoLoad(), SlIterateArray(), SlLoadCheckChunk(), SlLoadChunk(), SlReadByte(), and SlSkipArray().
bool SaveLoadParams::saveinprogress |
Whether there is currently a save in progress.
Definition at line 197 of file saveload.cpp.
Referenced by DoSave(), SaveFileDone(), SaveFileStart(), and SaveOrLoad().
std::shared_ptr<SaveFilter> SaveLoadParams::sf |
Filter to write the savegame to.
Definition at line 189 of file saveload.cpp.
Referenced by ClearSaveLoadState(), DoSave(), and SaveFileToDisk().