mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03: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:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user