[Scummvm-cvs-logs] scummvm master -> adfa5e1b861c4b55720b497412e940cbb95a7afe

clone2727 clone2727 at gmail.com
Sun Mar 6 18:46:56 CET 2011


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:
adfa5e1b86 SCI: Fix Mac SCI1.1 view decompression


Commit: adfa5e1b861c4b55720b497412e940cbb95a7afe
    https://github.com/scummvm/scummvm/commit/adfa5e1b861c4b55720b497412e940cbb95a7afe
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-03-06T09:46:01-08:00

Commit Message:
SCI: Fix Mac SCI1.1 view decompression

A regression from d2ad7898d9

Changed paths:
    engines/sci/graphics/view.cpp



diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index 27fad19..a6c0805 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -456,23 +456,24 @@ void unpackCelData(byte *inBuffer, byte *celBitmap, byte clearColor, int pixelCo
 
 				pixelNr = pixelLine + width;
 			}
-		}
-		// decompression for data that has two separate streams (probably SCI 1.1 view)
-		while (pixelNr < pixelCount) {
-			curByte = *rlePtr++;
-			runLength = curByte & 0x3F;
-			switch (curByte & 0xC0) {
-			case 0: // copy bytes as-is
-				while (runLength-- && pixelNr < pixelCount)
-					outPtr[pixelNr++] = *literalPtr++;
-				break;
-			case 0x80: // fill with color
-				memset(outPtr + pixelNr, *literalPtr++, MIN<uint16>(runLength, pixelCount - pixelNr));
-				pixelNr += runLength;
-				break;
-			case 0xC0: // fill with transparent
-				pixelNr += runLength;
-				break;
+		} else {
+			// decompression for data that has two separate streams (probably SCI 1.1 view)
+			while (pixelNr < pixelCount) {
+				curByte = *rlePtr++;
+				runLength = curByte & 0x3F;
+				switch (curByte & 0xC0) {
+				case 0: // copy bytes as-is
+					while (runLength-- && pixelNr < pixelCount)
+						outPtr[pixelNr++] = *literalPtr++;
+					break;
+				case 0x80: // fill with color
+					memset(outPtr + pixelNr, *literalPtr++, MIN<uint16>(runLength, pixelCount - pixelNr));
+					pixelNr += runLength;
+					break;
+				case 0xC0: // fill with transparent
+					pixelNr += runLength;
+					break;
+				}
 			}
 		}
 	}






More information about the Scummvm-git-logs mailing list