diff options
author | Matthew Hoops | 2011-01-23 05:12:50 +0000 |
---|---|---|
committer | Matthew Hoops | 2011-01-23 05:12:50 +0000 |
commit | fd3188a6fcb370364a178b4b61841b9916bcc5b2 (patch) | |
tree | 77dedeb036ff41903e94928e60947341be7c2c61 | |
parent | c039b06c3c35c725e19fa5f8027747e402749d46 (diff) | |
download | scummvm-rg350-fd3188a6fcb370364a178b4b61841b9916bcc5b2.tar.gz scummvm-rg350-fd3188a6fcb370364a178b4b61841b9916bcc5b2.tar.bz2 scummvm-rg350-fd3188a6fcb370364a178b4b61841b9916bcc5b2.zip |
MOHAWK: Cleanup Riven opcode 12 (now known as stopSound())
svn-id: r55457
-rw-r--r-- | engines/mohawk/riven_scripts.cpp | 19 | ||||
-rw-r--r-- | engines/mohawk/riven_scripts.h | 2 |
2 files changed, 15 insertions, 6 deletions
diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp index d79e7479b4..7decf4d2df 100644 --- a/engines/mohawk/riven_scripts.cpp +++ b/engines/mohawk/riven_scripts.cpp @@ -107,7 +107,7 @@ void RivenScript::setupOpcodes() { OPCODE(disableHotspot), OPCODE(empty), // Empty // 0x0C (12 decimal) - OPCODE(clearSLST), + OPCODE(stopSound), OPCODE(changeCursor), OPCODE(delay), OPCODE(empty), // Empty @@ -392,10 +392,19 @@ void RivenScript::disableHotspot(uint16 op, uint16 argc, uint16 *argv) { } } -// Command 12: clear slst records (flags) -void RivenScript::clearSLST(uint16 op, uint16 argc, uint16 *argv) { - warning ("STUB: clearSLST: Fade Out = %s, Fade In = %s", ((argv[0] & 1) != 0) ? "Yes" : "No", ((argv[0] & 2) != 0) ? "Yes" : "No"); - //_vm->_sound->clearAllSLST(); +// Command 12: stop sounds (flags) +void RivenScript::stopSound(uint16 op, uint16 argc, uint16 *argv) { + // The argument is a bitflag for the setting. + // bit 0 is normal sound stopping (unused) + // bit 1 is ambient sound stopping + // Having no flags set means clear all + + // TODO: Enable this once empty SLST entries are properly handled + //if (argv[0] & 2 || argv[0] == 0) + // _vm->_sound->stopAllSLST(); + + if (argv[0] & 1) + warning("Unhandled stopSound() flag"); } // Command 13: set mouse cursor (cursor_id) diff --git a/engines/mohawk/riven_scripts.h b/engines/mohawk/riven_scripts.h index 072821aa94..89e5ff0836 100644 --- a/engines/mohawk/riven_scripts.h +++ b/engines/mohawk/riven_scripts.h @@ -96,7 +96,7 @@ private: DECLARE_OPCODE(mohawkSwitch); DECLARE_OPCODE(enableHotspot); DECLARE_OPCODE(disableHotspot); - DECLARE_OPCODE(clearSLST); + DECLARE_OPCODE(stopSound); DECLARE_OPCODE(changeCursor); DECLARE_OPCODE(delay); DECLARE_OPCODE(runExternalCommand); |