diff options
| author | D G Turner | 2011-02-17 22:20:22 +0000 | 
|---|---|---|
| committer | D G Turner | 2011-02-17 22:20:22 +0000 | 
| commit | 41a5fc8476620d138227c369e2a2767e6e04f6d7 (patch) | |
| tree | 649ea3e379a5fc888df901be039fbd584d2a1c18 | |
| parent | be7fd9be5090cff9035378d0ce17280514a4b534 (diff) | |
| download | scummvm-rg350-41a5fc8476620d138227c369e2a2767e6e04f6d7.tar.gz scummvm-rg350-41a5fc8476620d138227c369e2a2767e6e04f6d7.tar.bz2 scummvm-rg350-41a5fc8476620d138227c369e2a2767e6e04f6d7.zip  | |
TOOLS: Add debug output of output file position to skycpt tool.
| -rw-r--r-- | tools/skycpt/cptcompiler.cpp | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/skycpt/cptcompiler.cpp b/tools/skycpt/cptcompiler.cpp index 956f575d7d..7453b383b6 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 {  | 
