Go to the documentation of this file.
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 Titem * Get(size_t index)
Returns Titem with given index.
@ SL_MIN_VERSION
First savegame version.
@ REF_TOWN
Load/save a reference to a town.
#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.
#define SLE_STR(base, variable, type, length)
Storage of a string in every savegame version.
@ CH_LAST
Last chunk in this array.
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.
#define SLE_CONDREF(base, variable, type, from, to)
Storage of a reference in some savegame versions.
static bool IsSavegameVersionBefore(SaveLoadVersion major, byte minor=0)
Checks whether the savegame is below major.
void SlObject(void *object, const SaveLoad *sld)
Main SaveLoad function.
@ SL_MAX_VERSION
Highest possible saveload version.
static Pool::IterateWrapper< Titem > Iterate(size_t from=0)
Returns an iterable ensemble of all valid Titem.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.