OpenTTD Source
1.11.0-beta2
|
Go to the documentation of this file.
10 #include "../stdafx.h"
11 #include "../object_base.h"
12 #include "../object_map.h"
17 #include "../safeguards.h"
19 static const SaveLoad _object_desc[] = {
32 static void Save_OBJS()
36 SlSetArrayIndex(o->index);
41 static void Load_OBJS()
50 static void Ptrs_OBJS()
61 static void Save_OBID()
66 static void Load_OBID()
72 {
'OBID', Save_OBID, Load_OBID,
nullptr,
nullptr, CH_ARRAY },
73 {
'OBJS', Save_OBJS, Load_OBJS, Ptrs_OBJS,
nullptr, CH_ARRAY |
CH_LAST},
@ SLV_186
186 25833 Objects storage
@ REF_TOWN
Load/save a reference to a town.
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
@ CH_LAST
Last chunk in this array.
Handlers and description of chunk.
#define SLE_REF(base, variable, type)
Storage of a reference in every version of a savegame.
@ MP_OBJECT
Contains objects such as transmitters and owned land.
#define SLE_END()
End marker of a struct/class save or load.
An object, such as transmitter, on the map.
void Load_NewGRFMapping(OverrideManagerBase &mapping)
Load a GRF ID + local id -> OpenTTD's id mapping.
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.
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a given tiletype.
@ SL_MAX_VERSION
Highest possible saveload version.
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
static Pool::IterateWrapper< Titem > Iterate(size_t from=0)
Returns an iterable ensemble of all valid Titem.
ObjectOverrideManager _object_mngr
The override manager for our objects.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.
void Save_NewGRFMapping(const OverrideManagerBase &mapping)
Save a GRF ID + local id -> OpenTTD's id mapping.