diff options
author | Max Horn | 2007-09-22 09:51:33 +0000 |
---|---|---|
committer | Max Horn | 2007-09-22 09:51:33 +0000 |
commit | 893c42c3d8cf4bd5ba0564267f8d9b704b01441f (patch) | |
tree | 1203eff8a920a64dc50a8b5f73c6ee416961681d /tools/skycpt/cptcompiler.cpp | |
parent | 924a9074fbedadd9b1d402d71899c6bc9d45bcb1 (diff) | |
download | scummvm-rg350-893c42c3d8cf4bd5ba0564267f8d9b704b01441f.tar.gz scummvm-rg350-893c42c3d8cf4bd5ba0564267f8d9b704b01441f.tar.bz2 scummvm-rg350-893c42c3d8cf4bd5ba0564267f8d9b704b01441f.zip |
Added legal headers, fixed various warnings
svn-id: r29014
Diffstat (limited to 'tools/skycpt/cptcompiler.cpp')
-rw-r--r-- | tools/skycpt/cptcompiler.cpp | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/tools/skycpt/cptcompiler.cpp b/tools/skycpt/cptcompiler.cpp index 63a0b630e2..c68f034d59 100644 --- a/tools/skycpt/cptcompiler.cpp +++ b/tools/skycpt/cptcompiler.cpp @@ -1,3 +1,25 @@ +/* ScummVM Tools + * Copyright (C) 2007 The ScummVM project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + #include "stdafx.h" #include "cpthelp.h" #include "textfile.h" @@ -163,7 +185,7 @@ void processTurntabs(FILE *inf, CptObj *destArr) { free(resBuf); } -void processBins(FILE *inf, CptObj *destArr, char *typeName, char *objName, uint8 cTypeId) { +void processBins(FILE *inf, CptObj *destArr, const char *typeName, const char *objName, uint8 cTypeId) { char line[1024]; dofgets(line, 1024, inf); assert(lineMatchSection(line, typeName)); @@ -478,9 +500,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("reset destination: %d\n", ftell(debOutf)); + printf("reset destination: %ld\n", ftell(debOutf)); for (int cnt = 0; cnt < 6; cnt++) { - uint16 diff[8192]; uint16 diffPos = 0; sprintf(inName, "reset.%03d", gameVers[cnt]); FILE *resDiff = fopen(inName, "rb"); @@ -504,7 +525,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE * printf("diff v0.0%03d: 2 * 2 * %d\n", gameVers[cnt], diffPos); } } else { - printf("Creating CPT file with Dummy reset data @ %d\n", ftell(debOutf)); + printf("Creating CPT file with Dummy reset data @ %ld\n", ftell(debOutf)); uint16 resetFields16 = 4; fwrite(&resetFields16, 2, 1, debOutf); uint32 blah = 8; @@ -524,8 +545,8 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE * fwrite(cptSize + 1, 1, 4, resOutf); printf("%d diffs\n", diffNo); - printf("%d Compacts in total\n", numCpts); + printf("%ld Compacts in total\n", numCpts); printf("max strlen = %d\n", maxStrl); - printf("raw size = 2 * %d\n", binSize); + printf("raw size = 2 * %ld\n", binSize); printf("max cptlen = %d\n", maxCptl); } |