34struct SIGNChunkHandler : ChunkHandler {
42 SlSetArrayIndex(si->index);
static constexpr Owner OWNER_DEITY
The object is owned by a superuser / goal script.
static constexpr Owner OWNER_NONE
The tile has no ownership.
static constexpr Owner INVALID_OWNER
An invalid owner.
@ Scenario
old or new scenario
Declarations for savegames operations.
A number of safeguards to prevent using unsafe methods.
std::vector< SaveLoad > SlCompatTableHeader(const SaveLoadTable &slt, const SaveLoadCompatTable &slct)
Load a table header in a savegame compatible way.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.
FileToSaveLoad _file_to_saveload
File to save or load in the openttd loop.
void SlObject(void *object, const SaveLoadTable &slt)
Main SaveLoad function.
std::vector< SaveLoad > SlTableHeader(const SaveLoadTable &slt)
Save or Load a table header.
Functions/types related to saving and loading games.
@ I32
A 32 bit signed int.
@ U8
A 8 bit unsigned int.
@ I16
A 16 bit signed int.
std::reference_wrapper< const ChunkHandler > ChunkHandlerRef
A reference to ChunkHandler.
std::span< const ChunkHandlerRef > ChunkHandlerTable
A table of ChunkHandler entries.
#define SLE_CONDSSTR(base, variable, type, from, to)
Storage of a std::string in some savegame versions.
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
bool IsSavegameVersionBefore(SaveLoadVersion major, uint8_t minor=0)
Checks whether the savegame is below major.
@ ReplaceCustomNameArray
Saveload version: 84, SVN revision: 11822 Replace single fixed size array of custom names,...
@ SignTextColours
Saveload version: 363, GitHub pull request: 14743 Configurable sign text colors in scenario editor.
@ VehicleCentreAndZPos
Saveload version: 164, SVN revision: 23290 Vehicle centres are not fixed at 4/8 of the vehicle; chan...
@ BigMap
Saveload version: 5.0, SVN revision: 1429 Making maps a different size than 256x256.
@ MultipleRoadStops
Saveload version: 6.0, SVN revision: 1721 Multi tile road stops, and some map size related fixes.
@ MinVersion
First savegame version.
@ ScenarioDeitySigns
Saveload version: 171, SVN revision: 23835 Signs made in scenarios become of OWNER_DEITY,...
@ DepotWaterOwners
Saveload version: 83, SVN revision: 11589 Store the owner of the water under depots,...
@ MaxVersion
Highest possible saveload version.
@ Table
An Array with a header describing the elements.
static const SaveLoad _sign_desc[]
Description of a sign within the savegame.
Loading of signs chunks before table headers were added.
const SaveLoadCompat _sign_sl_compat[]
Original field order for _sign_desc.
PoolID< uint16_t, struct SignIDTag, 64000, 0xFFFF > SignID
The type of the IDs of signs.
Definition of base types and functions in a cross-platform compatible way.
@ AllowControlCode
Allow the special control codes.
static Pool::IterateWrapper< Sign > Iterate(size_t from=0)
static T * CreateAtIndex(SignID index, Targs &&... args)
void Load() const override
Load the chunk.
void Save() const override
Save the chunk.
Owner owner
Placed by this company. Anyone can delete them though. OWNER_NONE for gray signs from old games.
static constexpr VarType U8
Store a 8 bits unsigned int.
static constexpr VarType STR
Store string.
static constexpr VarType NAME
A string stored in the custom string array.
static constexpr VarType I32
Store a 32 bits signed int.