[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.64,1.65 object.cpp,1.63,1.64

Max Horn fingolfin at users.sourceforge.net
Sun Mar 2 07:56:29 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv31662

Modified Files:
	actor.cpp object.cpp 
Log Message:
patch #696030: CMI: More actor direction fixes

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- actor.cpp	27 Feb 2003 10:17:28 -0000	1.64
+++ actor.cpp	2 Mar 2003 15:51:56 -0000	1.65
@@ -112,7 +112,7 @@
 
 int Scumm::getAngleFromPos(int x, int y)
 {
-	if (_gameId == GID_DIG) {
+	if (_gameId == GID_DIG || _gameId == GID_CMI) {
 		double temp = atan2((double)x, (double)-y);
 		return normalizeAngle((int)(temp * 180 / 3.1415926535));
 	} else {

Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/object.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- object.cpp	2 Mar 2003 12:36:07 -0000	1.63
+++ object.cpp	2 Mar 2003 15:51:56 -0000	1.64
@@ -218,7 +218,7 @@
 		y = od->walk_y;
 	}
 	if (_features & GF_AFTER_V8)
-		dir = od->actordir;
+		dir = fromSimpleDir(1, od->actordir);
 	else
 		dir = oldDirToNewDir(od->actordir & 3);
 }
@@ -657,7 +657,8 @@
 		od->y_pos = (int)READ_LE_UINT32(&imhd->v8.y_pos);
 		od->width = (uint)READ_LE_UINT32(&imhd->v8.width);
 		od->height = (uint)READ_LE_UINT32(&imhd->v8.height);
-		od->actordir = (byte)READ_LE_UINT32(&imhd->v8.actordir);
+		// HACK: This is done sinec an angle doesn't fit into a byte (360 > 256)
+		od->actordir = toSimpleDir(1, READ_LE_UINT32(&imhd->v8.actordir));
 
 	} else if (_features & GF_AFTER_V7) {
 		od->obj_nr = READ_LE_UINT16(&(cdhd->v7.obj_id));





More information about the Scummvm-git-logs mailing list