[Scummvm-cvs-logs] SF.net SVN: scummvm: [29880] tools/branches/gsoc2007-toolsgui
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Dec 16 18:28:52 CET 2007
Revision: 29880
http://scummvm.svn.sourceforge.net/scummvm/?rev=29880&view=rev
Author: fingolfin
Date: 2007-12-16 09:28:52 -0800 (Sun, 16 Dec 2007)
Log Message:
-----------
Some corrections compared to trunk
Modified Paths:
--------------
tools/branches/gsoc2007-toolsgui/compress_queen.c
tools/branches/gsoc2007-toolsgui/encode_dxa.cpp
tools/branches/gsoc2007-toolsgui/extract_loom_tg16.c
tools/branches/gsoc2007-toolsgui/extract_mm_apple.c
tools/branches/gsoc2007-toolsgui/extract_mm_c64.c
tools/branches/gsoc2007-toolsgui/extract_mm_nes.c
tools/branches/gsoc2007-toolsgui/extract_zak_c64.c
tools/branches/gsoc2007-toolsgui/util.c
Modified: tools/branches/gsoc2007-toolsgui/compress_queen.c
===================================================================
--- tools/branches/gsoc2007-toolsgui/compress_queen.c 2007-12-16 16:03:04 UTC (rev 29879)
+++ tools/branches/gsoc2007-toolsgui/compress_queen.c 2007-12-16 17:28:52 UTC (rev 29880)
@@ -315,13 +315,11 @@
tmp[4] = '\0';
if (memcmp(tmp, "QTBL", 4)) {
- printf("Invalid TBL file!\n");
- exit(-1);
+ error("Invalid TBL file");
}
if (readUint32BE(inputTbl) != CURRENT_TBL_VERSION) {
- printf("Error: You are using an incorrect (outdated?) version of the queen.tbl file\n");
- exit(1);
+ error("You are using an incorrect (outdated?) version of the queen.tbl file");
}
version = detectGameVersion(size);
Modified: tools/branches/gsoc2007-toolsgui/encode_dxa.cpp
===================================================================
--- tools/branches/gsoc2007-toolsgui/encode_dxa.cpp 2007-12-16 16:03:04 UTC (rev 29879)
+++ tools/branches/gsoc2007-toolsgui/encode_dxa.cpp 2007-12-16 17:28:52 UTC (rev 29880)
@@ -828,8 +828,7 @@
int r = read_png_file(strbuf, image, palette, width, height);
if (!palette) {
- printf("Error: 8-bit 256-color image expected!\n");
- exit(0);
+ error("8-bit 256-color image expected");
}
if (!r) {
Modified: tools/branches/gsoc2007-toolsgui/extract_loom_tg16.c
===================================================================
--- tools/branches/gsoc2007-toolsgui/extract_loom_tg16.c 2007-12-16 16:03:04 UTC (rev 29879)
+++ tools/branches/gsoc2007-toolsgui/extract_loom_tg16.c 2007-12-16 17:28:52 UTC (rev 29880)
@@ -1274,7 +1274,7 @@
output = fopen(fname, "wb");
if (!output) {
- error("Error: unable to create %s", fname);
+ error("Unable to create %s", fname);
}
extract_resource(input, output, res);
@@ -1334,7 +1334,7 @@
input = fopen(argv[1], "rb");
if (!input) {
- error("Error: unable to open file %s for input", argv[1]);
+ error("unable to open file %s for input", argv[1]);
}
InitCRC();
@@ -1363,7 +1363,7 @@
sprintf(fname, "%s/%02i.LFL", inputPath, lfl->num);
output = fopen(fname, "wb");
if (!output) {
- error("Error: unable to create %s", fname);
+ error("unable to create %s", fname);
}
notice("Creating %s...", fname);
@@ -1401,7 +1401,7 @@
sprintf(fname, "%s/00.LFL", inputPath);
output = fopen(fname, "wb");
if (!output) {
- error("Error: unable to create index file!");
+ error("Unable to create index file!");
}
notice("Creating %s...", fname);
@@ -1456,7 +1456,7 @@
sprintf(fname, "%s/97.LFL", inputPath);
output = fopen(fname, "wb");
if (!output) {
- error("Error: unable to create charset file 97.LFL");
+ error("Unable to create charset file 97.LFL");
}
notice("Creating %s...", fname);
@@ -1466,7 +1466,7 @@
sprintf(fname, "%s/98.LFL", inputPath);
output = fopen(fname, "wb");
if (!output) {
- error("Error: unable to create charset file 98.LFL");
+ error("Unable to create charset file 98.LFL");
}
notice("Creating %s...", fname);
@@ -1476,7 +1476,7 @@
sprintf(fname, "%s/99.LFL", inputPath);
output = fopen(fname, "wb");
if (!output) {
- error("Error: unable to create charset file 99.LFL");
+ error("Unable to create charset file 99.LFL");
}
notice("Creating %s...", fname);
Modified: tools/branches/gsoc2007-toolsgui/extract_mm_apple.c
===================================================================
--- tools/branches/gsoc2007-toolsgui/extract_mm_apple.c 2007-12-16 16:03:04 UTC (rev 29879)
+++ tools/branches/gsoc2007-toolsgui/extract_mm_apple.c 2007-12-16 17:28:52 UTC (rev 29880)
@@ -66,11 +66,11 @@
getPath(argv[argc - 1], inputPath);
if (!(input1 = fopen(argv[1], "rb"))) {
- error("Error: unable to open file %s for input", argv[1]);
+ error("Unable to open file %s for input", argv[1]);
}
if (!(input2 = fopen(argv[2], "rb"))) {
- error("Error: unable to open file %s for input", argv[2]);
+ error("Unable to open file %s for input", argv[2]);
}
fseek(input1, 142080, SEEK_SET);
Modified: tools/branches/gsoc2007-toolsgui/extract_mm_c64.c
===================================================================
--- tools/branches/gsoc2007-toolsgui/extract_mm_c64.c 2007-12-16 16:03:04 UTC (rev 29879)
+++ tools/branches/gsoc2007-toolsgui/extract_mm_c64.c 2007-12-16 17:28:52 UTC (rev 29880)
@@ -69,11 +69,11 @@
getPath(argv[argc - 1], inputPath);
if (!(input1 = fopen(argv[1], "rb"))) {
- error("Error: unable to open file %s for input", argv[1]);
+ error("Unable to open file %s for input", argv[1]);
}
if (!(input2 = fopen(argv[2], "rb"))) {
- error("Error: unable to open file %s for input", argv[2]);
+ error("Unable to open file %s for input", argv[2]);
}
/* check signature */
Modified: tools/branches/gsoc2007-toolsgui/extract_mm_nes.c
===================================================================
--- tools/branches/gsoc2007-toolsgui/extract_mm_nes.c 2007-12-16 16:03:04 UTC (rev 29879)
+++ tools/branches/gsoc2007-toolsgui/extract_mm_nes.c 2007-12-16 17:28:52 UTC (rev 29880)
@@ -132,14 +132,14 @@
};
t_resource res_roomgfx_esp[40] = {
- { 0x04001, 0x041B, NES_ROOMGFX }, { 0x0441C, 0x069E, NES_ROOMGFX }, { 0x04ABA, 0x0327, NES_ROOMGFX }, { 0x04DE1, 0x053B, NES_ROOMGFX }, { 0x0531C, 0x06BE, NES_ROOMGFX },
- { 0x059DA, 0x0682, NES_ROOMGFX }, { 0x0605C, 0x0778, NES_ROOMGFX }, { 0x067D4, 0x0517, NES_ROOMGFX }, { 0x06CEB, 0x07FB, NES_ROOMGFX }, { 0x074E6, 0x07BE, NES_ROOMGFX },
- { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x07E2, NES_ROOMGFX }, { 0x09B4F, 0x0791, NES_ROOMGFX },
- { 0x0A2E0, 0x07B5, NES_ROOMGFX }, { 0x0AA95, 0x0515, NES_ROOMGFX }, { 0x0AFAA, 0x0799, NES_ROOMGFX }, { 0x0B743, 0x04B9, NES_ROOMGFX }, { 0x0BBFC, 0x0319, NES_ROOMGFX },
- { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x072C, NES_ROOMGFX }, { 0x0CB91, 0x0827, NES_ROOMGFX }, { 0x0D3B8, 0x0515, NES_ROOMGFX }, { 0x0D8CD, 0x064E, NES_ROOMGFX },
- { 0x0DF1B, 0x0775, NES_ROOMGFX }, { 0x0E690, 0x06DD, NES_ROOMGFX }, { 0x0ED6D, 0x0376, NES_ROOMGFX }, { 0x0F0E3, 0x05F7, NES_ROOMGFX }, { 0x0F6DA, 0x078D, NES_ROOMGFX },
- { 0x07CA4, 0x02D6, NES_ROOMGFX }, { 0x10001, 0x06A3, NES_ROOMGFX }, { 0x106A4, 0x091F, NES_ROOMGFX }, { 0x10FC3, 0x0361, NES_ROOMGFX }, { 0x11324, 0x0489, NES_ROOMGFX },
- { 0x117AD, 0x0437, NES_ROOMGFX }, { 0x11BE4, 0x086E, NES_ROOMGFX }, { 0x12452, 0x0199, NES_ROOMGFX }, { 0x125EB, 0x0947, NES_ROOMGFX }, { 0x12F32, 0x037A, NES_ROOMGFX }
+ { 0x04001, 0x041B, NES_ROOMGFX }, { 0x0441C, 0x069E, NES_ROOMGFX }, { 0x04ABA, 0x0327, NES_ROOMGFX }, { 0x04DE1, 0x053B, NES_ROOMGFX }, { 0x0531C, 0x06BE, NES_ROOMGFX },
+ { 0x059DA, 0x0682, NES_ROOMGFX }, { 0x0605C, 0x0778, NES_ROOMGFX }, { 0x067D4, 0x0517, NES_ROOMGFX }, { 0x06CEB, 0x07FB, NES_ROOMGFX }, { 0x074E6, 0x07BE, NES_ROOMGFX },
+ { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x07E2, NES_ROOMGFX }, { 0x09B4F, 0x0791, NES_ROOMGFX },
+ { 0x0A2E0, 0x07B5, NES_ROOMGFX }, { 0x0AA95, 0x0515, NES_ROOMGFX }, { 0x0AFAA, 0x0799, NES_ROOMGFX }, { 0x0B743, 0x04B9, NES_ROOMGFX }, { 0x0BBFC, 0x0319, NES_ROOMGFX },
+ { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x072C, NES_ROOMGFX }, { 0x0CB91, 0x0827, NES_ROOMGFX }, { 0x0D3B8, 0x0515, NES_ROOMGFX }, { 0x0D8CD, 0x064E, NES_ROOMGFX },
+ { 0x0DF1B, 0x0775, NES_ROOMGFX }, { 0x0E690, 0x06DD, NES_ROOMGFX }, { 0x0ED6D, 0x0376, NES_ROOMGFX }, { 0x0F0E3, 0x05F7, NES_ROOMGFX }, { 0x0F6DA, 0x078D, NES_ROOMGFX },
+ { 0x07CA4, 0x02D6, NES_ROOMGFX }, { 0x10001, 0x06A3, NES_ROOMGFX }, { 0x106A4, 0x091F, NES_ROOMGFX }, { 0x10FC3, 0x0361, NES_ROOMGFX }, { 0x11324, 0x0489, NES_ROOMGFX },
+ { 0x117AD, 0x0437, NES_ROOMGFX }, { 0x11BE4, 0x086E, NES_ROOMGFX }, { 0x12452, 0x0199, NES_ROOMGFX }, { 0x125EB, 0x0947, NES_ROOMGFX }, { 0x12F32, 0x037A, NES_ROOMGFX }
};
p_resource res_roomgfx[NUM_ROMSETS] = {
@@ -1135,7 +1135,7 @@
output = fopen(fname, "wb");
if (!output) {
- error("Error: unable to create %s!", fname);
+ error("Unable to create %s!", fname);
}
notice("Extracting resource to %s", fname);
@@ -1144,8 +1144,8 @@
}
#endif /* MAKE_LFLS */
-uint32 CRCtable[256];
-void InitCRC (void) {
+static uint32 CRCtable[256];
+static void InitCRC(void) {
const uint32 poly = 0xEDB88320;
int i, j;
uint32 n;
@@ -1159,7 +1159,7 @@
CRCtable[i] = n;
}
}
-uint32 CheckROM (FILE *file) {
+static uint32 CheckROM(FILE *file) {
uint32 CRC = 0xFFFFFFFF;
uint32 i;
@@ -1170,7 +1170,7 @@
return CRC ^ 0xFFFFFFFF;
}
-int main (int argc, char **argv) {
+int main(int argc, char **argv) {
FILE *input, *output;
char fname[1024];
char inputPath[768];
@@ -1187,7 +1187,7 @@
getPath(argv[argc - 1], inputPath);
if (!(input = fopen(argv[1], "rb"))) {
- error("Error: unable to open file %s for input", argv[1]);
+ error("Unable to open file %s for input", argv[1]);
}
if ((readByte(input) == 'N') && (readByte(input) == 'E') && (readByte(input) == 'S') && (readByte(input) == 0x1A)) {
@@ -1222,9 +1222,9 @@
notice("ROM contents verified as Maniac Mansion (Germany)");
break;
case 0xF5B2AFCA:
- ROMset = ROMSET_SPAIN;
- notice("ROM contents verified as Maniac Mansion (Spain)");
- break;
+ ROMset = ROMSET_SPAIN;
+ notice("ROM contents verified as Maniac Mansion (Spain)");
+ break;
case 0x3DA2085E:
error("Maniac Mansion (Japan) is not supported");
break;
@@ -1242,7 +1242,7 @@
sprintf(fname, "%s/%02i.LFL", inputPath, lfl->num);
output = fopen(fname, "wb");
if (!output) {
- error("Error: unable to create %s", fname);
+ error("Unable to create %s", fname);
}
notice("Creating %s...", fname);
@@ -1318,7 +1318,7 @@
sprintf(fname, "%s/00.LFL", inputPath);
output = fopen(fname, "wb");
if (!output) {
- error("Error: unable to create index file");
+ error("Unable to create index file");
}
notice("Creating %s...", fname);
Modified: tools/branches/gsoc2007-toolsgui/extract_zak_c64.c
===================================================================
--- tools/branches/gsoc2007-toolsgui/extract_zak_c64.c 2007-12-16 16:03:04 UTC (rev 29879)
+++ tools/branches/gsoc2007-toolsgui/extract_zak_c64.c 2007-12-16 17:28:52 UTC (rev 29880)
@@ -36,15 +36,15 @@
#define NUM_ROOMS 59
unsigned char room_disks[NUM_ROOMS], room_tracks[NUM_ROOMS], room_sectors[NUM_ROOMS];
-const int SectorOffset[36] = {
+
+static const int SectorOffset[36] = {
0,
0, 21, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, 294, 315, 336,
357, 376, 395, 414, 433, 452, 471,
490, 508, 526, 544, 562, 580,
598, 615, 632, 649, 666
};
-
-const int ResourcesPerFile[59] = {
+static const int ResourcesPerFile[NUM_ROOMS] = {
0, 29, 12, 14, 13, 4, 4, 10, 7, 4,
14, 19, 5, 4, 7, 6, 11, 9, 4, 4,
1, 3, 3, 5, 1, 9, 4, 10, 13, 6,
Modified: tools/branches/gsoc2007-toolsgui/util.c
===================================================================
--- tools/branches/gsoc2007-toolsgui/util.c 2007-12-16 16:03:04 UTC (rev 29879)
+++ tools/branches/gsoc2007-toolsgui/util.c 2007-12-16 17:28:52 UTC (rev 29880)
@@ -63,14 +63,14 @@
}
void notice(const char *s, ...) {
- char buf[1024];
- va_list va;
+ char buf[1024];
+ va_list va;
- va_start(va, s);
- vsnprintf(buf, 1024, s, va);
- va_end(va);
+ va_start(va, s);
+ vsnprintf(buf, 1024, s, va);
+ va_end(va);
- fprintf(stdout, "%s\n", buf);
+ fprintf(stdout, "%s\n", buf);
}
uint8 readByte(FILE *fp) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list