OpenTTD Source
1.11.0-beta2
|
Go to the documentation of this file.
10 #include "../stdafx.h"
11 #include "../autoreplace_base.h"
15 #include "../safeguards.h"
17 static const SaveLoad _engine_renew_desc[] = {
27 static void Save_ERNW()
30 SlSetArrayIndex(er->index);
35 static void Load_ERNW()
52 static void Ptrs_ERNW()
59 extern const ChunkHandler _autoreplace_chunk_handlers[] = {
60 {
'ERNW', Save_ERNW, Load_ERNW, Ptrs_ERNW,
nullptr, CH_ARRAY |
CH_LAST},
#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.
static const GroupID ALL_GROUP
All vehicles are in this group.
#define SLE_END()
End marker of a struct/class save or load.
static const GroupID DEFAULT_GROUP
Ungrouped vehicles are in this group.
static bool IsSavegameVersionBefore(SaveLoadVersion major, byte minor=0)
Checks whether the savegame is below major.
@ REF_ENGINE_RENEWS
Load/save a reference to an engine renewal (autoreplace).
void SlObject(void *object, const SaveLoad *sld)
Main SaveLoad function.
Struct to store engine replacements.
@ 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.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.