aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_scripts.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-01-23 05:12:50 +0000
committerMatthew Hoops2011-01-23 05:12:50 +0000
commitfd3188a6fcb370364a178b4b61841b9916bcc5b2 (patch)
tree77dedeb036ff41903e94928e60947341be7c2c61 /engines/mohawk/riven_scripts.cpp
parentc039b06c3c35c725e19fa5f8027747e402749d46 (diff)
downloadscummvm-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
Diffstat (limited to 'engines/mohawk/riven_scripts.cpp')
-rw-r--r--engines/mohawk/riven_scripts.cpp19
1 files changed, 14 insertions, 5 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)