[Scummvm-cvs-logs] SF.net SVN: scummvm: [28694] scummvm/trunk/engines/saga/actor.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Aug 22 13:11:33 CEST 2007


Revision: 28694
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28694&view=rev
Author:   thebluegr
Date:     2007-08-22 04:11:33 -0700 (Wed, 22 Aug 2007)

Log Message:
-----------
Sprite priorities are now calculated correctly for IHNM

Modified Paths:
--------------
    scummvm/trunk/engines/saga/actor.cpp

Modified: scummvm/trunk/engines/saga/actor.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor.cpp	2007-08-21 20:44:32 UTC (rev 28693)
+++ scummvm/trunk/engines/saga/actor.cpp	2007-08-22 11:11:33 UTC (rev 28694)
@@ -76,6 +76,16 @@
 	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 @@
 	if (_vm->_scene->getFlags() & kSceneFlagISO) {
 		compareFunction = &tileCommonObjectCompare;
 	} else {
-		compareFunction = &commonObjectCompare;
+		if (_vm->getGameType() == GType_ITE)
+			compareFunction = &commonObjectCompare;
+		else
+			compareFunction = &commonObjectCompareIHNM;
 	}
 
 	_drawOrderList.clear();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list