DIRECTOR: skip compression in BITD decoder for D3

This commit is contained in:
ysj1173886760 2021-08-03 15:13:30 +08:00
parent 480fd72c2a
commit 5c23fcdcb5

View File

@ -184,7 +184,7 @@ bool BITDDecoder::loadStream(Common::SeekableReadStream &stream) {
// If the stream has exactly the required number of bits for this image,
// we assume it is uncompressed.
// logic above does not fit the situation when _bitsPerPixel == 1, need to fix.
if ((stream.size() == _pitch * _surface->h * _bitsPerPixel / 8) || (_bitsPerPixel != 1 && _version < kFileVer300 && stream.size() >= _surface->h * _surface->w * _bitsPerPixel / 8)) {
if ((stream.size() == _pitch * _surface->h * _bitsPerPixel / 8) || (_bitsPerPixel != 1 && _version < kFileVer400 && stream.size() >= _surface->h * _surface->w * _bitsPerPixel / 8)) {
debugC(6, kDebugImages, "Skipping compression");
for (int i = 0; i < stream.size(); i++) {
pixels.push_back((int)stream.readByte());