OpenTTD Source 20241224-master-gee860a5c8e
cheat_sl.cpp File Reference

Code handling saving and loading of cheats. More...

#include "../stdafx.h"
#include "saveload.h"
#include "compat/cheat_sl_compat.h"
#include "../cheat_type.h"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

struct  CHTSChunkHandler
 

Functions

const ChunkHandlerTable _cheat_chunk_handlers (cheat_chunk_handlers)
 

Variables

static const SaveLoad _cheats_desc []
 
static const CHTSChunkHandler CHTS
 
static const ChunkHandlerRef cheat_chunk_handlers []
 

Detailed Description

Code handling saving and loading of cheats.

Definition in file cheat_sl.cpp.

Variable Documentation

◆ _cheats_desc

const SaveLoad _cheats_desc[]
static
Initial value:
= {
SLE_VAR(Cheats, magic_bulldozer.been_used, SLE_BOOL),
SLE_VAR(Cheats, magic_bulldozer.value, SLE_BOOL),
SLE_VAR(Cheats, switch_company.been_used, SLE_BOOL),
SLE_VAR(Cheats, switch_company.value, SLE_BOOL),
SLE_VAR(Cheats, money.been_used, SLE_BOOL),
SLE_VAR(Cheats, money.value, SLE_BOOL),
SLE_VAR(Cheats, crossing_tunnels.been_used, SLE_BOOL),
SLE_VAR(Cheats, crossing_tunnels.value, SLE_BOOL),
SLE_VAR(Cheats, no_jetcrash.been_used, SLE_BOOL),
SLE_VAR(Cheats, no_jetcrash.value, SLE_BOOL),
SLE_VAR(Cheats, change_date.been_used, SLE_BOOL),
SLE_VAR(Cheats, change_date.value, SLE_BOOL),
SLE_VAR(Cheats, setup_prod.been_used, SLE_BOOL),
SLE_VAR(Cheats, setup_prod.value, SLE_BOOL),
SLE_VAR(Cheats, edit_max_hl.been_used, SLE_BOOL),
SLE_VAR(Cheats, edit_max_hl.value, SLE_BOOL),
SLE_CONDVAR(Cheats, station_rating.been_used, SLE_BOOL, SLV_STATION_RATING_CHEAT, SL_MAX_VERSION),
SLE_CONDVAR(Cheats, station_rating.value, SLE_BOOL, SLV_STATION_RATING_CHEAT, SL_MAX_VERSION),
}
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition saveload.h:868
@ SL_MAX_VERSION
Highest possible saveload version.
Definition saveload.h:399
@ SLV_STATION_RATING_CHEAT
320 PR#11346 Add cheat to fix station ratings at 100%.
Definition saveload.h:364
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition saveload.h:1002
WARNING! Do not remove entries in Cheats struct or change the order of the existing ones!...
Definition cheat_type.h:26

Definition at line 19 of file cheat_sl.cpp.

◆ cheat_chunk_handlers

const ChunkHandlerRef cheat_chunk_handlers[]
static
Initial value:
= {
CHTS,
}

Definition at line 80 of file cheat_sl.cpp.

◆ CHTS

const CHTSChunkHandler CHTS
static

Definition at line 79 of file cheat_sl.cpp.