(svn r6921) - PEBKAC: Add an MD5 sum check of our own data files, and warn if they don't match.

This commit is contained in:
peter1138 2006-10-24 10:15:56 +00:00
parent 736e3597b5
commit e08dfce57c
2 changed files with 16 additions and 0 deletions

View File

@ -161,6 +161,12 @@ void CheckExternalFiles(void)
if (!FileMD5(sample_cat_win, false) && !FileMD5(sample_cat_dos, false))
fprintf(stderr, "Your sample.cat file is corrupted or missing!\n");
for (i = 0; i < lengthof(files_openttd); i++) {
if (!FileMD5(files_openttd[i], false)) {
fprintf(stderr, "Your %s file is corrupted or missing!\n", files_openttd[i].filename);
}
}
/*
* forced DOS palette via command line -> leave it that way
* all Windows files present -> Windows palette

View File

@ -53,3 +53,13 @@ static FileList files_win = {
static MD5File sample_cat_win = { "SAMPLE.CAT", {0x92, 0x12, 0xe8, 0x1e, 0x72, 0xba, 0xdd, 0x4b, 0xbe, 0x1e, 0xae, 0xae, 0x66, 0x45, 0x8e, 0x10} };
static MD5File sample_cat_dos = { "SAMPLE.CAT", {0x42, 0x2e, 0xa3, 0xdd, 0x07, 0x4d, 0x28, 0x59, 0xbb, 0x51, 0x63, 0x9a, 0x6e, 0x0e, 0x85, 0xda} };
static MD5File files_openttd[] = {
{ "2ccmap.grf", { 0x20, 0x03, 0x32, 0x1a, 0x43, 0x6c, 0xc1, 0x05, 0x80, 0xbd, 0x43, 0xeb, 0xe1, 0xfd, 0x0c, 0x62 } },
{ "airports.grf", { 0xfd, 0xa4, 0x38, 0xd6, 0x9c, 0x81, 0x74, 0xfe, 0xa0, 0x98, 0xa2, 0x14, 0x4b, 0x15, 0xb8, 0x4b } },
{ "autorail.grf", { 0xed, 0x44, 0x7f, 0xbb, 0x19, 0x44, 0x48, 0x4c, 0x07, 0x8a, 0xb1, 0xc1, 0x5c, 0x12, 0x3a, 0x60 } },
{ "canalsw.grf", { 0x13, 0x9c, 0x98, 0xcf, 0xb8, 0x7c, 0xd7, 0x1f, 0xca, 0x34, 0xa5, 0x6b, 0x65, 0x31, 0xec, 0x0f } },
{ "elrailsw.grf", { 0x4f, 0xf9, 0xac, 0x79, 0x50, 0x28, 0x9b, 0xe2, 0x15, 0x30, 0xa8, 0x1e, 0xd5, 0xfd, 0xe1, 0xda } },
{ "openttd.grf", { 0x3c, 0x9f, 0x90, 0xb1, 0xf2, 0x45, 0xc3, 0xb4, 0xb5, 0xbb, 0xed, 0x30, 0xec, 0x07, 0x95, 0x9e } },
{ "trkfoundw.grf", { 0x12, 0x33, 0x3f, 0xa3, 0xd1, 0x86, 0x8b, 0x04, 0x53, 0x18, 0x9c, 0xee, 0xf9, 0x2d, 0xf5, 0x95 } },
};