diff options
author | Benjamin Haisch | 2008-05-26 11:07:18 +0000 |
---|---|---|
committer | Benjamin Haisch | 2008-05-26 11:07:18 +0000 |
commit | 23da4c5fa24270622edca0fbdc1153fa1cc069f6 (patch) | |
tree | cc59444b1f0ab1412264ae982a7946d031e99010 /engines/made/resource.cpp | |
parent | dd6821cbcb3ed67086ce69e01ebf9d1274768ffd (diff) | |
download | scummvm-rg350-23da4c5fa24270622edca0fbdc1153fa1cc069f6.tar.gz scummvm-rg350-23da4c5fa24270622edca0fbdc1153fa1cc069f6.tar.bz2 scummvm-rg350-23da4c5fa24270622edca0fbdc1153fa1cc069f6.zip |
Fixed graphics decoding bug in Manhole: N&E
svn-id: r32281
Diffstat (limited to 'engines/made/resource.cpp')
-rw-r--r-- | engines/made/resource.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp index 8bda5e564b..2cae8b276c 100644 --- a/engines/made/resource.cpp +++ b/engines/made/resource.cpp @@ -59,9 +59,9 @@ void PictureResource::load(byte *source, int size) { Common::MemoryReadStream *sourceS = new Common::MemoryReadStream(source, size); _hasPalette = (sourceS->readByte() != 0); - sourceS->readByte(); - sourceS->readByte(); - sourceS->readByte(); + byte cmdFlags = sourceS->readByte(); + byte pixelFlags = sourceS->readByte(); + byte maskFlags = sourceS->readByte(); uint16 cmdOffs = sourceS->readUint16LE(); uint16 pixelOffs = sourceS->readUint16LE(); uint16 maskOffs = sourceS->readUint16LE(); @@ -69,7 +69,11 @@ void PictureResource::load(byte *source, int size) { /*uint16 u = */sourceS->readUint16LE(); uint16 width = sourceS->readUint16LE(); uint16 height = sourceS->readUint16LE(); - + + if (cmdFlags || pixelFlags || maskFlags) { + warning("PictureResource::load() Graphic has flags set"); + } + _paletteColorCount = (cmdOffs - 18) / 3; // 18 = sizeof header debug(2, "width = %d; height = %d\n", width, height); @@ -82,7 +86,7 @@ void PictureResource::load(byte *source, int size) { _picture = new Graphics::Surface(); _picture->create(width, height, 1); - decompressImage(source, *_picture, cmdOffs, pixelOffs, maskOffs, lineSize); + decompressImage(source, *_picture, cmdOffs, pixelOffs, maskOffs, lineSize, cmdFlags, pixelFlags, maskFlags); delete sourceS; @@ -137,7 +141,7 @@ void AnimationResource::load(byte *source, int size) { Graphics::Surface *frame = new Graphics::Surface(); frame->create(frameWidth, frameHeight, 1); - decompressImage(source + frameOffs, *frame, cmdOffs, pixelOffs, maskOffs, lineSize, _flags & 1); + decompressImage(source + frameOffs, *frame, cmdOffs, pixelOffs, maskOffs, lineSize, 0, 0, 0, _flags & 1); _frames.push_back(frame); |