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);
ObjectOverrideManager _object_mngr(NEW_OBJECT_OFFSET, NUM_OBJECTS, INVALID_OBJECT_TYPE)
The override manager for our objects.
Code handling saving and loading of NewGRF mappings.
Loading of object chunks before table headers were added.
const SaveLoadCompat _object_sl_compat[]
Original field order for _object_desc.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.
std::vector< SaveLoad > SlCompatTableHeader(const SaveLoadTable &slt, const SaveLoadCompatTable &slct)
Load a table header in a savegame compatible way.
std::vector< SaveLoad > SlTableHeader(const SaveLoadTable &slt)
Save or Load a table header.
void SlObject(void *object, const SaveLoadTable &slt)
Main SaveLoad function.
Functions/types related to saving and loading games.
std::reference_wrapper< const ChunkHandler > ChunkHandlerRef
A reference to ChunkHandler.
std::span< const ChunkHandlerRef > ChunkHandlerTable
A table of ChunkHandler entries.
#define SLE_REF(base, variable, type)
Storage of a reference in every version of a savegame.
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
bool IsSavegameVersionBefore(SaveLoadVersion major, uint8_t minor=0)
Checks whether the savegame is below major.
@ SLV_186
186 25833 Objects storage
@ SL_MAX_VERSION
Highest possible saveload version.
@ REF_TOWN
Load/save a reference to a town.
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Handlers and description of chunk.
void FixPointers() const override
Fix the pointers.
void Load() const override
Load the chunk.
void Save() const override
Save the chunk.
An object, such as transmitter, on the map.
static Pool::IterateWrapper< Titem > Iterate(size_t from=0)
Returns an iterable ensemble of all valid Titem.
static debug_inline bool IsTileType(Tile tile, TileType type)
Checks if a tile is a given tiletype.
@ MP_OBJECT
Contains objects such as transmitters and owned land.