[Scummvm-cvs-logs] SF.net SVN: scummvm: [32865] scummvm/trunk/engines

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Jul 1 12:33:26 CEST 2008


Revision: 32865
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32865&view=rev
Author:   fingolfin
Date:     2008-07-01 03:33:25 -0700 (Tue, 01 Jul 2008)

Log Message:
-----------
Fixed unitialized variables

Modified Paths:
--------------
    scummvm/trunk/engines/cine/bg_list.cpp
    scummvm/trunk/engines/cine/object.cpp
    scummvm/trunk/engines/cine/various.cpp
    scummvm/trunk/engines/drascula/talk.cpp
    scummvm/trunk/engines/engines.mk
    scummvm/trunk/engines/m4/assets.cpp
    scummvm/trunk/engines/m4/converse.cpp
    scummvm/trunk/engines/made/screen.cpp

Modified: scummvm/trunk/engines/cine/bg_list.cpp
===================================================================
--- scummvm/trunk/engines/cine/bg_list.cpp	2008-07-01 03:21:30 UTC (rev 32864)
+++ scummvm/trunk/engines/cine/bg_list.cpp	2008-07-01 10:33:25 UTC (rev 32865)
@@ -63,6 +63,7 @@
 void createBgIncrustListElement(int16 objIdx, int16 param) {
 	BGIncrust tmp;
 
+	tmp.unkPtr = 0;
 	tmp.objIdx = objIdx;
 	tmp.param = param;
 	tmp.x = objectTable[objIdx].x;
@@ -90,6 +91,7 @@
 		fHandle.readUint32BE();
 		fHandle.readUint32BE();
 
+		tmp.unkPtr = 0;
 		tmp.objIdx = fHandle.readUint16BE();
 		tmp.param = fHandle.readUint16BE();
 		tmp.x = fHandle.readUint16BE();

Modified: scummvm/trunk/engines/cine/object.cpp
===================================================================
--- scummvm/trunk/engines/cine/object.cpp	2008-07-01 03:21:30 UTC (rev 32864)
+++ scummvm/trunk/engines/cine/object.cpp	2008-07-01 10:33:25 UTC (rev 32865)
@@ -125,6 +125,10 @@
 
 	tmp.objIdx = objIdx;
 	tmp.type = type;
+	tmp.x = 0;
+	tmp.y = 0;
+	tmp.width = 0;
+	tmp.color = 0;
 
 	overlayList.insert(it, tmp);
 }

Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp	2008-07-01 03:21:30 UTC (rev 32864)
+++ scummvm/trunk/engines/cine/various.cpp	2008-07-01 10:33:25 UTC (rev 32865)
@@ -133,6 +133,7 @@
  */
 void addPlayerCommandMessage(int16 cmd) {
 	overlay tmp;
+	memset(&tmp, 0, sizeof(tmp));
 	tmp.objIdx = cmd;
 	tmp.type = 3;
 

Modified: scummvm/trunk/engines/drascula/talk.cpp
===================================================================
--- scummvm/trunk/engines/drascula/talk.cpp	2008-07-01 03:21:30 UTC (rev 32864)
+++ scummvm/trunk/engines/drascula/talk.cpp	2008-07-01 10:33:25 UTC (rev 32865)
@@ -60,7 +60,7 @@
 	int x_talk1[8] = {  56,  86, 116, 146, 176, 206, 236, 266 };
 	int x_talk3[4] = {  80, 102, 124, 146 };
 	int x_talk4[4] = { 119, 158, 197, 236 };
-	int face;
+	int face = 0;
 	int length = strlen(said);
 
 	color_abc(kColorWhite);

Modified: scummvm/trunk/engines/engines.mk
===================================================================
--- scummvm/trunk/engines/engines.mk	2008-07-01 03:21:30 UTC (rev 32864)
+++ scummvm/trunk/engines/engines.mk	2008-07-01 10:33:25 UTC (rev 32865)
@@ -97,6 +97,11 @@
 MODULES += engines/sword2
 endif
 
+ifdef ENABLE_TINSEL
+DEFINES += -DENABLE_TINSEL=$(ENABLE_TINSEL)
+MODULES += engines/tinsel
+endif
+
 ifdef ENABLE_TOUCHE
 DEFINES += -DENABLE_TOUCHE=$(ENABLE_TOUCHE)
 MODULES += engines/touche

Modified: scummvm/trunk/engines/m4/assets.cpp
===================================================================
--- scummvm/trunk/engines/m4/assets.cpp	2008-07-01 03:21:30 UTC (rev 32864)
+++ scummvm/trunk/engines/m4/assets.cpp	2008-07-01 10:33:25 UTC (rev 32865)
@@ -201,6 +201,7 @@
 	Common::SeekableReadStream *spriteDataStream = sprite.getItemStream(3);
 	SpriteAssetFrame frame;
 	for (curFrame = 0; curFrame < _frameCount; curFrame++) {
+		frame.stream = 0;
 		frame.comp = 0;
 		frameOffset = spriteStream->readUint32LE();
 		_frameOffsets.push_back(frameOffset);

Modified: scummvm/trunk/engines/m4/converse.cpp
===================================================================
--- scummvm/trunk/engines/m4/converse.cpp	2008-07-01 03:21:30 UTC (rev 32864)
+++ scummvm/trunk/engines/m4/converse.cpp	2008-07-01 10:33:25 UTC (rev 32865)
@@ -379,7 +379,7 @@
 	uint32 header = convS->readUint32LE();
 	uint32 size;
 	uint32 chunk;
-	uint32 data;
+	uint32 data = 0;
 	uint32 i;
 	ConvEntry* curEntry = NULL;
 	ConvEntry* replyEntry = NULL;

Modified: scummvm/trunk/engines/made/screen.cpp
===================================================================
--- scummvm/trunk/engines/made/screen.cpp	2008-07-01 03:21:30 UTC (rev 32864)
+++ scummvm/trunk/engines/made/screen.cpp	2008-07-01 10:33:25 UTC (rev 32865)
@@ -822,6 +822,8 @@
 	if (((uint) index) > _spriteList.size()) {
 		SpriteListItem emptyItem;
 		emptyItem.index = 0;
+		emptyItem.xofs = 0;
+		emptyItem.yofs = 0;
 		return emptyItem;
 	} else {
 		return _spriteList[index - 1];


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list