[Scummvm-cvs-logs] scummvm master -> 7759f47607ac9e24295ced6383943692568ec038
clone2727
clone2727 at gmail.com
Mon Sep 17 18:37:02 CEST 2012
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7759f47607 GRAPHICS: Fix BMP palette color count with bpp != 8
Commit: 7759f47607ac9e24295ced6383943692568ec038
https://github.com/scummvm/scummvm/commit/7759f47607ac9e24295ced6383943692568ec038
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2012-09-17T09:35:17-07:00
Commit Message:
GRAPHICS: Fix BMP palette color count with bpp != 8
Changed paths:
graphics/decoders/bmp.cpp
diff --git a/graphics/decoders/bmp.cpp b/graphics/decoders/bmp.cpp
index f15d4e2..0d21656 100644
--- a/graphics/decoders/bmp.cpp
+++ b/graphics/decoders/bmp.cpp
@@ -100,10 +100,10 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {
_paletteColorCount = stream.readUint32LE();
/* uint32 colorsImportant = */ stream.readUint32LE();
- if (_paletteColorCount == 0)
- _paletteColorCount = 256;
-
if (bitsPerPixel == 8) {
+ if (_paletteColorCount == 0)
+ _paletteColorCount = 256;
+
// Read the palette
_palette = new byte[_paletteColorCount * 3];
for (uint16 i = 0; i < _paletteColorCount; i++) {
More information about the Scummvm-git-logs
mailing list