Add command line option for master volume, patch #591813

svn-id: r5280
This commit is contained in:
Travis Howell 2002-10-23 10:34:14 +00:00
parent 134468fd61
commit 319b37bd7b
2 changed files with 10 additions and 0 deletions

View File

@ -57,6 +57,7 @@ static const char USAGE_STRING[] =
"\t-l<file> - load config file instead of default\n"
"\t-m<num> - set music volume to <num> (0-100)\n"
"\t-n - no subtitles for speech\n"
"\t-o<num> - set master volume to <num> (0-255)\n"
"\t-p<path> - look for game in <path>\n"
"\t-s<num> - set sfx volume to <num> (0-255)\n"
"\t-t<num> - set music tempo (default- adlib: 0x1F0000, midi: 0x460000)\n"
@ -79,6 +80,7 @@ GameDetector::GameDetector()
_use_adlib = false;
_master_volume = kDefaultMasterVolume;
_music_volume = kDefaultMusicVolume;
_sfx_volume = kDefaultSFXVolume;
_amiga = false;
@ -150,6 +152,8 @@ void GameDetector::updateconfig()
exit(-1);
}
_master_volume = g_config->getInt("master_volume", _master_volume);
_music_volume = g_config->getInt("music_volume", _music_volume);
_noSubtitles = g_config->getBool("nosubtitles", _noSubtitles ? true : false);
@ -271,6 +275,11 @@ void GameDetector::parseCommandLine(int argc, char **argv)
_noSubtitles = (c == 'n');
g_config->setBool("nosubtitles", _noSubtitles ? true : false);
break;
case 'o':
HANDLE_OPTION();
_master_volume = atoi(option);
g_config->setInt("master_volume", _master_volume);
break;
case 'p':
HANDLE_OPTION();
_gameDataPath = option;

View File

@ -58,6 +58,7 @@ public:
int _music_volume;
int _sfx_volume;
int _master_volume;
bool _amiga;
uint16 _talkSpeed;