aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/view.cpp
diff options
context:
space:
mode:
authorDavid Turner2010-12-15 22:36:55 +0000
committerDavid Turner2010-12-15 22:36:55 +0000
commit58b72951934ecd9697c1c184a0f588a4aaa12fc1 (patch)
tree5e95264810de87896e00fa882e004e16c796f707 /engines/sci/graphics/view.cpp
parent76eb9d7f6430a3528ba0688e8c3f8519b23fb8a5 (diff)
downloadscummvm-rg350-58b72951934ecd9697c1c184a0f588a4aaa12fc1.tar.gz
scummvm-rg350-58b72951934ecd9697c1c184a0f588a4aaa12fc1.tar.bz2
scummvm-rg350-58b72951934ecd9697c1c184a0f588a4aaa12fc1.zip
SCI: Fixed View Cel RLE Decoding when RLE Code 0x40 is used (Corrects Bug #3135872 "LSL1VGA: "Pause Game" problem")
In the copy case, the runLength can be up to 127, not 64 i.e. the LSB of the RLE code forms part of the runLength. svn-id: r54924
Diffstat (limited to 'engines/sci/graphics/view.cpp')
-rw-r--r--engines/sci/graphics/view.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index 9513b11811..a25ae805d5 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -429,7 +429,9 @@ void GfxView::unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint32 pixelCou
pixel = *rlePtr++;
runLength = pixel & 0x3F;
switch (pixel & 0xC0) {
- case 0: // copy bytes as-is
+ case 0x40: // copy bytes as is (In copy case, runLength can go upto 127 i.e. pixel & 0x40)
+ runLength += 64;
+ case 0x00: // copy bytes as-is
while (runLength-- && pixelNo < pixelCount)
outPtr[pixelNo++] = *rlePtr++;
break;