diff options
author | Travis Howell | 2005-10-18 13:56:10 +0000 |
---|---|---|
committer | Travis Howell | 2005-10-18 13:56:10 +0000 |
commit | 0690343c656c6b5e9e517e230d9ab2fad98c9265 (patch) | |
tree | 65a229153c7e0d17b08f116a2555f11785189476 | |
parent | 62a59b2d46d2f92f3c6b3869ddbd4b4cf955bf56 (diff) | |
download | scummvm-rg350-0690343c656c6b5e9e517e230d9ab2fad98c9265.tar.gz scummvm-rg350-0690343c656c6b5e9e517e230d9ab2fad98c9265.tar.bz2 scummvm-rg350-0690343c656c6b5e9e517e230d9ab2fad98c9265.zip |
HE games use overlow to get correct color value.
Fixes regressions in activity and puttmoon.
svn-id: r19150
-rw-r--r-- | scumm/gfx.cpp | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 6d5abdce7a..b185c06138 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -1087,18 +1087,33 @@ void ScummEngine::drawBox(int x, int y, int x2, int y2, int color) { byte *mask = (byte *)_charset->_textSurface.pixels + _charset->_textSurface.pitch * (y - _screenTop) + x; fill(mask, _charset->_textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width, height); } + } else if (_heversion == 100) { + // Flags are used for different methods in HE games + int32 flags = color; + if (flags & 0x4000000) { + blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height); + } else if (flags & 0x2000000) { + blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height); + } else if (flags & 0x1000000) { + flags &= 0xFFFFFF; + fill(backbuff, vs->pitch, flags, width, height); + fill(bgbuff, vs->pitch, flags, width, height); + } else { + fill(backbuff, vs->pitch, flags, width, height); + } } else { - // Flags are used for different methods in HE71+ games - if ((color & 0x2000) || (color & 0x4000000)) { + // Flags are used for different methods in HE games + int16 flags = color; + if (flags & 0x2000) { blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height); - } else if ((color & 0x4000) || (color & 0x2000000)) { + } else if (flags & 0x4000) { blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height); - } else if ((color & 0x8000) || (color & 0x1000000)) { - color &= (_heversion == 100) ? 0xFFFFFF : 0x7FFF; - fill(backbuff, vs->pitch, color, width, height); - fill(bgbuff, vs->pitch, color, width, height); + } else if (flags & 0x8000) { + flags &= 0x7FFF; + fill(backbuff, vs->pitch, flags, width, height); + fill(bgbuff, vs->pitch, flags, width, height); } else { - fill(backbuff, vs->pitch, color, width, height); + fill(backbuff, vs->pitch, flags, width, height); } } } |