mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-02-01 21:55:01 +01:00
Convert custom quicksave loading attempt to TinyXML2
Seems a bit wasteful to do the whole "parse the XML document thing" instead of a simple file check. It doesn't even fail if the XML document is invalid, but whatever.
This commit is contained in:
parent
677dd424ec
commit
2f2f04c76b
1 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
|||
#include "MakeAndPlay.h"
|
||||
|
||||
#include "tinyxml.h"
|
||||
#include "tinyxml2.h"
|
||||
|
||||
#include "FileSystemUtils.h"
|
||||
|
||||
|
@ -228,8 +229,8 @@ void menuactionpress()
|
|||
game.customlevelfilename=ed.ListOfMetaData[game.playcustomlevel].filename;
|
||||
|
||||
std::string name = "saves/" + ed.ListOfMetaData[game.playcustomlevel].filename.substr(7) + ".vvv";
|
||||
TiXmlDocument doc;
|
||||
if (!FILESYSTEM_loadTiXmlDocument(name.c_str(), &doc)){
|
||||
tinyxml2::XMLDocument doc;
|
||||
if (!FILESYSTEM_loadTiXml2Document(name.c_str(), doc)){
|
||||
game.mainmenu = 22;
|
||||
graphics.fademode = 2;
|
||||
}else{
|
||||
|
|
Loading…
Add table
Reference in a new issue