|
Pyrogenesis
13997
|
Functions | |
| Status | Save (const std::wstring &name, const std::wstring &description, CSimulation2 &simulation, CGUIManager *gui, int playerID) |
| Create new saved game archive with given name and simulation data. More... | |
| Status | SavePrefix (const std::wstring &prefix, const std::wstring &description, CSimulation2 &simulation, CGUIManager *gui, int playerID) |
| Create new saved game archive with given prefix and simulation data. More... | |
| Status | Load (const std::wstring &name, ScriptInterface &scriptInterface, CScriptValRooted &metadata, std::string &savedState) |
| Load saved game archive with the given name. More... | |
| std::vector< CScriptValRooted > | GetSavedGames (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) |
Definition at line 224 of file SavedGame.cpp.
| std::vector< CScriptValRooted > SavedGames::GetSavedGames | ( | ScriptInterface & | scriptInterface | ) |
Get list of saved games for GUI script usage.
| scriptInterface | the ScriptInterface in which to create the return data. |
Definition at line 175 of file SavedGame.cpp.
| Status SavedGames::Load | ( | const std::wstring & | name, |
| ScriptInterface & | scriptInterface, | ||
| CScriptValRooted & | 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. |
Definition at line 152 of file SavedGame.cpp.
| Status SavedGames::Save | ( | const std::wstring & | name, |
| const std::wstring & | description, | ||
| CSimulation2 & | simulation, | ||
| CGUIManager * | gui, | ||
| int | playerID | ||
| ) |
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 | |
| gui | if not NULL, store some UI-related data with the saved game |
| playerID | ID of the player who saved this file |
Definition at line 50 of file SavedGame.cpp.
| Status SavedGames::SavePrefix | ( | const std::wstring & | prefix, |
| const std::wstring & | description, | ||
| CSimulation2 & | simulation, | ||
| CGUIManager * | gui, | ||
| int | playerID | ||
| ) |
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 | |
| gui | if not NULL, store some UI-related data with the saved game |
| playerID | ID of the player who saved this file |
Definition at line 35 of file SavedGame.cpp.
1.8.5