aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-09-15 17:57:08 +0200
committerEinar Johan Trøan Sømåen2012-09-15 17:57:08 +0200
commitcffda7710c7c0ba720797dbb025048e21e821708 (patch)
tree57242be5d1e055108255abd291526d7bd897a211 /graphics
parenta843df23b2719952b7ecec63c47df0fe9d1f5c11 (diff)
downloadscummvm-rg350-cffda7710c7c0ba720797dbb025048e21e821708.tar.gz
scummvm-rg350-cffda7710c7c0ba720797dbb025048e21e821708.tar.bz2
scummvm-rg350-cffda7710c7c0ba720797dbb025048e21e821708.zip
GRAPHICS: Force alphaBits to 8 for 32bpp TGAs for now
Diffstat (limited to 'graphics')
-rw-r--r--graphics/decoders/tga.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/decoders/tga.cpp b/graphics/decoders/tga.cpp
index 0b2318e127..0c07770d75 100644
--- a/graphics/decoders/tga.cpp
+++ b/graphics/decoders/tga.cpp
@@ -145,7 +145,10 @@ bool TGADecoder::readHeader(Common::SeekableReadStream &tga, byte &imageType, by
if (pixelDepth == 24) {
_format = PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0);
} else if (pixelDepth == 32) {
- _format = PixelFormat(4, 8, 8, 8, attributeBits, 16, 8, 0, 24);
+ // HACK: According to the spec, attributeBits should determine the amount
+ // of alpha-bits, however, as the game files that use this decoder seems
+ // to ignore that fact, we force the amount to 8 for 32bpp files for now.
+ _format = PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24);
} else if (pixelDepth == 16 && imageType == TYPE_TRUECOLOR) {
// 16bpp TGA is ARGB1555
_format = PixelFormat(2, 5, 5, 5, attributeBits, 10, 5, 0, 15);