12 #include "../stdafx.h" 13 #include "../autoreplace_base.h" 17 #include "../safeguards.h" 19 static const SaveLoad _engine_renew_desc[] = {
29 static void Save_ERNW()
33 FOR_ALL_ENGINE_RENEWS(er) {
34 SlSetArrayIndex(er->
index);
39 static void Load_ERNW()
56 static void Ptrs_ERNW()
60 FOR_ALL_ENGINE_RENEWS(er) {
65 extern const ChunkHandler _autoreplace_chunk_handlers[] = {
66 {
'ERNW', Save_ERNW, Load_ERNW, Ptrs_ERNW, NULL, CH_ARRAY |
CH_LAST},
#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 an engine renewal (autoreplace).
Functions/types related to saving and loading games.
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
#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.
#define SLE_END()
End marker of a struct/class save or load.
static const GroupID DEFAULT_GROUP
Ungrouped vehicles are in this group.
Struct to store engine replacements.
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.
Last chunk in this array.
static const GroupID ALL_GROUP
All vehicles are in this group.