diff options
author | johndoe123 | 2014-04-17 12:57:56 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | d431d3521480d43fa646a5cd84c6a10d0d24843a (patch) | |
tree | ed559955060ebcfdeca99c837205933a1c163614 /engines/illusions/screen.cpp | |
parent | b94b4c28ba33b9c5edbd9ba8143284786a8dfeac (diff) | |
download | scummvm-rg350-d431d3521480d43fa646a5cd84c6a10d0d24843a.tar.gz scummvm-rg350-d431d3521480d43fa646a5cd84c6a10d0d24843a.tar.bz2 scummvm-rg350-d431d3521480d43fa646a5cd84c6a10d0d24843a.zip |
ILLUSIONS: BBDOU: Add microphone radar
Diffstat (limited to 'engines/illusions/screen.cpp')
-rw-r--r-- | engines/illusions/screen.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/illusions/screen.cpp b/engines/illusions/screen.cpp index cd5ca683df..076906e3a0 100644 --- a/engines/illusions/screen.cpp +++ b/engines/illusions/screen.cpp @@ -336,15 +336,17 @@ void Screen::drawSurface(Common::Rect &dstRect, Graphics::Surface *surface, Comm } void Screen::setPalette(byte *colors, uint start, uint count) { - byte *dstPal = &_mainPalette[3 * (start - 1)]; - for (uint i = 0; i < count; ++i) { - *dstPal++ = *colors++; - *dstPal++ = *colors++; - *dstPal++ = *colors++; - ++colors; + if (_backSurface->format.bytesPerPixel == 1) { + byte *dstPal = &_mainPalette[3 * (start - 1)]; + for (uint i = 0; i < count; ++i) { + *dstPal++ = *colors++; + *dstPal++ = *colors++; + *dstPal++ = *colors++; + ++colors; + } + buildColorTransTbl(); + _needRefreshPalette = true; } - buildColorTransTbl(); - _needRefreshPalette = true; } void Screen::setPaletteEntry(int16 index, byte r, byte g, byte b) { |