aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorFabio Battaglia2009-08-11 10:28:15 +0000
committerFabio Battaglia2009-08-11 10:28:15 +0000
commit194e3d674df29bac8c5da912b55f6ba321d8efae (patch)
tree78150ad2d768c8023a11943e6ccf12c3815b6373 /engines/scumm
parent6dc55b5f810f813bcaa43278a25c99f51b493432 (diff)
downloadscummvm-rg350-194e3d674df29bac8c5da912b55f6ba321d8efae.tar.gz
scummvm-rg350-194e3d674df29bac8c5da912b55f6ba321d8efae.tar.bz2
scummvm-rg350-194e3d674df29bac8c5da912b55f6ba321d8efae.zip
Maniac Mansion NES: added workaround to fix dirty screen when loading a narrow room from a full width room
svn-id: r43264
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/gfx.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 18cba0ab4a..be36069dd7 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -671,6 +671,16 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
width -= 16;
if (width <= 0)
return;
+
+ // HACK: In this way we won't get a screen with dirty side strips when
+ // loading a narrow room in a full screen room.
+ if(width == 224 && height == 240 && x == 16) {
+ char blackbuf[16 * 240];
+ memset(blackbuf, 0, 16*240); // Prepare a buffer 16px wide and 240px high, to fit on a lateral strip
+
+ width = 240; // Fix right strip
+ _system->copyRectToScreen((const byte *)blackbuf, 16, 0, 0, 16, 240); // Fix left strip
+ }
}
}