From 8d2e812dc81bab4bc8b9850574e8212f6ce148ea Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 7 Jun 2013 23:33:35 +0000 Subject: [PATCH] remove unused reference to image and image-cancel for upgrade types --- source/glest_game/types/upgrade_type.cpp | 26 +++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/source/glest_game/types/upgrade_type.cpp b/source/glest_game/types/upgrade_type.cpp index 7aceea57..6915b9ba 100644 --- a/source/glest_game/types/upgrade_type.cpp +++ b/source/glest_game/types/upgrade_type.cpp @@ -574,24 +574,26 @@ void UpgradeType::load(const string &dir, const TechTree *techTree, const XmlNode *upgradeNode= xmlTree.getRootNode(); //image - const XmlNode *imageNode= upgradeNode->getChild("image"); - image= Renderer::getInstance().newTexture2D(rsGame); - if(image) { - image->load(imageNode->getAttribute("path")->getRestrictedValue(currentPath,true)); - } - loadedFileList[imageNode->getAttribute("path")->getRestrictedValue(currentPath,true)].push_back(make_pair(sourceXMLFile,imageNode->getAttribute("path")->getRestrictedValue())); + image = NULL; // Not used for upgrade types +// const XmlNode *imageNode= upgradeNode->getChild("image"); +// image= Renderer::getInstance().newTexture2D(rsGame); +// if(image) { +// image->load(imageNode->getAttribute("path")->getRestrictedValue(currentPath,true)); +// } +// loadedFileList[imageNode->getAttribute("path")->getRestrictedValue(currentPath,true)].push_back(make_pair(sourceXMLFile,imageNode->getAttribute("path")->getRestrictedValue())); //if(fileExists(imageNode->getAttribute("path")->getRestrictedValue(currentPath,true)) == false) { // printf("\n***ERROR MISSING FILE [%s]\n",imageNode->getAttribute("path")->getRestrictedValue(currentPath,true).c_str()); //} //image cancel - const XmlNode *imageCancelNode= upgradeNode->getChild("image-cancel"); - cancelImage= Renderer::getInstance().newTexture2D(rsGame); - if(cancelImage) { - cancelImage->load(imageCancelNode->getAttribute("path")->getRestrictedValue(currentPath,true)); - } - loadedFileList[imageCancelNode->getAttribute("path")->getRestrictedValue(currentPath,true)].push_back(make_pair(sourceXMLFile,imageCancelNode->getAttribute("path")->getRestrictedValue())); + cancelImage = NULL; // Not used for upgrade types +// const XmlNode *imageCancelNode= upgradeNode->getChild("image-cancel"); +// cancelImage= Renderer::getInstance().newTexture2D(rsGame); +// if(cancelImage) { +// cancelImage->load(imageCancelNode->getAttribute("path")->getRestrictedValue(currentPath,true)); +// } +// loadedFileList[imageCancelNode->getAttribute("path")->getRestrictedValue(currentPath,true)].push_back(make_pair(sourceXMLFile,imageCancelNode->getAttribute("path")->getRestrictedValue())); //if(fileExists(imageCancelNode->getAttribute("path")->getRestrictedValue(currentPath,true)) == false) { // printf("\n***ERROR MISSING FILE [%s]\n",imageCancelNode->getAttribute("path")->getRestrictedValue(currentPath,true).c_str());