21static const SaveLoad _animated_tile_desc[] = {
25struct ANITChunkHandler : ChunkHandler {
44 for (
int i = 0; i < 256; i++) {
45 if (anim_list[i] == 0)
break;
73extern const ChunkHandlerTable _animated_tile_chunk_handlers(animated_tile_chunk_handlers);
std::vector< TileIndex > _animated_tiles
The table/list with animated tiles.
std::vector< TileIndex > _animated_tiles
The table/list with animated tiles.
Loading for animated_tile chunks before table headers were added.
const SaveLoadCompat _animated_tile_sl_compat[]
Original field order for _animated_tile_desc.
A number of safeguards to prevent using unsafe methods.
std::vector< SaveLoad > SlCompatTableHeader(const SaveLoadTable &slt, const SaveLoadCompatTable &slct)
Load a table header in a savegame compatible way.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.
void SlCopy(void *object, size_t length, VarType conv)
Copy a list of SaveLoadType::Variables to/from a savegame.
size_t SlGetFieldLength()
Get the length of the current object.
void SlErrorCorrupt(const std::string &msg)
Error handler for corrupt savegames.
std::vector< SaveLoad > SlTableHeader(const SaveLoadTable &slt)
Save or Load a table header.
void SlGlobList(const SaveLoadTable &slt)
Save or Load (a list of) global variables.
Functions/types related to saving and loading games.
@ U32
A 32 bit unsigned int.
@ U16
A 16 bit unsigned int.
std::reference_wrapper< const ChunkHandler > ChunkHandlerRef
A reference to ChunkHandler.
std::span< const ChunkHandlerRef > ChunkHandlerTable
A table of ChunkHandler entries.
#define SLEG_VECTOR(name, variable, type)
Storage of a global vector of SaveLoadType::Variable elements in every savegame version.
bool IsSavegameVersionBefore(SaveLoadVersion major, uint8_t minor=0)
Checks whether the savegame is below major.
@ MultipleRoadStops
Saveload version: 6.0, SVN revision: 1721 Multi tile road stops, and some map size related fixes.
@ NewGRFMoreAnimation
Saveload version: 80, SVN revision: 11228 Support more types of animation for NewGRF industries.
@ RiffToArray
Saveload version: 294, GitHub pull request: 9375 Changed many ChunkType::Riff chunks to ChunkType::A...
@ Table
An Array with a header describing the elements.
Definition of base types and functions in a cross-platform compatible way.
void Save() const override
Save the chunk.
void Load() const override
Load the chunk.
static constexpr VarType U32
Store a 32 bits unsigned int.
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > > TileIndex
The index/ID of a Tile.