diff options
author | Eugene Sandulenko | 2016-06-16 15:31:46 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 7607ba926ce5d31bb877e8f4ca6fdceac7f492a4 (patch) | |
tree | a95edbeaf19ed5612933c3d3bb03f3a83d7bbd6f /engines/director/dib.cpp | |
parent | 4b56951d3038836c32d8a1a0db3da856a720f1fc (diff) | |
download | scummvm-rg350-7607ba926ce5d31bb877e8f4ca6fdceac7f492a4.tar.gz scummvm-rg350-7607ba926ce5d31bb877e8f4ca6fdceac7f492a4.tar.bz2 scummvm-rg350-7607ba926ce5d31bb877e8f4ca6fdceac7f492a4.zip |
DIRECTOR: Whitespace fixes
Diffstat (limited to 'engines/director/dib.cpp')
-rw-r--r-- | engines/director/dib.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/director/dib.cpp b/engines/director/dib.cpp index 912f083569..8c54ba5363 100644 --- a/engines/director/dib.cpp +++ b/engines/director/dib.cpp @@ -59,10 +59,11 @@ void DIBDecoder::destroy() { } void DIBDecoder::loadPalette(Common::SeekableReadStream &stream) { - uint16 steps = stream.size()/6; + uint16 steps = stream.size() / 6; uint16 index = (steps * 3) - 1; _paletteColorCount = steps; _palette = new byte[index]; + for (uint8 i = 0; i < steps; i++) { _palette[index - 2] = stream.readByte(); stream.readByte(); @@ -98,9 +99,12 @@ bool DIBDecoder::loadStream(Common::SeekableReadStream &stream) { Common::SeekableSubReadStream subStream(&stream, 40, stream.size()); _codec = Image::createBitmapCodec(compression, width, height, bitsPerPixel); + if (!_codec) return false; + _surface = _codec->decodeFrame(subStream); + return true; } |