OpenTTD Source 20260711-master-g3fb3006dff
group_sl.cpp File Reference

Code handling saving and loading of groups. More...

#include "../stdafx.h"
#include "../group.h"
#include "../company_base.h"
#include "saveload.h"
#include "compat/group_sl_compat.h"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

struct  GRPSChunkHandler

Functions

const ChunkHandlerTable _group_chunk_handlers (group_chunk_handlers)

Variables

static const SaveLoad _group_desc []
static const GRPSChunkHandler GRPS
static const ChunkHandlerRef group_chunk_handlers []

Detailed Description

Code handling saving and loading of groups.

Definition in file group_sl.cpp.

Variable Documentation

◆ _group_desc

const SaveLoad _group_desc[]
static
Initial value:
= {
SLE_VAR(Group, vehicle_type, VarTypes::U8),
}
#define SLE_CONDSSTR(base, variable, type, from, to)
Storage of a std::string in some savegame versions.
Definition saveload.h:958
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition saveload.h:904
@ GroupHierarchy
Saveload version: 189, SVN revision: 26450 Hierarchical vehicle subgroups.
Definition saveload.h:270
@ ReplaceCustomNameArray
Saveload version: 84, SVN revision: 11822 Replace single fixed size array of custom names,...
Definition saveload.h:144
@ GroupLiveries
Saveload version: 205, GitHub pull request: 7108 Livery storage change and group liveries.
Definition saveload.h:290
@ MinVersion
First savegame version.
Definition saveload.h:31
@ GroupNumbers
Saveload version: 336, GitHub pull request: 12297 Add per-company group numbers.
Definition saveload.h:383
@ MaxVersion
Highest possible saveload version.
Definition saveload.h:421
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition saveload.h:1017
@ AllowControlCode
Allow the special control codes.
Definition string_type.h:47
Group data.
Definition group.h:76
static constexpr VarType U16
Store a 16 bits unsigned int.
Definition saveload.h:754
static constexpr VarType U8
Store a 8 bits unsigned int.
Definition saveload.h:752
static constexpr VarType STR
Store string.
Definition saveload.h:760
static constexpr VarType NAME
A string stored in the custom string array.
Definition saveload.h:762

Definition at line 19 of file group_sl.cpp.

◆ group_chunk_handlers

const ChunkHandlerRef group_chunk_handlers[]
static
Initial value:
= {
GRPS,
}

Definition at line 62 of file group_sl.cpp.

◆ GRPS

const GRPSChunkHandler GRPS
static

Definition at line 61 of file group_sl.cpp.