aboutsummaryrefslogtreecommitdiff
path: root/engines/dm/gfx.cpp
diff options
context:
space:
mode:
authorBendegúz Nagy2016-06-25 13:51:17 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commitd893075343c8b27a6f20eab436fea6aa6b02d800 (patch)
tree1695e1e5fc5bc5bcf17114f653fb01455331d50d /engines/dm/gfx.cpp
parent9c544a44f22cdf15662f90d0cdffe5770a77ce4c (diff)
downloadscummvm-rg350-d893075343c8b27a6f20eab436fea6aa6b02d800.tar.gz
scummvm-rg350-d893075343c8b27a6f20eab436fea6aa6b02d800.tar.bz2
scummvm-rg350-d893075343c8b27a6f20eab436fea6aa6b02d800.zip
DM: Fix unused viewport in DisplayMan::clearScreenBox
Diffstat (limited to 'engines/dm/gfx.cpp')
-rw-r--r--engines/dm/gfx.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index f5d58838fa..f1a93a1c5f 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -1578,8 +1578,8 @@ byte* DisplayMan::getBitmap(uint16 index) {
void DisplayMan::clearScreenBox(Color color, Box &box, Viewport &viewport) {
uint16 width = box._x2 - box._x1;
- for (int y = box._y1; y < box._y2; ++y)
- memset(_vgaBuffer + y * _screenWidth + box._x1, color, sizeof(byte) * width);
+ for (int y = box._y1 + viewport._posY; y < box._y2 + viewport._posY; ++y)
+ memset(_vgaBuffer + y * _screenWidth + box._x1 + viewport._posX, color, sizeof(byte) * width);
}
void DisplayMan::blitToScreen(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY,