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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Apr 27 20:54:34 CEST 2007


Revision: 26615
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26615&view=rev
Author:   thebluegr
Date:     2007-04-27 11:54:33 -0700 (Fri, 27 Apr 2007)

Log Message:
-----------
Fixed loads of warnings with MSVC and gcc

Modified Paths:
--------------
    scummvm/trunk/engines/cruise/actor.cpp
    scummvm/trunk/engines/cruise/cruise_main.cpp
    scummvm/trunk/engines/cruise/ctp.cpp
    scummvm/trunk/engines/cruise/dataLoader.cpp
    scummvm/trunk/engines/cruise/font.cpp
    scummvm/trunk/engines/cruise/gfxModule.cpp
    scummvm/trunk/engines/cruise/menu.cpp
    scummvm/trunk/engines/cruise/object.cpp
    scummvm/trunk/engines/cruise/overlay.cpp
    scummvm/trunk/engines/cruise/script.cpp

Modified: scummvm/trunk/engines/cruise/actor.cpp
===================================================================
--- scummvm/trunk/engines/cruise/actor.cpp	2007-04-27 16:28:22 UTC (rev 26614)
+++ scummvm/trunk/engines/cruise/actor.cpp	2007-04-27 18:54:33 UTC (rev 26615)
@@ -640,7 +640,7 @@
 }
 
 //computePathfinding(returnVar2, params.X, params.Y, var34, var35, currentActor->stepX, currentActor->stepY);
-int16 computePathfinding(int16* pSolution, int16 X, int16 Y, int16 destX, int16 destY, int16 stepX, int16 stepY, int16 oldPathId)
+int16 computePathfinding(int16* pSolution, int16 _X, int16 _Y, int16 destX, int16 destY, int16 stepX, int16 stepY, int16 oldPathId)
 {
   persoStruct* perso;
   int num;
@@ -689,8 +689,8 @@
     perso->inc_jo1 = stepX;
     perso->inc_jo2 = stepY;
 
-    *(ptr++) = X;
-    *(ptr++) = Y;
+    *(ptr++) = _X;
+    *(ptr++) = _Y;
     *(ptr++) = pSolution[0] = destX;
     *(ptr++) = pSolution[1] = destY;
     *(ptr++) = -1;
@@ -707,7 +707,7 @@
 	ctpVar19=ctpVar11;
 	flag_aff_chemin=0;
 
-	if (X==destX && Y==destY)
+	if (_X==destX && _Y==destY)
 	{
 		pSolution[0]=-1;
 		pSolution[1]=-1;
@@ -717,12 +717,12 @@
 
 /******* cherche le premier noeud ******/
 
-  getPixel(X,Y);
+  getPixel(_X,_Y);
 
   pSolution[4] = computedVar14;
 
-  x_mouse = X;
-  y_mouse = Y;
+  x_mouse = _X;
+  y_mouse = _Y;
 
 	if (!flag_obstacle || (point_select=point_proche(ctp_routeCoords))==-1)
 	{

Modified: scummvm/trunk/engines/cruise/cruise_main.cpp
===================================================================
--- scummvm/trunk/engines/cruise/cruise_main.cpp	2007-04-27 16:28:22 UTC (rev 26614)
+++ scummvm/trunk/engines/cruise/cruise_main.cpp	2007-04-27 18:54:33 UTC (rev 26615)
@@ -728,7 +728,7 @@
 
               if((var_4 != var_16) && (var_2 != var_14))
               {
-                objectParamsQuery params;
+                params;
                 getMultipleObjectParam(var_16, var_14, &params);
 
                 var_C = params.X;
@@ -893,7 +893,7 @@
 
 void buildInventory(int X, int Y)
 {
-  int numObjectInInventory;
+  int numObjectInInventory = 0;
   menuStruct* pMenu;
   
   pMenu = createMenu(X, Y, "Inventaire");
@@ -1131,7 +1131,7 @@
                             {
                               if(var_22->specialString1)
                               {
-                                char* ptr = getObjectName(var_34->varNameOffset, var_22->specialString1);
+                                ptr = getObjectName(var_34->varNameOffset, var_22->specialString1);
 
                                 var_2C = 1;
 
@@ -1163,8 +1163,8 @@
 
     if(pMenuElementSub)
     {
-      int var2;
-      int var4;
+      //int var2;
+      //int var4;
 
       var2 = pMenuElementSub->var2;
       var4 = pMenuElementSub->var4;
@@ -1190,9 +1190,9 @@
 {
   menuStruct* var_5C;
 
-  int16 mouseX;
-  int16 mouseY;
-  int16 button;
+  int16 mouseX = 0;
+  int16 mouseY = 0;
+  int16 button = 0;
 
   /*if(inputSub1keyboad())
   {
@@ -1476,7 +1476,7 @@
   int frames=0;                   /* Number of frames displayed */
   //int32 t_start,t_left;
   //uint32 t_end;
-  int32 q=0;                     /* Dummy */
+  //int32 q=0;                     /* Dummy */
 
   int enableUser = 0;
   //int16 mouseX;

Modified: scummvm/trunk/engines/cruise/ctp.cpp
===================================================================
--- scummvm/trunk/engines/cruise/ctp.cpp	2007-04-27 16:28:22 UTC (rev 26614)
+++ scummvm/trunk/engines/cruise/ctp.cpp	2007-04-27 18:54:33 UTC (rev 26615)
@@ -89,7 +89,7 @@
 	}
 }
 
-void getWalkBoxCenter(int boxIdx, uint16* walkboxTable)
+void getWalkBoxCenter(int boxIdx, uint16* _walkboxTable)
 {
 	int minX = 1000;
 	int minY = 1000;
@@ -97,12 +97,12 @@
 	int maxY = -1;
 
 	ASSERT(boxIdx <= 15);				// max number of walkboxes is 16
-	ASSERT(walkboxTable[boxIdx * 40]);	// we should never have an empty walk box
+	ASSERT(_walkboxTable[boxIdx * 40]);	// we should never have an empty walk box
 
-	if(walkboxTable[boxIdx * 40] > 0)
+	if(_walkboxTable[boxIdx * 40] > 0)
 	{
-		int numPoints    = walkboxTable[boxIdx * 40];
-		uint16* pCurrentPtr = walkboxTable + (boxIdx * 40) + 1;
+		int numPoints    = _walkboxTable[boxIdx * 40];
+		uint16* pCurrentPtr = _walkboxTable + (boxIdx * 40) + 1;
 
 		int i;
 
@@ -169,7 +169,7 @@
 }
 
 // this process the walkboxes
-void loadCtpSub1(int boxIdx, int scale, uint16* walkboxTable, ctpVar19Struct* param4)
+void loadCtpSub1(int boxIdx, int scale, uint16* _walkboxTable, ctpVar19Struct* param4)
 {
 	int minX = 1000;
 	int minY = 1000;
@@ -186,20 +186,20 @@
 	//  int ax;
 	//  int var_2;
 	int var_E;
-	int var_C = 1000;
-	int var_A = 0;
+	//int var_C = 1000;
+	//int var_A = 0;
 	ctpVar19SubStruct* subStruct;
 
 	ASSERT(boxIdx <= 15);
 
-	if(walkboxTable[boxIdx * 40] > 0) // is walkbox used ?
+	if(_walkboxTable[boxIdx * 40] > 0) // is walkbox used ?
 	{
-		getWalkBoxCenter(boxIdx, walkboxTable);
+		getWalkBoxCenter(boxIdx, _walkboxTable);
 
 		currentWalkBoxCenterYBis = currentWalkBoxCenterY;
 		currentWalkBoxCenterXBis = currentWalkBoxCenterX;
 		// + 512
-		renderCTPWalkBox(currentWalkBoxCenterX, currentWalkBoxCenterY, currentWalkBoxCenterX, scale + 0x200, currentWalkBoxCenterY, walkboxTable + boxIdx * 40);
+		renderCTPWalkBox(currentWalkBoxCenterX, currentWalkBoxCenterY, currentWalkBoxCenterX, scale + 0x200, currentWalkBoxCenterY, _walkboxTable + boxIdx * 40);
 
 		var_1C = param4;
 		var_12 = var_1C + 1; // next
@@ -245,7 +245,7 @@
 		{
 			int i;
 			int numPoints;
-			uint16* pCurrentPtr = walkboxTable + boxIdx * 40;
+			uint16* pCurrentPtr = _walkboxTable + boxIdx * 40;
 
 			numPoints = *(pCurrentPtr++);
 

Modified: scummvm/trunk/engines/cruise/dataLoader.cpp
===================================================================
--- scummvm/trunk/engines/cruise/dataLoader.cpp	2007-04-27 16:28:22 UTC (rev 26614)
+++ scummvm/trunk/engines/cruise/dataLoader.cpp	2007-04-27 18:54:33 UTC (rev 26615)
@@ -322,6 +322,14 @@
       loadFNTSub(ptr, startIdx);
       break;
     }
+  case type_UNK:
+	{
+	  break;  
+	}
+  case type_SPL:
+	{
+	  break;  
+	}
   }
   return 0;
 }
@@ -356,6 +364,14 @@
       loadFNTSub(ptr, startIdx);
       break;
     }
+  case type_UNK:
+	{
+	  break;  
+	}
+  case type_SPL:
+	{
+	  break;  
+	}
   }
 
   return 0;

Modified: scummvm/trunk/engines/cruise/font.cpp
===================================================================
--- scummvm/trunk/engines/cruise/font.cpp	2007-04-27 16:28:22 UTC (rev 26614)
+++ scummvm/trunk/engines/cruise/font.cpp	2007-04-27 18:54:33 UTC (rev 26615)
@@ -62,7 +62,7 @@
 	int32 var_6      = 0;
 	int32 lineLength = 0;
 
-	uint8* tempPtr;
+	uint8* tempPtr = 0;
 
 	if(!*localString)
 	{
@@ -505,7 +505,7 @@
 
 		do
 		{
-			uint8 character = *(string++);
+			character = *(string++);
 
 			short int data = fontCharacterTable[character];
 
@@ -698,7 +698,7 @@
 		// draw textline, character wise
 		do
 		{
-			uint8 character = *(string++);
+			character = *(string++);
 
 			short int charData = fontCharacterTable[character];     // get character position
 

Modified: scummvm/trunk/engines/cruise/gfxModule.cpp
===================================================================
--- scummvm/trunk/engines/cruise/gfxModule.cpp	2007-04-27 16:28:22 UTC (rev 26614)
+++ scummvm/trunk/engines/cruise/gfxModule.cpp	2007-04-27 18:54:33 UTC (rev 26615)
@@ -635,8 +635,8 @@
 {
 	int i;
 	byte paletteRGBA[256 * 4];
-	uint8* outPtr = scaledScreen;
-	uint8* inPtr  = globalScreen;
+	//uint8* outPtr = scaledScreen;
+	//uint8* inPtr  = globalScreen;
 
 
 	for(i=0;i<256;i++)

Modified: scummvm/trunk/engines/cruise/menu.cpp
===================================================================
--- scummvm/trunk/engines/cruise/menu.cpp	2007-04-27 16:28:22 UTC (rev 26614)
+++ scummvm/trunk/engines/cruise/menu.cpp	2007-04-27 18:54:33 UTC (rev 26615)
@@ -214,7 +214,7 @@
 int playerMenu(int menuX, int menuY)
 {
   int retourMenu;
-  int restartGame = 0;
+  //int restartGame = 0;
 
   if(entrerMenuJoueur && affichePasMenuJoueur)
   {
@@ -294,13 +294,13 @@
 
     while(pSub)
     {
-      menuElementSubStruct* next;
+      menuElementSubStruct* nextSub;
 
-      next = pSub->pNext;
+      nextSub = pSub->pNext;
 
       free(pSub);
 
-      pSub=next;
+      pSub=nextSub;
     }
 
     if(pElement->gfx)

Modified: scummvm/trunk/engines/cruise/object.cpp
===================================================================
--- scummvm/trunk/engines/cruise/object.cpp	2007-04-27 16:28:22 UTC (rev 26614)
+++ scummvm/trunk/engines/cruise/object.cpp	2007-04-27 18:54:33 UTC (rev 26615)
@@ -437,7 +437,7 @@
 int16 getSingleObjectParam(int16 overlayIdx,int16 param2,int16 param3,int16* returnParam)
 {
 	int var_A = 0;
-	char* ptr3 = NULL;
+	//char* ptr3 = NULL;
   objDataStruct* ptr;
   ovlDataStruct* ovlData;
   objectParams* ptr2;

Modified: scummvm/trunk/engines/cruise/overlay.cpp
===================================================================
--- scummvm/trunk/engines/cruise/overlay.cpp	2007-04-27 16:28:22 UTC (rev 26614)
+++ scummvm/trunk/engines/cruise/overlay.cpp	2007-04-27 18:54:33 UTC (rev 26615)
@@ -447,8 +447,8 @@
 
     if(scriptNotLoadedBefore)
     {
-      int var1;
-      int var2;
+      //int var1;
+      //int var2;
       
       overlayTable[scriptIdx].field_14 = (char)setup1;
 
@@ -532,10 +532,10 @@
   if(ovlData->specialString1Length /*|| ovlData->specialString2Length*/ || ovlData->stringTable)
   {
     int i;
-    int unpackedSize;
-    int fileIdx;
-    uint8 fileName[50];
-    char* unpackedBuffer;
+    //int unpackedSize;
+    //int fileIdx;
+    //uint8 fileName[50];
+    //char* unpackedBuffer;
     
     strcpyuint8(fileName,scriptName);
 

Modified: scummvm/trunk/engines/cruise/script.cpp
===================================================================
--- scummvm/trunk/engines/cruise/script.cpp	2007-04-27 16:28:22 UTC (rev 26614)
+++ scummvm/trunk/engines/cruise/script.cpp	2007-04-27 18:54:33 UTC (rev 26615)
@@ -63,7 +63,7 @@
     }
   case 1:
     {
-      uint8* ptr;
+      uint8* ptr = 0;
       int byte1 = getByteFromScript();
       int byte2 = getByteFromScript();
       short int short1 = getShortFromScript();
@@ -153,7 +153,7 @@
 
       int var_E = byte1 & 7;
       
-      uint8* ptr;
+      uint8* ptr = 0;
 
       if(!var_E)
       {
@@ -243,7 +243,7 @@
 
       int var_C = short1;
 
-      uint8* ptr;
+      uint8* ptr = 0;
       int type2;
 
       if(!var_6)
@@ -405,8 +405,8 @@
 {
   int boolVar = 0;
 
-  int var1 = popVar();
-  int var2 = popVar();
+  var1 = popVar();
+  var2 = popVar();
 
   switch(currentScriptOpcodeType)
   {
@@ -480,8 +480,8 @@
 
 int32 opcodeType7(void)
 {
-  int var1 = popVar();
-  int var2 = popVar();
+  var1 = popVar();
+  var2 = popVar();
 
   pushVar(var1);
   pushVar(var2);


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