[Scummvm-cvs-logs] CVS: scummvm/common gameDetector.cpp,1.19,1.20 gameDetector.h,1.6,1.7
Travis Howell
kirben at users.sourceforge.net
Wed Oct 23 03:35:05 CEST 2002
Update of /cvsroot/scummvm/scummvm/common
In directory usw-pr-cvs1:/tmp/cvs-serv11355/common
Modified Files:
gameDetector.cpp gameDetector.h
Log Message:
Add command line option for master volume, patch #591813
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- gameDetector.cpp 21 Oct 2002 15:59:04 -0000 1.19
+++ gameDetector.cpp 23 Oct 2002 10:34:14 -0000 1.20
@@ -57,6 +57,7 @@
"\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 @@
_use_adlib = false;
+ _master_volume = kDefaultMasterVolume;
_music_volume = kDefaultMusicVolume;
_sfx_volume = kDefaultSFXVolume;
_amiga = false;
@@ -150,6 +152,8 @@
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 @@
_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;
Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- gameDetector.h 18 Oct 2002 07:08:45 -0000 1.6
+++ gameDetector.h 23 Oct 2002 10:34:14 -0000 1.7
@@ -58,6 +58,7 @@
int _music_volume;
int _sfx_volume;
+ int _master_volume;
bool _amiga;
uint16 _talkSpeed;
More information about the Scummvm-git-logs
mailing list