- initial loading logic for loading of saved games.

- currently we always save the game during out of synch or on game quit.
- added a new commandline option to load the last saved game, this doesn't do much yet, just creates units in the map locations they were when the game was saved
./megaglest --load-saved-game
This commit is contained in:
Mark Vejvoda
2012-03-12 23:08:22 +00:00
parent 6e857b3af2
commit 9271d7d7f6
25 changed files with 972 additions and 97 deletions

View File

@@ -55,7 +55,7 @@ public:
~XmlIo();
void cleanup();
XmlNode *load(const string &path, std::map<string,string> mapTagReplacementValues);
XmlNode *load(const string &path, std::map<string,string> mapTagReplacementValues,bool noValidation=false);
void save(const string &path, const XmlNode *node);
};
@@ -76,7 +76,7 @@ public:
~XmlTree();
void init(const string &name);
void load(const string &path, std::map<string,string> mapTagReplacementValues);
void load(const string &path, std::map<string,string> mapTagReplacementValues, bool noValidation=false);
void save(const string &path);
XmlNode *getRootNode() const {return rootNode;}