aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Battaglia2009-05-24 14:37:53 +0000
committerFabio Battaglia2009-05-24 14:37:53 +0000
commit6651cdc97c19571966eb29936e7849af003008b7 (patch)
treebf72f8ce9432d972ffdbf74f8ede6d4034676f0b
parent84a2651e63addeb55c61ed6244c77073f8921193 (diff)
downloadscummvm-rg350-6651cdc97c19571966eb29936e7849af003008b7.tar.gz
scummvm-rg350-6651cdc97c19571966eb29936e7849af003008b7.tar.bz2
scummvm-rg350-6651cdc97c19571966eb29936e7849af003008b7.zip
tinsel: fix graphic corruption caused by wrong clipping of 8-bit images in Discworld PSX
svn-id: r40864
-rw-r--r--engines/tinsel/graphics.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp
index 6960e40f51..8bf9fb1896 100644
--- a/engines/tinsel/graphics.cpp
+++ b/engines/tinsel/graphics.cpp
@@ -278,7 +278,7 @@ static void PsxDrawTiles(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply
srcP += sizeof(uint16);
// Draw a 4x4 block based on the opcode as in index into the block list
- // In case we have a 4-bit CLUT image, blocks are 2x4, then expanded into 4x4
+ // In case we have a 4-bit CLUT image, blocks are 2x4 bytes, then expanded into 4x4
const uint8 *p;
if (fourBitClut)
p = (uint8 *)pObj->charBase + psxSkipBytes + (indexVal << 3);
@@ -292,8 +292,8 @@ static void PsxDrawTiles(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply
Common::copy(p + boxBounds.left, p + boxBounds.right + 1, tempDest + (SCREEN_WIDTH * (yp - boxBounds.top)));
else
for (int xp = boxBounds.left; xp <= boxBounds.right; ++xp) {
- if (*(p + (xp - boxBounds.left)))
- *(tempDest + SCREEN_WIDTH * (yp - boxBounds.top) + (xp - boxBounds.left)) = *(p + (xp - boxBounds.left));
+ if (*(p + xp))
+ *(tempDest + SCREEN_WIDTH * (yp - boxBounds.top) + (xp - boxBounds.left)) = *(p + xp);
}
} else {
for (int xp = boxBounds.left; xp <= boxBounds.right; ++xp) {