[Scummvm-cvs-logs] CVS: tools README,1.34,1.35 compress_san.cpp,1.31,1.32
Pawel Kolodziejski
aquadran at users.sourceforge.net
Mon Jan 24 14:28:04 CET 2005
Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28878
Modified Files:
README compress_san.cpp
Log Message:
cleanup
Index: README
===================================================================
RCS file: /cvsroot/scummvm/tools/README,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- README 23 Jan 2005 21:29:50 -0000 1.34
+++ README 24 Jan 2005 22:26:29 -0000 1.35
@@ -61,8 +61,6 @@
Compresses '.san' smush animation files. It uses lossless
zlib for compressing FOBJ gfx chunks inside a san file.
It also can create a separate Ogg file with the audio track.
- There are also temporary files *.tmp and *.wav which could
- be deleted after finished compression.
Example of usage:
compress_san opening.san uncomp comp
@@ -74,12 +72,7 @@
must have been built with Ogg support enabled.
compress_scumm_bun <inputfile> <inputdir> <outputdir>
- Compresses '.bun' music/voice files into ogg files and '.map'
- information files. There are temporary files *.wav which
- could be deleted after finished compression.
- Files '.ogg' and '.map' are suggested placed in new
- handly created sub directory with name 'audio'.
- That directory must be in game data dir.
+ Compresses '.bun' music/voice files.
Example of usage:
compress_scumm.bun digmusic.bun uncomp comp
Index: compress_san.cpp
===================================================================
RCS file: /cvsroot/scummvm/tools/compress_san.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- compress_san.cpp 21 Jan 2005 21:09:20 -0000 1.31
+++ compress_san.cpp 24 Jan 2005 22:26:33 -0000 1.32
@@ -45,8 +45,6 @@
void showhelp(char *exename) {
printf("\nUsage: %s <inputfile> <inputdir> <outputdir>\n", exename);
-// printf("\nParams:\n");
-// printf("\n --help this help message\n");
exit(2);
}
@@ -173,7 +171,7 @@
printf("error write temp wave file");
exit(1);
}
- _waveDataSize += 0x1000;
+ _waveDataSize += size;
}
void decompressComiIACT(char *fileName, byte *output_data, byte *d_src, int bsize) {
@@ -415,6 +413,7 @@
byte *tmpBuf = (byte *)malloc(fileSize);
fread(tmpBuf, fileSize, 1, _audioTracks[l].file);
fclose(_audioTracks[l].file);
+ unlink(filename);
byte *wavBuf = (byte *)malloc(fileSize);
fseek(wavFile, 44 + (frameAudioSize * _audioTracks[l].animFrame), SEEK_SET);
@@ -612,7 +611,7 @@
trackId = track + 600;
volume = track_flags * 2 - 600;
} else {
- printf("bad track_flags: %d\n", track_flags);
+ printf("handleDigIACT() Bad track_flags: %d\n", track_flags);
exit(1);
}
@@ -648,10 +647,7 @@
*index = 0;
}
- strcpy(tmpPath, inputDir);
- strcat(tmpPath, "/");
- strcat(tmpPath, inputFilename);
- strcat(tmpPath, ".san");
+ sprintf(tmpPath, "%s/%s.san", inputDir, inputFilename);
FILE *input = fopen(tmpPath, "rb");
if (!input) {
@@ -659,10 +655,7 @@
exit(-1);
}
- strcpy(tmpPath, outputDir);
- strcat(tmpPath, "/");
- strcat(tmpPath, inputFilename);
- strcat(tmpPath, ".san");
+ sprintf(tmpPath, "%s/%s.san", outputDir, inputFilename);
FILE *output = fopen(tmpPath, "wb");
if (!output) {
@@ -670,20 +663,14 @@
exit(-1);
}
- strcpy(tmpPath, inputDir);
- strcat(tmpPath, "/");
- strcat(tmpPath, inputFilename);
- strcat(tmpPath, ".flu");
+ sprintf(tmpPath, "%s/%s.flu", inputDir, inputFilename);
FILE *flu_in = NULL;
FILE *flu_out = NULL;
flu_in = fopen(tmpPath, "rb");
if (flu_in) {
- strcpy(tmpPath, outputDir);
- strcat(tmpPath, "/");
- strcat(tmpPath, inputFilename);
- strcat(tmpPath, ".flu");
+ sprintf(tmpPath, "%s/%s.flu", outputDir, inputFilename);
flu_out = fopen(tmpPath, "wb");
if (!flu_out) {
printf("Cannot open file: %s\n", tmpPath);
@@ -823,11 +810,9 @@
if (_waveTmpFile) {
writeWaveHeader(_waveDataSize);
- strcpy(tmpPath, outputDir);
- strcat(tmpPath, "/");
- strcat(tmpPath, inputFilename);
- strcat(tmpPath, ".wav");
+ sprintf(tmpPath, "%s/%s.wav", outputDir, inputFilename);
encodeWaveWithOgg(tmpPath);
+ unlink(tmpPath);
}
fclose(input);
More information about the Scummvm-git-logs
mailing list