diff options
author | Travis Howell | 2005-05-22 10:38:57 +0000 |
---|---|---|
committer | Travis Howell | 2005-05-22 10:38:57 +0000 |
commit | 7dc115be6f9182c7f82396cab576647bf9d63f5c (patch) | |
tree | d40362d6f6874d41b638ad46d9bc5cfb82ff6eaa /scumm/gfx.cpp | |
parent | 76f8021a2895cc4ae9edb9edbc3678ebaff25e7e (diff) | |
download | scummvm-rg350-7dc115be6f9182c7f82396cab576647bf9d63f5c.tar.gz scummvm-rg350-7dc115be6f9182c7f82396cab576647bf9d63f5c.tar.bz2 scummvm-rg350-7dc115be6f9182c7f82396cab576647bf9d63f5c.zip |
HE70+ games use flags in drawBox().
Fixes glitches in farmdemo (Old version), freddi2, lost/smaller.
svn-id: r18216
Diffstat (limited to 'scumm/gfx.cpp')
-rw-r--r-- | scumm/gfx.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 7902031879..5af4705cf8 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -1049,18 +1049,27 @@ void ScummEngine::drawBox(int x, int y, int x2, int y2, int color) { markRectAsDirty(vs->number, x, x2, y, y2); backbuff = vs->getPixels(x, y); + bgbuff = vs->getBackPixels(x, y); if (color == -1) { if (vs->number != kMainVirtScreen) error("can only copy bg to main window"); - bgbuff = vs->getBackPixels(x, y); blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height); if (_charset->_hasMask) { byte *mask = (byte *)_charset->_textSurface.pixels + _charset->_textSurface.pitch * (y - _screenTop) + x; fill(mask, _charset->_textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width, height); } } else { - fill(backbuff, vs->pitch, color, width, height); + // Flags are used for different methods in HE70+ games + if ((color & 0x2000) || (color & 0x4000)) { + error("drawBox: unsupported flag 0x%x", color); + } else if (color & 0x8000) { + color &= 0x7FFF; + fill(backbuff, vs->pitch, color, width, height); + fill(bgbuff, vs->pitch, color, width, height); + } else { + fill(backbuff, vs->pitch, color, width, height); + } } } |