[Scummvm-cvs-logs] CVS: residual actor.cpp,1.57,1.58 lua.cpp,1.147,1.148 smush.cpp,1.64,1.65 vector3d.h,1.11,1.12

Pawel Kolodziejski aquadran at users.sourceforge.net
Mon Aug 8 00:07:04 CEST 2005


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

Modified Files:
	actor.cpp lua.cpp smush.cpp vector3d.h 
Log Message:
fixed compilation and warnings

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/actor.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- actor.cpp	1 Aug 2005 03:49:02 -0000	1.57
+++ actor.cpp	8 Aug 2005 07:05:45 -0000	1.58
@@ -116,7 +116,7 @@
 void Actor::walkForward() {
 	float dist = g_engine->perSecond(_walkRate);
 	float yaw_rad = _yaw * (M_PI / 180), pitch_rad = _pitch * (M_PI / 180);
-	float yaw;
+	//float yaw;
 	Vector3d forwardVec(-std::sin(yaw_rad) * std::cos(pitch_rad),
 		std::cos(yaw_rad) * std::cos(pitch_rad),
 		std::sin(pitch_rad));

Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- lua.cpp	1 Aug 2005 03:49:02 -0000	1.147
+++ lua.cpp	8 Aug 2005 07:05:46 -0000	1.148
@@ -1574,7 +1574,7 @@
 static void GetPointSector(void) {
 	lua_Object xparam, yparam, zparam;
 	Sector *result;
-	float x, y, z;
+	float x = 0.0f, y = 0.0f, z = 0.0f;
 	
 	DEBUG_FUNCTION();
 	stubWarning("VERIFY: GetPointSector");

Index: smush.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/smush.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- smush.cpp	26 Jul 2005 01:46:51 -0000	1.64
+++ smush.cpp	8 Aug 2005 07:05:58 -0000	1.65
@@ -247,7 +247,7 @@
 bool Smush::setupAnim(const char *file, int x, int y) {
 	uint32 tag;
 	int32 size;
-  int16 flags;
+	int16 flags;
 
 	if (!_file.open(file))
 		return false;
@@ -284,8 +284,8 @@
 	// Output information for checking out the flags
 	if (debugLevel == DEBUG_SMUSH || debugLevel == DEBUG_NORMAL || debugLevel == DEBUG_ALL) {
 		printf("SMUSH Flags:");
-		for(int i=0;i<16;i++)
-			printf(" %d", (flags & ((int) pow(2, i))) != 0);
+		for(int i = 0; i < 16; i++)
+			printf(" %d", (flags & ((int)pow(2.0f, i))) != 0);
 		printf("\n");
 	}
 	_videoLooping = SMUSH_LOOPMOVIE(flags);

Index: vector3d.h
===================================================================
RCS file: /cvsroot/scummvm/residual/vector3d.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- vector3d.h	1 Aug 2005 03:49:02 -0000	1.11
+++ vector3d.h	8 Aug 2005 07:05:58 -0000	1.12
@@ -20,6 +20,10 @@
 
 #include <cmath>
 
+#ifndef PI
+#define PI 3.14159265358979323846
+#endif
+
 class Vector3d {
 public:
 	float _coords[3];		// Make sure this stays as an array so
@@ -90,7 +94,7 @@
 		float yaw;
 		
 		// find the angle on the upper half of the unit circle
-		yaw = std::acos(a) * (180.0f / M_PI);
+		yaw = std::acos(a) * (180.0f / (float)PI);
 		if (b < 0.0f)
 			// adjust for the lower half of the unit circle
 			return 360.0f - yaw;





More information about the Scummvm-git-logs mailing list