diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 813634893..e5fc402a4 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -106,9 +106,9 @@ const char *GAME_ARGS[] = { "--log-path", "--show-ini-settings", "--convert-models", - //"--convert-textures", "--disable-backtrace", "--disable-vbo", + "--disable-sound", "--verbose" }; @@ -131,9 +131,9 @@ enum GAME_ARG_TYPE { GAME_ARG_LOG_PATH, GAME_ARG_SHOW_INI_SETTINGS, GAME_ARG_CONVERT_MODELS, -// GAME_ARG_CONVERT_TEXTURES, GAME_ARG_DISABLE_BACKTRACE, GAME_ARG_DISABLE_VBO, + GAME_ARG_DISABLE_SOUND, GAME_ARG_VERBOSE_MODE }; @@ -154,12 +154,9 @@ void cleanupCRCThread() { if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); } preCacheThread = NULL; - //if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); - //sleep(25); if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); } if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); - //SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); } static void cleanupProcessObjects() { @@ -964,13 +961,10 @@ void printParameterHelp(const char *argv0, bool foundInvalidArgs) { printf("\n \t\tWhere keepsmallest is an optional flag indicating to keep original texture if its filesize is smaller than the converted format."); printf("\n \t\texample: %s %s=techs/megapack/factions/tech/units/castle/models/castle.g3d=png=keepsmallest",argv0,GAME_ARGS[GAME_ARG_CONVERT_MODELS]); -// printf("\n%s=x=textureformat\t\t\tconvert a texture file or folder to the format textureformat.",GAME_ARGS[GAME_ARG_CONVERT_TEXTURES]); -// printf("\n \t\tWhere x is a filename or folder containing the texture(s)."); -// printf("\n \t\tWhere textureformat is a supported texture format to convert to (tga,bmp,jpg,png)."); -// printf("\n \t\texample: %s %s=data/core/misc_textures/fire_particle.tga=png",argv0,GAME_ARGS[GAME_ARG_CONVERT_TEXTURES]); - printf("\n%s\t\tdisables stack backtrace on errors.",GAME_ARGS[GAME_ARG_DISABLE_BACKTRACE]); printf("\n%s\t\tdisables trying to use Vertex Buffer Objects.",GAME_ARGS[GAME_ARG_DISABLE_VBO]); + printf("\n%s\t\tdisables the sound system.",GAME_ARGS[GAME_ARG_DISABLE_SOUND]); + printf("\n%s\t\t\tdisplays verbose information in the console.",GAME_ARGS[GAME_ARG_VERBOSE_MODE]); printf("\n\n"); @@ -1849,6 +1843,10 @@ int glestMain(int argc, char** argv) { } setCRCCacheFilePath(crcCachePath); + if(hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_DISABLE_SOUND]) == true) { + config.setString("FactorySound","None"); + } + // Set some statics based on ini entries SystemFlags::ENABLE_THREADED_LOGGING = config.getBool("ThreadedLogging","true"); FontGl::setDefault_fontType(config.getString("DefaultFont",FontGl::getDefault_fontType().c_str()));