OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
10 #include "../stdafx.h"
12 #include "../company_base.h"
17 #include "../safeguards.h"
19 static const SaveLoad _group_desc[] = {
39 SlSetArrayIndex(g->index);
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.
std::reference_wrapper< const ChunkHandler > ChunkHandlerRef
A reference to ChunkHandler.
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.
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.
@ SLF_ALLOW_CONTROL
Allow control codes in the strings.
static const GroupID INVALID_GROUP
Sentinel for invalid groups.
A trimmed down version of what std::span will be in C++20.
void Load() const override
Load the chunk.
const SaveLoadCompat _group_sl_compat[]
Original field order for _group_desc.
static bool IsSavegameVersionBefore(SaveLoadVersion major, byte minor=0)
Checks whether the savegame is below major.
@ 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
void Save() const override
Save the chunk.
std::vector< SaveLoad > SlCompatTableHeader(const SaveLoadTable &slt, const SaveLoadCompatTable &slct)
Load a table header in a savegame compatible way.
void SlObject(void *object, const SaveLoadTable &slt)
Main SaveLoad function.
std::vector< SaveLoad > SlTableHeader(const SaveLoadTable &slt)
Save or Load a table header.
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.