[Scummvm-cvs-logs] CVS: scummvm/scumm scumm.cpp,1.285,1.286

Eugene Sandulenko sev at users.sourceforge.net
Sat Dec 18 18:26:01 CET 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28596

Modified Files:
	scumm.cpp 
Log Message:
Report unknown MD5's. I wonder, should we move the check after
initSize() and thus have possibility to show up a window with the
message?


Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.285
retrieving revision 1.286
diff -u -d -r1.285 -r1.286
--- scumm.cpp	18 Dec 2004 11:07:52 -0000	1.285
+++ scumm.cpp	19 Dec 2004 02:25:11 -0000	1.286
@@ -444,6 +444,17 @@
 	// Copy MD5 checksum
 	memcpy(_gameMD5, md5sum, 16);
 
+	// Check for unknown MD5
+	char md5str[32+1];
+	for (int j = 0; j < 16; j++) {
+		sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
+	}
+	const MD5Table *elem;
+	elem = (const MD5Table *)bsearch(md5str, md5table, ARRAYSIZE(md5table)-1, sizeof(MD5Table), compareMD5Table);
+
+	if (!elem)
+		printf("Unknown MD5! Please report the details (language, platform, etc.) of this game to the ScummVM team\n");
+
 	// Add default file directories.
 	if (((_features & GF_AMIGA) || (_features & GF_ATARI_ST)) && (_version <= 4)) {
 		// This is for the Amiga version of Indy3/Loom/Maniac/Zak





More information about the Scummvm-git-logs mailing list