OpenTTD Source: src/saveload/group_sl.cpp File Reference

OpenTTD Source 15.0-beta1

Data Structures | Functions | Variables
group_sl.cpp File Reference

Code handling saving and loading of economy data. 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 economy data.

Definition in file group_sl.cpp.

## Variable Documentation

## ◆ _group_desc

const SaveLoad _group_desc[]
| static

Initial value:
= {
SLE_CONDVAR(Group, name, SLE_NAME, SL_MIN_VERSION, SLV_84),
SLE_CONDSSTR(Group, name, SLE_STR | SLF_ALLOW_CONTROL, SLV_84, SL_MAX_VERSION),
SLE_VAR(Group, owner, SLE_UINT8),
SLE_VAR(Group, vehicle_type, SLE_UINT8),
SLE_VAR(Group, flags, SLE_UINT8),
SLE_CONDVAR(Group, livery.in_use, SLE_UINT8, SLV_GROUP_LIVERIES, SL_MAX_VERSION),
SLE_CONDVAR(Group, livery.colour1, SLE_UINT8, SLV_GROUP_LIVERIES, SL_MAX_VERSION),
SLE_CONDVAR(Group, livery.colour2, SLE_UINT8, SLV_GROUP_LIVERIES, SL_MAX_VERSION),
SLE_CONDVAR(Group, parent, SLE_UINT16, SLV_189, SL_MAX_VERSION),
SLE_CONDVAR(Group, number, SLE_UINT16, SLV_GROUP_NUMBERS, SL_MAX_VERSION),
}
SLF_ALLOW_CONTROL
@ SLF_ALLOW_CONTROL
Allow control codes in the strings.
Definition saveload.h:688
SLE_CONDSSTR
#define SLE_CONDSSTR(base, variable, type, from, to)
Storage of a std::string in some savegame versions.
Definition saveload.h:933
SLE_CONDVAR
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition saveload.h:868
SLV_84
@ SLV_84
84 11822
Definition saveload.h:143
SL_MAX_VERSION
@ SL_MAX_VERSION
Highest possible saveload version.
Definition saveload.h:399
SL_MIN_VERSION
@ SL_MIN_VERSION
First savegame version.
Definition saveload.h:31
SLV_GROUP_LIVERIES
@ SLV_GROUP_LIVERIES
205 PR#7108 Livery storage change and group liveries.
Definition saveload.h:290
SLV_189
@ SLV_189
189 26450 Hierarchical vehicle subgroups
Definition saveload.h:269
SLV_GROUP_NUMBERS
@ SLV_GROUP_NUMBERS
336 PR#12297 Add per-company group numbers.
Definition saveload.h:383
SLE_VAR
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition saveload.h:1002
Group
Group data.
Definition group.h:72

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.