diff options
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r-- | engines/scumm/scumm.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 73776bad5a..6040344c2c 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -467,6 +467,8 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) VAR_NUM_SCRIPT_CYCLES = 0xFF; VAR_SCRIPT_CYCLE = 0xFF; + VAR_QUIT_SCRIPT = 0xFF; + VAR_NUM_GLOBAL_OBJS = 0xFF; // Use g_scumm from error() ONLY @@ -714,7 +716,7 @@ ScummEngine_v2::ScummEngine_v2(OSystem *syst, const DetectorResult &dr) ScummEngine_v0::ScummEngine_v0(OSystem *syst, const DetectorResult &dr) : ScummEngine_v2(syst, dr) { - + _drawDemo = false; _currentMode = 0; _currentLights = 0; @@ -729,6 +731,9 @@ ScummEngine_v0::ScummEngine_v0(OSystem *syst, const DetectorResult &dr) VAR_ACTIVE_OBJECT2 = 0xFF; VAR_IS_SOUND_RUNNING = 0xFF; VAR_ACTIVE_VERB = 0xFF; + + if (strcmp(dr.fp.pattern, "maniacdemo.d64") == 0 ) + _game.features |= GF_DEMO; } ScummEngine_v6::ScummEngine_v6(OSystem *syst, const DetectorResult &dr) @@ -1089,8 +1094,13 @@ Common::Error ScummEngine::init() { const char *tmpBuf1, *tmpBuf2; assert(_game.id == GID_MANIAC || _game.id == GID_ZAK); if (_game.id == GID_MANIAC) { - tmpBuf1 = "maniac1.d64"; - tmpBuf2 = "maniac2.d64"; + if (_game.features & GF_DEMO) { + tmpBuf1 = "maniacdemo.d64"; + tmpBuf2 = "maniacdemo.d64"; + } else { + tmpBuf1 = "maniac1.d64"; + tmpBuf2 = "maniac2.d64"; + } } else { tmpBuf1 = "zak1.d64"; tmpBuf2 = "zak2.d64"; @@ -2073,6 +2083,7 @@ Common::Error ScummEngine::go() { if (shouldQuit()) { // TODO: Maybe perform an autosave on exit? + runQuitScript(); } } @@ -2569,7 +2580,7 @@ void ScummEngine::runBootscript() { int args[NUM_SCRIPT_LOCAL]; memset(args, 0, sizeof(args)); args[0] = _bootParam; - if (_game.id == GID_MANIAC && (_game.features & GF_DEMO)) + if (_game.id == GID_MANIAC && (_game.features & GF_DEMO) && (_game.platform != Common::kPlatformC64)) runScript(9, 0, 0, args); else runScript(1, 0, 0, args); |