aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-10-08 20:09:00 +0000
committerEugene Sandulenko2005-10-08 20:09:00 +0000
commitf5f57c9a23bb0270d80d174749c0a82707f4b595 (patch)
treecaa37b185681b554ff828466bf41d463734c7c54
parent46660feeb29a9fd387fd2869a4932f1e072092fa (diff)
downloadscummvm-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.cpp11
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;
}