diff options
author | Bastien Bouclet | 2011-02-13 16:57:32 +0100 |
---|---|---|
committer | Bastien Bouclet | 2011-02-15 21:43:35 +0100 |
commit | a76badf30746aea70745f0bf5bb87d44df2d9116 (patch) | |
tree | 410835fc29627c9c13c644f140506893c9986662 /engines | |
parent | 2d094af90c41e2c57f451b687490e95344e7ef74 (diff) | |
download | scummvm-rg350-a76badf30746aea70745f0bf5bb87d44df2d9116.tar.gz scummvm-rg350-a76badf30746aea70745f0bf5bb87d44df2d9116.tar.bz2 scummvm-rg350-a76badf30746aea70745f0bf5bb87d44df2d9116.zip |
MOHAWK: Implement Mechanical opcode 100
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mohawk/myst_stacks/mechanical.cpp | 11 | ||||
-rw-r--r-- | engines/mohawk/myst_stacks/mechanical.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/engines/mohawk/myst_stacks/mechanical.cpp b/engines/mohawk/myst_stacks/mechanical.cpp index 0ab1b8df86..46aade250d 100644 --- a/engines/mohawk/myst_stacks/mechanical.cpp +++ b/engines/mohawk/myst_stacks/mechanical.cpp @@ -50,6 +50,7 @@ MystScriptParser_Mechanical::~MystScriptParser_Mechanical() { void MystScriptParser_Mechanical::setupOpcodes() { // "Stack-Specific" Opcodes + OPCODE(100, o_throneEnablePassage); OPCODE(104, opcode_104); OPCODE(105, o_fortressStaircaseMovie); OPCODE(121, opcode_121); @@ -170,6 +171,10 @@ uint16 MystScriptParser_Mechanical::getVar(uint16 var) { void MystScriptParser_Mechanical::toggleVar(uint16 var) { switch(var) { + case 0: // Sirrus's Secret Panel State + _state.sirrusPanelState ^= 1; + case 1: // Achenar's Secret Panel State + _state.achenarPanelState ^= 1; case 3: // Achenar's Secret Room Crate State _state.achenarCrateOpened ^= 1; case 4: // Myst Book Room Staircase State @@ -216,6 +221,12 @@ bool MystScriptParser_Mechanical::setVarValue(uint16 var, uint16 value) { return refresh; } +void MystScriptParser_Mechanical::o_throneEnablePassage(uint16 op, uint16 var, uint16 argc, uint16 *argv) { + debugC(kDebugScript, "Opcode %d: Enable throne passage", op); + + _vm->_resources[argv[0]]->setEnabled(getVar(var)); +} + void MystScriptParser_Mechanical::opcode_104(uint16 op, uint16 var, uint16 argc, uint16 *argv) { varUnusedCheck(op, var); diff --git a/engines/mohawk/myst_stacks/mechanical.h b/engines/mohawk/myst_stacks/mechanical.h index 7015c1b9c1..346699b425 100644 --- a/engines/mohawk/myst_stacks/mechanical.h +++ b/engines/mohawk/myst_stacks/mechanical.h @@ -66,6 +66,7 @@ private: void opcode_209_run(); void opcode_209_disable(); + DECLARE_OPCODE(o_throneEnablePassage); DECLARE_OPCODE(opcode_104); DECLARE_OPCODE(o_fortressStaircaseMovie); DECLARE_OPCODE(opcode_121); |