diff options
author | Fabio Battaglia | 2009-05-24 14:37:53 +0000 |
---|---|---|
committer | Fabio Battaglia | 2009-05-24 14:37:53 +0000 |
commit | 6651cdc97c19571966eb29936e7849af003008b7 (patch) | |
tree | bf72f8ce9432d972ffdbf74f8ede6d4034676f0b | |
parent | 84a2651e63addeb55c61ed6244c77073f8921193 (diff) | |
download | scummvm-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.cpp | 6 |
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) { |