11#include "../script/api/script_object.hpp"
16static const SaveLoad _randomizer_desc[] = {
30 SlSetArrayIndex(owner);
31 SlObject(&ScriptObject::GetRandomizer(owner), _randomizer_desc);
41 SlObject(&ScriptObject::GetRandomizer(index), _randomizer_desc);
51extern const ChunkHandlerTable _randomizer_chunk_handlers(randomizer_chunk_handlers);
static constexpr Owner OWNER_END
Last + 1 owner.
static constexpr Owner OWNER_BEGIN
First owner.
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.
std::reference_wrapper< const ChunkHandler > ChunkHandlerRef
A reference to ChunkHandler.
std::span< const ChunkHandlerRef > ChunkHandlerTable
A table of ChunkHandler entries.
@ 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.
Declaration of functions used in more save/load files.
Definition of base types and functions in a cross-platform compatible way.
ChunkHandler(ChunkId id, ChunkType type)
Create this ChunkHandler.
Structure to encapsulate the pseudo random number generators.
void Save() const override
Save the chunk.
void Load() const override
Load the chunk.
static constexpr VarType U32
Store a 32 bits unsigned int.