1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-06 21:13:32 +02: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:
Misa 2020-06-03 17:39:21 -07:00 committed by Ethan Lee
parent 677dd424ec
commit 2f2f04c76b

View File

@ -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{