[Scummvm-cvs-logs] CVS: scummvm/gob draw.cpp,1.2,1.3 game.cpp,1.3,1.4 goblin.cpp,1.1,1.2 inter.cpp,1.2,1.3 mult.cpp,1.2,1.3 sound.cpp,1.1,1.2 sound.h,1.1,1.2 util.cpp,1.3,1.4 util.h,1.1,1.2

Max Horn fingolfin at users.sourceforge.net
Tue Apr 5 10:42:21 CEST 2005


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

Modified Files:
	draw.cpp game.cpp goblin.cpp inter.cpp mult.cpp sound.cpp 
	sound.h util.cpp util.h 
Log Message:
Fixing lots of warnings

Index: draw.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/draw.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- draw.cpp	5 Apr 2005 15:53:16 -0000	1.2
+++ draw.cpp	5 Apr 2005 17:41:37 -0000	1.3
@@ -850,7 +850,7 @@
 			cmd = ptr2[17] & 0x7f;
 			if (cmd == 0) {
 				val = READ_LE_UINT16(ptr2 + 18) * 4;
-				sprintf(buf, "%ld",  READ_LE_UINT32(inter_variables + val));
+				sprintf(buf, "%d",  READ_LE_UINT32(inter_variables + val));
 			} else if (cmd == 1) {
 				val = READ_LE_UINT16(ptr2 + 18) * 4;
 
@@ -858,18 +858,18 @@
 			} else {
 				val = READ_LE_UINT16(ptr2 + 18) * 4;
 
-				sprintf(buf, "%ld",  READ_LE_UINT32(inter_variables + val));
+				sprintf(buf, "%d",  READ_LE_UINT32(inter_variables + val));
 				if (buf[0] == '-') {
 					while (strlen(buf) - 1 < (uint32)ptr2[17]) {
-						util_insertStr((char *)"0", buf, 1);
+						util_insertStr("0", buf, 1);
 					}
 				} else {
 					while (strlen(buf) - 1 < (uint32)ptr2[17]) {
-						util_insertStr((char *)"0", buf, 0);
+						util_insertStr("0", buf, 0);
 					}
 				}
 
-				util_insertStr((char *)",", buf, strlen(buf) + 1 - ptr2[17]);
+				util_insertStr(",", buf, strlen(buf) + 1 - ptr2[17]);
 			}
 
 			draw_textToPrint = buf;

Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/game.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- game.cpp	5 Apr 2005 16:28:18 -0000	1.3
+++ game.cpp	5 Apr 2005 17:41:37 -0000	1.4
@@ -446,7 +446,7 @@
 	util_processInput();
 
 	if (READ_LE_UINT32(inter_variables + 0xe8) != 0) {
-		if (mult_frameStart != READ_LE_UINT32(inter_variables + 0xe8) - 1)
+		if (mult_frameStart != (int)READ_LE_UINT32(inter_variables + 0xe8) - 1)
 			mult_frameStart++;
 		else
 			mult_frameStart = 0;
@@ -1793,7 +1793,7 @@
 
 			filePtr = (char *)game_totFileData + 0x30;
 
-			if (READ_LE_UINT32(filePtr) != -1) {
+			if (READ_LE_UINT32(filePtr) != (uint32)-1) {
 				curPtr = game_totFileData;
 				game_totTextData =
 				    (Game_TotTextTable *) (curPtr +
@@ -1802,7 +1802,7 @@
 			}
 
 			filePtr = (char *)game_totFileData + 0x34;
-			if (READ_LE_UINT32(filePtr) != -1) {
+			if (READ_LE_UINT32(filePtr) != (uint32)-1) {
 				curPtr = game_totFileData;
 
 				game_totResourceTable = 

Index: goblin.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/goblin.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- goblin.cpp	5 Apr 2005 15:07:39 -0000	1.1
+++ goblin.cpp	5 Apr 2005 17:41:37 -0000	1.2
@@ -461,14 +461,10 @@
 
 			if (objDesc->multState != -1) {
 				if (objDesc->multState > 39) {
-					objDesc->stateMach =
-					    gob_goblins[objDesc->
-					    multObjIndex]->stateMach;
-					objDesc->state =
-					    objDesc->multState - 40;
+					objDesc->stateMach = gob_goblins[(int)(objDesc->multObjIndex)]->stateMach;
+					objDesc->state = objDesc->multState - 40;
 				} else {
-					objDesc->stateMach =
-					    objDesc->realStateMach;
+					objDesc->stateMach = objDesc->realStateMach;
 					objDesc->state = objDesc->multState;
 				}
 				objDesc->animation =
@@ -565,7 +561,7 @@
 }
 
 void gob_setMultStates(Gob_Object * gobDesc) {
-	gobDesc->stateMach = gob_goblins[gobDesc->multObjIndex]->stateMach;
+	gobDesc->stateMach = gob_goblins[(int)gobDesc->multObjIndex]->stateMach;
 }
 
 int16 gob_nextLayer(Gob_Object *gobDesc) {
@@ -2268,12 +2264,10 @@
 		map_itemPoses[idInPocket].orient = lookDir;
 		if (map_itemPoses[idInPocket].orient == 0) {
 //                      map_itemPoses[idInPocket].x++;
-			if (map_passMap[map_itemPoses[idInPocket].
-				y][map_itemPoses[idInPocket].x + 1] == 1)
+			if (map_passMap[(int)map_itemPoses[idInPocket].y][map_itemPoses[idInPocket].x + 1] == 1)
 				map_itemPoses[idInPocket].x++;
 		} else {
-			if (map_passMap[map_itemPoses[idInPocket].
-				y][map_itemPoses[idInPocket].x - 1] == 1)
+			if (map_passMap[(int)map_itemPoses[idInPocket].y][map_itemPoses[idInPocket].x - 1] == 1)
 				map_itemPoses[idInPocket].x--;
 		}
 	}

Index: inter.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/inter.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- inter.cpp	5 Apr 2005 16:28:18 -0000	1.2
+++ inter.cpp	5 Apr 2005 17:41:37 -0000	1.3
@@ -159,7 +159,7 @@
 			switch (*inter_execPtr) {
 			case 23:
 			case 26:
-				sprintf(buf + i, "%ld", READ_LE_UINT32(inter_variables + parse_parseVarIndex()));
+				sprintf(buf + i, "%d", READ_LE_UINT32(inter_variables + parse_parseVarIndex()));
 				break;
 
 			case 25:

Index: mult.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/mult.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- mult.cpp	5 Apr 2005 16:29:59 -0000	1.2
+++ mult.cpp	5 Apr 2005 17:41:37 -0000	1.3
@@ -320,8 +320,7 @@
 			} else {
 				pAnimData->frame++;
 				if (pAnimData->frame >=
-				    scen_animations[pAnimData->animation].
-				    layers[pAnimData->layer]->framesCount) {
+				    scen_animations[(int)pAnimData->animation].layers[pAnimData->layer]->framesCount) {
 					switch (pAnimData->animType) {
 					case 0:
 						pAnimData->frame = 0;
@@ -332,11 +331,11 @@
 
 						*(mult_objects[i].pPosX) =
 						    *(mult_objects[i].pPosX) +
-						    scen_animations[pAnimData->animation].layers[pAnimData->layer]->animDeltaX;
+						    scen_animations[(int)pAnimData->animation].layers[pAnimData->layer]->animDeltaX;
 
 						*(mult_objects[i].pPosY) =
 						    *(mult_objects[i].pPosY) +
-						    scen_animations[pAnimData->animation].layers[pAnimData->layer]->animDeltaY;
+						    scen_animations[(int)pAnimData->animation].layers[pAnimData->layer]->animDeltaY;
 						break;
 
 					case 2:
@@ -1128,7 +1127,7 @@
 }
 
 void mult_freeMultKeys(void) {
-	char i;
+	int i;
 	char animCount;
 	char staticCount;
 

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/sound.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sound.cpp	5 Apr 2005 15:07:39 -0000	1.1
+++ sound.cpp	5 Apr 2005 17:41:37 -0000	1.2
@@ -31,7 +31,7 @@
 		return;
 	}
 
-	Snd_SoundDesc *snd_loadSoundData(char *path) {
+	Snd_SoundDesc *snd_loadSoundData(const char *path) {
 		return NULL;
 	}
 void snd_freeSoundData(Snd_SoundDesc * sndDesc) {;}

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/sound.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sound.h	5 Apr 2005 15:07:39 -0000	1.1
+++ sound.h	5 Apr 2005 17:41:37 -0000	1.2
@@ -37,7 +37,7 @@
 } Snd_SoundDesc;
 
 void snd_playSample(Snd_SoundDesc * soundDesc, int16 repCount, int16 frequency);
-Snd_SoundDesc *snd_loadSoundData(char *path);
+Snd_SoundDesc *snd_loadSoundData(const char *path);
 void snd_freeSoundData(Snd_SoundDesc * sndDesc);
 void snd_playComposition(Snd_SoundDesc ** samples, int16 *composit, int16 freqVal);
 void snd_waitEndPlay(void);

Index: util.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/util.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- util.cpp	5 Apr 2005 17:05:12 -0000	1.3
+++ util.cpp	5 Apr 2005 17:41:37 -0000	1.4
@@ -286,7 +286,7 @@
 		vid_setPalElem(i, 0, 0, 0, 0, videoMode);
 }
 
-void util_insertStr(char *str1, char *str2, int16 pos) {
+void util_insertStr(const char *str1, char *str2, int16 pos) {
 	int16 len1;
 	int16 i;
 	int16 from;

Index: util.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/util.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- util.h	5 Apr 2005 15:07:40 -0000	1.1
+++ util.h	5 Apr 2005 17:41:37 -0000	1.2
@@ -50,7 +50,7 @@
 FontDesc *util_loadFont(const char *path);
 void util_freeFont(FontDesc * fontDesc);
 void util_clearPalette(void);
-void util_insertStr(char *str1, char *str2, int16 pos);
+void util_insertStr(const char *str1, char *str2, int16 pos);
 void util_cutFromStr(char *str, int16 from, int16 cutlen);
 int16 util_strstr(const char *str1, char *str2);
 void util_waitEndFrame(void);





More information about the Scummvm-git-logs mailing list