OpenTTD Source 20260711-master-g3fb3006dff
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, VarTypes::BOOL),
SLE_VAR(Cheats, magic_bulldozer.value, VarTypes::BOOL),
SLE_VAR(Cheats, switch_company.been_used, VarTypes::BOOL),
SLE_VAR(Cheats, switch_company.value, VarTypes::BOOL),
SLE_VAR(Cheats, money.been_used, VarTypes::BOOL),
SLE_VAR(Cheats, money.value, VarTypes::BOOL),
SLE_VAR(Cheats, crossing_tunnels.been_used, VarTypes::BOOL),
SLE_VAR(Cheats, crossing_tunnels.value, VarTypes::BOOL),
SLE_VAR(Cheats, no_jetcrash.been_used, VarTypes::BOOL),
SLE_VAR(Cheats, no_jetcrash.value, VarTypes::BOOL),
SLE_VAR(Cheats, change_date.been_used, VarTypes::BOOL),
SLE_VAR(Cheats, change_date.value, VarTypes::BOOL),
SLE_VAR(Cheats, setup_prod.been_used, VarTypes::BOOL),
SLE_VAR(Cheats, setup_prod.value, VarTypes::BOOL),
SLE_VAR(Cheats, edit_max_hl.been_used, VarTypes::BOOL),
SLE_VAR(Cheats, edit_max_hl.value, VarTypes::BOOL),
}
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition saveload.h:904
@ StationRatingCheat
Saveload version: 320, GitHub pull request: 11346 Add cheat to fix station ratings at 100%.
Definition saveload.h:364
@ MaxVersion
Highest possible saveload version.
Definition saveload.h:421
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition saveload.h:1017
WARNING!
Definition cheat_type.h:26
static constexpr VarType BOOL
Store a boolean (as int8).
Definition saveload.h:750

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.