OpenTTD
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 "../safeguards.h"

Go to the source code of this file.

Functions

static void Save_GRPS ()
 
static void Load_GRPS ()
 

Variables

static const SaveLoad _group_desc []
 
const ChunkHandler _group_chunk_handlers []
 

Detailed Description

Code handling saving and loading of economy data.

Definition in file group_sl.cpp.

Variable Documentation

◆ _group_chunk_handlers

const ChunkHandler _group_chunk_handlers[]
Initial value:
= {
{ 'GRPS', Save_GRPS, Load_GRPS, NULL, NULL, CH_ARRAY | CH_LAST},
}
Last chunk in this array.
Definition: saveload.h:381

◆ _group_desc

const SaveLoad _group_desc[]
static
Initial value:
= {
SLE_CONDVAR(Group, name, SLE_NAME, SL_MIN_VERSION, SLV_84),
SLE_VAR(Group, owner, SLE_UINT8),
SLE_VAR(Group, vehicle_type, SLE_UINT8),
SLE_VAR(Group, replace_protection, SLE_BOOL),
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),
}
#define SLE_CONDNULL(length, from, to)
Empty space in some savegame versions.
Definition: saveload.h:632
Window * parent
Parent window.
Definition: window_gui.h:339
#define SLE_CONDSTR(base, variable, type, length, from, to)
Storage of a string in some savegame versions.
Definition: saveload.h:556
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:524
Highest possible saveload version.
Definition: saveload.h:295
205 PR#7108 Livery storage change and group liveries.
Definition: saveload.h:291
allow control codes in the strings
Definition: saveload.h:461
First savegame version.
Definition: saveload.h:32
189 26450 Heirarchical vehicle subgroups
Definition: saveload.h:270
84 11822
Definition: saveload.h:144
164 23290
Definition: saveload.h:240
Group data.
Definition: group.h:67
Owner owner
The owner of the content shown in this window. Company colour is acquired from this variable...
Definition: window_gui.h:326
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:584
#define SLE_STR(base, variable, type, length)
Storage of a string in every savegame version.
Definition: saveload.h:610

Definition at line 20 of file group_sl.cpp.