10 #include "../stdafx.h"
12 #include "../company_base.h"
17 #include "../safeguards.h"
19 static const SaveLoad _group_desc[] = {
40 SlSetArrayIndex(g->index);
Loading of group chunks before table headers were added.
const SaveLoadCompat _group_sl_compat[]
Original field order for _group_desc.
static const GroupID INVALID_GROUP
Sentinel for invalid groups.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.
std::vector< SaveLoad > SlCompatTableHeader(const SaveLoadTable &slt, const SaveLoadCompatTable &slct)
Load a table header in a savegame compatible way.
std::vector< SaveLoad > SlTableHeader(const SaveLoadTable &slt)
Save or Load a table header.
void SlObject(void *object, const SaveLoadTable &slt)
Main SaveLoad function.
Functions/types related to saving and loading games.
@ SLF_ALLOW_CONTROL
Allow control codes in the strings.
std::reference_wrapper< const ChunkHandler > ChunkHandlerRef
A reference to ChunkHandler.
std::span< const ChunkHandlerRef > ChunkHandlerTable
A table of ChunkHandler entries.
#define SLE_CONDSSTR(base, variable, type, from, to)
Storage of a std::string in some savegame versions.
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
bool IsSavegameVersionBefore(SaveLoadVersion major, uint8_t minor=0)
Checks whether the savegame is below major.
@ SL_MAX_VERSION
Highest possible saveload version.
@ SL_MIN_VERSION
First savegame version.
@ SLV_GROUP_LIVERIES
205 PR#7108 Livery storage change and group liveries.
@ SLV_189
189 26450 Hierarchical vehicle subgroups
@ SLV_GROUP_NUMBERS
336 PR#12297 Add per-company group numbers.
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Handlers and description of chunk.
void Load() const override
Load the chunk.
void Save() const override
Save the chunk.
GroupID parent
Parent group.
static Pool::IterateWrapper< Titem > Iterate(size_t from=0)
Returns an iterable ensemble of all valid Titem.