diff options
Diffstat (limited to 'base/commandLine.cpp')
-rw-r--r-- | base/commandLine.cpp | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 2e981fb75a..bd8b9d07ac 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -131,7 +131,14 @@ static const char HELP_STRING[] = " --native-mt32 True Roland MT-32 (disable GM emulation)\n" " --enable-gs Enable Roland GS mode for MIDI playback\n" " --output-rate=RATE Select output sample rate in Hz (e.g. 22050)\n" - " --opl-driver=DRIVER Select AdLib (OPL) emulator (db, mame)\n" + " --opl-driver=DRIVER Select AdLib (OPL) emulator (db, mame" +#ifndef DISABLE_NUKED_OPL + ", nuked" +#endif +#ifdef ENABLE_OPL2LPT + ", opl2lpt" +#endif + ")\n" " --aspect-ratio Enable aspect ratio correction\n" " --render-mode=MODE Enable additional render modes (hercGreen, hercAmber,\n" " cga, ega, vga, amiga, fmtowns, pc9821, pc9801, 2gs,\n" @@ -148,7 +155,7 @@ static const char HELP_STRING[] = " --alt-intro Use alternative intro for CD versions of Beneath a\n" " Steel Sky and Flight of the Amazon Queen\n" #endif - " --copy-protection Enable copy protection in SCUMM games, when\n" + " --copy-protection Enable copy protection in games, when\n" " ScummVM disables it by default.\n" " --talkspeed=NUM Set talk speed for games (default: 60)\n" #if defined(ENABLE_SCUMM) || defined(ENABLE_GROOVIE) @@ -220,6 +227,7 @@ void registerDefaults() { ConfMan.registerDefault("music_driver", "auto"); ConfMan.registerDefault("mt32_device", "null"); ConfMan.registerDefault("gm_device", "null"); + ConfMan.registerDefault("opl2lpt_parport", "null"); ConfMan.registerDefault("cdrom", 0); @@ -233,7 +241,7 @@ void registerDefaults() { ConfMan.registerDefault("boot_param", 0); ConfMan.registerDefault("dump_scripts", false); ConfMan.registerDefault("save_slot", -1); - ConfMan.registerDefault("autosave_period", 5 * 60); // By default, trigger autosave every 5 minutes + ConfMan.registerDefault("autosave_period", 5 * 60); // By default, trigger autosave every 5 minutes #if defined(ENABLE_SCUMM) || defined(ENABLE_SWORD2) ConfMan.registerDefault("object_labels", true); @@ -300,7 +308,7 @@ void registerDefaults() { // Use this for options which have an *optional* value #define DO_OPTION_OPT(shortCmd, longCmd, defaultVal) \ - if (isLongCmd ? (!strcmp(s+2, longCmd) || !memcmp(s+2, longCmd"=", sizeof(longCmd"=") - 1)) : (tolower(s[1]) == shortCmd)) { \ + if (isLongCmd ? (!strcmp(s + 2, longCmd) || !memcmp(s + 2, longCmd"=", sizeof(longCmd"=") - 1)) : (tolower(s[1]) == shortCmd)) { \ s += 2; \ if (isLongCmd) { \ s += sizeof(longCmd) - 1; \ @@ -329,7 +337,7 @@ void registerDefaults() { // Use this for boolean options; this distinguishes between "-x" and "-X", // resp. between "--some-option" and "--no-some-option". #define DO_OPTION_BOOL(shortCmd, longCmd) \ - if (isLongCmd ? (!strcmp(s+2, longCmd) || !strcmp(s+2, "no-" longCmd)) : (tolower(s[1]) == shortCmd)) { \ + if (isLongCmd ? (!strcmp(s + 2, longCmd) || !strcmp(s + 2, "no-" longCmd)) : (tolower(s[1]) == shortCmd)) { \ bool boolValue = (Common::isLower(s[1]) != 0); \ s += 2; \ if (isLongCmd) { \ @@ -342,7 +350,7 @@ void registerDefaults() { // Use this for options which never have a value, i.e. for 'commands', like "--help". #define DO_COMMAND(shortCmd, longCmd) \ - if (isLongCmd ? (!strcmp(s+2, longCmd)) : (tolower(s[1]) == shortCmd)) { \ + if (isLongCmd ? (!strcmp(s + 2, longCmd)) : (tolower(s[1]) == shortCmd)) { \ s += 2; \ if (isLongCmd) \ s += sizeof(longCmd) - 1; \ @@ -375,7 +383,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha // argv[0] contains the name of the executable. if (argv[0]) { s = strrchr(argv[0], '/'); - s_appName = s ? (s+1) : argv[0]; + s_appName = s ? (s + 1) : argv[0]; } // We store all command line settings into a string map. @@ -738,7 +746,7 @@ static Common::Error listSaves(const char *target) { gameid = domain->getVal("gameid"); if (gameid.empty()) gameid = target; - gameid.toLowercase(); // Normalize it to lower case + gameid.toLowercase(); // Normalize it to lower case // Find the plugin that will handle the specified gameid const Plugin *plugin = nullptr; @@ -746,7 +754,7 @@ static Common::Error listSaves(const char *target) { if (!plugin) { return Common::Error(Common::kEnginePluginNotFound, - Common::String::format("target '%s', gameid '%s", target, gameid.c_str())); + Common::String::format("target '%s', gameid '%s", target, gameid.c_str())); } const MetaEngine &metaEngine = plugin->get<MetaEngine>(); @@ -754,7 +762,7 @@ static Common::Error listSaves(const char *target) { if (!metaEngine.hasFeature(MetaEngine::kSupportsListSaves)) { // TODO: Include more info about the target (desc, engine name, ...) ??? return Common::Error(Common::kEnginePluginNotSupportSaves, - Common::String::format("target '%s', gameid '%s", target, gameid.c_str())); + Common::String::format("target '%s', gameid '%s", target, gameid.c_str())); } else { // Query the plugin for a list of saved games SaveStateList saveList = metaEngine.listSaves(target); @@ -813,7 +821,7 @@ static void listAudioDevices() { static GameList getGameList(const Common::FSNode &dir) { Common::FSList files; - //Collect all files from directory + // Collect all files from directory if (!dir.getChildren(files, Common::FSNode::kListAll)) { printf("Path %s does not exist or is not a directory.\n", dir.getPath().c_str()); return GameList(); @@ -1035,7 +1043,7 @@ void upgradeTargets() { if (gameid.empty()) { gameid = name; } - gameid.toLowercase(); // TODO: Is this paranoia? Maybe we should just assume all lowercase, always? + gameid.toLowercase(); // TODO: Is this paranoia? Maybe we should just assume all lowercase, always? Common::FSNode dir(path); Common::FSList files; |