From 93a92e9deed12aee95342e534c393c1a9b77b127 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 8 Apr 2011 01:58:34 +0000 Subject: [PATCH] - removed hard coded enabled system and network debug (someone must have left this code in there) - added verbose output in mod menu for content metadata output - bugfix for masterserver php files not using proper variuable for imageurl output --- source/glest_game/main/main.cpp | 4 ++-- source/glest_game/menu/menu_state_mods.cpp | 4 ++-- source/masterserver/showScenariosForGlest.php | 2 +- source/masterserver/showTechsForGlest.php | 2 +- source/masterserver/showTilesetsForGlest.php | 2 +- .../sources/platform/common/platform_common.cpp | 8 +++++--- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 589bcc3d..fbb8b8c8 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -2015,8 +2015,8 @@ int glestMain(int argc, char** argv) { } SystemFlags::init(haveSpecialOutputCommandLineOption); - SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled = true; - SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled = true; + //SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled = true; + //SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled = true; MainWindow *mainWindow= NULL; Program *program= NULL; diff --git a/source/glest_game/menu/menu_state_mods.cpp b/source/glest_game/menu/menu_state_mods.cpp index 7595ee70..b6347c3f 100644 --- a/source/glest_game/menu/menu_state_mods.cpp +++ b/source/glest_game/menu/menu_state_mods.cpp @@ -1462,7 +1462,7 @@ void MenuStateMods::showDesription(const ModInfo *modInfo) { modInfoSelected = *modInfo; modDescrLabel.setText(modInfo->description); - //printf("### modInfo->imageUrl [%s]\n",modInfo->imageUrl.c_str()); + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("### modInfo->imageUrl [%s]\n",modInfo->imageUrl.c_str()); if(modInfo->imageUrl != "") { string tempImage = getPreviewImageFileForMod(modInfo); @@ -1559,7 +1559,7 @@ void MenuStateMods::render() { if(modPreviewImage == NULL) { string tempImage = getPreviewImageFileForMod(&modInfoSelected); - //printf("### Render tempImage [%s] fileExists(tempImage) = %d\n",tempImage.c_str(),fileExists(tempImage)); + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("### Render tempImage [%s] fileExists(tempImage) = %d\n",tempImage.c_str(),fileExists(tempImage)); if(tempImage != "" && fileExists(tempImage) == true) { cleanupPreviewTexture(); diff --git a/source/masterserver/showScenariosForGlest.php b/source/masterserver/showScenariosForGlest.php index 207a4e35..27ca7229 100644 --- a/source/masterserver/showScenariosForGlest.php +++ b/source/masterserver/showScenariosForGlest.php @@ -22,7 +22,7 @@ foreach( $all_scenarios as &$scenario ) { $outString = - "${scenario['scenarioname']}|${scenario['crc']}|${scenario['description']}|${scenario['url']}|${map['imageUrl']}|"; + "${scenario['scenarioname']}|${scenario['crc']}|${scenario['description']}|${scenario['url']}|${scenario['imageUrl']}|"; $outString = $outString . "\n"; echo ($outString); diff --git a/source/masterserver/showTechsForGlest.php b/source/masterserver/showTechsForGlest.php index 92c0296d..eace0594 100644 --- a/source/masterserver/showTechsForGlest.php +++ b/source/masterserver/showTechsForGlest.php @@ -22,7 +22,7 @@ foreach( $all_techs as &$tech ) { $outString = - "${tech['techname']}|${tech['factioncount']}|${tech['crc']}|${tech['description']}|${tech['url']}|${map['imageUrl']}|"; + "${tech['techname']}|${tech['factioncount']}|${tech['crc']}|${tech['description']}|${tech['url']}|${tech['imageUrl']}|"; $outString = $outString . "\n"; echo ($outString); diff --git a/source/masterserver/showTilesetsForGlest.php b/source/masterserver/showTilesetsForGlest.php index 04771a91..b1f877bf 100644 --- a/source/masterserver/showTilesetsForGlest.php +++ b/source/masterserver/showTilesetsForGlest.php @@ -22,7 +22,7 @@ foreach( $all_tilesets as &$tileset ) { $outString = - "${tileset['tilesetname']}|${tileset['crc']}|${tileset['description']}|${tileset['url']}|${map['imageUrl']}|"; + "${tileset['tilesetname']}|${tileset['crc']}|${tileset['description']}|${tileset['url']}|${tileset['imageUrl']}|"; $outString = $outString . "\n"; echo ($outString); diff --git a/source/shared_lib/sources/platform/common/platform_common.cpp b/source/shared_lib/sources/platform/common/platform_common.cpp index f8ef52ae..09b040e5 100644 --- a/source/shared_lib/sources/platform/common/platform_common.cpp +++ b/source/shared_lib/sources/platform/common/platform_common.cpp @@ -1192,14 +1192,16 @@ void createDirectoryPaths(string Path) { while(*path) { //if (('\\' == *path) || ('/' == *path)) if ('/' == *path) { + if(isdir(DirName) == false) { #ifdef WIN32 - int result = _mkdir(DirName); + int result = _mkdir(DirName); #elif defined(__GNUC__) - int result = mkdir(DirName, S_IRWXU | S_IRWXO | S_IRWXG); + int result = mkdir(DirName, S_IRWXU | S_IRWXO | S_IRWXG); #else - #error "Your compiler needs to support mkdir!" + #error "Your compiler needs to support mkdir!" #endif if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] DirName [%s] result = %d, errno = %d\n",__FILE__,__FUNCTION__,__LINE__,DirName,result,errno); + } } *dirName++ = *path++; *dirName = '\0';