[Scummvm-cvs-logs] scummvm master -> 41a5fc8476620d138227c369e2a2767e6e04f6d7

digitall digitall at scummvm.org
Thu Feb 17 23:24:34 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
41a5fc8476 TOOLS: Add debug output of output file position to skycpt tool.


Commit: 41a5fc8476620d138227c369e2a2767e6e04f6d7
    https://github.com/scummvm/scummvm/commit/41a5fc8476620d138227c369e2a2767e6e04f6d7
Author: D G Turner (digitall at scummvm.org)
Date: 2011-02-17T14:20:22-08:00

Commit Message:
TOOLS: Add debug output of output file position to skycpt tool.

Changed paths:
    tools/skycpt/cptcompiler.cpp



diff --git a/tools/skycpt/cptcompiler.cpp b/tools/skycpt/cptcompiler.cpp
index 956f575..7453b38 100644
--- a/tools/skycpt/cptcompiler.cpp
+++ b/tools/skycpt/cptcompiler.cpp
@@ -362,6 +362,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
 				fwrite(&tmp, 2, 1, resOutf);
 			}
 		}
+		printf("DEBUG lcnt: %lu Output File Position: 0x%08lX\r\n", lcnt, ftell(debOutf));
 	}
 	cptSize[0] = ftell(debOutf) - cptSize[0];
 	cptSize[1] = ftell(resOutf) - cptSize[1];
@@ -390,6 +391,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
 		fwrite(dlinks + cnt * 2 + 1, 2, 1, resOutf);
 	}
 	printf("Processing diff data...\n");
+	printf("DEBUG Output File Position: 0x%08lX\r\n", ftell(debOutf));
 	// 288 diffdata
 	FILE *dif = fopen("288diff.txt", "r");
 	assert(dif);
@@ -448,6 +450,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
 	fwrite(diff, 2, diffDest, resOutf);
 
 	printf("Converting Save data...\n");
+	printf("DEBUG Output File Position: 0x%08lX\r\n", ftell(debOutf));
 	// the IDs of the compacts to be saved
 	char cptName[1024];
 	uint16 saveIds[2048];
@@ -503,6 +506,8 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
 		fwrite(&tmp, 2, 1, debOutf);
 		tmp = 0;
 		fwrite(&tmp, 2, 1, debOutf);
+		
+		printf("DEBUG Output File Position: 0x%08lX\r\n", ftell(debOutf));
 		printf("reset destination: %ld\n", ftell(debOutf));
 		for (int cnt = 0; cnt < 6; cnt++) {
 			printf("Processing diff v0.0%03d\n", gameVers[cnt]);
@@ -527,6 +532,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
 			fwrite(&diffPos, 1, 2, debOutf);
 			fwrite(diff, 2, 2 * diffPos, debOutf);
 			printf("diff v0.0%03d: 2 * 2 * %d\n", gameVers[cnt], diffPos);
+			printf("DEBUG Output File Position: 0x%08lX\r\n", ftell(debOutf));
 		}
 		free(buf288);
 	} else {






More information about the Scummvm-git-logs mailing list