[Scummvm-cvs-logs] CVS: scummvm/gob dataio.cpp,1.3,1.4 game.cpp,1.7,1.8 game.h,1.3,1.4 inter.cpp,1.5,1.6 palanim.cpp,1.3,1.4 scenery.cpp,1.5,1.6 video.cpp,1.5,1.6

Eugene Sandulenko sev at users.sourceforge.net
Fri Apr 8 18:28:48 CEST 2005


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

Modified Files:
	dataio.cpp game.cpp game.h inter.cpp palanim.cpp scenery.cpp 
	video.cpp 
Log Message:
o Put numerous debug messages to deeper level and removed others
o Occasional indentation fixes
o Fixed bug with cursor. Thanks wjp. Now even gob1demo works but final screen which is not playable in original hangs here.


Index: dataio.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/dataio.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dataio.cpp	5 Apr 2005 17:50:30 -0000	1.3
+++ dataio.cpp	9 Apr 2005 01:28:16 -0000	1.4
@@ -115,7 +115,7 @@
 		offset =
 		    chunkOffset[file * MAX_SLOT_COUNT + slot] +
 		    chunkPos[file * MAX_SLOT_COUNT + slot];
-		debug(0, "seek: %ld, %ld", chunkOffset[file * MAX_SLOT_COUNT + slot], chunkPos[file * MAX_SLOT_COUNT + slot]);
+		debug(7, "seek: %ld, %ld", chunkOffset[file * MAX_SLOT_COUNT + slot], chunkPos[file * MAX_SLOT_COUNT + slot]);
 		file_getHandle(dataFileHandles[file])->seek(offset, SEEK_SET);
 	}
 
@@ -207,7 +207,7 @@
 
 	numDataChunks[file] = file_getHandle(dataFileHandles[file])->readUint16LE();
 
-	debug(0, "DataChunks: %d [for %s]", numDataChunks[file], path);
+	debug(7, "DataChunks: %d [for %s]", numDataChunks[file], path);
 
 	dataFiles[file] = dataDesc = 
 	    (struct ChunkDesc *)malloc(sizeof(struct ChunkDesc) *
@@ -221,7 +221,7 @@
 	}
 
 	for (i = 0; i < numDataChunks[file]; i++)
-		debug(0, "%d: %s %d", i, dataDesc[i].chunkName, dataDesc[i].size);
+		debug(7, "%d: %s %d", i, dataDesc[i].chunkName, dataDesc[i].size);
 
 	for (i = 0; i < MAX_SLOT_COUNT; i++)
 		chunkPos[file * MAX_SLOT_COUNT + i] = -1;

Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/game.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- game.cpp	6 Apr 2005 14:34:42 -0000	1.7
+++ game.cpp	9 Apr 2005 01:28:16 -0000	1.8
@@ -113,15 +113,15 @@
 	if (pResWidth != 0) {
 		*pResWidth = item->width & 0x7fff;
 		*pResHeight = item->height;
-		debug(0, "game_loadExtData(%d, %d, %d)", itemId, *pResWidth, *pResHeight);
+		debug(7, "game_loadExtData(%d, %d, %d)", itemId, *pResWidth, *pResHeight);
 	}
 
-	debug(0, "game_loadExtData(%d, 0, 0)", itemId);
+	debug(7, "game_loadExtData(%d, 0, 0)", itemId);
 
 	if (item->height == 0)
 		size += (item->width & 0x7fff) << 16;
 
-	debug(0, "size: %d off: %d", size, offset);
+	debug(7, "size: %d off: %d", size, offset);
 	if (offset >= 0) {
 		handle = game_extHandle;
 	} else {
@@ -134,7 +134,7 @@
 		handle = commonHandle;
 	}
 
-	debug(0, "off: %ld size: %ld", offset, tableSize);
+	debug(7, "off: %ld size: %ld", offset, tableSize);
 	data_seekData(handle, offset + tableSize, SEEK_SET);
 	if (isPacked)
 		dataBuf = (char *)malloc(size);
@@ -161,10 +161,6 @@
 		free(packedBuf);
 	}
 
-	for (int16 i = 0; i < 16; i++)
-		printf("%02x ", (byte)dataBuf[i]);
-	printf("\n");
-
 	return dataBuf;
 
 }
@@ -381,8 +377,7 @@
 		return ((char *)game_totResourceTable) + szGame_TotResTable +
 		    szGame_TotResItem * game_totResourceTable->itemsCount + offset;
 	} else {
-		return (char *)(game_imFileData +
-		    ((int32 *)game_imFileData)[-offset - 1]);
+		return (char *)(game_imFileData + ((int32 *)game_imFileData)[-offset - 1]);
 	}
 }
 
@@ -1693,7 +1688,6 @@
 	char path[20];
 	int16 handle;
 
-	// If demo
 	if (game_totFileData[0x3d] != 0 && game_totFileData[0x3b] == 0)
 		return;
 

Index: game.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/game.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- game.h	5 Apr 2005 18:08:01 -0000	1.3
+++ game.h	9 Apr 2005 01:28:16 -0000	1.4
@@ -44,8 +44,8 @@
 
 #define szGame_TotResItem (4 + 2 + 2 + 2)
 typedef struct Game_TotResItem {
-	int32 offset;		// if > 0, then offset from end of resource table.
-	// If < 0, then -offset-1 is index in .IM file table
+	int32 offset;	// if > 0, then offset from end of resource table.
+					// If < 0, then -offset-1 is index in .IM file table
 	int16 size;
 	int16 width;
 	int16 height;

Index: inter.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/inter.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- inter.cpp	6 Apr 2005 14:33:31 -0000	1.5
+++ inter.cpp	9 Apr 2005 01:28:16 -0000	1.6
@@ -43,7 +43,7 @@
 int16 *inter_nestLevel;
 
 int16 inter_load16(void) {
-	int16 tmp = READ_LE_UINT16(inter_execPtr);
+	int16 tmp = (int16)READ_LE_UINT16(inter_execPtr);
 	inter_execPtr += 2;
 	return tmp;
 }
@@ -803,12 +803,11 @@
 	Game_TotResItem *itemPtr;
 	int16 width;
 	int16 height;
-	int16 offset;
+	int32 offset;
 	char *dataBuf;
 	int16 id;
 	int8 index;
 
-	debug(0, "inter_loadCursor");
 	id = inter_load16();
 	index = *inter_execPtr++;
 	itemPtr = &game_totResourceTable->items[id];

Index: palanim.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/palanim.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- palanim.cpp	5 Apr 2005 18:08:01 -0000	1.3
+++ palanim.cpp	9 Apr 2005 01:28:16 -0000	1.4
@@ -140,7 +140,7 @@
 	return 1;
 }
 
-void pal_fade(PalDesc * palDesc, int16 fade, int16 allColors) {
+void pal_fade(PalDesc *palDesc, int16 fade, int16 allColors) {
 	char stop;
 	int16 i;
 

Index: scenery.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/scenery.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- scenery.cpp	6 Apr 2005 11:39:22 -0000	1.5
+++ scenery.cpp	9 Apr 2005 01:28:16 -0000	1.6
@@ -111,7 +111,6 @@
 
 	ptr->layersCount = (int16)READ_LE_UINT16(dataPtr);
 	dataPtr += 2;
-	debug("layer: %d", ptr->layersCount);
 
 	ptr->layers = (Scen_StaticLayer **)malloc(sizeof(Scen_StaticLayer *) * ptr->layersCount);
 	ptr->pieces = (Scen_PieceDesc **)malloc(sizeof(Scen_PieceDesc *) * picsCount);

Index: video.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/video.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- video.cpp	6 Apr 2005 19:18:07 -0000	1.5
+++ video.cpp	9 Apr 2005 01:28:16 -0000	1.6
@@ -93,8 +93,6 @@
 	int16 someFlags = 1;
 	SurfaceDesc *descPtr;
 
-	debug(0, "stub: vid_initSurfDesc()");
-
 	if (flags != PRIMARY_SURFACE)
 		sprAllocated++;
 
@@ -441,8 +439,6 @@
 	int16 bufPos;
 	int16 strLen;
 
-	warning("vid_spriteUncompressor called");
-
 	if ((destDesc->vidMode & 0x7f) != 0x13)
 		error("vid_spriteUncompressor: Video mode 0x%x is not supported!",
 		    destDesc->vidMode & 0x7f);





More information about the Scummvm-git-logs mailing list