aboutsummaryrefslogtreecommitdiff
path: root/graphics/decoders/pict.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2012-09-09 17:20:07 -0400
committerMatthew Hoops2012-09-09 17:20:07 -0400
commited2be9d873cb69d2f06f38665342082e4ec157d0 (patch)
treeb34da680f7af7877d5f5c1bdd3a9b42865f62b6e /graphics/decoders/pict.cpp
parentafcc8ecddc35f59d9c999dc3904a6259a2126c7e (diff)
downloadscummvm-rg350-ed2be9d873cb69d2f06f38665342082e4ec157d0.tar.gz
scummvm-rg350-ed2be9d873cb69d2f06f38665342082e4ec157d0.tar.bz2
scummvm-rg350-ed2be9d873cb69d2f06f38665342082e4ec157d0.zip
GRAPHICS: Fix ImageDecoder inconsistency with getPalette()
Per LordHoto's suggestion
Diffstat (limited to 'graphics/decoders/pict.cpp')
-rw-r--r--graphics/decoders/pict.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/graphics/decoders/pict.cpp b/graphics/decoders/pict.cpp
index 7eddd3b893..9e619df208 100644
--- a/graphics/decoders/pict.cpp
+++ b/graphics/decoders/pict.cpp
@@ -292,12 +292,12 @@ struct PackBitsRectData {
uint16 mode;
};
-void PICTDecoder::unpackBitsRect(Common::SeekableReadStream &stream, bool hasPalette) {
+void PICTDecoder::unpackBitsRect(Common::SeekableReadStream &stream, bool withPalette) {
PackBitsRectData packBitsData;
- packBitsData.pixMap = readPixMap(stream, !hasPalette);
+ packBitsData.pixMap = readPixMap(stream, !withPalette);
// Read in the palette if there is one present
- if (hasPalette) {
+ if (withPalette) {
// See http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-267.html
stream.readUint32BE(); // seed
stream.readUint16BE(); // flags
@@ -469,10 +469,10 @@ void PICTDecoder::outputPixelBuffer(byte *&out, byte value, byte bitsPerPixel) {
}
}
-void PICTDecoder::skipBitsRect(Common::SeekableReadStream &stream, bool hasPalette) {
+void PICTDecoder::skipBitsRect(Common::SeekableReadStream &stream, bool withPalette) {
// Step through a PackBitsRect/DirectBitsRect function
- if (!hasPalette)
+ if (!withPalette)
stream.readUint32BE();
uint16 rowBytes = stream.readUint16BE();
@@ -492,7 +492,7 @@ void PICTDecoder::skipBitsRect(Common::SeekableReadStream &stream, bool hasPalet
stream.readUint16BE(); // pixelSize
stream.skip(16);
- if (hasPalette) {
+ if (withPalette) {
stream.readUint32BE();
stream.readUint16BE();
stream.skip((stream.readUint16BE() + 1) * 8);