aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-07-22 19:07:56 +0200
committeruruk2014-07-22 19:07:56 +0200
commit848b2650e9427739b79e8b8c6c46f0501d6c3f18 (patch)
tree7d25b54e47f6f606fc757dc46d45555d13be0cfb
parentaa6b4601d766f775e97c1b38332948a2a6a2c3e0 (diff)
downloadscummvm-rg350-848b2650e9427739b79e8b8c6c46f0501d6c3f18.tar.gz
scummvm-rg350-848b2650e9427739b79e8b8c6c46f0501d6c3f18.tar.bz2
scummvm-rg350-848b2650e9427739b79e8b8c6c46f0501d6c3f18.zip
CGE2: Unstub CommandHandler::runCommand().
-rw-r--r--engines/cge2/snail.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp
index 9dce4dbbc8..f6c6e2d71f 100644
--- a/engines/cge2/snail.cpp
+++ b/engines/cge2/snail.cpp
@@ -72,7 +72,13 @@ void CommandHandler::runCommand() {
return;
else {
++_vm->_soundStat._ref[0];
- warning("STUB: CommandHandler::runCommand() - Sound code missing!");
+ if (_vm->_fx->exist(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0])) {
+ int16 oldRepeat = _vm->_sound->getRepeat();
+ _vm->_sound->setRepeat(1);
+ _vm->_sound->play(_vm->_fx->load(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0]), _vm->_sound->_smpinf._span);
+ _vm->_sound->setRepeat(oldRepeat);
+ return;
+ }
_vm->_soundStat._wait = nullptr;
}
}