[Scummvm-git-logs] scummvm master -> 637f4c5c00d03b1beeb969ca4eb65753e6d7806d
Strangerke
Strangerke at scummvm.org
Thu Apr 19 07:37:18 CEST 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
637f4c5c00 LILLIPUT: Fix second compression method in MUS extraction code
Commit: 637f4c5c00d03b1beeb969ca4eb65753e6d7806d
https://github.com/scummvm/scummvm/commit/637f4c5c00d03b1beeb969ca4eb65753e6d7806d
Author: Strangerke (strangerke at scummvm.org)
Date: 2018-04-19T07:33:29+02:00
Commit Message:
LILLIPUT: Fix second compression method in MUS extraction code
Changed paths:
engines/lilliput/sound.cpp
engines/lilliput/sound.h
diff --git a/engines/lilliput/sound.cpp b/engines/lilliput/sound.cpp
index 6ea5ab9..55624e7 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 e9f5a03..9d164a0 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);
More information about the Scummvm-git-logs
mailing list