12 #include "../stdafx.h" 13 #include "../depot_base.h" 18 #include "../safeguards.h" 20 static TownID _town_index;
22 static const SaveLoad _depot_desc[] = {
33 static void Save_DEPT()
37 FOR_ALL_DEPOTS(depot) {
38 SlSetArrayIndex(depot->
index);
43 static void Load_DEPT()
56 static void Ptrs_DEPT()
60 FOR_ALL_DEPOTS(depot) {
67 {
'DEPT', Save_DEPT, Load_DEPT, Ptrs_DEPT, NULL, CH_ARRAY |
CH_LAST},
#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.
Tindex index
Index of this pool item.
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.
#define SL_MAX_VERSION
Highest possible savegame version.
static bool IsSavegameVersionBefore(uint16 major, byte minor=0)
Checks whether the savegame is below major.
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.
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.