aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorMatthew Hoops2011-02-20 00:45:59 -0500
committerMatthew Hoops2011-02-20 00:45:59 -0500
commit5091f846a78c82d619b41530ff670de04bc05387 (patch)
tree8071ff0e1f4029cdfdd1b20ecd994b183f6b9a90 /graphics
parent098581b3b5ec22f2e50075414f74f378ad24c2ae (diff)
downloadscummvm-rg350-5091f846a78c82d619b41530ff670de04bc05387.tar.gz
scummvm-rg350-5091f846a78c82d619b41530ff670de04bc05387.tar.bz2
scummvm-rg350-5091f846a78c82d619b41530ff670de04bc05387.zip
GRAPHICS: Switch PICT's palette from RGBA to RGB
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pict.cpp8
-rw-r--r--graphics/pict.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/graphics/pict.cpp b/graphics/pict.cpp
index 9079223237..ca4aac751d 100644
--- a/graphics/pict.cpp
+++ b/graphics/pict.cpp
@@ -127,7 +127,7 @@ Surface *PictDecoder::decodeImage(Common::SeekableReadStream *stream, byte *pale
// If we got a palette throughout this nonsense, go and grab it
if (palette && _isPaletted)
- memcpy(palette, _palette, 256 * 4);
+ memcpy(palette, _palette, 256 * 3);
return _outputSurface;
}
@@ -180,9 +180,9 @@ void PictDecoder::decodeDirectBitsRect(Common::SeekableReadStream *stream, bool
for (uint32 i = 0; i < colorCount; i++) {
stream->readUint16BE();
- _palette[i * 4] = stream->readUint16BE() >> 8;
- _palette[i * 4 + 1] = stream->readUint16BE() >> 8;
- _palette[i * 4 + 2] = stream->readUint16BE() >> 8;
+ _palette[i * 3] = stream->readUint16BE() >> 8;
+ _palette[i * 3 + 1] = stream->readUint16BE() >> 8;
+ _palette[i * 3 + 2] = stream->readUint16BE() >> 8;
}
}
diff --git a/graphics/pict.h b/graphics/pict.h
index e4bde8a466..a683a23bf6 100644
--- a/graphics/pict.h
+++ b/graphics/pict.h
@@ -70,7 +70,7 @@ private:
Common::Rect _imageRect;
PixelFormat _pixelFormat;
JPEG *_jpeg;
- byte _palette[256 * 4];
+ byte _palette[256 * 3];
bool _isPaletted;
Graphics::Surface *_outputSurface;