10 #include "../stdafx.h" 11 #include "../depot_base.h" 16 #include "../safeguards.h" 18 static TownID _town_index;
20 static const SaveLoad _depot_desc[] = {
31 static void Save_DEPT()
34 SlSetArrayIndex(depot->index);
39 static void Load_DEPT()
52 static void Ptrs_DEPT()
61 {
'DEPT', Save_DEPT, Load_DEPT, Ptrs_DEPT,
nullptr, CH_ARRAY |
CH_LAST},
static bool IsSavegameVersionBefore(SaveLoadVersion major, byte minor=0)
Checks whether the savegame is below major.
#define SLE_CONDSTR(base, variable, type, length, from, to)
Storage of a string in some savegame versions.
#define SLE_CONDREF(base, variable, type, from, to)
Storage of a reference in some savegame versions.
static Titem * Get(size_t index)
Returns Titem with given index.
Load/save a reference to a town.
Functions/types related to saving and loading games.
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Highest possible saveload version.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.
Handlers and description of chunk.
#define SLEG_CONDVAR(variable, type, from, to)
Storage of a global variable in some savegame versions.
#define SLE_END()
End marker of a struct/class save or load.
static Pool::IterateWrapper< Titem > Iterate(size_t from=0)
Returns an iterable ensemble of all valid Titem.
void SlObject(void *object, const SaveLoad *sld)
Main SaveLoad function.
#define SLE_STR(base, variable, type, length)
Storage of a string in every savegame version.
Last chunk in this array.