diff options
author | Joseph-Eugene Winzer | 2017-06-12 11:20:11 +0200 |
---|---|---|
committer | Thierry Crozat | 2018-01-22 21:16:37 +0000 |
commit | bd48a32c5a2d9af74f30e58f3defb9ca4e789c25 (patch) | |
tree | 04a8be58c04aa692aa834a0de738d0b31721af50 /engines | |
parent | 8e55efa748c1d3d73b261b53b9feadcc5384801d (diff) | |
download | scummvm-rg350-bd48a32c5a2d9af74f30e58f3defb9ca4e789c25.tar.gz scummvm-rg350-bd48a32c5a2d9af74f30e58f3defb9ca4e789c25.tar.bz2 scummvm-rg350-bd48a32c5a2d9af74f30e58f3defb9ca4e789c25.zip |
SUPERNOVA: Convert 18bit VGA to 24bit CLUT8
Colors on VGA are 6bit per color channel, that is why the colors
were so dark in earlier commits. Shifting the colors left by 2 gives us
an approximated value for CLUT8.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/supernova/graphics.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/engines/supernova/graphics.cpp b/engines/supernova/graphics.cpp index 225e2e72f2..3ab1c44d65 100644 --- a/engines/supernova/graphics.cpp +++ b/engines/supernova/graphics.cpp @@ -36,19 +36,15 @@ bool MSNImageDecoder::loadStream(Common::SeekableReadStream &stream) { byte flag = stream.readByte(); if (flag == 0) { pal_diff = 0; - _palette[141] = 0x38; - _palette[142] = 0x38; - _palette[143] = 0x38; + _palette[141] = 0xE0; + _palette[142] = 0xE0; + _palette[143] = 0xE0; } else { pal_diff = 1; for (int i = flag * 3; i != 0; --i) { - _palette[717 - i] = stream.readByte(); + _palette[717 - i] = stream.readByte() << 2; } } - // 18bit VGA to 24bit CLUT8 - for (size_t i = 0; i < 717; ++i) { - _palette[i] <<= 2; - } byte numSections = stream.readByte(); for (size_t i = 0; i < kMaxSections; ++i) { |