[Scummvm-cvs-logs] CVS: scummvm akos.cpp,1.23,1.24

Max Horn fingolfin at users.sourceforge.net
Tue Jul 2 13:12:05 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv2004

Modified Files:
	akos.cpp 
Log Message:
got rid of akos_findManyDirection; simplified akos_frameToAnim a lot

Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/akos.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- akos.cpp	27 Jun 2002 14:10:56 -0000	1.23
+++ akos.cpp	2 Jul 2002 20:08:42 -0000	1.24
@@ -39,40 +39,12 @@
 	return 0;
 }
 
-int Scumm::akos_findManyDirection(int16 ManyDirection, uint16 facing)
-{
-	int32 direction;
-	int32 temp;
-
-	temp = many_direction_tab[ManyDirection];
-	direction = temp + ManyDirection * 8;
-	do {
-		if (facing >= many_direction_tab[direction + 1]) {
-			if (facing <= many_direction_tab[direction + 2]) {
-				return (temp);
-			}
-		}
-
-		--temp;
-		--direction;
-	} while (temp);
-
-	return (temp);
-}
-
-
 int Scumm::akos_frameToAnim(Actor * a, int frame)
 {
-	bool ManyDirection;
-
-	ManyDirection = akos_hasManyDirections(a);
-
-	if (ManyDirection) {
-		frame *= many_direction_tab[ManyDirection];
-		return akos_findManyDirection(ManyDirection, a->facing) + frame;
-	} else {
+	if (akos_hasManyDirections(a))
+		return toSimpleDir(1, a->facing) + frame * 8;
+	else
 		return newDirToOldDir(a->facing) + frame * 4;
-	}
 }
 
 void Scumm::akos_decodeData(Actor * a, int frame, uint usemask)





More information about the Scummvm-git-logs mailing list