aboutsummaryrefslogtreecommitdiff
path: root/graphics/decoders/tga.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2012-10-31 09:34:38 +1100
committerPaul Gilbert2012-10-31 09:34:38 +1100
commit798ddfaab500bb212f620cf095328eee5eb140a4 (patch)
tree55b5d0b90affd88063c04b7ff62fea1616b83e80 /graphics/decoders/tga.cpp
parentef663f95a516d8fe47a245653d418c047361281a (diff)
parentfdc80fd952120ecb8a4941edd4c2e404cdc5fa33 (diff)
downloadscummvm-rg350-798ddfaab500bb212f620cf095328eee5eb140a4.tar.gz
scummvm-rg350-798ddfaab500bb212f620cf095328eee5eb140a4.tar.bz2
scummvm-rg350-798ddfaab500bb212f620cf095328eee5eb140a4.zip
Merge branch 'master' into hopkins
Diffstat (limited to 'graphics/decoders/tga.cpp')
-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..c3b9d84055 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, /* attributeBits */ 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);