diff options
author | Filippos Karapetis | 2007-08-22 11:11:33 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-08-22 11:11:33 +0000 |
commit | 9a9e42a1f6a25a1db56e2ccf00160277ccd83309 (patch) | |
tree | ea14cab173775227fbcf56271686d51f97f4be5b | |
parent | 3778d8619f7cef27f400a550b75547b0968467a7 (diff) | |
download | scummvm-rg350-9a9e42a1f6a25a1db56e2ccf00160277ccd83309.tar.gz scummvm-rg350-9a9e42a1f6a25a1db56e2ccf00160277ccd83309.tar.bz2 scummvm-rg350-9a9e42a1f6a25a1db56e2ccf00160277ccd83309.zip |
Sprite priorities are now calculated correctly for IHNM
svn-id: r28694
-rw-r--r-- | engines/saga/actor.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp index cc8303f402..beae0aae3a 100644 --- a/engines/saga/actor.cpp +++ b/engines/saga/actor.cpp @@ -76,6 +76,16 @@ static int commonObjectCompare(const CommonObjectDataPointer& obj1, const Common return 1; } +static int commonObjectCompareIHNM(const CommonObjectDataPointer& obj1, const CommonObjectDataPointer& obj2) { + int p1 = obj1->_location.y; + int p2 = obj2->_location.y; + if (p1 == p2) + return 0; + if (p1 < p2) + return -1; + return 1; +} + static int tileCommonObjectCompare(const CommonObjectDataPointer& obj1, const CommonObjectDataPointer& obj2) { int p1 = -obj1->_location.u() - obj1->_location.v() - obj1->_location.z; int p2 = -obj2->_location.u() - obj2->_location.v() - obj2->_location.z; @@ -1741,7 +1751,10 @@ void Actor::createDrawOrderList() { if (_vm->_scene->getFlags() & kSceneFlagISO) { compareFunction = &tileCommonObjectCompare; } else { - compareFunction = &commonObjectCompare; + if (_vm->getGameType() == GType_ITE) + compareFunction = &commonObjectCompare; + else + compareFunction = &commonObjectCompareIHNM; } _drawOrderList.clear(); |