12 #include "../stdafx.h" 13 #include "../object_base.h" 14 #include "../object_map.h" 19 #include "../safeguards.h" 21 static const SaveLoad _object_desc[] = {
34 static void Save_OBJS()
40 SlSetArrayIndex(o->
index);
45 static void Load_OBJS()
54 static void Ptrs_OBJS()
66 static void Save_OBID()
71 static void Load_OBID()
77 {
'OBID', Save_OBID, Load_OBID, NULL, NULL, CH_ARRAY },
78 {
'OBJS', Save_OBJS, Load_OBJS, Ptrs_OBJS, NULL, CH_ARRAY |
CH_LAST},
Code handling saving and loading of NewGRF mappings.
#define SLE_REF(base, variable, type)
Storage of a reference in every version of a savegame.
Tindex index
Index of this pool item.
Load/save a reference to a town.
Contains objects such as transmitters and owned land.
Functions/types related to saving and loading games.
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a give tiletype.
An object, such as transmitter, on the map.
#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.
void Load_NewGRFMapping(OverrideManagerBase &mapping)
Load a GRF ID + local id -> OpenTTD's id mapping.
TileIndex tile
The base tile of the area.
#define SLE_END()
End marker of a struct/class save or load.
TileArea location
Location of the object.
void SlObject(void *object, const SaveLoad *sld)
Main SaveLoad function.
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
void Save_NewGRFMapping(const OverrideManagerBase &mapping)
Save a GRF ID + local id -> OpenTTD's id mapping.
ObjectOverrideManager _object_mngr
The override manager for our objects.
Last chunk in this array.