diff options
author | James Brown | 2002-10-11 11:50:06 +0000 |
---|---|---|
committer | James Brown | 2002-10-11 11:50:06 +0000 |
commit | 2d22cc45673e965ebbd70ce4acb5ed5e458701f1 (patch) | |
tree | e27ba91948bdf9729889a0c08c0438dba6f213f6 /scumm/object.cpp | |
parent | 4cf42ae9a8fbd122f268e8eb9dcce088ee0522be (diff) | |
download | scummvm-rg350-2d22cc45673e965ebbd70ce4acb5ed5e458701f1.tar.gz scummvm-rg350-2d22cc45673e965ebbd70ce4acb5ed5e458701f1.tar.bz2 scummvm-rg350-2d22cc45673e965ebbd70ce4acb5ed5e458701f1.zip |
Patch 621733: drawBomp() masking
svn-id: r5128
Diffstat (limited to 'scumm/object.cpp')
-rw-r--r-- | scumm/object.cpp | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index 40896990a7..1a48d8e3a4 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -1268,7 +1268,41 @@ void Scumm::removeBlastObjects() void Scumm::removeBlastObject(BlastObject *eo) { - restoreBG(eo->posX, eo->posY, eo->posX + eo->width, eo->posY + eo->height); + VirtScreen *vs = &virtscr[0]; + + int top, bottom, left, right; + int left_strip, right_strip; + int i; + + top = eo->posY; + bottom = eo->posY + eo->height; + left = eo->posX; + right = eo->posX + eo->width; + + if (bottom < 0 || right < 0 || top > vs->height || left > vs->width) + return; + + if (top < 0) + top = 0; + if (bottom > vs->height) + bottom = vs->height; + if (left < 0) + left = 0; + if (right > vs->width) + right = vs->width; + + left_strip = left >> 3; + right_strip = (right >> 3) + 1; + + if (left_strip < 0) + left_strip = 0; + if (right_strip >= 200) + right_strip = 200; + + for (i = left_strip; i <= right_strip; i++) + gdi.resetBackground(top, bottom, i); + + updateDirtyRect(0, left, right, top, bottom, 0x40000000); } int Scumm::findFlObjectSlot() |