aboutsummaryrefslogtreecommitdiff
path: root/saga/sfuncs.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2005-01-17 18:49:00 +0000
committerEugene Sandulenko2005-01-17 18:49:00 +0000
commit5200b8f1fa8df767cc74bc7df0f2429a6d984624 (patch)
tree3b92b21dcd8a1daa8fa73df24017896b39ed1c05 /saga/sfuncs.cpp
parent32117397288624adb700dfdb6c6e71bbc5993cc5 (diff)
downloadscummvm-rg350-5200b8f1fa8df767cc74bc7df0f2429a6d984624.tar.gz
scummvm-rg350-5200b8f1fa8df767cc74bc7df0f2429a6d984624.tar.bz2
scummvm-rg350-5200b8f1fa8df767cc74bc7df0f2429a6d984624.zip
o Proper implementation of sfPlaySound() which knows about CD<->floppy
difference o Fix regression in Mac titles where scene LUT wasn't conversed o Fix sound types in many games. Old Win demo is still wrong. svn-id: r16586
Diffstat (limited to 'saga/sfuncs.cpp')
-rw-r--r--saga/sfuncs.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp
index 31ae5fd28e..c951692e51 100644
--- a/saga/sfuncs.cpp
+++ b/saga/sfuncs.cpp
@@ -1453,12 +1453,18 @@ static struct {
// Script function #70 (0x46)
int Script::sfPlaySound(SCRIPTFUNC_PARAMS) {
- ScriptDataWord param = thread->pop() - 13;
+ int param = getSWord(thread->pop());
+ int res;
- if (/* param >= 0 && */ param < ARRAYSIZE(sfxTable))
- _vm->_sndRes->playSound(sfxTable[param].res, sfxTable[param].vol, false);
- else
+ if (param < ARRAYSIZE(sfxTable)) {
+ res = sfxTable[param].res;
+ if (_vm->getFeatures() & GF_CD_FX)
+ res -= 14;
+
+ _vm->_sndRes->playSound(res, sfxTable[param].vol, false);
+ } else {
_vm->_sound->stopSound();
+ }
return SUCCESS;
}