diff options
author | Martin Kiewitz | 2010-02-04 11:54:48 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-02-04 11:54:48 +0000 |
commit | a79330e6d8003aa07d0a77b45ed70fc31f53308a (patch) | |
tree | 9b03ec48a62b23ec3c1b50d4300145a6db0ad8ab /engines/sci/graphics/view.cpp | |
parent | 170c4c5c11e80f076483ab5374e42b5d04c5a018 (diff) | |
download | scummvm-rg350-a79330e6d8003aa07d0a77b45ed70fc31f53308a.tar.gz scummvm-rg350-a79330e6d8003aa07d0a77b45ed70fc31f53308a.tar.bz2 scummvm-rg350-a79330e6d8003aa07d0a77b45ed70fc31f53308a.zip |
SCI: fix support for cels that are larger than 64k (sierra logo animation in sq6)
svn-id: r47873
Diffstat (limited to 'engines/sci/graphics/view.cpp')
-rw-r--r-- | engines/sci/graphics/view.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index 4080af821d..90f708e5c5 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -284,11 +284,11 @@ void View::getCelScaledRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z } } -void View::unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint16 pixelCount) { +void View::unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint32 pixelCount) { CelInfo *celInfo = getCelInfo(loopNo, celNo); byte *rlePtr; byte *literalPtr; - uint16 pixelNo = 0, runLength; + uint32 pixelNo = 0, runLength; byte pixel; if (celInfo->offsetEGA) { @@ -297,7 +297,7 @@ void View::unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint16 pixelCount) while (pixelNo < pixelCount) { pixel = *literalPtr++; runLength = pixel >> 4; - memset(outPtr + pixelNo, pixel & 0x0F, MIN<uint16>(runLength, pixelCount - pixelNo)); + memset(outPtr + pixelNo, pixel & 0x0F, MIN<uint32>(runLength, pixelCount - pixelNo)); pixelNo += runLength; } return; @@ -332,7 +332,7 @@ void View::unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint16 pixelCount) outPtr[pixelNo++] = *rlePtr++; break; case 0x80: // fill with color - memset(outPtr + pixelNo, *rlePtr++, MIN<uint16>(runLength, pixelCount - pixelNo)); + memset(outPtr + pixelNo, *rlePtr++, MIN<uint32>(runLength, pixelCount - pixelNo)); pixelNo += runLength; break; case 0xC0: // fill with transparent @@ -355,7 +355,7 @@ void View::unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint16 pixelCount) outPtr[pixelNo++] = *literalPtr++; break; case 0x80: // fill with color - memset(outPtr + pixelNo, *literalPtr++, MIN<uint16>(runLength, pixelCount - pixelNo)); + memset(outPtr + pixelNo, *literalPtr++, MIN<uint32>(runLength, pixelCount - pixelNo)); pixelNo += runLength; break; case 0xC0: // fill with transparent |