OpenTTD Source  20240919-master-gdf0233f4c2
subsidy_sl.cpp File Reference
#include "../stdafx.h"
#include "saveload.h"
#include "compat/subsidy_sl_compat.h"
#include "../subsidy_base.h"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

struct  SUBSChunkHandler
 

Functions

const ChunkHandlerTable _subsidy_chunk_handlers (subsidy_chunk_handlers)
 

Variables

static const SaveLoad _subsidies_desc []
 
static const SUBSChunkHandler SUBS
 
static const ChunkHandlerRef subsidy_chunk_handlers []
 

Detailed Description

Code handling saving and loading of subsidies

Definition in file subsidy_sl.cpp.

Variable Documentation

◆ _subsidies_desc

const SaveLoad _subsidies_desc[]
static
Initial value:
= {
SLE_VAR(Subsidy, cargo_type, SLE_UINT8),
SLE_CONDVAR(Subsidy, remaining, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_CUSTOM_SUBSIDY_DURATION),
SLE_CONDVAR(Subsidy, awarded, SLE_UINT8, SLV_125, SL_MAX_VERSION),
SLE_CONDVAR(Subsidy, src_type, SLE_UINT8, SLV_125, SL_MAX_VERSION),
SLE_CONDVAR(Subsidy, dst_type, SLE_UINT8, SLV_125, SL_MAX_VERSION),
SLE_CONDVAR(Subsidy, src, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_5),
SLE_CONDVAR(Subsidy, src, SLE_UINT16, SLV_5, SL_MAX_VERSION),
SLE_CONDVAR(Subsidy, dst, SLE_FILE_U8 | SLE_VAR_U16, SL_MIN_VERSION, SLV_5),
SLE_CONDVAR(Subsidy, dst, SLE_UINT16, SLV_5, SL_MAX_VERSION),
}

Definition at line 19 of file subsidy_sl.cpp.

◆ subsidy_chunk_handlers

const ChunkHandlerRef subsidy_chunk_handlers[]
static
Initial value:
= {
SUBS,
}

Definition at line 58 of file subsidy_sl.cpp.

SLV_5
@ SLV_5
5.0 1429 5.1 1440 5.2 1525 0.3.6
Definition: saveload.h:43
SL_MIN_VERSION
@ SL_MIN_VERSION
First savegame version.
Definition: saveload.h:31
SLE_CONDVAR
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:857
SLV_CUSTOM_SUBSIDY_DURATION
@ SLV_CUSTOM_SUBSIDY_DURATION
292 PR#9081 Configurable subsidy duration.
Definition: saveload.h:330
Subsidy
Struct about subsidies, offered and awarded.
Definition: subsidy_base.h:22
SLV_125
@ SLV_125
125 17113
Definition: saveload.h:193
SL_MAX_VERSION
@ SL_MAX_VERSION
Highest possible saveload version.
Definition: saveload.h:391
SLE_VAR
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:971