From 58b72951934ecd9697c1c184a0f588a4aaa12fc1 Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 15 Dec 2010 22:36:55 +0000 Subject: 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 --- engines/sci/graphics/view.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/sci/graphics/view.cpp') 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; -- cgit v1.2.3