19static const SaveLoad _group_desc[] = {
32struct GRPSChunkHandler : ChunkHandler {
40 SlSetArrayIndex(g->index);
Definition of stuff that is very close to a company, like the company struct itself.
Base class for groups and group functions.
Loading of group chunks before table headers were added.
const SaveLoadCompat _group_sl_compat[]
Original field order for _group_desc.
A number of safeguards to prevent using unsafe methods.
std::vector< SaveLoad > SlCompatTableHeader(const SaveLoadTable &slt, const SaveLoadCompatTable &slct)
Load a table header in a savegame compatible way.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.
void SlObject(void *object, const SaveLoadTable &slt)
Main SaveLoad function.
std::vector< SaveLoad > SlTableHeader(const SaveLoadTable &slt)
Save or Load a table header.
Functions/types related to saving and loading games.
std::reference_wrapper< const ChunkHandler > ChunkHandlerRef
A reference to ChunkHandler.
std::span< const ChunkHandlerRef > ChunkHandlerTable
A table of ChunkHandler entries.
#define SLE_CONDSSTR(base, variable, type, from, to)
Storage of a std::string in some savegame versions.
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
bool IsSavegameVersionBefore(SaveLoadVersion major, uint8_t minor=0)
Checks whether the savegame is below major.
@ GroupHierarchy
Saveload version: 189, SVN revision: 26450 Hierarchical vehicle subgroups.
@ ReplaceCustomNameArray
Saveload version: 84, SVN revision: 11822 Replace single fixed size array of custom names,...
@ GroupLiveries
Saveload version: 205, GitHub pull request: 7108 Livery storage change and group liveries.
@ MinVersion
First savegame version.
@ GroupNumbers
Saveload version: 336, GitHub pull request: 12297 Add per-company group numbers.
@ MaxVersion
Highest possible saveload version.
@ Table
An Array with a header describing the elements.
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition of base types and functions in a cross-platform compatible way.
@ AllowControlCode
Allow the special control codes.
void Load() const override
Load the chunk.
void Save() const override
Save the chunk.
GroupID parent
Parent group.
static Pool::IterateWrapper< Group > Iterate(size_t from=0)
static T * CreateAtIndex(GroupID index, Targs &&... args)
static constexpr VarType U16
Store a 16 bits unsigned int.
static constexpr VarType U8
Store a 8 bits unsigned int.
static constexpr VarType STR
Store string.
static constexpr VarType NAME
A string stored in the custom string array.