18static const SaveLoad _league_table_elements_desc[] = {
29struct LEAEChunkHandler : ChunkHandler {
37 SlSetArrayIndex(lte->index);
38 SlObject(lte, _league_table_elements_desc);
44 const std::vector<SaveLoad> slt =
SlTableHeader(_league_table_elements_desc);
54static const SaveLoad _league_tables_desc[] = {
60struct LEATChunkHandler : ChunkHandler {
68 SlSetArrayIndex(lt->index);
75 const std::vector<SaveLoad> slt =
SlTableHeader(_league_tables_desc);
PoolID< uint16_t, struct LeagueTableElementIDTag, 64000, 0xFFFF > LeagueTableElementID
ID of a league table.
PoolID< uint8_t, struct LeagueTableIDTag, 255, 0xFF > LeagueTableID
ID of a league table.
A number of safeguards to prevent using unsafe methods.
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.
@ I64
A 64 bit signed int.
@ U64
A 64 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_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.
@ LinkgraphEdges
Saveload version: 304, GitHub pull request: 10314 Explicitly store link graph edges destination,...
@ MinVersion
First savegame version.
@ 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 Load() const override
Load the chunk.
void Save() const override
Save the chunk.
void Load() const override
Load the chunk.
void Save() const override
Save the chunk.
Struct about league table elements.
Struct about custom league tables.
static Pool::IterateWrapper< LeagueTableElement > Iterate(size_t from=0)
static T * CreateAtIndex(LeagueTableElementID index, Targs &&... args)
static constexpr VarType U8
Store a 8 bits unsigned int.
static constexpr VarType STR
Store string.
static constexpr VarType I64
Store a 64 bits signed int.
static constexpr VarType U32
Store a 32 bits unsigned int.