Go to the documentation of this file.
10 #include "../stdafx.h"
12 #include "../company_base.h"
16 #include "../safeguards.h"
18 static const SaveLoad _group_desc[] = {
32 static void Save_GRPS()
35 SlSetArrayIndex(g->index);
41 static void Load_GRPS()
60 {
'GRPS', Save_GRPS, Load_GRPS,
nullptr,
nullptr, CH_ARRAY |
CH_LAST},
static Titem * Get(size_t index)
Returns Titem with given index.
@ SL_MIN_VERSION
First savegame version.
#define SLE_CONDSSTR(base, variable, type, from, to)
Storage of a std::string in some savegame versions.
GroupID parent
Parent group.
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
#define SLE_STR(base, variable, type, length)
Storage of a string in every savegame version.
@ CH_LAST
Last chunk in this array.
Livery livery
Custom colour scheme for vehicles in this group.
Handlers and description of chunk.
@ SLV_GROUP_LIVERIES
205 PR#7108 Livery storage change and group liveries.
#define SLE_CONDNULL(length, from, to)
Empty space in some savegame versions.
@ SLF_ALLOW_CONTROL
allow control codes in the strings
static const GroupID INVALID_GROUP
Sentinel for invalid groups.
#define SLE_END()
End marker of a struct/class save or load.
static bool IsSavegameVersionBefore(SaveLoadVersion major, byte minor=0)
Checks whether the savegame is below major.
void SlObject(void *object, const SaveLoad *sld)
Main SaveLoad function.
@ 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.
@ SLV_189
189 26450 Hierarchical vehicle subgroups
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.
byte colour2
Second colour, for vehicles with 2CC support.
byte colour1
First colour, for all vehicles.