diff options
author | Max Horn | 2004-01-08 03:10:16 +0000 |
---|---|---|
committer | Max Horn | 2004-01-08 03:10:16 +0000 |
commit | d852e2855a837c0c686ad9cbe0810577e0c2ff6a (patch) | |
tree | b3bf956e21e8b3b229959a3e8c33d22fc18feb3f /scumm/gfx.cpp | |
parent | 619e6b43c4afe433a9f81e1de948ff4eb40fe020 (diff) | |
download | scummvm-rg350-d852e2855a837c0c686ad9cbe0810577e0c2ff6a.tar.gz scummvm-rg350-d852e2855a837c0c686ad9cbe0810577e0c2ff6a.tar.bz2 scummvm-rg350-d852e2855a837c0c686ad9cbe0810577e0c2ff6a.zip |
cleanup (make some more use of class Common::Rect)
svn-id: r12232
Diffstat (limited to 'scumm/gfx.cpp')
-rw-r--r-- | scumm/gfx.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index a3bc45153a..38555aa8ee 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -571,7 +571,9 @@ void ScummEngine::restoreBG(Common::Rect rect, byte backColor) { return; topline = vs->topline; - height = topline + vs->height; + + rect.top -= topline; + rect.bottom -= topline; if (rect.left < 0) rect.left = 0; @@ -581,12 +583,12 @@ void ScummEngine::restoreBG(Common::Rect rect, byte backColor) { return; if (rect.right > vs->width) rect.right = vs->width; - if (rect.bottom >= height) - rect.bottom = height; + if (rect.bottom >= vs->height) + rect.bottom = vs->height; - markRectAsDirty(vs->number, rect.left, rect.right, rect.top - topline, rect.bottom - topline, USAGE_BIT_RESTORED); + markRectAsDirty(vs->number, rect.left, rect.right, rect.top, rect.bottom, USAGE_BIT_RESTORED); - int offset = (rect.top - topline) * vs->width + vs->xstart + rect.left; + int offset = (rect.top) * vs->width + vs->xstart + rect.left; backbuff = vs->screenPtr + offset; height = rect.height(); @@ -608,7 +610,7 @@ void ScummEngine::restoreBG(Common::Rect rect, byte backColor) { if (rect.right & 0x07) mask_width++; - mask = getMaskBuffer(rect.left, rect.top, 0); + mask = getMaskBuffer(rect.left, rect.top + topline, 0); if (vs->number == kMainVirtScreen) mask += vs->topline * gdi._numStrips; |