aboutsummaryrefslogtreecommitdiff
path: root/base/commandLine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'base/commandLine.cpp')
-rw-r--r--base/commandLine.cpp54
1 files changed, 41 insertions, 13 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 44007c494a..42a3a64d34 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -145,7 +145,7 @@ static const char HELP_STRING[] =
static const char *s_appName = "scummvm";
-static void usage(const char *s, ...) GCC_PRINTF(1, 2);
+static void NORETURN_PRE usage(const char *s, ...) GCC_PRINTF(1, 2) NORETURN_POST;
static void usage(const char *s, ...) {
char buf[STRINGBUFLEN];
@@ -198,7 +198,7 @@ void registerDefaults() {
// Game specific
ConfMan.registerDefault("path", "");
- ConfMan.registerDefault("platform", Common::kPlatformPC);
+ ConfMan.registerDefault("platform", Common::kPlatformDOS);
ConfMan.registerDefault("language", "en");
ConfMan.registerDefault("subtitles", false);
ConfMan.registerDefault("boot_param", 0);
@@ -239,6 +239,28 @@ void registerDefaults() {
ConfMan.registerDefault("gui_saveload_chooser", "grid");
ConfMan.registerDefault("gui_saveload_last_pos", "0");
+
+ ConfMan.registerDefault("gui_browser_show_hidden", false);
+
+#ifdef USE_FLUIDSYNTH
+ // The settings are deliberately stored the same way as in Qsynth. The
+ // FluidSynth music driver is responsible for transforming them into
+ // their appropriate values.
+ ConfMan.registerDefault("fluidsynth_chorus_activate", true);
+ ConfMan.registerDefault("fluidsynth_chorus_nr", 3);
+ ConfMan.registerDefault("fluidsynth_chorus_level", 100);
+ ConfMan.registerDefault("fluidsynth_chorus_speed", 30);
+ ConfMan.registerDefault("fluidsynth_chorus_depth", 80);
+ ConfMan.registerDefault("fluidsynth_chorus_waveform", "sine");
+
+ ConfMan.registerDefault("fluidsynth_reverb_activate", true);
+ ConfMan.registerDefault("fluidsynth_reverb_roomsize", 20);
+ ConfMan.registerDefault("fluidsynth_reverb_damping", 0);
+ ConfMan.registerDefault("fluidsynth_reverb_width", 1);
+ ConfMan.registerDefault("fluidsynth_reverb_level", 90);
+
+ ConfMan.registerDefault("fluidsynth_misc_interpolation", "4th");
+#endif
}
//
@@ -310,12 +332,19 @@ void registerDefaults() {
continue; \
}
+// End an option handler
+#define END_COMMAND \
+ }
+
Common::String parseCommandLine(Common::StringMap &settings, int argc, const char * const *argv) {
const char *s, *s2;
+ if (!argv)
+ return Common::String();
+
// argv[0] contains the name of the executable.
- if (argv && argv[0]) {
+ if (argv[0]) {
s = strrchr(argv[0], '/');
s_appName = s ? (s+1) : argv[0];
}
@@ -341,27 +370,27 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
bool isLongCmd = (s[0] == '-' && s[1] == '-');
DO_COMMAND('h', "help")
- END_OPTION
+ END_COMMAND
DO_COMMAND('v', "version")
- END_OPTION
+ END_COMMAND
DO_COMMAND('t', "list-targets")
- END_OPTION
+ END_COMMAND
DO_COMMAND('z', "list-games")
- END_OPTION
+ END_COMMAND
#ifdef DETECTOR_TESTING_HACK
// HACK FIXME TODO: This command is intentionally *not* documented!
DO_LONG_COMMAND("test-detector")
- END_OPTION
+ END_COMMAND
#endif
#ifdef UPGRADE_ALL_TARGETS_HACK
// HACK FIXME TODO: This command is intentionally *not* documented!
DO_LONG_COMMAND("upgrade-targets")
- END_OPTION
+ END_COMMAND
#endif
DO_LONG_OPTION("list-saves")
@@ -387,7 +416,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
END_OPTION
DO_LONG_COMMAND("list-audio-devices")
- END_OPTION
+ END_COMMAND
DO_LONG_OPTION_INT("output-rate")
END_OPTION
@@ -517,7 +546,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
END_OPTION
DO_LONG_COMMAND("list-themes")
- END_OPTION
+ END_COMMAND
DO_LONG_OPTION("target-md5")
END_OPTION
@@ -579,8 +608,7 @@ static void listGames() {
"-------------------- ------------------------------------------------------\n");
const EnginePlugin::List &plugins = EngineMan.getPlugins();
- EnginePlugin::List::const_iterator iter = plugins.begin();
- for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
+ for (EnginePlugin::List::const_iterator iter = plugins.begin(); iter != plugins.end(); ++iter) {
GameList list = (**iter)->getSupportedGames();
for (GameList::iterator v = list.begin(); v != list.end(); ++v) {
printf("%-20s %s\n", v->gameid().c_str(), v->description().c_str());