From 39310bad4de4d4b6977009f98f1b3a9a29899bbe Mon Sep 17 00:00:00 2001 From: mathusummut Date: Tue, 25 Sep 2018 01:27:39 +0200 Subject: [PATCH] Code cleanup --- source/glest_game/facilities/game_util.cpp | 4 +- source/glest_game/facilities/logger.cpp | 6 +-- source/glest_game/game/game.cpp | 47 +++++++---------- source/glest_game/game/script_manager.cpp | 2 +- source/glest_game/global/config.cpp | 2 +- source/glest_game/global/core_data.cpp | 4 +- source/glest_game/global/lang.cpp | 4 +- source/glest_game/global/lang.h | 3 +- source/glest_game/graphics/renderer.cpp | 16 +++--- source/glest_game/main/battle_end.cpp | 3 +- source/glest_game/main/intro.cpp | 21 ++++---- .../menu/menu_state_connected_game.cpp | 51 ++++++++----------- .../menu/menu_state_custom_game.cpp | 18 +++---- .../glest_game/menu/menu_state_load_game.cpp | 5 +- .../menu/menu_state_options_sound.cpp | 7 +-- source/glest_game/type_instances/faction.cpp | 10 ++-- source/glest_game/type_instances/unit.cpp | 4 +- source/glest_game/type_instances/unit.h | 2 +- source/glest_game/types/faction_type.cpp | 3 +- source/glest_game/types/resource_type.cpp | 3 +- source/glest_game/types/skill_type.cpp | 2 +- source/glest_game/types/tech_tree.cpp | 6 +-- source/glest_game/types/unit_type.cpp | 6 +-- source/glest_game/types/upgrade_type.cpp | 3 +- source/glest_game/world/map.cpp | 6 +-- source/glest_game/world/minimap.cpp | 2 +- source/glest_game/world/scenario.cpp | 4 +- source/glest_game/world/tileset.cpp | 4 +- source/glest_game/world/world.cpp | 14 ++--- .../sources/platform/miniupnpc/minisoap.c | 2 +- source/shared_lib/sources/xml/xml_parser.cpp | 2 +- 31 files changed, 110 insertions(+), 156 deletions(-) diff --git a/source/glest_game/facilities/game_util.cpp b/source/glest_game/facilities/game_util.cpp index cecd54ff7..eb80c0ea8 100644 --- a/source/glest_game/facilities/game_util.cpp +++ b/source/glest_game/facilities/game_util.cpp @@ -90,7 +90,7 @@ namespace Glest { # endif #else - platform = "???"; + platform = "Unknown"; #endif } return platform; @@ -162,7 +162,7 @@ namespace Glest { version += ": " + intToStr(__GNUC_VERSION__); #else - version = "???"; + version = "Unknown"; #endif #if defined(DEBUG) || defined(_DEBUG) diff --git a/source/glest_game/facilities/logger.cpp b/source/glest_game/facilities/logger.cpp index b92e02c59..87dff7ca1 100644 --- a/source/glest_game/facilities/logger.cpp +++ b/source/glest_game/facilities/logger.cpp @@ -134,7 +134,7 @@ namespace Glest { showNextHint(); Lang &lang = Lang::getInstance(); - buttonNextHint.setText(lang.getString("ShowNextHint", "", true)); + buttonNextHint.setText(lang.getString("ShowNextHint", "")); buttonCancel.setText(lang.getString("Cancel")); GraphicComponent::applyAllCustomProperties("Loading"); @@ -267,7 +267,7 @@ namespace Glest { if (gameHintToShow != "") { Lang &lang = Lang::getInstance(); - string hintText = lang.getString("Hint", "", true); + string hintText = lang.getString("Hint", ""); char szBuf[8096] = ""; snprintf(szBuf, 8096, hintText.c_str(), gameHintToShow.c_str()); hintText = szBuf; @@ -293,7 +293,7 @@ namespace Glest { //Show next Hint if (buttonNextHint.getEnabled() == false) { buttonNextHint.init((metrics.getVirtualW() / 2) - (175 / 2), 90 * metrics.getVirtualH() / 100 + 20, 175); - buttonNextHint.setText(lang.getString("ShowNextHint", "", true)); + buttonNextHint.setText(lang.getString("ShowNextHint", "")); buttonNextHint.setEnabled(true); buttonNextHint.setVisible(true); buttonNextHint.setEditable(true); diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index 0aad4cf83..9045d79f2 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -423,7 +423,7 @@ namespace Glest { //logger.add("Game", true); logger. add(Lang:: - getInstance().getString("LogScreenGameLoading", "", true), + getInstance().getString("LogScreenGameLoading", ""), false); logger.hideProgress(); @@ -562,7 +562,7 @@ namespace Glest { //logger.add("Game", true); logger. add(Lang:: - getInstance().getString("LogScreenGameLoading", "", true), + getInstance().getString("LogScreenGameLoading", ""), false); logger.hideProgress(); @@ -2042,8 +2042,7 @@ namespace Glest { char szBuf[8096] = ""; snprintf(szBuf, 8096, Lang::getInstance().getString - ("LogScreenGameLoadingCreatingAIFaction", "", - true).c_str(), i); + ("LogScreenGameLoadingCreatingAIFaction", "").c_str(), i); logger.add(szBuf, true); slaveThreadList.push_back(aiInterfaces[i]->getWorkerThread()); @@ -2087,16 +2086,14 @@ namespace Glest { //weather particle systems if (world.getTileset()->getWeather() == wRainy) { logger.add(Lang::getInstance().getString - ("LogScreenGameLoadingCreatingRainParticles", - "", true), true); + ("LogScreenGameLoadingCreatingRainParticles", ""), true); weatherParticleSystem = new RainParticleSystem(); weatherParticleSystem->setSpeed(12.f / GameConstants::updateFps); weatherParticleSystem->setPos(gameCamera.getPos()); renderer.manageParticleSystem(weatherParticleSystem, rsGame); } else if (world.getTileset()->getWeather() == wSnowy) { logger.add(Lang::getInstance().getString - ("LogScreenGameLoadingCreatingSnowParticles", - "", true), true); + ("LogScreenGameLoadingCreatingSnowParticles", ""), true); weatherParticleSystem = new SnowParticleSystem(1200); weatherParticleSystem->setSpeed(1.5f / GameConstants::updateFps); weatherParticleSystem->setPos(gameCamera.getPos()); @@ -2127,8 +2124,7 @@ namespace Glest { (__FILE__).c_str(), __FUNCTION__); logger. add(Lang:: - getInstance().getString("LogScreenGameLoadingInitRenderer", "", - true), true); + getInstance().getString("LogScreenGameLoadingInitRenderer", ""), true); //printf("Before renderer.initGame\n"); renderer.initGame(this, this->getGameCameraPtr()); @@ -2173,8 +2169,7 @@ namespace Glest { (__FILE__).c_str(), __FUNCTION__); logger. add(Lang:: - getInstance().getString - ("LogScreenGameLoadingWaitForNetworkPlayers", "", true), true); + getInstance().getString("LogScreenGameLoadingWaitForNetworkPlayers", ""), true); networkManager.getGameNetworkInterface()->waitUntilReady(&checksum); //std::string worldLog = world.DumpWorldToLog(true); @@ -2188,8 +2183,7 @@ namespace Glest { __LINE__); logger. add(Lang:: - getInstance().getString("LogScreenGameLoadingStartingMusic", - "", true), true); + getInstance().getString("LogScreenGameLoadingStartingMusic", ""), true); if (this->masterserverMode == false) { if (world.getThisFaction() == NULL) { @@ -2218,8 +2212,7 @@ namespace Glest { && ambientSounds->isEnabledRain()) { logger. add(Lang:: - getInstance().getString - ("LogScreenGameLoadingStartingAmbient", "", true), true); + getInstance().getString("LogScreenGameLoadingStartingAmbient", ""), true); currentAmbientSound = ambientSounds->getRain(); //printf("In [%s:%s] Line: %d currentAmbientSound = [%p]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,currentAmbientSound); soundRenderer.playAmbient(currentAmbientSound); @@ -2230,8 +2223,7 @@ namespace Glest { && ambientSounds->isEnabledSnow()) { logger. add(Lang:: - getInstance().getString - ("LogScreenGameLoadingStartingAmbient", "", true), true); + getInstance().getString("LogScreenGameLoadingStartingAmbient", ""), true); currentAmbientSound = ambientSounds->getSnow(); //printf("In [%s:%s] Line: %d currentAmbientSound = [%p]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,currentAmbientSound); soundRenderer.playAmbient(currentAmbientSound); @@ -2245,8 +2237,7 @@ namespace Glest { logger. add(Lang:: - getInstance().getString("LogScreenGameLoadingLaunchGame", "", - true)); + getInstance().getString("LogScreenGameLoadingLaunchGame", "")); } if (showPerfStats) { @@ -3686,8 +3677,7 @@ namespace Glest { char szBuf[8096] = ""; Lang & lang = Lang::getInstance(); snprintf(szBuf, 8096, - lang.getString("GameSaved", "", - true).c_str(), file.c_str()); + lang.getString("GameSaved", "").c_str(), file.c_str()); console.addLine(szBuf); for (int i = 0; i < world.getFactionCount(); ++i) { @@ -4422,8 +4412,7 @@ namespace Glest { snprintf(szBuf, 8096, Lang::getInstance().getString - ("LogScreenGameLoadingCreatingAIFaction", - "", true).c_str(), i); + ("LogScreenGameLoadingCreatingAIFaction", "").c_str(), i); logger.add(szBuf, true); commander.tryNetworkPlayerDisconnected(i); @@ -4448,8 +4437,7 @@ namespace Glest { if (lang.hasString("GameSwitchPlayerToAI", languageList[j], true)) { msg = - lang.getString("GameSwitchPlayerToAI", - languageList[j], true); + lang.getString("GameSwitchPlayerToAI", languageList[j]); } snprintf(szBuf, 8096, msg.c_str(), i + 1, this->gameSettings.getNetworkPlayerName(i). @@ -4461,8 +4449,7 @@ namespace Glest { if (lang.hasString("GameSwitchPlayerObserverToAI", languageList[j], true)) { msg = - lang.getString("GameSwitchPlayerObserverToAI", - languageList[j], true); + lang.getString("GameSwitchPlayerObserverToAI", languageList[j]); } snprintf(szBuf, 8096, msg.c_str(), i + 1, this->gameSettings.getNetworkPlayerName(i). @@ -8213,7 +8200,7 @@ namespace Glest { Lang & lang = Lang::getInstance(); - if (this->speed < Config::getInstance().getInt("FastSpeedLoops")) { + if (this->speed < Config::getInstance().getInt("FastSpeedLoops", "8")) { if (this->speed == 0) { this->speed = 1; } else { @@ -8655,7 +8642,7 @@ namespace Glest { string file = this->saveGame(GameConstants::saveGameFilePattern); char szBuf[8096] = ""; Lang & lang = Lang::getInstance(); - snprintf(szBuf, 8096, lang.getString("GameSaved", "", true).c_str(), + snprintf(szBuf, 8096, lang.getString("GameSaved", "").c_str(), file.c_str()); console.addLine(szBuf); diff --git a/source/glest_game/game/script_manager.cpp b/source/glest_game/game/script_manager.cpp index caaa61799..22782e263 100644 --- a/source/glest_game/game/script_manager.cpp +++ b/source/glest_game/game/script_manager.cpp @@ -3177,7 +3177,7 @@ namespace } break; default: - result = "???"; + result = ""; break; } } diff --git a/source/glest_game/global/config.cpp b/source/glest_game/global/config.cpp index 90d29a4ea..3a7ecfeec 100644 --- a/source/glest_game/global/config.cpp +++ b/source/glest_game/global/config.cpp @@ -55,7 +55,7 @@ namespace Glest { const char *GameConstants::folder_path_tilesets = "tilesets"; const char *GameConstants::folder_path_tutorials = "tutorials"; - const char *GameConstants::NETWORK_SLOT_UNCONNECTED_SLOTNAME = "???"; + const char *GameConstants::NETWORK_SLOT_UNCONNECTED_SLOTNAME = "??"; const char *GameConstants::NETWORK_SLOT_CLOSED_SLOTNAME = "Closed"; const char *GameConstants::folder_path_screenshots = "screens/"; diff --git a/source/glest_game/global/core_data.cpp b/source/glest_game/global/core_data.cpp index b9fd3ca3a..d9d712d37 100644 --- a/source/glest_game/global/core_data.cpp +++ b/source/glest_game/global/core_data.cpp @@ -1061,9 +1061,7 @@ namespace Glest { void CoreData::load() { string data_path = CoreData::getDataPath(); - Logger::getInstance().add(Lang::getInstance(). - getString("LogScreenCoreDataLoading", "", - true)); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenCoreDataLoading", "")); // textures loadTextures(data_path); diff --git a/source/glest_game/global/lang.cpp b/source/glest_game/global/lang.cpp index d7bb8a3ca..70d73ea41 100644 --- a/source/glest_game/global/lang.cpp +++ b/source/glest_game/global/lang.cpp @@ -566,7 +566,7 @@ namespace Glest { return result; } - string Lang::getString(const string & s, string uselanguage, bool fallbackToDefault) { + string Lang::getString(const string & s, string uselanguage) { string result = ""; if (uselanguage != "") { @@ -587,7 +587,7 @@ namespace Glest { if (uselanguage != DEFAULT_LANGUAGE && this->language != DEFAULT_LANGUAGE) { - return getString(s, DEFAULT_LANGUAGE, false); + return getString(s, DEFAULT_LANGUAGE); } return s; diff --git a/source/glest_game/global/lang.h b/source/glest_game/global/lang.h index fde16b132..f110ac1f0 100644 --- a/source/glest_game/global/lang.h +++ b/source/glest_game/global/lang.h @@ -80,8 +80,7 @@ namespace Glest { bool loadTechTreeStrings(string techTree, bool forceLoad = false); void loadTilesetStrings(string tileset); - string getString(const string & s, string uselanguage = - "", bool fallbackToDefault = false); + string getString(const string & s, string uselanguage = ""); bool hasString(const string & s, string uselanguage = "", bool fallbackToDefault = false); diff --git a/source/glest_game/graphics/renderer.cpp b/source/glest_game/graphics/renderer.cpp index e4abf8f46..b89376617 100644 --- a/source/glest_game/graphics/renderer.cpp +++ b/source/glest_game/graphics/renderer.cpp @@ -1447,12 +1447,12 @@ namespace Glest { bool swapRequiredY = false; int const cellBuffer = 4; if ((tl.x > tr.x) || (bl.x > br.x)) { - if (debug) printf("Swap X???\n"); + if (debug) printf("Swap X?\n"); //std::swap(tl,bl); //std::swap(tr,br); if (tl.x > tr.x) { - if (debug) printf("Swap X1???\n"); + if (debug) printf("Swap X1?\n"); tr.x += cellBuffer; tl.x -= cellBuffer; @@ -1464,7 +1464,7 @@ namespace Glest { tr.x -= cellBuffer; } if (bl.x > br.x) { - if (debug) printf("Swap X2???\n"); + if (debug) printf("Swap X2?\n"); bl.x += cellBuffer; br.x -= cellBuffer; @@ -1480,10 +1480,10 @@ namespace Glest { if ((tl.y > bl.y) || (tr.y > br.y)) { visibleQuad = this->gameCamera->computeVisibleQuad(); - if (debug) printf("Swap Y???\n"); + if (debug) printf("Swap Y?\n"); if (tl.y > bl.y) { - if (debug) printf("Swap Y1???\n"); + if (debug) printf("Swap Y1?\n"); tl.y += cellBuffer; bl.y -= cellBuffer; @@ -1495,7 +1495,7 @@ namespace Glest { tl.y -= cellBuffer; } if (tr.y > br.y) { - if (debug) printf("Swap Y2???\n"); + if (debug) printf("Swap Y2?\n"); tr.y += cellBuffer; br.y -= cellBuffer; @@ -2241,7 +2241,7 @@ namespace Glest { //int minutes = (world->getTimeFlow()->getTime() - hours) * 100 * 0.6; // scale 100 to 60 //snprintf(szBuf,200,"%s %.2d:%.2d",lang.getString("GameTime","",true).c_str(),hours,minutes); // string header2 = lang.getString("GameDurationTime","",true) + ": " + getTimeString(stats.getFramesToCalculatePlaytime()); - snprintf(szBuf, 500, "%s %s", lang.getString("GameDurationTime", "", true).c_str(), getTimeDuationString(world->getFrameCount(), GameConstants::updateFps).c_str()); + snprintf(szBuf, 500, "%s %s", lang.getString("GameDurationTime", "").c_str(), getTimeDuationString(world->getFrameCount(), GameConstants::updateFps).c_str()); if (str != "") { str += " "; } @@ -2257,7 +2257,7 @@ namespace Glest { Lang &lang = Lang::getInstance(); char szBuf[200] = ""; - snprintf(szBuf, 200, "%s %s", lang.getString("LocalTime", "", true).c_str(), szBuf2); + snprintf(szBuf, 200, "%s %s", lang.getString("LocalTime", "").c_str(), szBuf2); if (str != "") { str += " "; } diff --git a/source/glest_game/main/battle_end.cpp b/source/glest_game/main/battle_end.cpp index 5faa15e09..318a9d58f 100644 --- a/source/glest_game/main/battle_end.cpp +++ b/source/glest_game/main/battle_end.cpp @@ -854,8 +854,7 @@ namespace Glest { string header2 = - lang.getString("GameDurationTime", "", - true) + ": " + + lang.getString("GameDurationTime", "") + ": " + getTimeDuationString(stats.getFramesToCalculatePlaytime(), GameConstants::updateFps); textRenderer->render(header2, lm + 250, bm + 530); diff --git a/source/glest_game/main/intro.cpp b/source/glest_game/main/intro.cpp index 09d556da3..bb1f6f9e6 100644 --- a/source/glest_game/main/intro.cpp +++ b/source/glest_game/main/intro.cpp @@ -344,7 +344,7 @@ namespace Glest { string lineText = ""; if (lang.hasString(introTagName, "", true) == true) { - lineText = lang.getString(introTagName, "", true); + lineText = lang.getString(introTagName, ""); } string showStartTime = "IntroStartMilliseconds" + intToStr(i); @@ -352,7 +352,7 @@ namespace Glest { int displayTime = appear; if (lang.hasString(showStartTime, "", true) == true) { - displayTime = strToInt(lang.getString(showStartTime, "", true)); + displayTime = strToInt(lang.getString(showStartTime, "")); } else { if (i == 1) { displayTime = appear; @@ -372,7 +372,7 @@ namespace Glest { string introTagTextureHeightName = "IntroTextureHeight" + intToStr(i); - lineText = lang.getString(introTagTextureName, "", true); + lineText = lang.getString(introTagTextureName, ""); Texture2D * logoTexture = renderer.newTexture2D(rsGlobal); if (logoTexture) { @@ -391,7 +391,7 @@ namespace Glest { if (lang.hasString(introTagTextureWidthName, "", true) == true) { textureWidth = strToInt(lang.getString - (introTagTextureWidthName, "", true)); + (introTagTextureWidthName, "")); } int @@ -402,7 +402,7 @@ namespace Glest { if (lang.hasString(introTagTextureHeightName, "", true) == true) { textureHeight = strToInt(lang.getString - (introTagTextureHeightName, "", true)); + (introTagTextureHeightName, "")); } texts.push_back(new @@ -422,7 +422,7 @@ namespace Glest { int textX = -1; if (lang.hasString(introTagTextXName, "", true) == true) { - string value = lang.getString(introTagTextXName, "", true); + string value = lang.getString(introTagTextXName, ""); if (value.length() > 0 && (value[0] == '+' || value[0] == '-')) { textX = w / 2 + strToInt(value); } else { @@ -433,7 +433,7 @@ namespace Glest { int textY = -1; if (lang.hasString(introTagTextYName, "", true) == true) { - string value = lang.getString(introTagTextYName, "", true); + string value = lang.getString(introTagTextYName, ""); if (value.length() > 0 && (value[0] == '+' || value[0] == '-')) { textY = h / 2 + strToInt(value); } else { @@ -448,7 +448,7 @@ namespace Glest { if (lang.hasString(introTagTextFontTypeName, "", true) == true) { string - value = lang.getString(introTagTextFontTypeName, "", true); + value = lang.getString(introTagTextFontTypeName, ""); if (value == "displaynormal") { font = coreData.getDisplayFont(); font3d = coreData.getDisplayFont3D(); @@ -481,7 +481,7 @@ namespace Glest { modelShowTime = disappear * (displayItemNumber); if (lang.hasString("IntroModelStartMilliseconds", "", true) == true) { modelShowTime = - strToInt(lang.getString("IntroModelStartMilliseconds", "", true)); + strToInt(lang.getString("IntroModelStartMilliseconds", "")); } else { modelShowTime = disappear * (displayItemNumber); } @@ -588,8 +588,7 @@ namespace Glest { if (lang.hasString("IntroTextureStartMilliseconds", "", true) == true) { textureStartTime = - strToInt(lang.getString("IntroTextureStartMilliseconds", "", - true)); + strToInt(lang.getString("IntroTextureStartMilliseconds", "")); } texts.push_back(new diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index ddd9d7d02..63c5f34e1 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -2512,7 +2512,7 @@ namespace Glest { true) == true) { labelMapInfo.setText(mapInfo.desc); } else { - labelMapInfo.setText("???"); + labelMapInfo.setText(""); } needToBroadcastServerSettings = true; @@ -2576,7 +2576,7 @@ namespace Glest { true) == true) { labelMapInfo.setText(mapInfo.desc); } else { - labelMapInfo.setText("???"); + labelMapInfo.setText(""); } needToBroadcastServerSettings = true; broadcastServerSettingsDelayTimer = time(NULL); @@ -2904,8 +2904,7 @@ namespace Glest { factionFiles.push_back(formatString (GameConstants::RANDOMFACTION_SLOTNAME)); translatedFactionNames.push_back("*" + - lang.getString("Random", "", - true) + "*"); + lang.getString("Random", "") + "*"); // Add special Observer Faction if (checkBoxAllowObservers.getValue() == 1) { @@ -2913,8 +2912,7 @@ namespace Glest { factionFiles.push_back(formatString (GameConstants::OBSERVER_SLOTNAME)); translatedFactionNames.push_back("*" + - lang.getString("Observer", "", - true) + "*"); + lang.getString("Observer", "") + "*"); } for (int i = 0; i < GameConstants::maxPlayers; ++i) { @@ -4337,7 +4335,7 @@ namespace Glest { && techCRC != displayedGamesettings.getTechCRC() && listBoxTechTree.getSelectedItemIndex() >= 0 && listBoxTechTree.getSelectedItem() != - Lang::getInstance().getString("DataMissing", "", true)) { + Lang::getInstance().getString("DataMissing", "")) { //time_t now = time(NULL); time_t @@ -4402,7 +4400,7 @@ namespace Glest { if (factionName != GameConstants::RANDOMFACTION_SLOTNAME && factionName != GameConstants::OBSERVER_SLOTNAME && factionName != - Lang::getInstance().getString("DataMissing", "", true)) { + Lang::getInstance().getString("DataMissing", "")) { uint32 factionCRC = 0; //time_t now = time(NULL); @@ -4549,7 +4547,7 @@ namespace Glest { if (mapCRC != 0 && mapCRC != displayedGamesettings.getMapCRC() && listBoxMap.getSelectedItemIndex() >= 0 && listBoxMap.getSelectedItem() != - Lang::getInstance().getString("DataMissing", "", true)) { + Lang::getInstance().getString("DataMissing", "")) { labelSynch = labelSynch + " " + lang.getString("Map"); if (updateDataSynchDetailText == true && @@ -4584,7 +4582,7 @@ namespace Glest { && tilesetCRC != displayedGamesettings.getTilesetCRC() && listBoxTileset.getSelectedItemIndex() >= 0 && listBoxTileset.getSelectedItem() != - Lang::getInstance().getString("DataMissing", "", true)) { + Lang::getInstance().getString("DataMissing", "")) { labelSynch = labelSynch + " " + lang.getString("Tileset"); if (updateDataSynchDetailText == true && lastTileDataSynchError != @@ -4618,7 +4616,7 @@ namespace Glest { && techCRC != displayedGamesettings.getTechCRC() && listBoxTechTree.getSelectedItemIndex() >= 0 && listBoxTechTree.getSelectedItem() != - Lang::getInstance().getString("DataMissing", "", true)) { + Lang::getInstance().getString("DataMissing", "")) { labelSynch = labelSynch + " " + lang.getString("TechTree"); if (updateDataSynchDetailText == true && lastTechtreeDataSynchError != @@ -5818,7 +5816,7 @@ namespace Glest { } results. push_back(Lang:: - getInstance().getString("DataMissing", "", true)); + getInstance().getString("DataMissing", "")); factionFiles = results; vector < string > translatedFactionNames; for (int i = 0; i < (int) factionFiles.size(); ++i) { @@ -5907,8 +5905,7 @@ namespace Glest { factionFiles.push_back(formatString (GameConstants::RANDOMFACTION_SLOTNAME)); translatedFactionNames.push_back("*" + - lang.getString("Random", "", - true) + "*"); + lang.getString("Random", "") + "*"); // Add special Observer Faction if (checkBoxAllowObservers.getValue() == 1) { @@ -5917,8 +5914,7 @@ namespace Glest { factionFiles.push_back(formatString (GameConstants::OBSERVER_SLOTNAME)); translatedFactionNames.push_back("*" + - lang.getString("Observer", "", - true) + "*"); + lang.getString("Observer", "") + "*"); } @@ -6238,7 +6234,7 @@ namespace Glest { } else { cleanupMapPreviewTexture(); mapInfo->desc = - Lang::getInstance().getString("DataMissing", "", true); + Lang::getInstance().getString("DataMissing", ""); NetworkManager & networkManager = NetworkManager::getInstance(); ClientInterface * @@ -7286,7 +7282,7 @@ namespace Glest { tilesets. push_back(Lang:: - getInstance().getString("DataMissing", "", true)); + getInstance().getString("DataMissing", "")); NetworkManager & networkManager = NetworkManager::getInstance(); ClientInterface * @@ -7339,8 +7335,7 @@ namespace Glest { listBoxTileset.setItems(tilesets); listBoxTileset. setSelectedItem(Lang:: - getInstance().getString("DataMissing", "", - true)); + getInstance().getString("DataMissing", "")); } } @@ -7404,7 +7399,7 @@ namespace Glest { techtree. push_back(Lang:: - getInstance().getString("DataMissing", "", true)); + getInstance().getString("DataMissing", "")); NetworkManager & networkManager = NetworkManager::getInstance(); ClientInterface * @@ -7463,8 +7458,7 @@ namespace Glest { listBoxTechTree.setItems(techtree, translatedTechs); listBoxTechTree. setSelectedItem(Lang:: - getInstance().getString("DataMissing", "", - true)); + getInstance().getString("DataMissing", "")); } } @@ -7548,12 +7542,8 @@ namespace Glest { } formattedPlayerSortedMaps[gameSettings-> - getMapFilter()].push_back(Lang:: - getInstance - ().getString - ("DataMissing", - "", true)); - mapFile = Lang::getInstance().getString("DataMissing", "", true); + getMapFilter()].push_back(Lang::getInstance().getString("DataMissing", "")); + mapFile = Lang::getInstance().getString("DataMissing", ""); missingMap = true; } @@ -7563,8 +7553,7 @@ namespace Glest { if (isfirstSwitchingMapMessage) { isfirstSwitchingMapMessage = false; } else { - console.addLine(Lang::getInstance().getString - ("HeadlessServerDoesNotHaveMap", "", true)); + console.addLine(Lang::getInstance().getString("HeadlessServerDoesNotHaveMap", "")); } } listBoxMap.setItems(formattedPlayerSortedMaps diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 4044c71d3..45e083362 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -2774,14 +2774,14 @@ namespace Glest { Lang & lang = Lang::getInstance(); string sMsg = - lang.getString("NetworkSlotNoHumanErrorUI", "", true); + lang.getString("NetworkSlotNoHumanErrorUI", ""); showMessageBox(sMsg, "", false); const vector < string > languageList = serverInterface-> getGameSettings()->getUniqueNetworkPlayerLanguages(); for (unsigned int j = 0; j < languageList.size(); ++j) { - sMsg = lang.getString("NetworkSlotNoHumanError", "", true); + sMsg = lang.getString("NetworkSlotNoHumanError", ""); serverInterface->sendTextMessage(sMsg, -1, true, languageList[j]); @@ -3281,9 +3281,9 @@ namespace Glest { && switchSetupRequests[i]->getSelectedFactionName() != Lang::getInstance().getString("DataMissing", slot->getNetworkPlayerLanguage - (), true) + ()) && switchSetupRequests[i]->getSelectedFactionName() - != "???DataMissing???")) { + != "DataMissing")) { // I don't believe we need to check to see if Observers // are allowed. If it's not, there should be not button on the client // side that would allow them to switch to a slot > mapInfo.hardMaxPlayers @@ -3373,9 +3373,9 @@ namespace Glest { && switchSetupRequests[i]->getSelectedFactionName() != Lang::getInstance().getString("DataMissing", slot->getNetworkPlayerLanguage - (), true) + ()) && switchSetupRequests[i]->getSelectedFactionName() - != "???DataMissing???")) { + != "DataMissing")) { listBoxFactions[i].setSelectedItem(switchSetupRequests [i]->getSelectedFactionName ()); @@ -6310,8 +6310,7 @@ namespace Glest { factionFiles.push_back(formatString (GameConstants::RANDOMFACTION_SLOTNAME)); translatedFactionNames.push_back("*" + - lang.getString("Random", "", - true) + "*"); + lang.getString("Random", "") + "*"); // Add special Observer Faction if (checkBoxAllowObservers.getValue() == 1) { @@ -6319,8 +6318,7 @@ namespace Glest { factionFiles.push_back(formatString (GameConstants::OBSERVER_SLOTNAME)); translatedFactionNames.push_back("*" + - lang.getString("Observer", "", - true) + "*"); + lang.getString("Observer", "") + "*"); } for (int i = 0; i < GameConstants::maxPlayers; ++i) { diff --git a/source/glest_game/menu/menu_state_load_game.cpp b/source/glest_game/menu/menu_state_load_game.cpp index 5f694137a..2e09273fb 100644 --- a/source/glest_game/menu/menu_state_load_game.cpp +++ b/source/glest_game/menu/menu_state_load_game.cpp @@ -253,8 +253,7 @@ namespace Glest { Lang & lang = Lang::getInstance(); char szBuf[8096] = ""; snprintf(szBuf, 8096, - lang.getString("LoadGameDeletingFile", "", - true).c_str(), filename.c_str()); + lang.getString("LoadGameDeletingFile", "").c_str(), filename.c_str()); console.addLineOnly(szBuf); for (int i = 0; i < (int) slots.size(); i++) { @@ -285,7 +284,7 @@ namespace Glest { Lang & lang = Lang::getInstance(); char szBuf[8096] = ""; snprintf(szBuf, 8096, - lang.getString("LoadGameLoadingFile", "", true).c_str(), + lang.getString("LoadGameLoadingFile", "").c_str(), filename.c_str()); console.addLineOnly(szBuf); diff --git a/source/glest_game/menu/menu_state_options_sound.cpp b/source/glest_game/menu/menu_state_options_sound.cpp index 70187e128..4de756078 100644 --- a/source/glest_game/menu/menu_state_options_sound.cpp +++ b/source/glest_game/menu/menu_state_options_sound.cpp @@ -160,12 +160,7 @@ namespace pushBackItem("OpenAL"); string - FSoundMode = config.getString("FactorySound"); - string - FSoundModeT = lang.getString(config.getString("FactorySound")); - if (FSoundModeT != "???" + FSoundMode + "???") { - FSoundMode = FSoundModeT; - } + FSoundMode = lang.getString(config.getString("FactorySound")); listBoxSoundFactory. setSelectedItem(FSoundMode); currentLine -= diff --git a/source/glest_game/type_instances/faction.cpp b/source/glest_game/type_instances/faction.cpp index d0dcaafaa..5a1d9a8f5 100644 --- a/source/glest_game/type_instances/faction.cpp +++ b/source/glest_game/type_instances/faction.cpp @@ -100,8 +100,8 @@ namespace Glest { return false; } - // const Command *command= l->getCurrrentCommandThreadSafe(); - // const Command *commandPeer = r->getCurrrentCommandThreadSafe(); + // const Command *command= l->getCurrentCommandThreadSafe(); + // const Command *commandPeer = r->getCurrentCommandThreadSafe(); const Command *command = l->getCurrCommand(); const Command *commandPeer = r->getCurrCommand(); @@ -114,7 +114,7 @@ namespace Glest { command->getUnitCommandGroupId() > 0) { int curCommandGroupId = command->getUnitCommandGroupId(); - //Command *commandPeer = j.unit->getCurrrentCommandThreadSafe(); + //Command *commandPeer = j.unit->getCurrentCommandThreadSafe(); //Command *commandPeer = j.unit->getCurrCommand(); // is comparer a valid command @@ -144,11 +144,11 @@ namespace Glest { } else if (command == NULL && commandPeer != NULL) { result = false; } - // else if(command == NULL && j.unit->getCurrrentCommandThreadSafe() == NULL) { + // else if(command == NULL && j.unit->getCurrentCommandThreadSafe() == NULL) { // return this->unit->getId() < j.unit->getId(); // } else { - //Command *commandPeer = j.unit->getCurrrentCommandThreadSafe(); + //Command *commandPeer = j.unit->getCurrentCommandThreadSafe(); //if( commandPeer != NULL && commandPeer->getCommandType() != NULL && // (commandPeer->getCommandType()->getClass() != ccMove && // commandPeer->getCommandType()->getClass() != ccAttack)) { diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index 90477c53d..32ba11821 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -1483,7 +1483,7 @@ namespace Glest { unitParticleSystems.pop_back(); } - Command *cmd = getCurrrentCommandThreadSafe(); + Command *cmd = getCurrentCommandThreadSafe(); // Set mew fog of war skill type if need be if (cmd != NULL && cmd->getCommandType() != NULL && @@ -2031,7 +2031,7 @@ namespace Glest { } //return current command, assert that there is always one command - Command *Unit::getCurrrentCommandThreadSafe() { + Command *Unit::getCurrentCommandThreadSafe() { static string mutexOwnerId = string(__FILE__) + string("_") + intToStr(__LINE__); MutexSafeWrapper safeMutex(mutexCommands, mutexOwnerId); diff --git a/source/glest_game/type_instances/unit.h b/source/glest_game/type_instances/unit.h index c5de30b11..291744c7e 100644 --- a/source/glest_game/type_instances/unit.h +++ b/source/glest_game/type_instances/unit.h @@ -622,7 +622,7 @@ namespace Glest { void calculateFogOfWarRadius(bool forceRefresh = false); //queries - Command *getCurrrentCommandThreadSafe(); + Command *getCurrentCommandThreadSafe(); void setIgnoreCheckCommand(bool value) { ignoreCheckCommand = value; } diff --git a/source/glest_game/types/faction_type.cpp b/source/glest_game/types/faction_type.cpp index 676a42778..2e00bb3c6 100644 --- a/source/glest_game/types/faction_type.cpp +++ b/source/glest_game/types/faction_type.cpp @@ -153,8 +153,7 @@ namespace Glest { char szBuf[8096] = ""; snprintf(szBuf, 8096, Lang::getInstance(). - getString("LogScreenGameLoadingFactionType", "", - true).c_str(), + getString("LogScreenGameLoadingFactionType", "").c_str(), formatString(this->getName()).c_str()); Logger::getInstance().add(szBuf, true); diff --git a/source/glest_game/types/resource_type.cpp b/source/glest_game/types/resource_type.cpp index 96e9a4e89..b4b88f656 100644 --- a/source/glest_game/types/resource_type.cpp +++ b/source/glest_game/types/resource_type.cpp @@ -77,8 +77,7 @@ namespace Glest { char szBuf[8096] = ""; snprintf(szBuf, 8096, Lang::getInstance(). - getString("LogScreenGameLoadingResourceType", "", - true).c_str(), + getString("LogScreenGameLoadingResourceType", "").c_str(), formatString(getName(true)).c_str()); Logger::getInstance().add(szBuf, true); diff --git a/source/glest_game/types/skill_type.cpp b/source/glest_game/types/skill_type.cpp index a3843e790..3e73443e0 100644 --- a/source/glest_game/types/skill_type.cpp +++ b/source/glest_game/types/skill_type.cpp @@ -1372,7 +1372,7 @@ namespace Glest { attackSkillTypeNode->addAttribute("projectile", intToStr(projectile), mapTagReplacements); // ParticleSystemTypeProjectile* projectileParticleSystemType; - // save a skill_type ???? + // save a skill_type? // if(projectileParticleSystemType != NULL) { // projectileParticleSystemType->saveGame(attackSkillTypeNode); // } diff --git a/source/glest_game/types/tech_tree.cpp b/source/glest_game/types/tech_tree.cpp index 7d63148cd..46d642604 100644 --- a/source/glest_game/types/tech_tree.cpp +++ b/source/glest_game/types/tech_tree.cpp @@ -242,8 +242,7 @@ namespace Glest { char szBuf[8096] = ""; snprintf(szBuf, 8096, - Lang::getInstance(). - getString("LogScreenGameLoadingTechtree", "", true).c_str(), + Lang::getInstance().getString("LogScreenGameLoadingTechtree", "").c_str(), formatString(getName(true)).c_str()); Logger::getInstance().add(szBuf, true); @@ -474,8 +473,7 @@ namespace Glest { extractFileFromDirectoryPath(__FILE__). c_str(), __FUNCTION__, __LINE__); Logger::getInstance().add(Lang::getInstance(). - getString("LogScreenGameUnLoadingTechtree", - "", true), true); + getString("LogScreenGameUnLoadingTechtree", ""), true); resourceTypes.clear(); factionTypes.clear(); armorTypes.clear(); diff --git a/source/glest_game/types/unit_type.cpp b/source/glest_game/types/unit_type.cpp index 5173c40ea..9093bb56c 100644 --- a/source/glest_game/types/unit_type.cpp +++ b/source/glest_game/types/unit_type.cpp @@ -217,8 +217,7 @@ namespace Glest { char szBuf[8096] = ""; snprintf(szBuf, 8096, Lang::getInstance(). - getString("LogScreenGameLoadingUnitType", "", - true).c_str(), + getString("LogScreenGameLoadingUnitType", "").c_str(), formatString(this->getName(true)).c_str()); Logger::getInstance().add(szBuf, true); @@ -1047,8 +1046,7 @@ namespace Glest { snprintf(szBuf, 8096, Lang::getInstance(). - getString("LogScreenGameLoadingUnitTypeSkills", "", - true).c_str(), + getString("LogScreenGameLoadingUnitTypeSkills", "").c_str(), formatString(this->getName(true)).c_str(), skillTypes.size()); Logger::getInstance().add(szBuf, true); diff --git a/source/glest_game/types/upgrade_type.cpp b/source/glest_game/types/upgrade_type.cpp index 2e2c2a566..c8a8bbf59 100644 --- a/source/glest_game/types/upgrade_type.cpp +++ b/source/glest_game/types/upgrade_type.cpp @@ -1043,8 +1043,7 @@ namespace Glest { char szBuf[8096] = ""; snprintf(szBuf, 8096, Lang::getInstance(). - getString("LogScreenGameLoadingUpgradeType", "", - true).c_str(), + getString("LogScreenGameLoadingUpgradeType", "").c_str(), formatString(this->getName(true)).c_str()); Logger::getInstance().add(szBuf, true); diff --git a/source/glest_game/world/map.cpp b/source/glest_game/world/map.cpp index 273deffeb..aebb124e7 100644 --- a/source/glest_game/world/map.cpp +++ b/source/glest_game/world/map.cpp @@ -366,7 +366,7 @@ namespace Glest { } Map::~Map() { - Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingMapCells", "", true), true); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingMapCells", ""), true); delete[] cells; cells = NULL; @@ -378,7 +378,7 @@ namespace Glest { void Map::end() { if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d]\n", __FILE__, __FUNCTION__, __LINE__); - Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingMap", "", true), true); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingMap", ""), true); //read heightmap for (int j = 0; j < surfaceH; ++j) { for (int i = 0; i < surfaceW; ++i) { @@ -574,7 +574,7 @@ namespace Glest { } void Map::init(Tileset *tileset) { - Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingMap", "", true), true); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingMap", ""), true); maxMapHeight = 0.0f; smoothSurface(tileset); computeNormals(); diff --git a/source/glest_game/world/minimap.cpp b/source/glest_game/world/minimap.cpp index db2d471b0..38d64088b 100644 --- a/source/glest_game/world/minimap.cpp +++ b/source/glest_game/world/minimap.cpp @@ -117,7 +117,7 @@ namespace Glest { } Minimap::~Minimap() { - Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingMiniMap", "", true), true); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingMiniMap", ""), true); delete fowPixmap0; fowPixmap0 = NULL; delete fowPixmap0Copy; diff --git a/source/glest_game/world/scenario.cpp b/source/glest_game/world/scenario.cpp index 5efe7599a..9cd5f05ce 100644 --- a/source/glest_game/world/scenario.cpp +++ b/source/glest_game/world/scenario.cpp @@ -64,9 +64,7 @@ namespace Glest { char szBuf[8096] = ""; snprintf(szBuf, 8096, - Lang::getInstance(). - getString("LogScreenGameLoadingScenario", "", - true).c_str(), formatString(name).c_str()); + Lang::getInstance().getString("LogScreenGameLoadingScenario", "").c_str(), formatString(name).c_str()); Logger::getInstance().add(szBuf, true); bool isTutorial = Scenario::isGameTutorial(path); diff --git a/source/glest_game/world/tileset.cpp b/source/glest_game/world/tileset.cpp index 2f816d8e3..3dcf9ac50 100644 --- a/source/glest_game/world/tileset.cpp +++ b/source/glest_game/world/tileset.cpp @@ -164,7 +164,7 @@ namespace Glest { try { char szBuf[8096] = ""; - snprintf(szBuf, 8096, Lang::getInstance().getString("LogScreenGameLoadingTileset", "", true).c_str(), formatString(name).c_str()); + snprintf(szBuf, 8096, Lang::getInstance().getString("LogScreenGameLoadingTileset", "").c_str(), formatString(name).c_str()); Logger::getInstance().add(szBuf, true); Renderer &renderer = Renderer::getInstance(); @@ -502,7 +502,7 @@ namespace Glest { surfPixmaps[i].clear(); } - Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingTileset", "", true), true); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingTileset", ""), true); } const Pixmap2D *Tileset::getSurfPixmap(int type, int var) const { diff --git a/source/glest_game/world/world.cpp b/source/glest_game/world/world.cpp index 1b5367f72..41acc5e1b 100644 --- a/source/glest_game/world/world.cpp +++ b/source/glest_game/world/world.cpp @@ -162,7 +162,7 @@ namespace Glest { void World::endScenario() { if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d]\n", __FILE__, __FUNCTION__, __LINE__); - Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingWorld", "", true), true); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingWorld", ""), true); animatedTilesetObjectPosListLoaded = false; @@ -183,7 +183,7 @@ namespace Glest { void World::end() { if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d]\n", __FILE__, __FUNCTION__, __LINE__); - Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingWorld", "", true), true); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameUnLoadingWorld", ""), true); animatedTilesetObjectPosListLoaded = false; @@ -1949,7 +1949,7 @@ namespace Glest { void World::initCells(bool fogOfWar) { if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d]\n", __FILE__, __FUNCTION__, __LINE__); - Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameLoadingStateCells", "", true), true); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameLoadingStateCells", ""), true); for (int i = 0; i < map.getSurfaceW(); ++i) { for (int j = 0; j < map.getSurfaceH(); ++j) { @@ -2027,7 +2027,7 @@ namespace Glest { //creates each faction looking at each faction name contained in GameSettings void World::initFactionTypes(GameSettings *gs) { if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d]\n", __FILE__, __FUNCTION__, __LINE__); - Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameLoadingFactionTypes", "", true), true); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameLoadingFactionTypes", ""), true); if (gs == NULL) { throw megaglest_runtime_error("gs == NULL"); @@ -2173,14 +2173,14 @@ namespace Glest { if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d]\n", __FILE__, __FUNCTION__, __LINE__); minimap.init(map.getW(), map.getH(), this, game->getGameSettings()->getFogOfWar()); - Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameLoadingMinimapSurface", "", true), true); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameLoadingMinimapSurface", ""), true); if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d]\n", __FILE__, __FUNCTION__, __LINE__); } void World::initUnitsForScenario() { if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d]\n", __FILE__, __FUNCTION__, __LINE__); - Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameLoadingGenerateGameElements", "", true), true); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameLoadingGenerateGameElements", ""), true); //put starting units for (int i = 0; i < getFactionCount(); ++i) { @@ -2245,7 +2245,7 @@ namespace Glest { //place units randomly aroud start location void World::initUnits() { if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d]\n", __FILE__, __FUNCTION__, __LINE__); - Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameLoadingGenerateGameElements", "", true), true); + Logger::getInstance().add(Lang::getInstance().getString("LogScreenGameLoadingGenerateGameElements", ""), true); bool gotError = false; bool skipStackTrace = false; diff --git a/source/shared_lib/sources/platform/miniupnpc/minisoap.c b/source/shared_lib/sources/platform/miniupnpc/minisoap.c index f8b62f9ba..fd5861195 100644 --- a/source/shared_lib/sources/platform/miniupnpc/minisoap.c +++ b/source/shared_lib/sources/platform/miniupnpc/minisoap.c @@ -99,7 +99,7 @@ int soapPostSubmit(int fd, "Content-Type: text/xml\r\n" "SOAPAction: \"%s\"\r\n" "Connection: Close\r\n" - "Cache-Control: no-cache\r\n" /* ??? */ + "Cache-Control: no-cache\r\n" "Pragma: no-cache\r\n" "\r\n", url, httpversion, host, portstr, bodysize, action); diff --git a/source/shared_lib/sources/xml/xml_parser.cpp b/source/shared_lib/sources/xml/xml_parser.cpp index 1b3a2a951..0a2f39fbb 100644 --- a/source/shared_lib/sources/xml/xml_parser.cpp +++ b/source/shared_lib/sources/xml/xml_parser.cpp @@ -839,7 +839,7 @@ namespace Shared { } } - throw megaglest_runtime_error("Node \"" + getName() + "\" doesn't have " + intToStr(childIndex + 1) + " children named \"" + (childNameList.empty() ? "???" : childNameList[0]) + "\"\n\nTree: " + getTreeString(), true); + throw megaglest_runtime_error("Node \"" + getName() + "\" doesn't have " + intToStr(childIndex + 1) + " children named \"" + (childNameList.empty() ? "?" : childNameList[0]) + "\"\n\nTree: " + getTreeString(), true); } bool XmlNode::hasChildAtIndex(const string &childName, int i) const {