Pyrogenesis trunk
|
Functions | |
Status | Save (const CStrW &name, const CStrW &description, CSimulation2 &simulation, const Script::StructuredClone &guiMetadataClone) |
Create new saved game archive with given name and simulation data. More... | |
Status | SavePrefix (const CStrW &prefix, const CStrW &description, CSimulation2 &simulation, const Script::StructuredClone &guiMetadataClone) |
Create new saved game archive with given prefix and simulation data. More... | |
Status | Load (const std::wstring &name, const ScriptInterface &scriptInterface, JS::MutableHandleValue metadata, std::string &savedState) |
Load saved game archive with the given name. More... | |
JS::Value | GetSavedGames (const ScriptInterface &scriptInterface) |
Get list of saved games for GUI script usage. More... | |
bool | DeleteSavedGame (const std::wstring &name) |
Permanently deletes the saved game archive with the given name. More... | |
bool SavedGames::DeleteSavedGame | ( | const std::wstring & | name | ) |
Permanently deletes the saved game archive with the given name.
name | filename of saved game (without path or extension) |
JS::Value SavedGames::GetSavedGames | ( | const ScriptInterface & | scriptInterface | ) |
Get list of saved games for GUI script usage.
scriptInterface | the ScriptInterface in which to create the return data. |
Status SavedGames::Load | ( | const std::wstring & | name, |
const ScriptInterface & | scriptInterface, | ||
JS::MutableHandleValue | metadata, | ||
std::string & | savedState | ||
) |
Load saved game archive with the given name.
name | filename of saved game (without path or extension) | |
scriptInterface | ||
[out] | metadata | object containing metadata associated with saved game, parsed from metadata.json inside the archive. |
[out] | savedState | serialized simulation state stored as string of bytes, loaded from simulation.dat inside the archive. |
Status SavedGames::Save | ( | const CStrW & | name, |
const CStrW & | description, | ||
CSimulation2 & | simulation, | ||
const Script::StructuredClone & | guiMetadataClone | ||
) |
Create new saved game archive with given name and simulation data.
name | Name to save the game with |
description | A user-given description of the save |
simulation | |
guiMetadataClone | if not NULL, store some UI-related data with the saved game |
Status SavedGames::SavePrefix | ( | const CStrW & | prefix, |
const CStrW & | description, | ||
CSimulation2 & | simulation, | ||
const Script::StructuredClone & | guiMetadataClone | ||
) |
Create new saved game archive with given prefix and simulation data.
prefix | Create new numbered file starting with this prefix |
description | A user-given description of the save |
simulation | |
guiMetadataClone | if not NULL, store some UI-related data with the saved game |