aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-02-25 00:35:36 +0000
committerTravis Howell2006-02-25 00:35:36 +0000
commitd08dbb2a3c3fbd48a67c86eec73a8b7b7ede0f11 (patch)
tree0afdad1743115d89b9c63ec761b58e8928ca9e1b
parentf39699517320cbccca7f2705c451efa60c781773 (diff)
downloadscummvm-rg350-d08dbb2a3c3fbd48a67c86eec73a8b7b7ede0f11.tar.gz
scummvm-rg350-d08dbb2a3c3fbd48a67c86eec73a8b7b7ede0f11.tar.bz2
scummvm-rg350-d08dbb2a3c3fbd48a67c86eec73a8b7b7ede0f11.zip
More corrections to copyWizImageWithMask() in HE games
svn-id: r20854
-rw-r--r--engines/scumm/he/wiz_he.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index ca8b5e6816..533382a6c4 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -394,8 +394,8 @@ void Wiz::copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstw, int dsth,
if (!calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, srcRect, dstRect)) {
return;
}
- dstw = (dstw & 7) / 8;
- dst += dstRect.top * dstw + ((dstRect.left & 7) / 8);
+ dstw = dstw / 8;
+ dst += dstRect.top * dstw + dstRect.left / 8;
const uint8 *dataPtr, *dataPtrNext;
uint8 *dstPtr, *dstPtrNext;
@@ -420,7 +420,7 @@ void Wiz::copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstw, int dsth,
while (h--) {
xoff = srcRect.left;
w = srcRect.width();
- mask = 1 << (7 - (dstRect.left & 7));
+ mask = 1 << (7 - dstRect.left);
off = READ_LE_UINT16(dataPtr); dataPtr += 2;
dstPtrNext = dstPtr + dstw;
dataPtrNext = dataPtr + off;
@@ -430,7 +430,6 @@ void Wiz::copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstw, int dsth,
databit = code & 1;
code >>= 1;
if (databit) {
- code >>= 1;
if (xoff > 0) {
xoff -= code;
if (xoff >= 0)