aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTravis Howell2003-07-29 12:13:39 +0000
committerTravis Howell2003-07-29 12:13:39 +0000
commit11aa36ff90be9c0cee214a7fb2a15f9e97bef918 (patch)
tree84d7b526096762e05d7a50fcbb19ddd71d65721c /common
parentbbbebd9d14c7360dbe250b5e28e1b6505385f7d5 (diff)
downloadscummvm-rg350-11aa36ff90be9c0cee214a7fb2a15f9e97bef918.tar.gz
scummvm-rg350-11aa36ff90be9c0cee214a7fb2a15f9e97bef918.tar.bz2
scummvm-rg350-11aa36ff90be9c0cee214a7fb2a15f9e97bef918.zip
Add option for the demo included in Maniac Mansion (Classic version)
svn-id: r9279
Diffstat (limited to 'common')
-rw-r--r--common/gameDetector.cpp17
-rw-r--r--common/gameDetector.h1
2 files changed, 18 insertions, 0 deletions
diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp
index 7b96c857d6..15ca149510 100644
--- a/common/gameDetector.cpp
+++ b/common/gameDetector.cpp
@@ -83,6 +83,9 @@ static const char USAGE_STRING[] =
"\t--multi-midi - enable combination Adlib and native MIDI\n"
"\t--native-mt32 - true Roland MT-32 (disable GM emulation)\n"
"\t--aspect-ratio - enable aspect ratio correction\n"
+#ifndef DISABLE_SCUMM
+ "\t--demo-mode - Start demo mode of Maniac Mansion (Classic version)\n"
+#endif
#ifndef DISABLE_SKY
"\t--floppy-intro - Use floppy version intro for Beneath a Steel Sky CD\n"
#endif
@@ -168,6 +171,10 @@ GameDetector::GameDetector() {
_amiga = false;
_language = 0;
+#ifndef DISABLE_SCUMM
+ _demo_mode = false;
+#endif
+
#ifndef DISABLE_SKY
_floppyIntro = false;
#endif
@@ -286,6 +293,10 @@ void GameDetector::updateconfig() {
_floppyIntro = g_config->getBool("floppy_intro", _floppyIntro);
#endif
+#ifndef DISABLE_SCUMM
+ _demo_mode = g_config->getBool("demo_mode", _demo_mode);
+#endif
+
if ((val = g_config->get("language")))
if ((_language = parseLanguage(val)) == -1) {
printf("Error in the config file: invalid language.\n");
@@ -494,6 +505,12 @@ void GameDetector::parseCommandLine(int argc, char **argv) {
} else if (!strcmp (s, "aspect-ratio")) {
_aspectRatio = long_option_value;
g_config->setBool ("aspect_ratio", _aspectRatio);
+#ifndef DISABLE_SCUMM
+ } else if (!strcmp (s, "demo-mode")) {
+ _demo_mode = long_option_value;
+ g_config->setBool ("demo_mode", _demo_mode);
+#endif
+
#ifndef DISABLE_SKY
} else if (!strcmp (s, "floppy-intro")) {
_floppyIntro = long_option_value;
diff --git a/common/gameDetector.h b/common/gameDetector.h
index 226ffe3ea0..d0e04cde7f 100644
--- a/common/gameDetector.h
+++ b/common/gameDetector.h
@@ -122,6 +122,7 @@ public:
bool _amiga;
int _language;
+ bool _demo_mode;
bool _floppyIntro;
uint16 _talkSpeed;