From 4e057c8885ce5dfcb8a9964f9247531a391dd341 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 19 Dec 2004 02:25:11 +0000 Subject: 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? svn-id: r16124 --- scumm/scumm.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index cbc0a06024..310a0ecc8e 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -444,6 +444,17 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS // 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 -- cgit v1.2.3