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 | |
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')
-rw-r--r-- | engines/sci/graphics/view.cpp | 10 | ||||
-rw-r--r-- | engines/sci/graphics/view.h | 2 |
2 files changed, 6 insertions, 6 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 diff --git a/engines/sci/graphics/view.h b/engines/sci/graphics/view.h index f4c1521614..4f84d6a2ef 100644 --- a/engines/sci/graphics/view.h +++ b/engines/sci/graphics/view.h @@ -72,7 +72,7 @@ public: private: void initData(GuiResourceId resourceId); - void unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint16 pixelCount); + void unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint32 pixelCount); void unditherBitmap(byte *bitmap, int16 width, int16 height, byte clearKey); ResourceManager *_resMan; |