diff options
author | Iskrich | 2016-05-20 23:33:55 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 08641d688dfb003af01a342a27a847f8cf75f192 (patch) | |
tree | a883150ab045a7c52a09a1c7ae77582bfb1f740a /engines | |
parent | 9ed9a601165977780c45a562f38f36787918fe6d (diff) | |
download | scummvm-rg350-08641d688dfb003af01a342a27a847f8cf75f192.tar.gz scummvm-rg350-08641d688dfb003af01a342a27a847f8cf75f192.tar.bz2 scummvm-rg350-08641d688dfb003af01a342a27a847f8cf75f192.zip |
DIRECTOR: FIX load palette
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/dib.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/engines/director/dib.cpp b/engines/director/dib.cpp index b59d688788..733d666ab2 100644 --- a/engines/director/dib.cpp +++ b/engines/director/dib.cpp @@ -59,24 +59,20 @@ void DIBDecoder::destroy() { } void DIBDecoder::loadPalette(Common::SeekableReadStream &stream) { - _palette = new byte[768]; uint16 steps = stream.size()/6; uint16 index = (steps * 3) - 1; + _palette = new byte[index]; for (uint8 i = 0; i < steps; i++) { - _palette[index--] = stream.readByte(); + _palette[index - 2] = stream.readByte(); stream.readByte(); - _palette[index--] = stream.readByte(); + _palette[index - 1] = stream.readByte(); stream.readByte(); - _palette[index--] = stream.readByte(); + _palette[index] = stream.readByte(); stream.readByte(); - } - - index = (steps * 3) - 1; - while (index < 768) { - _palette[index++] = 0; + index -= 3; } } |