aboutsummaryrefslogtreecommitdiff
path: root/engines/made/sound.cpp
diff options
context:
space:
mode:
authorBenjamin Haisch2009-01-22 13:04:29 +0000
committerBenjamin Haisch2009-01-22 13:04:29 +0000
commit5b8105afb3a345cfd66efa795726329f509572c3 (patch)
tree4ff90316c9dee6be8bda8a0c3f8413ab5d8178a5 /engines/made/sound.cpp
parentd5d7175691ea3cde7aa941886e3197763c1398c6 (diff)
downloadscummvm-rg350-5b8105afb3a345cfd66efa795726329f509572c3.tar.gz
scummvm-rg350-5b8105afb3a345cfd66efa795726329f509572c3.tar.bz2
scummvm-rg350-5b8105afb3a345cfd66efa795726329f509572c3.zip
- Added support for The Manhole EGA version
- Support for 'chunked' picture resources and EGA pictures - Improved the mouth sync in RtZ (still not perfect, though) - Removed obsolete TODOs - Fixed sfPlayMovie to return if the movie playback was aborted or not; this is used by RtZ to determine if it should display the credits screen after the intro movie svn-id: r35997
Diffstat (limited to 'engines/made/sound.cpp')
-rw-r--r--engines/made/sound.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/made/sound.cpp b/engines/made/sound.cpp
index 2ad1d98254..9c59232dd2 100644
--- a/engines/made/sound.cpp
+++ b/engines/made/sound.cpp
@@ -70,6 +70,8 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou
workSample = prevSample;
+ soundEnergyItem.position += chunkSize;
+
switch (type) {
case 0:
@@ -77,10 +79,6 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou
workSample = 0;
soundEnergyItem.energy = 0;
- // FIXME: I believe that this should be added in a different manner than the
- // rest of the values. 0 means "mouth shut", but it seems to be occuring too
- // often. Removing this bit makes the mouth of the lighthouse keeper move
- // without going too much off-sync. If I'm wrong here, please remove this.
if (soundEnergyArray)
soundEnergyArray->push_back(soundEnergyItem);
@@ -121,7 +119,7 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou
soundBuffer[i] = *source++;
workSample = soundBuffer[workChunkSize - 1] - 128;
- soundEnergyItem.energy = type - 1;
+ soundEnergyItem.energy = 4;
if (soundEnergyArray)
soundEnergyArray->push_back(soundEnergyItem);
@@ -155,7 +153,6 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou
prevSample = workSample;
memcpy(dest, soundBuffer, chunkSize);
dest += chunkSize;
- soundEnergyItem.position += chunkSize;
}