aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorBastien Bouclet2010-11-29 20:55:50 +0000
committerBastien Bouclet2010-11-29 20:55:50 +0000
commitfa7ec5ae4c67a98302e816b506b1c06d009a1f18 (patch)
tree56f11f471bace75d2bfc912374569a490d18f726 /engines/mohawk
parent34981c61b6c97281c6a7e4895d6ebbfdf97e00a6 (diff)
downloadscummvm-rg350-fa7ec5ae4c67a98302e816b506b1c06d009a1f18.tar.gz
scummvm-rg350-fa7ec5ae4c67a98302e816b506b1c06d009a1f18.tar.bz2
scummvm-rg350-fa7ec5ae4c67a98302e816b506b1c06d009a1f18.zip
MOHAWK: Describe Myst opcode 9
svn-id: r54617
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/myst_areas.cpp6
-rw-r--r--engines/mohawk/myst_areas.h2
-rw-r--r--engines/mohawk/myst_scripts.cpp28
-rw-r--r--engines/mohawk/myst_scripts.h2
-rw-r--r--engines/mohawk/myst_scripts_myst.cpp2
-rw-r--r--engines/mohawk/myst_scripts_selenitic.cpp2
6 files changed, 17 insertions, 25 deletions
diff --git a/engines/mohawk/myst_areas.cpp b/engines/mohawk/myst_areas.cpp
index 3e938b3e78..0950786a86 100644
--- a/engines/mohawk/myst_areas.cpp
+++ b/engines/mohawk/myst_areas.cpp
@@ -135,12 +135,12 @@ MystResourceType6::MystResourceType6(MohawkEngine_Myst *vm, Common::SeekableRead
_left = rlstStream->readUint16LE() % 10000;
_top = rlstStream->readUint16LE() % 10000;
_loop = rlstStream->readUint16LE();
- _u0 = rlstStream->readUint16LE();
+ _direction = rlstStream->readUint16LE();
_playBlocking = rlstStream->readUint16LE();
_playOnCardChange = rlstStream->readUint16LE();
_u3 = rlstStream->readUint16LE();
- if (_u0 != 1)
+ if (_direction != 1)
warning("Type 6 _u0 != 1");
if (_u3 != 0)
warning("Type 6 _u3 != 0");
@@ -149,7 +149,7 @@ MystResourceType6::MystResourceType6(MohawkEngine_Myst *vm, Common::SeekableRead
debugC(kDebugResource, "\tleft: %d", _left);
debugC(kDebugResource, "\ttop: %d", _top);
debugC(kDebugResource, "\tloop: %d", _loop);
- debugC(kDebugResource, "\tu0: %d", _u0);
+ debugC(kDebugResource, "\tdirection: %d", _direction);
debugC(kDebugResource, "\tplayBlocking: %d", _playBlocking);
debugC(kDebugResource, "\tplayOnCardChange: %d", _playOnCardChange);
debugC(kDebugResource, "\tu3: %d", _u3);
diff --git a/engines/mohawk/myst_areas.h b/engines/mohawk/myst_areas.h
index f3b78427ca..dab35871a2 100644
--- a/engines/mohawk/myst_areas.h
+++ b/engines/mohawk/myst_areas.h
@@ -84,7 +84,7 @@ protected:
uint16 _left;
uint16 _top;
uint16 _loop;
- uint16 _u0;
+ uint16 _direction; // 1 => forward, -1 => backwards
uint16 _playBlocking;
uint16 _playOnCardChange;
uint16 _u3;
diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp
index dc3e705d36..e6a8129af9 100644
--- a/engines/mohawk/myst_scripts.cpp
+++ b/engines/mohawk/myst_scripts.cpp
@@ -97,7 +97,7 @@ void MystScriptParser::setupOpcodes() {
OPCODE(6, o_6_changeCard),
OPCODE(7, o_6_changeCard),
OPCODE(8, o_6_changeCard),
- OPCODE(9, opcode_9),
+ OPCODE(9, o_9_triggerMovie),
OPCODE(10, o_10_toggleVarNoRedraw),
// Opcode 11 Not Present
OPCODE(12, o_2_changeCardSwitch),
@@ -340,27 +340,19 @@ void MystScriptParser::o_6_changeCard(uint16 op, uint16 var, uint16 argc, uint16
} else
unknown(op, var, argc, argv);
}
-void MystScriptParser::opcode_9(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void MystScriptParser::o_9_triggerMovie(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Trigger Type 6 Resource Movie..", op);
// If movie has sound, pause background music
- varUnusedCheck(op, var);
-
- if (argc == 0 || argc == 1) {
- debugC(kDebugScript, "Opcode %d: Trigger Type 6 Resource Movie..", op);
- // TODO: Add Logic to do this...
+ int16 direction = 1;
+ if (argc == 1) {
+ direction = argv[0];
+ }
+ debugC(kDebugScript, "\tDirection: %d", direction);
- // Used on Stoneship Card 2138 with 1 argument of 66535 as well as with
- // no arguments. Seems logically consistent with play movie with optional
- // start point or time direction control?
+ // Trigger resource 6 movie overriding play direction
- // This understanding of this opcode is based upon Stoneship Card 2197
- // i.e. Sirrus' Desk, but since this is a single case, we should find
- // more...
- if (!((_vm->getCurStack() == kStoneshipStack && _vm->getCurCard() == 2197) ||
- (_vm->getCurStack() == kStoneshipStack && _vm->getCurCard() == 2138)))
- warning("TODO: Opcode 9 on this card - Check function is consistent");
- } else
- unknown(op, var, argc, argv);
+ // If movie has sound, resume background music
}
void MystScriptParser::o_10_toggleVarNoRedraw(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
diff --git a/engines/mohawk/myst_scripts.h b/engines/mohawk/myst_scripts.h
index 299516d284..c19471377a 100644
--- a/engines/mohawk/myst_scripts.h
+++ b/engines/mohawk/myst_scripts.h
@@ -84,7 +84,7 @@ public:
DECLARE_OPCODE(takePage);
DECLARE_OPCODE(opcode_4);
DECLARE_OPCODE(o_6_changeCard);
- DECLARE_OPCODE(opcode_9);
+ DECLARE_OPCODE(o_9_triggerMovie);
DECLARE_OPCODE(o_10_toggleVarNoRedraw);
DECLARE_OPCODE(o_14_drawAreaState);
DECLARE_OPCODE(o_15_redrawAreaForVar);
diff --git a/engines/mohawk/myst_scripts_myst.cpp b/engines/mohawk/myst_scripts_myst.cpp
index 4357c92acc..47197595a7 100644
--- a/engines/mohawk/myst_scripts_myst.cpp
+++ b/engines/mohawk/myst_scripts_myst.cpp
@@ -62,7 +62,7 @@ void MystScriptParser_Myst::setupOpcodes() {
OPCODE(6, o_6_changeCard),
OPCODE(7, o_6_changeCard),
OPCODE(8, o_6_changeCard),
- OPCODE(9, opcode_9),
+ OPCODE(9, o_9_triggerMovie),
OPCODE(10, o_10_toggleVarNoRedraw),
// TODO: Opcode 10 to 11 Not Present
OPCODE(12, o_2_changeCardSwitch),
diff --git a/engines/mohawk/myst_scripts_selenitic.cpp b/engines/mohawk/myst_scripts_selenitic.cpp
index 3d0f83f6fe..54aaf30916 100644
--- a/engines/mohawk/myst_scripts_selenitic.cpp
+++ b/engines/mohawk/myst_scripts_selenitic.cpp
@@ -62,7 +62,7 @@ void MystScriptParser_Selenitic::setupOpcodes() {
OPCODE(6, o_6_changeCard),
OPCODE(7, o_6_changeCard),
OPCODE(8, o_6_changeCard),
- OPCODE(9, opcode_9),
+ OPCODE(9, o_9_triggerMovie),
OPCODE(10, o_10_toggleVarNoRedraw),
// TODO: Opcode 10 to 11 Not Present
OPCODE(12, o_2_changeCardSwitch),