aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/lilliput/sound.cpp6
-rw-r--r--engines/lilliput/sound.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/lilliput/sound.cpp b/engines/lilliput/sound.cpp
index 6ea5ab985a..55624e74b1 100644
--- a/engines/lilliput/sound.cpp
+++ b/engines/lilliput/sound.cpp
@@ -46,8 +46,8 @@ byte LilliputSound::readByte(const byte *data, uint32 offset) {
return data[1 + (offset & 1) + (al << 1)];
}
-uint32 LilliputSound::decode(const byte *src, byte *dst, uint32 len) {
- uint32 i = 0;
+uint32 LilliputSound::decode(const byte *src, byte *dst, uint32 len, uint32 start) {
+ uint32 i = start;
for (; i < len; ++i) {
*dst++ = readByte(src, i);
}
@@ -82,7 +82,7 @@ void LilliputSound::loadMusic(Common::String filename) {
int shift = (srcBuf[0] == 'c') ? 1 : 0;
_unpackedSizes[i] = (1 + packedSize - 0x201) * 2 - shift;
byte *dstBuf = new byte[_unpackedSizes[i]];
- decode(srcBuf + shift, dstBuf, _unpackedSizes[i]);
+ decode(srcBuf, dstBuf, _unpackedSizes[i], shift);
_unpackedFiles[i] = dstBuf;
} else {
_unpackedSizes[i] = packedSize;
diff --git a/engines/lilliput/sound.h b/engines/lilliput/sound.h
index e9f5a0367b..9d164a0b80 100644
--- a/engines/lilliput/sound.h
+++ b/engines/lilliput/sound.h
@@ -47,7 +47,7 @@ private:
byte **_unpackedFiles;
uint16 *_unpackedSizes;
- uint32 decode(const byte *src, byte *dst, uint32 len);
+ uint32 decode(const byte *src, byte *dst, uint32 len, uint32 start);
byte readByte(const byte *data, uint32 offset);
void loadMusic(Common::String filename);