diff options
| author | Jamieson Christian | 2003-05-17 03:06:16 +0000 | 
|---|---|---|
| committer | Jamieson Christian | 2003-05-17 03:06:16 +0000 | 
| commit | 5a1e994d02c9e47ba15f327248f410d88a90d841 (patch) | |
| tree | 575e2ae463e58610620103674448e955c4bed20e /common | |
| parent | 1f7ebc70d8d72d081f52392dd1adeb273156ed68 (diff) | |
| download | scummvm-rg350-5a1e994d02c9e47ba15f327248f410d88a90d841.tar.gz scummvm-rg350-5a1e994d02c9e47ba15f327248f410d88a90d841.tar.bz2 scummvm-rg350-5a1e994d02c9e47ba15f327248f410d88a90d841.zip | |
Added command line options for
native MT-32 support and
combination Adilb/native MIDI drivers.
svn-id: r7594
Diffstat (limited to 'common')
| -rw-r--r-- | common/gameDetector.cpp | 65 | ||||
| -rw-r--r-- | common/gameDetector.h | 3 | 
2 files changed, 46 insertions, 22 deletions
| diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp index 30aacaad93..a45ed45d0d 100644 --- a/common/gameDetector.cpp +++ b/common/gameDetector.cpp @@ -46,35 +46,38 @@ static const char USAGE_STRING[] =  	"Syntax:\n"  	"\tscummvm [-v] [-d[<num>]] [-n] [-b<num>] [-t<num>] [-s<num>] [-p<path>] [-m<num>] [-f] game\n"  	"Flags:\n" -	"\t-p<path>   - look for game in <path>\n" -	"\t-x[<num>]  - load this savegame (default: 0 - autosave)\n" -	"\t-f         - fullscreen mode\n" -	"\t-g<mode>   - graphics mode (normal,2x,3x,2xsai,super2xsai,supereagle,advmame2x,tv2x,dotmatrix)\n" -	"\t-e<mode>   - set music engine (see README for details)\n" -	"\t-a         - specify game is amiga version\n" -	"\t-q<lang>   - specify language (en,de,fr,it,pt,es,ja,zh,ko,hb)\n" +	"\t-p<path>      - look for game in <path>\n" +	"\t-x[<num>]     - load this savegame (default: 0 - autosave)\n" +	"\t-f            - fullscreen mode\n" +	"\t-g<mode>      - graphics mode (normal,2x,3x,2xsai,super2xsai,supereagle,advmame2x,tv2x,dotmatrix)\n" +	"\t-e<mode>      - set music engine (see README for details)\n" +	"\t-a            - specify game is amiga version\n" +	"\t-q<lang>      - specify language (en,de,fr,it,pt,es,ja,zh,ko,hb)\n"  	"\n" -	"\t-c<num>    - use cdrom <num> for cd audio\n" -	"\t-m<num>    - set music volume to <num> (0-255)\n" -	"\t-o<num>    - set master volume to <num> (0-255)\n" -	"\t-s<num>    - set sfx volume to <num> (0-255)\n" -	"\t-t<num>    - set music tempo (default- adlib: 0x1D9000, midi: 0x4A0000)\n" +	"\t-c<num>       - use cdrom <num> for cd audio\n" +	"\t-m<num>       - set music volume to <num> (0-255)\n" +	"\t-o<num>       - set master volume to <num> (0-255)\n" +	"\t-s<num>       - set sfx volume to <num> (0-255)\n" +	"\t-t<num>       - set music tempo (50-200, default 100%%)\n"  	"\n" -	"\t-n         - no subtitles for speech\n" -	"\t-y         - set text speed (default: 60)\n" +	"\t-n            - no subtitles for speech\n" +	"\t-y            - set text speed (default: 60)\n"  	"\n" -	"\t-l<file>   - load config file instead of default\n" +	"\t-l<file>      - load config file instead of default\n"  #if defined(UNIX) -	"\t-w[<file>] - write to config file [~/.scummvmrc]\n" +	"\t-w[<file>]    - write to config file [~/.scummvmrc]\n"  #else -	"\t-w[<file>] - write to config file [scummvm.ini]\n" +	"\t-w[<file>]    - write to config file [scummvm.ini]\n"  #endif -	"\t-v         - show version info and exit\n" -	"\t-z         - display list of games\n" +	"\t-v            - show version info and exit\n" +	"\t-z            - display list of games\n"  	"\n" -	"\t-b<num>    - start in room <num>\n" -	"\t-d[<num>]  - enable debug output (debug level [1])\n" -	"\t-u         - dump scripts\n" +	"\t-b<num>       - start in room <num>\n" +	"\t-d[<num>]     - enable debug output (debug level [1])\n" +	"\t-u            - dump scripts\n" +	"\n" +	"\t--multi-midi  - enable combination Adlib and native MIDI\n" +	"\t--native-mt32 - true Roland MT-32 (disable GM emulation)\n"  ;  #endif  // This contains a pointer to a list of all supported games. @@ -162,6 +165,9 @@ GameDetector::GameDetector() {  	_midi_driver = MD_AUTO;  	_features = 0; +	_multi_midi = false; +	_native_mt32 = false; +  	_cdrom = 0;  	_save_slot = 0; @@ -271,6 +277,9 @@ void GameDetector::updateconfig() {  		_gameTempo = strtol(val, NULL, 0);  	_talkSpeed = g_config->getInt("talkspeed", _talkSpeed); + +	_multi_midi = g_config->getBool ("multi_midi"); +	_native_mt32 = g_config->getBool ("native_mt32");  }  void GameDetector::list_games() { @@ -445,6 +454,18 @@ void GameDetector::parseCommandLine(int argc, char **argv) {  				CHECK_OPTION();  				list_games();  				exit(1); +			case '-': +				// Long options. Let the fun begin! +				if (!strcmp (s, "multi-midi")) { +					_multi_midi = true; +					g_config->setBool ("multi_midi", true); +				} else if (!strcmp (s, "native-mt32")) { +					_native_mt32 = true; +					g_config->setBool ("native_mt32", true); +				} else { +					goto ShowHelpAndExit; +				} +				break;  			default:  				goto ShowHelpAndExit;  			} diff --git a/common/gameDetector.h b/common/gameDetector.h index 1547ac5250..bb080d642d 100644 --- a/common/gameDetector.h +++ b/common/gameDetector.h @@ -170,6 +170,9 @@ public:  	int _gfx_mode;  	bool _default_gfx_mode; + +	bool _multi_midi; +	bool _native_mt32;  	int _cdrom;  	int _save_slot; | 
