19static const SaveLoad _goals_desc[] = {
28struct GOALChunkHandler : ChunkHandler {
36 SlSetArrayIndex(s->index);
Loading of goal chunks before table headers were added.
const SaveLoadCompat _goals_sl_compat[]
Original field order for _goals_desc.
PoolID< uint16_t, struct GoalIDTag, 64000, 0xFFFF > GoalID
ID of a goal.
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.
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.
@ U8
A 8 bit unsigned int.
@ U16
A 16 bit unsigned 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.
#define SLE_SSTR(base, variable, type)
Storage of a std::string in every savegame version.
@ GoalProgressPlaneAcceleration
Saveload version: 182, SVN revision: 25115, r25259, r25296 Goal status and plane acceleration fixes.
@ MaxVersion
Highest possible saveload version.
@ Table
An Array with a header describing the elements.
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition of base types and functions in a cross-platform compatible way.
@ AllowControlCode
Allow the special control codes.
void Save() const override
Save the chunk.
void Load() const override
Load the chunk.
Struct about goals, current and completed.
static Pool::IterateWrapper< Goal > Iterate(size_t from=0)
static T * CreateAtIndex(GoalID index, Targs &&... args)
static constexpr VarType STR
Store string.
static constexpr VarType U32
Store a 32 bits unsigned int.
static constexpr VarType BOOL
Store a boolean (as int8).