aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2007-03-23 03:06:10 +0000
committerTravis Howell2007-03-23 03:06:10 +0000
commit32c7ee77488c8c6ff6dd2badb5af1eb321313e02 (patch)
treec4b6c7076bd528a8510f851b41a260f558cc078d /engines
parent5057c1b5c845a9cc4620ee82e609074eea3d4c8a (diff)
downloadscummvm-rg350-32c7ee77488c8c6ff6dd2badb5af1eb321313e02.tar.gz
scummvm-rg350-32c7ee77488c8c6ff6dd2badb5af1eb321313e02.tar.bz2
scummvm-rg350-32c7ee77488c8c6ff6dd2badb5af1eb321313e02.zip
Fix bug #1684010 - SPYFOX1: Background buffer not been cleared.
svn-id: r26280
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/gfx.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 0f40c287dd..914229cd23 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -1099,23 +1099,23 @@ void ScummEngine::drawBox(int x, int y, int x2, int y2, int color) {
byte *mask = (byte *)_textSurface.getBasePtr(x, y - _screenTop);
fill(mask, _textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width, height);
}
- } else if (_game.heversion == 100) {
+ } else if (_game.heversion >= 71) {
// Flags are used for different methods in HE games
- int32 flags = color;
- if (flags & 0x4000000) {
+ uint32 flags = color;
+ if ((flags & 0x2000) || (flags & 0x4000000)) {
blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height);
- } else if (flags & 0x2000000) {
+ } else if ((flags & 0x4000) || (flags & 0x2000000)) {
blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height);
- } else if (flags & 0x1000000) {
- flags &= 0xFFFFFF;
+ } else if ((flags & 0x8000) || (flags & 0x1000000)) {
+ flags &= (flags & 0x1000000) ? 0xFFFFFF : 0x7FFF;
fill(backbuff, vs->pitch, flags, width, height);
fill(bgbuff, vs->pitch, flags, width, height);
} else {
fill(backbuff, vs->pitch, flags, width, height);
}
- } else {
+ } else if (_game.version >= 60) {
// Flags are used for different methods in HE games
- int16 flags = color;
+ uint16 flags = color;
if (flags & 0x2000) {
blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height);
} else if (flags & 0x4000) {
@@ -1127,6 +1127,8 @@ void ScummEngine::drawBox(int x, int y, int x2, int y2, int color) {
} else {
fill(backbuff, vs->pitch, flags, width, height);
}
+ } else {
+ fill(backbuff, vs->pitch, color, width, height);
}
}