diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 47fed1c4..0cef5d02 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -5429,20 +5429,20 @@ void Game::customloadquick(std::string savfile) void Game::loadsummary() { - TiXmlDocument docTele; - if (!FILESYSTEM_loadTiXmlDocument("saves/tsave.vvv", &docTele)) + tinyxml2::XMLDocument docTele; + if (!FILESYSTEM_loadTiXml2Document("saves/tsave.vvv", docTele)) { telesummary = ""; } else { - TiXmlHandle hDoc(&docTele); - TiXmlElement* pElem; - TiXmlHandle hRoot(0); + tinyxml2::XMLHandle hDoc(&docTele); + tinyxml2::XMLElement* pElem; + tinyxml2::XMLHandle hRoot(NULL); { - pElem=hDoc.FirstChildElement().Element(); + pElem=hDoc.FirstChildElement().ToElement(); // should always have a valid root but handle gracefully if it does if (!pElem) { @@ -5450,13 +5450,13 @@ void Game::loadsummary() } // save this for later - hRoot=TiXmlHandle(pElem); + hRoot=tinyxml2::XMLHandle(pElem); } int l_minute, l_second, l_hours; l_minute = l_second= l_hours = 0; int l_saveX = 0; int l_saveY = 0; - for( pElem = hRoot.FirstChild( "Data" ).FirstChild().Element(); pElem; pElem=pElem->NextSiblingElement()) + for( pElem = hRoot.FirstChildElement( "Data" ).FirstChild().ToElement(); pElem; pElem=pElem->NextSiblingElement()) { std::string pKey(pElem->Value()); const char* pText = pElem->GetText() ; @@ -5518,20 +5518,20 @@ void Game::loadsummary() tele_currentarea = map.currentarea(map.area(l_saveX, l_saveY)); } - TiXmlDocument doc; - if (!FILESYSTEM_loadTiXmlDocument("saves/qsave.vvv", &doc)) + tinyxml2::XMLDocument doc; + if (!FILESYSTEM_loadTiXml2Document("saves/qsave.vvv", doc)) { quicksummary = ""; } else { - TiXmlHandle hDoc(&doc); - TiXmlElement* pElem; - TiXmlHandle hRoot(0); + tinyxml2::XMLHandle hDoc(&doc); + tinyxml2::XMLElement* pElem; + tinyxml2::XMLHandle hRoot(NULL); { - pElem=hDoc.FirstChildElement().Element(); + pElem=hDoc.FirstChildElement().ToElement(); // should always have a valid root but handle gracefully if it does if (!pElem) { @@ -5539,13 +5539,13 @@ void Game::loadsummary() } // save this for later - hRoot=TiXmlHandle(pElem); + hRoot=tinyxml2::XMLHandle(pElem); } int l_minute, l_second, l_hours; l_minute = l_second= l_hours = 0; int l_saveX = 0; int l_saveY = 0; - for( pElem = hRoot.FirstChild( "Data" ).FirstChild().Element(); pElem; pElem=pElem->NextSiblingElement()) + for( pElem = hRoot.FirstChildElement( "Data" ).FirstChild().ToElement(); pElem; pElem=pElem->NextSiblingElement()) { std::string pKey(pElem->Value()); const char* pText = pElem->GetText() ;