aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2010-12-01 17:56:36 +0000
committerMatthew Hoops2010-12-01 17:56:36 +0000
commit77782f4eb3655d9d7b73c6158b96e369d617163b (patch)
tree530918f93594062b7cb4a7f6b7d5f2d73d33ec48 /engines
parent81209867a2eaa0cf9fa4cf0120c9cb6ef353e2fe (diff)
downloadscummvm-rg350-77782f4eb3655d9d7b73c6158b96e369d617163b.tar.gz
scummvm-rg350-77782f4eb3655d9d7b73c6158b96e369d617163b.tar.bz2
scummvm-rg350-77782f4eb3655d9d7b73c6158b96e369d617163b.zip
MOHAWK: Split intro and demo opcodes into their own classes
svn-id: r54706
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/module.mk2
-rw-r--r--engines/mohawk/myst.cpp8
-rw-r--r--engines/mohawk/myst_stacks/demo.cpp121
-rw-r--r--engines/mohawk/myst_stacks/demo.h65
-rw-r--r--engines/mohawk/myst_stacks/intro.cpp178
-rw-r--r--engines/mohawk/myst_stacks/intro.h63
-rw-r--r--engines/mohawk/myst_stacks/myst.cpp149
7 files changed, 437 insertions, 149 deletions
diff --git a/engines/mohawk/module.mk b/engines/mohawk/module.mk
index 1d8153a5e7..353b7db483 100644
--- a/engines/mohawk/module.mk
+++ b/engines/mohawk/module.mk
@@ -25,7 +25,9 @@ MODULE_OBJS = \
video.o \
myst_stacks/channelwood.o \
myst_stacks/credits.o \
+ myst_stacks/demo.o \
myst_stacks/dni.o \
+ myst_stacks/intro.o \
myst_stacks/mechanical.o \
myst_stacks/myst.o \
myst_stacks/selenitic.o \
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index eb3c20e478..d81c5923cc 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -41,7 +41,9 @@
// The stacks
#include "mohawk/myst_stacks/channelwood.h"
#include "mohawk/myst_stacks/credits.h"
+#include "mohawk/myst_stacks/demo.h"
#include "mohawk/myst_stacks/dni.h"
+#include "mohawk/myst_stacks/intro.h"
#include "mohawk/myst_stacks/mechanical.h"
#include "mohawk/myst_stacks/myst.h"
#include "mohawk/myst_stacks/selenitic.h"
@@ -387,9 +389,15 @@ void MohawkEngine_Myst::changeToStack(uint16 stack) {
case kCreditsStack:
_scriptParser = new MystScriptParser_Credits(this);
break;
+ case kDemoStack:
+ _scriptParser = new MystScriptParser_Demo(this);
+ break;
case kDniStack:
_scriptParser = new MystScriptParser_Dni(this);
break;
+ case kIntroStack:
+ _scriptParser = new MystScriptParser_Intro(this);
+ break;
case kMechanicalStack:
_scriptParser = new MystScriptParser_Mechanical(this);
break;
diff --git a/engines/mohawk/myst_stacks/demo.cpp b/engines/mohawk/myst_stacks/demo.cpp
new file mode 100644
index 0000000000..bc8d489790
--- /dev/null
+++ b/engines/mohawk/myst_stacks/demo.cpp
@@ -0,0 +1,121 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "mohawk/myst.h"
+#include "mohawk/myst_stacks/demo.h"
+
+#include "gui/message.h"
+
+namespace Mohawk {
+
+MystScriptParser_Demo::MystScriptParser_Demo(MohawkEngine_Myst *vm) : MystScriptParser_Intro(vm) {
+ setupOpcodes();
+}
+
+MystScriptParser_Demo::~MystScriptParser_Demo() {
+}
+
+#define OPCODE(op, x) _opcodes.push_back(new MystOpcode(op, (OpcodeProcMyst) &MystScriptParser_Demo::x, #x))
+
+#define OVERRIDE_OPCODE(opcode, x) \
+ for (uint32 i = 0; i < _opcodes.size(); i++) \
+ if (_opcodes[i]->op == opcode) { \
+ _opcodes[i]->proc = (OpcodeProcMyst) &MystScriptParser_Demo::x; \
+ _opcodes[i]->desc = #x; \
+ break; \
+ }
+
+void MystScriptParser_Demo::setupOpcodes() {
+ // "Stack-Specific" Opcodes
+ OPCODE(101, opcode_101);
+ OPCODE(102, opcode_102);
+
+ // "Init" Opcodes
+ OVERRIDE_OPCODE(201, opcode_201);
+
+ // "Exit" Opcodes
+ OVERRIDE_OPCODE(300, opcode_300);
+}
+
+#undef OPCODE
+#undef OVERRIDE_OPCODE
+
+void MystScriptParser_Demo::disablePersistentScripts() {
+ MystScriptParser_Intro::disablePersistentScripts();
+
+ _enabled201 = false;
+}
+
+void MystScriptParser_Demo::runPersistentScripts() {
+ MystScriptParser_Intro::runPersistentScripts();
+
+ if (_enabled201) {
+ // Used on Card 2001, 2002 and 2003
+
+ // TODO: Fill in Function...
+ }
+}
+
+void MystScriptParser_Demo::opcode_101(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ varUnusedCheck(op, var);
+
+ // Used on Card 2000, 2002 and 2003
+ // Triggered by Click
+ if (argc == 0) {
+ // TODO: Fill in Logic.. Fade in?
+ } else
+ unknown(op, var, argc, argv);
+}
+
+void MystScriptParser_Demo::opcode_102(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ varUnusedCheck(op, var);
+
+ // Used on Card 2002 and 2003
+ // Triggered by Click
+ if (argc == 0) {
+ // TODO: Fill in Logic.. Fade out?
+ } else
+ unknown(op, var, argc, argv);
+}
+
+void MystScriptParser_Demo::opcode_201(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ varUnusedCheck(op, var);
+
+ // Used on Card 2001, 2002 and 2003
+ if (argc == 0)
+ _enabled201 = true;
+ else
+ unknown(op, var, argc, argv);
+}
+
+
+void MystScriptParser_Demo::opcode_300(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ // Used on Card 2000
+ varUnusedCheck(op, var);
+
+ // TODO: Fill in Function...
+}
+
+} // End of namespace Mohawk
diff --git a/engines/mohawk/myst_stacks/demo.h b/engines/mohawk/myst_stacks/demo.h
new file mode 100644
index 0000000000..c3dbeb2844
--- /dev/null
+++ b/engines/mohawk/myst_stacks/demo.h
@@ -0,0 +1,65 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef MYST_SCRIPTS_DEMO_H
+#define MYST_SCRIPTS_DEMO_H
+
+#include "common/scummsys.h"
+#include "common/util.h"
+#include "mohawk/myst_stacks/intro.h"
+
+namespace Mohawk {
+
+#define DECLARE_OPCODE(x) void x(uint16 op, uint16 var, uint16 argc, uint16 *argv)
+
+class MohawkEngine_Myst;
+struct MystScriptEntry;
+
+class MystScriptParser_Demo : public MystScriptParser_Intro {
+public:
+ MystScriptParser_Demo(MohawkEngine_Myst *vm);
+ ~MystScriptParser_Demo();
+
+ void disablePersistentScripts();
+ void runPersistentScripts();
+
+private:
+ void setupOpcodes();
+
+ DECLARE_OPCODE(opcode_101);
+ DECLARE_OPCODE(opcode_102);
+
+ DECLARE_OPCODE(opcode_201);
+
+ DECLARE_OPCODE(opcode_300);
+
+ bool _enabled201;
+};
+
+} // End of namespace Mohawk
+
+#undef DECLARE_OPCODE
+
+#endif
diff --git a/engines/mohawk/myst_stacks/intro.cpp b/engines/mohawk/myst_stacks/intro.cpp
new file mode 100644
index 0000000000..9b4e41d2d7
--- /dev/null
+++ b/engines/mohawk/myst_stacks/intro.cpp
@@ -0,0 +1,178 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "mohawk/myst.h"
+#include "mohawk/graphics.h"
+#include "mohawk/myst_areas.h"
+#include "mohawk/sound.h"
+#include "mohawk/video.h"
+#include "mohawk/myst_stacks/intro.h"
+
+#include "gui/message.h"
+
+namespace Mohawk {
+
+MystScriptParser_Intro::MystScriptParser_Intro(MohawkEngine_Myst *vm) : MystScriptParser(vm) {
+ setupOpcodes();
+}
+
+MystScriptParser_Intro::~MystScriptParser_Intro() {
+}
+
+#define OPCODE(op, x) _opcodes.push_back(new MystOpcode(op, (OpcodeProcMyst) &MystScriptParser_Intro::x, #x))
+
+void MystScriptParser_Intro::setupOpcodes() {
+ // "Stack-Specific" Opcodes
+ OPCODE(100, o_useLinkBook);
+
+ // "Init" Opcodes
+ OPCODE(200, o_playIntroMovies);
+ OPCODE(201, opcode_201);
+
+ // "Exit" Opcodes
+ OPCODE(300, opcode_300);
+}
+
+#undef OPCODE
+
+void MystScriptParser_Intro::disablePersistentScripts() {
+}
+
+void MystScriptParser_Intro::runPersistentScripts() {
+}
+
+void MystScriptParser_Intro::o_useLinkBook(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ // Hard coded SoundId valid only for Intro Stack.
+ // Other stacks use Opcode 40, which takes SoundId values as arguments.
+ const uint16 soundIdLinkSrc = 5;
+
+ debugC(kDebugScript, "Opcode %d: o_useLinkBook", op);
+ debugC(kDebugScript, "\tvar: %d", var);
+
+ // TODO: Merge with changeStack (Opcode 40) Implementation?
+ if (_vm->_varStore->getVar(var) == 5 || _vm->_varStore->getVar(var) > 7) {
+ // TODO: Dead Book i.e. Released Sirrus/Achenar
+ } else {
+ // Play Linking Sound, blocking...
+ _vm->_sound->stopSound();
+ Audio::SoundHandle *handle = _vm->_sound->playSound(soundIdLinkSrc);
+ while (_vm->_mixer->isSoundHandleActive(*handle))
+ _vm->_system->delayMillis(10);
+
+ // Play Flyby Entry Movie on Masterpiece Edition. The Macintosh version is currently hooked
+ // up to the Cinepak versions of the video (the 'c' suffix) until the SVQ1 decoder is completed.
+ if ((_vm->getFeatures() & GF_ME)) {
+ switch (_stackMap[_vm->_varStore->getVar(var)]) {
+ case kSeleniticStack:
+ if (_vm->getPlatform() == Common::kPlatformMacintosh)
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("FLY_SEc", kMasterpieceOnly));
+ else
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("selenitic flyby", kMasterpieceOnly));
+ break;
+ case kStoneshipStack:
+ if (_vm->getPlatform() == Common::kPlatformMacintosh)
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("FLY_STc", kMasterpieceOnly));
+ else
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("stoneship flyby", kMasterpieceOnly));
+ break;
+ // Myst Flyby Movie not used in Original Masterpiece Edition Engine
+ case kMystStack:
+ if (_vm->_tweaksEnabled) {
+ if (_vm->getPlatform() == Common::kPlatformMacintosh)
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("FLY_MYc", kMasterpieceOnly));
+ else
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("myst flyby", kMasterpieceOnly));
+ }
+ break;
+ case kMechanicalStack:
+ if (_vm->getPlatform() == Common::kPlatformMacintosh)
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("FLY_MEc", kMasterpieceOnly));
+ else
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("mech age flyby", kMasterpieceOnly));
+ break;
+ case kChannelwoodStack:
+ if (_vm->getPlatform() == Common::kPlatformMacintosh)
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("FLY_CHc", kMasterpieceOnly));
+ else
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("channelwood flyby", kMasterpieceOnly));
+ break;
+ default:
+ break;
+ }
+ }
+
+ uint16 varValue = _vm->_varStore->getVar(var);
+ _vm->changeToStack(_stackMap[varValue]);
+ _vm->changeToCard(_startCard[varValue], true);
+
+ // TODO: No soundIdLinkDst for Opcode 100 link? Check Original.
+ }
+}
+
+void MystScriptParser_Intro::o_playIntroMovies(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ varUnusedCheck(op, var);
+
+ // TODO: Clicking during the intro movies does not stop them and change to Card 5.
+ // This is due to the movies playing blocking, but making them non-blocking causes
+ // the card change here to prevent them playing. Need to move the following to the
+ // opcode_200_run process and wait for all movies to finish playing before the card
+ // change is performed.
+
+ // Play Intro Movies..
+ if ((_vm->getFeatures() & GF_ME) && _vm->getPlatform() == Common::kPlatformMacintosh) {
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("mattel", kIntroStack));
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("presto", kIntroStack));
+ } else
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("broder", kIntroStack));
+
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("cyanlogo", kIntroStack));
+
+ if (!(_vm->getFeatures() & GF_DEMO)) { // The demo doesn't have the intro video
+ if ((_vm->getFeatures() & GF_ME) && _vm->getPlatform() == Common::kPlatformMacintosh)
+ // intro.mov uses Sorenson, introc uses Cinepak. Otherwise, they're the same.
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("introc", kIntroStack));
+ else
+ _vm->_video->playMovieCentered(_vm->wrapMovieFilename("intro", kIntroStack));
+ }
+
+ _vm->changeToCard(_vm->getCurCard() + 1, true);
+}
+
+void MystScriptParser_Intro::opcode_201(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ varUnusedCheck(op, var);
+
+ _vm->_gfx->updateScreen();
+ _vm->_system->delayMillis(4 * 1000);
+ _vm->_gfx->copyImageToScreen(4, Common::Rect(0, 0, 544, 333));
+ // TODO: Wait until video ends, then change to card 5
+}
+
+void MystScriptParser_Intro::opcode_300(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ varUnusedCheck(op, var);
+ // In the original engine, this opcode stopped Intro Movies if playing,
+ // upon card change, but this behavior is now default in this engine.
+}
+
+} // End of namespace Mohawk
diff --git a/engines/mohawk/myst_stacks/intro.h b/engines/mohawk/myst_stacks/intro.h
new file mode 100644
index 0000000000..78dc3bcaee
--- /dev/null
+++ b/engines/mohawk/myst_stacks/intro.h
@@ -0,0 +1,63 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef MYST_SCRIPTS_INTRO_H
+#define MYST_SCRIPTS_INTRO_H
+
+#include "common/scummsys.h"
+#include "common/util.h"
+#include "mohawk/myst_scripts.h"
+
+namespace Mohawk {
+
+#define DECLARE_OPCODE(x) void x(uint16 op, uint16 var, uint16 argc, uint16 *argv)
+
+class MohawkEngine_Myst;
+struct MystScriptEntry;
+
+class MystScriptParser_Intro : public MystScriptParser {
+public:
+ MystScriptParser_Intro(MohawkEngine_Myst *vm);
+ ~MystScriptParser_Intro();
+
+ void disablePersistentScripts();
+ void runPersistentScripts();
+
+private:
+ void setupOpcodes();
+
+ DECLARE_OPCODE(o_useLinkBook);
+
+ DECLARE_OPCODE(o_playIntroMovies);
+ DECLARE_OPCODE(opcode_201);
+
+ DECLARE_OPCODE(opcode_300);
+};
+
+} // End of namespace Mohawk
+
+#undef DECLARE_OPCODE
+
+#endif
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index 219aa65a1d..2d1619ba8c 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -156,74 +156,7 @@ void MystScriptParser_Myst::runPersistentScripts() {
}
void MystScriptParser_Myst::opcode_100(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- // Hard coded SoundId valid only for Intro Stack.
- // Other stacks use Opcode 40, which takes SoundId values as arguments.
- const uint16 soundIdLinkSrc = 5;
-
switch (_vm->getCurStack()) {
- case kIntroStack:
- debugC(kDebugScript, "Opcode %d: ChangeStack", op);
- debugC(kDebugScript, "\tvar: %d", var);
-
- // TODO: Merge with changeStack (Opcode 40) Implementation?
- if (_vm->_varStore->getVar(var) == 5 || _vm->_varStore->getVar(var) > 7) {
- // TODO: Dead Book i.e. Released Sirrus/Achenar
- } else {
- // Play Linking Sound, blocking...
- _vm->_sound->stopSound();
- Audio::SoundHandle *handle = _vm->_sound->playSound(soundIdLinkSrc);
- while (_vm->_mixer->isSoundHandleActive(*handle))
- _vm->_system->delayMillis(10);
-
- // Play Flyby Entry Movie on Masterpiece Edition. The Macintosh version is currently hooked
- // up to the Cinepak versions of the video (the 'c' suffix) until the SVQ1 decoder is completed.
- if ((_vm->getFeatures() & GF_ME)) {
- switch (_stackMap[_vm->_varStore->getVar(var)]) {
- case kSeleniticStack:
- if (_vm->getPlatform() == Common::kPlatformMacintosh)
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("FLY_SEc", kMasterpieceOnly));
- else
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("selenitic flyby", kMasterpieceOnly));
- break;
- case kStoneshipStack:
- if (_vm->getPlatform() == Common::kPlatformMacintosh)
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("FLY_STc", kMasterpieceOnly));
- else
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("stoneship flyby", kMasterpieceOnly));
- break;
- // Myst Flyby Movie not used in Original Masterpiece Edition Engine
- case kMystStack:
- if (_vm->_tweaksEnabled) {
- if (_vm->getPlatform() == Common::kPlatformMacintosh)
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("FLY_MYc", kMasterpieceOnly));
- else
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("myst flyby", kMasterpieceOnly));
- }
- break;
- case kMechanicalStack:
- if (_vm->getPlatform() == Common::kPlatformMacintosh)
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("FLY_MEc", kMasterpieceOnly));
- else
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("mech age flyby", kMasterpieceOnly));
- break;
- case kChannelwoodStack:
- if (_vm->getPlatform() == Common::kPlatformMacintosh)
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("FLY_CHc", kMasterpieceOnly));
- else
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("channelwood flyby", kMasterpieceOnly));
- break;
- default:
- break;
- }
- }
-
- uint16 varValue = _vm->_varStore->getVar(var);
- _vm->changeToStack(_stackMap[varValue]);
- _vm->changeToCard(_startCard[varValue], true);
-
- // TODO: No soundIdLinkDst for Opcode 100 link? Check Original.
- }
- break;
case kMakingOfStack:
_vm->_system->quit();
break;
@@ -247,16 +180,6 @@ void MystScriptParser_Myst::opcode_101(uint16 op, uint16 var, uint16 argc, uint1
} else
unknown(op, var, argc, argv);
break;
- case kDemoStack:
- varUnusedCheck(op, var);
-
- // Used on Card 2000, 2002 and 2003
- // Triggered by Click
- if (argc == 0) {
- // TODO: Fill in Logic.. Fade in?
- } else
- unknown(op, var, argc, argv);
- break;
default:
unknown(op, var, argc, argv);
break;
@@ -276,16 +199,6 @@ void MystScriptParser_Myst::opcode_102(uint16 op, uint16 var, uint16 argc, uint1
} else
unknown(op, var, argc, argv);
break;
- case kDemoStack:
- varUnusedCheck(op, var);
-
- // Used on Card 2002 and 2003
- // Triggered by Click
- if (argc == 0) {
- // TODO: Fill in Logic.. Fade out?
- } else
- unknown(op, var, argc, argv);
- break;
default:
unknown(op, var, argc, argv);
break;
@@ -1038,10 +951,6 @@ void MystScriptParser_Myst::opcode_200_run() {
if (g_opcode200Parameters.enabled) {
switch (_vm->getCurStack()) {
- case kIntroStack: // Used on Card 1
- case kDemoStack: // Used on Card 2000
- // TODO : Implement function here to play though intro movies and change card?
- break;
case kDemoPreviewStack:
case kMystStack:
curImageIndex = _vm->_varStore->getVar(g_opcode200Parameters.var);
@@ -1086,35 +995,6 @@ void MystScriptParser_Myst::opcode_200_disable() {
void MystScriptParser_Myst::opcode_200(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
switch (_vm->getCurStack()) {
- case kIntroStack: // Used on Card 1
- case kDemoStack: // Used on Card 2000
- varUnusedCheck(op, var);
-
- // TODO : Clicking during the intro movies does not stop them and change to Card 5.
- // This is due to the movies playing blocking, but making them non-blocking causes
- // the card change here to prevent them playing. Need to move the following to the
- // opcode_200_run process and wait for all movies to finish playing before the card
- // change is performed.
-
- // Play Intro Movies..
- if ((_vm->getFeatures() & GF_ME) && _vm->getPlatform() == Common::kPlatformMacintosh) {
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("mattel", kIntroStack));
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("presto", kIntroStack));
- } else
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("broder", kIntroStack));
-
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("cyanlogo", kIntroStack));
-
- if (!(_vm->getFeatures() & GF_DEMO)) { // The demo doesn't have the intro video
- if ((_vm->getFeatures() & GF_ME) && _vm->getPlatform() == Common::kPlatformMacintosh)
- // intro.mov uses Sorenson, introc uses Cinepak. Otherwise, they're the same.
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("introc", kIntroStack));
- else
- _vm->_video->playMovieCentered(_vm->wrapMovieFilename("intro", kIntroStack));
- }
-
- _vm->changeToCard(_vm->getCurCard()+1, true);
- break;
case kDemoPreviewStack:
case kMystStack:
if (argc == 4) {
@@ -1153,11 +1033,6 @@ void MystScriptParser_Myst::opcode_201_run() {
_vm->_sound->playSound(g_opcode201Parameters.soundId);
g_opcode201Parameters.lastVar105 = var105;
break;
- case kDemoStack:
- // Used on Card 2001, 2002 and 2003
-
- // TODO: Fill in Function...
- break;
}
}
}
@@ -1172,12 +1047,6 @@ void MystScriptParser_Myst::opcode_201(uint16 op, uint16 var, uint16 argc, uint1
varUnusedCheck(op, var);
switch (_vm->getCurStack()) {
- case kIntroStack:
- _vm->_gfx->updateScreen();
- _vm->_system->delayMillis(4 * 1000);
- _vm->_gfx->copyImageToScreen(4, Common::Rect(0, 0, 544, 333));
- // TODO: Wait until video ends, then change to card 5
- break;
case kMystStack:
// Used for Cards 4257, 4260, 4263, 4266, 4269, 4272, 4275 and 4278 (Ship Puzzle Boxes)
if (argc == 1) {
@@ -1187,13 +1056,6 @@ void MystScriptParser_Myst::opcode_201(uint16 op, uint16 var, uint16 argc, uint1
} else
unknown(op, var, argc, argv);
break;
- case kDemoStack:
- // Used on Card 2001, 2002 and 2003
- if (argc == 0) {
- g_opcode201Parameters.enabled = true;
- } else
- unknown(op, var, argc, argv);
- break;
default:
unknown(op, var, argc, argv);
break;
@@ -1920,11 +1782,6 @@ void MystScriptParser_Myst::opcode_299(uint16 op, uint16 var, uint16 argc, uint1
void MystScriptParser_Myst::opcode_300(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
switch (_vm->getCurStack()) {
- case kIntroStack:
- varUnusedCheck(op, var);
- // In the original engine, this opcode stopped Intro Movies if playing,
- // upon card change, but this behaviour is now default in this engine.
- break;
case kDemoPreviewStack:
case kMystStack:
// Used in Card 4371 (Blue Book) Var = 101
@@ -1933,12 +1790,6 @@ void MystScriptParser_Myst::opcode_300(uint16 op, uint16 var, uint16 argc, uint1
debugC(kDebugScript, "Var: %d", var);
// TODO: Fill in Logic
break;
- case kDemoStack:
- // Used on Card 2000
- varUnusedCheck(op, var);
-
- // TODO: Fill in Function...
- break;
default:
varUnusedCheck(op, var);
unknown(op, var, argc, argv);