diff options
author | Eugene Sandulenko | 2005-10-08 20:09:00 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-10-08 20:09:00 +0000 |
commit | f5f57c9a23bb0270d80d174749c0a82707f4b595 (patch) | |
tree | caa37b185681b554ff828466bf41d463734c7c54 | |
parent | 46660feeb29a9fd387fd2869a4932f1e072092fa (diff) | |
download | scummvm-rg350-f5f57c9a23bb0270d80d174749c0a82707f4b595.tar.gz scummvm-rg350-f5f57c9a23bb0270d80d174749c0a82707f4b595.tar.bz2 scummvm-rg350-f5f57c9a23bb0270d80d174749c0a82707f4b595.zip |
Put actors on the ground. No more upside down. Though probably drawClip()
has to be fixed too, but now we have no test case for this.
svn-id: r18966
-rw-r--r-- | saga/sprite.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/saga/sprite.cpp b/saga/sprite.cpp index 01fd989b80..5e55782327 100644 --- a/saga/sprite.cpp +++ b/saga/sprite.cpp @@ -332,7 +332,14 @@ void Sprite::drawOccluded(Surface *ds, const Rect &clipRect, SpriteList &spriteL // Finally, draw the occluded sprite sourceRowPointer = spriteBuffer + clipData.drawSource.x + (clipData.drawSource.y * width); - destRowPointer = (byte *)ds->pixels + clipData.drawDest.x + (clipData.drawDest.y * ds->pitch); + int traverseSign; + if (_vm->getGameType() == GType_IHNM) { + traverseSign = -1; + destRowPointer = (byte *)ds->pixels + clipData.drawDest.x + ((clipData.drawDest.y + clipData.drawHeight) * ds->pitch); + } else { + traverseSign = 1; + destRowPointer = (byte *)ds->pixels + clipData.drawDest.x + (clipData.drawDest.y * ds->pitch); + } maskRowPointer = maskBuffer + clipData.drawDest.x + (clipData.drawDest.y * maskWidth); for (y = 0; y < clipData.drawHeight; y++) { @@ -350,7 +357,7 @@ void Sprite::drawOccluded(Surface *ds, const Rect &clipRect, SpriteList &spriteL destPointer++; maskPointer++; } - destRowPointer += ds->pitch; + destRowPointer += ds->pitch * traverseSign; maskRowPointer += maskWidth; sourceRowPointer += width; } |