|
OpenTTD Source
14.0-beta3
|
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.
#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.
@ SL_MIN_VERSION
First savegame version.
@ SLV_189
189 26450 Hierarchical vehicle subgroups
GroupID parent
Parent group.
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Livery livery
Custom colour scheme for vehicles in this group.
Handlers and description of chunk.
@ SLF_ALLOW_CONTROL
Allow control codes in the strings.
static const GroupID INVALID_GROUP
Sentinel for invalid groups.
bool IsSavegameVersionBefore(SaveLoadVersion major, byte minor=0)
Checks whether the savegame is below major.
void Load() const override
Load the chunk.
const SaveLoadCompat _group_sl_compat[]
Original field order for _group_desc.
@ SL_MAX_VERSION
Highest possible saveload version.
@ SLV_GROUP_LIVERIES
205 PR#7108 Livery storage change and group liveries.
#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.
Colours colour1
First colour, for all vehicles.
std::span< const ChunkHandlerRef > ChunkHandlerTable
A table of ChunkHandler entries.
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.
Colours colour2
Second colour, for vehicles with 2CC support.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.