OpenTTD

Functions | Variables
signs_sl.cpp File Reference

Code handling saving and loading of economy data. More...

`#include "../stdafx.h"`
`#include "../signs_base.h"`
`#include "../fios.h"`
`#include "saveload.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Functions
static void | Save_SIGN ()
| Save all signs.
static void | Load_SIGN ()
| Load all signs.

## Variables
static const SaveLoad | _sign_desc []
| Description of a sign within the savegame. More...
const ChunkHandler | _sign_chunk_handlers []
| Chunk handlers related to signs. More...

## Detailed Description

Code handling saving and loading of economy data.

Definition in file signs_sl.cpp.

## Variable Documentation

## ◆ _sign_chunk_handlers

const ChunkHandler _sign_chunk_handlers[]

Initial value:
= {
{ 'SIGN', Save_SIGN, Load_SIGN, NULL, NULL, CH_ARRAY | CH_LAST},
}
Load_SIGN
static void Load_SIGN()
Load all signs.
Definition: signs_sl.cpp:46
Save_SIGN
static void Save_SIGN()
Save all signs.
Definition: signs_sl.cpp:35
CH_LAST
Last chunk in this array.
Definition: saveload.h:104

Chunk handlers related to signs.

Referenced by Load_SIGN().

## ◆ _sign_desc

const SaveLoad _sign_desc[]
| static

Initial value:
= {
SLE_CONDVAR(Sign, name, SLE_NAME, 0, 83),
SLE_CONDSTR(Sign, name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION),
SLE_CONDVAR(Sign, x, SLE_FILE_I16 | SLE_VAR_I32, 0, 4),
SLE_CONDVAR(Sign, y, SLE_FILE_I16 | SLE_VAR_I32, 0, 4),
SLE_CONDVAR(Sign, x, SLE_INT32, 5, SL_MAX_VERSION),
SLE_CONDVAR(Sign, y, SLE_INT32, 5, SL_MAX_VERSION),
SLE_CONDVAR(Sign, owner, SLE_UINT8, 6, SL_MAX_VERSION),
SLE_CONDVAR(Sign, z, SLE_FILE_U8 | SLE_VAR_I32, 0, 163),
SLE_CONDVAR(Sign, z, SLE_INT32, 164, SL_MAX_VERSION),
}
SLE_CONDSTR
#define SLE_CONDSTR(base, variable, type, length, from, to)
Storage of a string in some savegame versions.
Definition: saveload.h:278
SLE_CONDVAR
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:246
SLF_ALLOW_CONTROL
allow control codes in the strings
Definition: saveload.h:184
SL_MAX_VERSION
#define SL_MAX_VERSION
Highest possible savegame version.
Definition: saveload.h:96
Sign
Definition: signs_base.h:23
Window::owner
Owner owner
The owner of the content shown in this window. Company colour is acquired from this variable...
Definition: window_gui.h:319
SLE_STR
#define SLE_STR(base, variable, type, length)
Storage of a string in every savegame version.
Definition: saveload.h:322

Description of a sign within the savegame.

Definition at line 21 of file signs_sl.cpp.