Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
SavedGame.h File Reference

Contains functions for managing saved game archives. More...

Include dependency graph for SavedGame.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  SavedGames
 

Functions

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. More...
 
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. More...
 
Status SavedGames::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 SavedGames::GetSavedGames (const ScriptInterface &scriptInterface)
 Get list of saved games for GUI script usage. More...
 
bool SavedGames::DeleteSavedGame (const std::wstring &name)
 Permanently deletes the saved game archive with the given name. More...
 

Detailed Description

Contains functions for managing saved game archives.

A saved game is simply a zip archive with the extension '0adsave' and containing two files:

  • metadata.json - JSON data file containing the game metadata
  • simulation.dat - the serialized simulation state data