mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-30 21:00:39 +00:00
IMAGE: Load BMPs with any v1-v5 header
This commit is contained in:
parent
236be25624
commit
75b8735b57
@ -78,8 +78,8 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {
|
||||
}
|
||||
|
||||
uint32 infoSize = stream.readUint32LE();
|
||||
if (infoSize != 40 && infoSize != 108) {
|
||||
warning("Only Windows v3 & v4 bitmaps are supported");
|
||||
if (infoSize != 40 && infoSize != 52 && infoSize != 56 && infoSize != 108 && infoSize != 124) {
|
||||
warning("Only Windows v1-v5 bitmaps are supported, unknown header: %d", infoSize);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -109,6 +109,8 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {
|
||||
_paletteColorCount = stream.readUint32LE();
|
||||
/* uint32 colorsImportant = */ stream.readUint32LE();
|
||||
|
||||
stream.seek(infoSize - 40, SEEK_CUR);
|
||||
|
||||
if (bitsPerPixel == 4 || bitsPerPixel == 8) {
|
||||
if (_paletteColorCount == 0)
|
||||
_paletteColorCount = bitsPerPixel == 8 ? 256 : 16;
|
||||
|
Loading…
Reference in New Issue
Block a user