[Scummvm-cvs-logs] CVS: residual actor.cpp,1.18,1.19 smush.cpp,1.15,1.16 vector3d.h,1.4,1.5

James Brown ender at users.sourceforge.net
Sun Feb 1 04:35:10 CET 2004


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

Modified Files:
	actor.cpp smush.cpp vector3d.h 
Log Message:
A few valgrind fixes (hopefully)


Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/actor.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- actor.cpp	23 Jan 2004 11:10:21 -0000	1.18
+++ actor.cpp	1 Feb 2004 12:32:53 -0000	1.19
@@ -30,6 +30,7 @@
   visible_(true), talkSound_(NULL), turning_(false), walking_(false), walkChore_(-1)
 {
   Engine::instance()->registerActor(this);
+  lookingMode_ = false;
 }
 
 void Actor::turnTo(float pitch, float yaw, float roll) {

Index: smush.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/smush.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- smush.cpp	1 Feb 2004 12:02:41 -0000	1.15
+++ smush.cpp	1 Feb 2004 12:32:53 -0000	1.16
@@ -242,10 +242,11 @@
 			error("Unsupported header flag");
 
 		if ((flags & 0x08) != 0) {				// Name
-			while(inBuf[0] != 0) {
+			do {
 				fread(inBuf, 1, sizeof(byte), tmp);
 				printf("%c", inBuf[0]);
-			}
+			} while(inBuf[0] != 0);
+
 		}
 
 		if ((flags & 0x02) != 0)				// CRC

Index: vector3d.h
===================================================================
RCS file: /cvsroot/scummvm/residual/vector3d.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- vector3d.h	28 Aug 2003 01:55:48 -0000	1.4
+++ vector3d.h	1 Feb 2004 12:32:53 -0000	1.5
@@ -32,7 +32,7 @@
   float& z() { return coords_[2]; }
   float z() const { return coords_[2]; }
 
-  Vector3d() { }
+  Vector3d() {this->x() = 0; this->y() = 0; this->z() = 0;}
   Vector3d(float x, float y, float z) {
     this->x() = x; this->y() = y; this->z() = z;
   }





More information about the Scummvm-git-logs mailing list