OpenTTD Source  20241108-master-g80f628063a
autoreplace_sl.cpp File Reference

Code handling saving and loading of autoreplace rules. More...

#include "../stdafx.h"
#include "saveload.h"
#include "compat/autoreplace_sl_compat.h"
#include "../autoreplace_base.h"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

struct  ERNWChunkHandler
 

Functions

const ChunkHandlerTable _autoreplace_chunk_handlers (autoreplace_chunk_handlers)
 

Variables

static const SaveLoad _engine_renew_desc []
 
static const ERNWChunkHandler ERNW
 
static const ChunkHandlerRef autoreplace_chunk_handlers []
 

Detailed Description

Code handling saving and loading of autoreplace rules.

Definition in file autoreplace_sl.cpp.

Variable Documentation

◆ _engine_renew_desc

const SaveLoad _engine_renew_desc[]
static
Initial value:
= {
SLE_VAR(EngineRenew, from, SLE_UINT16),
SLE_VAR(EngineRenew, to, SLE_UINT16),
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),
}
#define SLE_REF(base, variable, type)
Storage of a reference in every version of a savegame.
Definition: saveload.h:992
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:861
@ SLV_175
175 24136
Definition: saveload.h:253
@ SLV_60
60 9874
Definition: saveload.h:115
@ SL_MAX_VERSION
Highest possible saveload version.
Definition: saveload.h:395
@ REF_ENGINE_RENEWS
Load/save a reference to an engine renewal (autoreplace).
Definition: saveload.h:603
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:975
Struct to store engine replacements.

Definition at line 19 of file autoreplace_sl.cpp.

◆ autoreplace_chunk_handlers

const ChunkHandlerRef autoreplace_chunk_handlers[]
static
Initial value:
= {
ERNW,
}

Definition at line 69 of file autoreplace_sl.cpp.