OpenTTD Source
20240919-master-gdf0233f4c2
|
Go to the documentation of this file.
10 #include "../stdafx.h"
15 #include "../object_base.h"
16 #include "../object_map.h"
19 #include "../safeguards.h"
21 static const SaveLoad _object_desc[] = {
41 SlSetArrayIndex(o->index);
void FixPointers() const override
Fix the pointers.
void Save() const override
Save the chunk.
@ REF_TOWN
Load/save a reference to a town.
std::reference_wrapper< const ChunkHandler > ChunkHandlerRef
A reference to ChunkHandler.
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
void Load() const override
Load the chunk.
Handlers and description of chunk.
#define SLE_REF(base, variable, type)
Storage of a reference in every version of a savegame.
const SaveLoadCompat _object_sl_compat[]
Original field order for _object_desc.
@ MP_OBJECT
Contains objects such as transmitters and owned land.
An object, such as transmitter, on the map.
@ 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.
std::span< const ChunkHandlerRef > ChunkHandlerTable
A table of ChunkHandler entries.
std::vector< SaveLoad > SlCompatTableHeader(const SaveLoadTable &slt, const SaveLoadCompatTable &slct)
Load a table header in a savegame compatible way.
ObjectOverrideManager _object_mngr
The override manager for our objects.
static debug_inline bool IsTileType(Tile tile, TileType type)
Checks if a tile is a given tiletype.
void SlObject(void *object, const SaveLoadTable &slt)
Main SaveLoad function.
bool IsSavegameVersionBefore(SaveLoadVersion major, uint8_t minor=0)
Checks whether the savegame is below major.
std::vector< SaveLoad > SlTableHeader(const SaveLoadTable &slt)
Save or Load a table header.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.
@ SLV_186
186 25833 Objects storage