aboutsummaryrefslogtreecommitdiff
path: root/engines/simon/res.cpp
diff options
context:
space:
mode:
authorTravis Howell2006-04-17 12:05:45 +0000
committerTravis Howell2006-04-17 12:05:45 +0000
commit82dfef4ce2c65dd3c345628eac19cfc3ccb4cbb9 (patch)
tree5ee3d78362721348b20a51f4f84c605010c9b494 /engines/simon/res.cpp
parent85158181cf9bd56b6c46c735182391ab3e692932 (diff)
downloadscummvm-rg350-82dfef4ce2c65dd3c345628eac19cfc3ccb4cbb9.tar.gz
scummvm-rg350-82dfef4ce2c65dd3c345628eac19cfc3ccb4cbb9.tar.bz2
scummvm-rg350-82dfef4ce2c65dd3c345628eac19cfc3ccb4cbb9.zip
Improve sound support in FF and add MoviePlayer class
svn-id: r21975
Diffstat (limited to 'engines/simon/res.cpp')
-rw-r--r--engines/simon/res.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/engines/simon/res.cpp b/engines/simon/res.cpp
index 8e72318400..f99e6c1fda 100644
--- a/engines/simon/res.cpp
+++ b/engines/simon/res.cpp
@@ -672,7 +672,9 @@ byte *SimonEngine::read_vga_from_datfile_2(uint id, uint type) {
}
}
-void SimonEngine::loadSound(uint sound, uint pan, uint vol, bool ambient) {
+void SimonEngine::loadSound(uint sound, uint pan, uint vol, uint type) {
+ byte *dst;
+
if (getFeatures() & GF_ZLIBCOMP) {
char filename[15];
@@ -688,13 +690,18 @@ void SimonEngine::loadSound(uint sound, uint pan, uint vol, bool ambient) {
else
sprintf(filename, "effects.wav");
- byte *dst = (byte *)malloc(dstSize);
+ dst = (byte *)malloc(dstSize);
decompressData(filename, dst, offset, srcSize, dstSize);
- _sound->playSoundData(dst, sound, pan, vol, ambient);
} else {
- int offs = READ_LE_UINT32(_curSfxFile + sound * 4);
- _sound->playSoundData(_curSfxFile + offs, sound, pan, vol, ambient);
+ dst = _curSfxFile + READ_LE_UINT32(_curSfxFile + sound * 4);
}
+
+ if (type == 3)
+ _sound->playSfx5Data(dst, sound, pan, vol);
+ else if (type == 2)
+ _sound->playAmbientData(dst, sound, pan, vol);
+ else
+ _sound->playSfxData(dst, sound, pan, vol);
}
void SimonEngine::loadVoice(uint speechId) {