[Scummvm-cvs-logs] CVS: tools mm_nes_extract.c,1.5,1.6 simon2mp3.c,1.13,1.14
Joost Peters
joostp at users.sourceforge.net
Mon Oct 20 17:42:11 CEST 2003
Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv29995
Modified Files:
mm_nes_extract.c simon2mp3.c
Log Message:
fixed warnings
Index: mm_nes_extract.c
===================================================================
RCS file: /cvsroot/scummvm/tools/mm_nes_extract.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- mm_nes_extract.c 15 Sep 2003 16:50:01 -0000 1.5
+++ mm_nes_extract.c 20 Oct 2003 23:37:16 -0000 1.6
@@ -28,8 +28,8 @@
#define TRUE 1
#define FALSE 0
-// if defined, generates a set of .LFL files
-// if not defined, dumps all resources to separate files
+/* if defined, generates a set of .LFL files */
+/* if not defined, dumps all resources to separate files */
#define MAKE_LFLS
#ifdef WIN32
@@ -543,7 +543,7 @@
_assert(res != NULL,"extract_resource - no resource specified");
if ((r_offset(res) == 0) && (r_length(res) == 0))
- return; // there are 8 scripts that are zero bytes long, so we should skip them
+ return; /* there are 8 scripts that are zero bytes long, so we should skip them */
fseek(input,16 + r_offset(res),SEEK_SET);
switch (res->type)
@@ -635,7 +635,7 @@
}
#ifdef MAKE_LFLS
-// based on structure of Classic PC Maniac Mansion LFL files (roomgfx resources are arranged in order, one per file, after the room blocks)
+/* based on structure of Classic PC Maniac Mansion LFL files (roomgfx resources are arranged in order, one per file, after the room blocks) */
p_resource lfl_01[] = { &res_rooms[1], &res_roomgfx[1], &res_scripts[57], &res_scripts[61], &res_scripts[76], &res_scripts[105], &res_scripts[111], &res_sounds[5], &res_scripts[132], &res_scripts[148], &res_scripts[155], &res_scripts[156], NULL };
p_resource lfl_02[] = { &res_rooms[2], &res_roomgfx[2], NULL };
p_resource lfl_03[] = { &res_rooms[3], &res_roomgfx[3], &res_scripts[21], &res_sounds[26], NULL };
@@ -688,9 +688,9 @@
p_resource lfl_50[] = { &res_rooms[50], &res_scripts[133], &res_scripts[162], &res_scripts[163], NULL };
p_resource lfl_51[] = { &res_rooms[51], &res_scripts[118], &res_scripts[128], &res_scripts[134], &res_sounds[61], &res_sounds[62], &res_sounds[67], &res_sounds[66], &res_costumes[16], &res_costumes[20], NULL };
p_resource lfl_52[] = { &res_rooms[52], NULL };
-// remaining 'standard' resources (not used by any of the original LFL files)
+/* remaining 'standard' resources (not used by any of the original LFL files) */
p_resource lfl_53[] = { &res_rooms[53], &res_scripts[177], &res_scripts[178], &res_sounds[70], &res_sounds[71], &res_sounds[72], &res_sounds[73], &res_sounds[74], &res_sounds[75], &res_sounds[76], &res_sounds[77], &res_sounds[78], &res_sounds[79], &res_sounds[80], &res_sounds[81], NULL };
-// all 'non-standard' resources (the costume-related stuff)
+/* all 'non-standard' resources (the costume-related stuff) */
p_resource lfl_54[] = { &res_rooms[54], &res_costumegfx[0], &res_costumegfx[1], &res_palettes[0], &res_palettes[1], &res_unk_DD75[0], &res_unk_DD75[1], &res_unk_DD7D[0], &res_unk_DD7D[1], &res_unk_DD95[0], &res_unk_DD95[1], &res_unk_DD9D[0], &res_unk_DD9D[1], NULL };
typedef struct _lfl
@@ -780,7 +780,7 @@
#if defined(_MSC_VER)
#pragma pack(pop)
#endif
-#else // !MAKE_LFLS
+#else /* !MAKE_LFLS */
void dump_resource (FILE *input, char *fn_template, int num, p_resource res)
{
char fname[256];
@@ -791,7 +791,7 @@
extract_resource(input,output,res);
fclose(output);
}
-#endif // MAKE_LFLS
+#endif /* MAKE_LFLS */
unsigned long CRCtable[256];
void InitCRC (void)
@@ -907,7 +907,7 @@
for (i = 0; i < (int)sizeof(lfl_index); i++)
write_byte(output,((unsigned char *)&lfl_index)[i]);
fclose(output);
-#else // !MAKE_LFLS
+#else /* !MAKE_LFLS */
dump_resource(input,"globdata.dmp",0,&res_globdata);
for (i = 0; i < 40; i++)
dump_resource(input,"roomgfx-%i.dmp",i,&res_roomgfx[i]);
@@ -931,7 +931,7 @@
dump_resource(input,"cost_DD95-%i.dmp",i,&res_unk_DD95[i]);
for (i = 0; i < 2; i++)
dump_resource(input,"cost_DD9D-%i.dmp",i,&res_unk_DD9D[i]);
-#endif // MAKE_LFLS
+#endif /* MAKE_LFLS */
debug("All done!");
return 0;
Index: simon2mp3.c
===================================================================
RCS file: /cvsroot/scummvm/tools/simon2mp3.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- simon2mp3.c 30 Sep 2003 10:46:58 -0000 1.13
+++ simon2mp3.c 20 Oct 2003 23:37:16 -0000 1.14
@@ -72,7 +72,7 @@
void end(void)
{
int size;
- char buf[2048];
+ char fbuf[2048];
fclose(output_snd);
fclose(output_idx);
@@ -84,13 +84,13 @@
sprintf(tmp, "%sidx", infile_base);
input = fopen(tmp, "rb");
while ((size = fread(buf, 1, 2048, input)) > 0) {
- fwrite(buf, 1, size, output_idx);
+ fwrite(fbuf, 1, size, output_idx);
}
fclose(input);
sprintf(tmp, "%sdat", infile_base);
input = fopen(tmp, "rb");
- while ((size = fread(buf, 1, 2048, input)) > 0) {
- fwrite(buf, 1, size, output_idx);
+ while ((size = fread(fbuf, 1, 2048, input)) > 0) {
+ fwrite(fbuf, 1, size, output_idx);
}
fclose(input);
fclose(output_idx);
@@ -178,16 +178,16 @@
int get_offsets_mac(void)
{
- int i, end;
+ int i, size;
fseek(input, 0, SEEK_END);
- end = ftell(input);
+ size = ftell(input);
fseek(input, 0, SEEK_SET);
- for (i = 1; i <= end / 6; i++) {
+ for (i = 1; i <= size / 6; i++) {
filenums[i] = get_int16BE();
offsets[i] = get_int32BE();
}
- return(end/6);
+ return(size/6);
}
void get_voc(void);
More information about the Scummvm-git-logs
mailing list