[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.373,1.374 intern.h,2.512,2.513 scumm.h,1.637,1.638

kirben kirben at users.sourceforge.net
Fri Jul 29 23:01:51 CEST 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20599/scumm

Modified Files:
	actor.cpp intern.h scumm.h 
Log Message:

Add He70 version of function instead.


Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.373
retrieving revision 1.374
diff -u -d -r1.373 -r1.374
--- actor.cpp	30 Jul 2005 05:51:28 -0000	1.373
+++ actor.cpp	30 Jul 2005 05:58:48 -0000	1.374
@@ -1297,29 +1297,37 @@
 	if (!testGfxAnyUsageBits(x / 8))
 		return 0;
 
-	if (_heversion >= 70) {
-		int result = 0;
-
-		for (i = 1; i < _numActors; i++) {
-			if (testGfxUsageBit(x / 8, i) && !getClass(i, kObjectClassUntouchable)
-				&& y >= _actors[i]._top && y <= _actors[i]._bottom && _actors[i]._pos.y > _actors[result]._pos.y) {
-				if (_version > 2 || i != VAR(VAR_EGO)) {
-					result = i;
-				}
-			}
+	for (i = 1; i < _numActors; i++) {
+		if (testGfxUsageBit(x / 8, i) && !getClass(i, kObjectClassUntouchable)
+			&& y >= _actors[i]._top && y <= _actors[i]._bottom) {
+			if (_version > 2 || i != VAR(VAR_EGO))
+				return i;
 		}
-		return result;
-	} else {
-		for (i = 1; i < _numActors; i++) {
-			if (testGfxUsageBit(x / 8, i) && !getClass(i, kObjectClassUntouchable)
-				&& y >= _actors[i]._top && y <= _actors[i]._bottom) {
-				if (_version > 2 || i != VAR(VAR_EGO))
-					return i;
+	}
+
+	return 0;
+}
+
+#ifndef DISABLE_HE
+int ScummEngine_v70he::getActorFromPos(int x, int y) {
+	int i;
+	int result = 0;
+
+	if (!testGfxAnyUsageBits(x / 8))
+		return 0;
+
+	for (i = 1; i < _numActors; i++) {
+		if (testGfxUsageBit(x / 8, i) && !getClass(i, kObjectClassUntouchable)
+			&& y >= _actors[i]._top && y <= _actors[i]._bottom && _actors[i]._pos.y > _actors[result]._pos.y) {
+			if (_version > 2 || i != VAR(VAR_EGO)) {
+				result = i;
 			}
 		}
-		return 0;
 	}
+
+	return result;
 }
+#endif
 
 #ifndef DISABLE_SCUMM_7_8
 void ScummEngine_v7::actorTalk(const byte *msg) {

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.512
retrieving revision 2.513
diff -u -d -r2.512 -r2.513
--- intern.h	19 Jul 2005 17:53:46 -0000	2.512
+++ intern.h	30 Jul 2005 05:58:48 -0000	2.513
@@ -830,6 +830,8 @@
 	virtual void readGlobalObjects();
 	virtual void readIndexBlock(uint32 blocktype, uint32 itemsize);
 
+	virtual int getActorFromPos(int x, int y);
+
 	int getStringCharWidth(byte chr);
 	virtual int setupStringArray(int size);
 	void appendSubstring(int dst, int src, int len2, int len);

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.637
retrieving revision 1.638
diff -u -d -r1.637 -r1.638
--- scumm.h	23 Jul 2005 15:48:54 -0000	1.637
+++ scumm.h	30 Jul 2005 05:58:48 -0000	1.638
@@ -842,7 +842,7 @@
 	void resetActorBgs();
 	virtual void processActors();
 	void processUpperActors();
-	int getActorFromPos(int x, int y);
+	virtual int getActorFromPos(int x, int y);
 
 public:
 	/* Actor talking stuff */





More information about the Scummvm-git-logs mailing list