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

OpenTTD Source 1.11.0-RC1

Functions | Variables
autoreplace_sl.cpp File Reference
`#include "../stdafx.h"`
`#include "../autoreplace_base.h"`
`#include "saveload.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Functions
static void | Save_ERNW ()
static void | Load_ERNW ()
static void | Ptrs_ERNW ()

## Variables
static const SaveLoad | _engine_renew_desc []
const ChunkHandler | _autoreplace_chunk_handlers []

## Detailed Description

Code handling saving and loading of autoreplace rules

Definition in file autoreplace_sl.cpp.

## Variable Documentation

## ◆ _autoreplace_chunk_handlers

const ChunkHandler _autoreplace_chunk_handlers[]

Initial value:
= {
{ 'ERNW', Save_ERNW, Load_ERNW, Ptrs_ERNW, nullptr, CH_ARRAY | CH_LAST},
}

## ◆ _engine_renew_desc

const SaveLoad _engine_renew_desc[]
| static

Initial value:
= {
SLE_VAR(EngineRenew, from, SLE_UINT16),
SLE_VAR(EngineRenew, to, SLE_UINT16),
SLE_REF(EngineRenew, next, REF_ENGINE_RENEWS),
SLE_CONDVAR(EngineRenew, group_id, SLE_UINT16, SLV_60, SL_MAX_VERSION),
SLE_CONDVAR(EngineRenew, replace_when_old, SLE_BOOL, SLV_175, SL_MAX_VERSION),
}

Definition at line 17 of file autoreplace_sl.cpp.

SLE_CONDVAR
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:551
CH_LAST
@ CH_LAST
Last chunk in this array.
Definition: saveload.h:410
SLV_175
@ SLV_175
175 24136
Definition: saveload.h:253
SLE_REF
#define SLE_REF(base, variable, type)
Storage of a reference in every version of a savegame.
Definition: saveload.h:629
REF_ENGINE_RENEWS
@ REF_ENGINE_RENEWS
Load/save a reference to an engine renewal (autoreplace).
Definition: saveload.h:396
EngineRenew
Struct to store engine replacements.
Definition: autoreplace_base.h:33
SL_MAX_VERSION
@ SL_MAX_VERSION
Highest possible saveload version.
Definition: saveload.h:328
SLE_VAR
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:621
SLV_60
@ SLV_60
60 9874
Definition: saveload.h:115