aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorTravis Howell2009-02-15 13:54:53 +0000
committerTravis Howell2009-02-15 13:54:53 +0000
commit01625a01abc71fff54501d929bee5a6079bd3ee8 (patch)
treeca8d913b5c1b46778bcc956173c888dec56dd7ce /engines/agos
parent2ef26fcd4ac2902a83603d63671c37ef6fed0dbb (diff)
downloadscummvm-rg350-01625a01abc71fff54501d929bee5a6079bd3ee8.tar.gz
scummvm-rg350-01625a01abc71fff54501d929bee5a6079bd3ee8.tar.bz2
scummvm-rg350-01625a01abc71fff54501d929bee5a6079bd3ee8.zip
Fix offset error in clearVideoBackGround(), that could cause menu glitches after fighting in Elvira 1.
svn-id: r38238
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/vga.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index af876e9417..a42989e347 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -1120,7 +1120,7 @@ void AGOSEngine::vc34_setMouseOff() {
void AGOSEngine::clearVideoBackGround(uint16 num, uint16 color) {
const uint16 *vlut = &_videoWindows[num * 4];
- byte *dst = getBackGround() + vlut[0] * 16 + (vlut[1] * (vlut[2] * 16));
+ byte *dst = getBackGround() + vlut[0] * 16 + vlut[1] * _dxSurfacePitch;
for (uint h = 0; h < vlut[3]; h++) {
memset(dst, color, vlut[2] * 16);
@@ -1183,10 +1183,6 @@ void AGOSEngine::vc35_clearWindow() {
uint16 num = vcReadNextWord();
uint16 color = vcReadNextWord();
- // Clear video window
- clearVideoWindow(num, color);
- _vgaSpriteChanged++;
-
// Clear video background
if (getGameType() == GType_ELVIRA1) {
if (num == 2 || num == 6)
@@ -1199,7 +1195,10 @@ void AGOSEngine::vc35_clearWindow() {
return;
}
+ // Clear video window
+ clearVideoWindow(num, color);
clearVideoBackGround(num, color);
+ _vgaSpriteChanged++;
}
void AGOSEngine::vc36_setWindowImage() {