ALL: synced with ScummVM

This commit is contained in:
Pawel Kolodziejski 2013-07-07 15:29:33 +02:00
parent 1f3ad19a38
commit 068ff94d20
228 changed files with 11689 additions and 4232 deletions

View file

@ -117,6 +117,13 @@ static const char HELP_STRING[] =
" --no-show-fps Set the turn off display FPS info\n"
" --soft-renderer Switch to 3D software renderer\n"
" --no-soft-renderer Switch to 3D hardware renderer\n"
#ifdef ENABLE_EVENTRECORDER
" --record-mode=MODE Specify record mode for event recorder (record, playback,\n"
" passthrough [default])\n"
" --record-file-name=FILE Specify record file name\n"
" --disable-display Disable any gfx output. Used for headless events\n"
" playback by Event Recorder\n"
#endif
"\n"
#ifdef ENABLE_GRIM
" --dimuse-tempo=NUM Set internal Digital iMuse tempo (10 - 100) per second\n"
@ -127,7 +134,7 @@ static const char HELP_STRING[] =
static const char *s_appName = "residualvm";
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];
@ -178,7 +185,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);
@ -197,11 +204,34 @@ void registerDefaults() {
ConfMan.registerDefault("confirm_exit", false);
ConfMan.registerDefault("disable_sdl_parachute", false);
ConfMan.registerDefault("disable_display", false);
ConfMan.registerDefault("record_mode", "none");
ConfMan.registerDefault("record_file_name", "record.bin");
ConfMan.registerDefault("record_temp_file_name", "record.tmp");
ConfMan.registerDefault("record_time_file_name", "record.time");
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
}
//
@ -273,12 +303,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];
}
@ -304,27 +341,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")
@ -350,7 +387,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
@ -358,6 +395,17 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
DO_OPTION_BOOL('f', "fullscreen")
END_OPTION
#ifdef ENABLE_EVENTRECORDER
DO_LONG_OPTION_INT("disable-display")
END_OPTION
DO_LONG_OPTION("record-mode")
END_OPTION
DO_LONG_OPTION("record-file-name")
END_OPTION
#endif
DO_LONG_OPTION("opl-driver")
END_OPTION
@ -480,7 +528,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
@ -494,18 +542,6 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
DO_LONG_OPTION("speech-mode")
END_OPTION
DO_LONG_OPTION("record-mode")
END_OPTION
DO_LONG_OPTION("record-file-name")
END_OPTION
DO_LONG_OPTION("record-temp-file-name")
END_OPTION
DO_LONG_OPTION("record-time-file-name")
END_OPTION
#ifdef IPHONE
// This is automatically set when launched from the Springboard.
DO_LONG_OPTION_OPT("launchedFromSB", 0)
@ -533,8 +569,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());