aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2006-02-25 18:24:22 +0000
committerMax Horn2006-02-25 18:24:22 +0000
commit05559c89f24e65fd1a2ee4092f1c84f8c50b9745 (patch)
treef55bbb1ea7a361a2f7aec7cb3ed437230505643c /engines
parent0364eeed5cbc11d74cc2fcbc54f800822b6f76ed (diff)
downloadscummvm-rg350-05559c89f24e65fd1a2ee4092f1c84f8c50b9745.tar.gz
scummvm-rg350-05559c89f24e65fd1a2ee4092f1c84f8c50b9745.tar.bz2
scummvm-rg350-05559c89f24e65fd1a2ee4092f1c84f8c50b9745.zip
Moved check for unknown MD5 checksum from ScummEngine::ScummEngine to Engine_SCUMM_create
svn-id: r20882
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/scumm.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 9ecbc004e3..e77d7c1980 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1215,21 +1215,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
// Clean _substResFileNameBundle
memset(&_substResFileNameBundle, 0, sizeof(_substResFileNameBundle));
- // 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;
-#ifdef PALMOS_68K
- uint32 arraySize = MemPtrSize((void *)md5table) / sizeof(MD5Table) - 1;
-#else
- uint32 arraySize = ARRAYSIZE(md5table) - 1;
-#endif
- elem = (const MD5Table *)bsearch(md5str, md5table, arraySize, sizeof(MD5Table), compareMD5Table);
- if (!elem)
- printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str);
-
_defaultFTSentenceScript = -1;
_buggyFTSentenceScript = -1;
@@ -3590,6 +3575,17 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
game.midi = MDT_TOWNS;
}
+ // Check for unknown MD5 checksums, and print a message if we encounter one.
+ const MD5Table *elem;
+#ifdef PALMOS_68K
+ uint32 arraySize = MemPtrSize((void *)md5table) / sizeof(MD5Table) - 1;
+#else
+ uint32 arraySize = ARRAYSIZE(md5table) - 1;
+#endif
+ elem = (const MD5Table *)bsearch(md5, md5table, arraySize, sizeof(MD5Table), compareMD5Table);
+ if (!elem)
+ printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5);
+
// Finally, we have massaged the GameSettings to our satisfaction, and can
// instantiate the appropriate game engine. Hooray!
switch (game.version) {