aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/resource.cpp2
-rw-r--r--engines/scumm/script_v2.cpp10
-rw-r--r--engines/scumm/script_v5.cpp2
-rw-r--r--engines/scumm/scumm.cpp12
-rw-r--r--engines/scumm/scumm.h1
5 files changed, 13 insertions, 14 deletions
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index 326b958128..b5fb6fb8e7 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -172,7 +172,7 @@ void ScummEngine::openRoom(const int room) {
result = openResourceFile(buf2, encByte);
// We have .man files so set demo mode
if (_game.id == GID_MANIAC)
- _demoMode = true;
+ _game.features |= GF_DEMO;
}
if (result) {
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 00e4bfba57..f1683fce26 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -425,7 +425,7 @@ void ScummEngine_v2::decodeParseString() {
if (_game.id == GID_MANIAC && _actorToPrintStrFor == 0xFF) {
if (_game.platform == Common::kPlatformC64) {
_string[textSlot].color = 14;
- } else if (_demoMode) {
+ } else if (_game.features & GF_DEMO) {
_string[textSlot].color = (_game.version == 2) ? 15 : 1;
}
}
@@ -711,7 +711,7 @@ void ScummEngine_v2::o2_actorOps() {
a->setActorCostume(arg);
break;
case 5: // SO_TALK_COLOR
- if (_game.id == GID_MANIAC && _game.version == 2 && _demoMode && arg == 1)
+ if (_game.id == GID_MANIAC && _game.version == 2 && (_game.features & GF_DEMO) && arg == 1)
a->_talkColor = 15;
else
a->_talkColor = arg;
@@ -844,11 +844,11 @@ void ScummEngine_v2::o2_verbOps() {
vs->hicolor = 1;
vs->dimcolor = 1;
} else if (_game.version == 1) {
- vs->color = (_game.id == GID_MANIAC && _demoMode) ? 16 : 5;
+ vs->color = (_game.id == GID_MANIAC && (_game.features & GF_DEMO)) ? 16 : 5;
vs->hicolor = 7;
vs->dimcolor = 11;
} else {
- vs->color = (_game.id == GID_MANIAC && _demoMode) ? 13 : 2;
+ vs->color = (_game.id == GID_MANIAC && (_game.features & GF_DEMO)) ? 13 : 2;
vs->hicolor = 14;
vs->dimcolor = 8;
}
@@ -1467,7 +1467,7 @@ void ScummEngine_v2::o2_cutscene() {
// FIXME allows quotes script (173) to start during introudction of
// demo mode of V1 Maniac Mansion. setUserState was halting script
// 173 before it started.
- if (!(_game.id == GID_MANIAC && _demoMode))
+ if (!(_game.id == GID_MANIAC && (_game.features & GF_DEMO)))
// Hide inventory, freeze scripts, hide cursor
setUserState(15);
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index c89830e625..2163be1958 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1340,7 +1340,7 @@ void ScummEngine_v5::o5_isEqual() {
// HACK: To allow demo script of Maniac Mansion V2
// The camera x position is only 100, instead of 180, after game title name scrolls.
- if (_game.id == GID_MANIAC && _game.version == 2 && _demoMode && isScriptRunning(173) && b == 180)
+ if (_game.id == GID_MANIAC && _game.version == 2 && (_game.features & GF_DEMO) && isScriptRunning(173) && b == 180)
b = 100;
if (b == a)
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 931aa00d58..957298b3a6 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -365,7 +365,6 @@ ScummEngine::ScummEngine(OSystem *syst, const GameSettings &gs, uint8 md5sum[16]
_charsetBufPos = 0;
memset(_charsetBuffer, 0, sizeof(_charsetBuffer));
_copyProtection = false;
- _demoMode = false;
_confirmExit = false;
_voiceMode = 0;
_talkDelay = 0;
@@ -544,7 +543,8 @@ ScummEngine::ScummEngine(OSystem *syst, const GameSettings &gs, uint8 md5sum[16]
_baseName = ConfMan.hasKey("basename") ? ConfMan.get("basename") : gs.gameid;
_copyProtection = ConfMan.getBool("copy_protection");
- _demoMode = ConfMan.getBool("demo_mode");
+ if (ConfMan.getBool("demo_mode"))
+ _game.features |= GF_DEMO;
if (ConfMan.hasKey("nosubtitles")) {
printf("Configuration key 'nosubtitles' is deprecated. Use 'subtitles' instead\n");
if (!ConfMan.hasKey("subtitles"))
@@ -1087,13 +1087,13 @@ void ScummEngine::scummInit() {
_actors[i].initActor(1);
// this is from IDB
- if ((_game.version == 1) || (_game.id == GID_MANIAC && _demoMode))
+ if ((_game.version == 1) || (_game.id == GID_MANIAC && (_game.features & GF_DEMO)))
_actors[i].setActorCostume(i);
}
if (_game.id == GID_MANIAC && _game.version == 1) {
setupV1ActorTalkColor();
- } else if (_game.id == GID_MANIAC && _game.version == 2 && _demoMode) {
+ } else if (_game.id == GID_MANIAC && _game.version == 2 && (_game.features & GF_DEMO)) {
// HACK Some palette changes needed for demo script
// in Maniac Mansion (Enhanced)
_actors[3].setPalette(3, 1);
@@ -1458,7 +1458,7 @@ int ScummEngine::go() {
((ScummEngine_v90he *)this)->_logicHE->beforeBootScript();
}
#endif
- if (_game.id == GID_MANIAC && _demoMode)
+ if (_game.id == GID_MANIAC && (_game.features & GF_DEMO))
runScript(9, 0, 0, args);
else
runScript(1, 0, 0, args);
@@ -1899,7 +1899,7 @@ void ScummEngine::restart() {
int args[16];
memset(args, 0, sizeof(args));
args[0] = _bootParam;
- if (_game.id == GID_MANIAC && _demoMode)
+ if (_game.id == GID_MANIAC && (_game.features & GF_DEMO))
runScript(9, 0, 0, args);
else
runScript(1, 0, 0, args);
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 489e897afb..ad6c84c667 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -1154,7 +1154,6 @@ protected:
bool _enable_gs;
MidiDriverFlags _musicType;
bool _copyProtection;
- bool _demoMode;
bool _confirmExit;
public: