aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2004-02-18 10:59:47 +0000
committerMax Horn2004-02-18 10:59:47 +0000
commit97472bd078dd7e0b72e5f119c6e11d28fd505ae4 (patch)
treed0e8168ee085169c7896b5adbd06683a03962613 /scumm
parent3e58cb906a0a467f75cab2c5c202e5ec87993d5b (diff)
downloadscummvm-rg350-97472bd078dd7e0b72e5f119c6e11d28fd505ae4.tar.gz
scummvm-rg350-97472bd078dd7e0b72e5f119c6e11d28fd505ae4.tar.bz2
scummvm-rg350-97472bd078dd7e0b72e5f119c6e11d28fd505ae4.zip
remove this *purely experimental and knowingly incomplete* test code from the release branch
svn-id: r12929
Diffstat (limited to 'scumm')
-rw-r--r--scumm/scummvm.cpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index caf3e6ac9e..c56bf38a17 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -630,64 +630,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
// differing from the regular version(s) of that game.
_gameName = ConfMan.hasKey("basename") ? ConfMan.get("basename") : gs.baseFilename ? gs.baseFilename : gs.name;
-#if 1
- // HACK HACK HACK
- // This is not how, and where, MD5 computation should be done in the
- // real world. Rather this is meant as a proof-of-concept hack.
- // It's quick, it's dirty, and it'll go again eventually :-)
- char buf[1024];
- uint8 md5sum[16];
-
- if (!(_features & GF_SMALL_HEADER)) {
-
- if (_features & GF_AFTER_HEV7) {
- sprintf(buf, "%s.he0", _gameName.c_str());
- } else if ((_gameId == GID_FT) && (_features & GF_PC) && (_features & GF_DEMO)) {
- sprintf(buf, "%s.000", _gameName.c_str());
- } else if (_version >= 7) {
- sprintf(buf, "%s.la0", _gameName.c_str());
- } else if (_features & GF_HUMONGOUS)
- sprintf(buf, "%s.he0", _gameName.c_str());
- else {
- sprintf(buf, "%s.000", _gameName.c_str());
-// if (_gameId == GID_SAMNMAX)
-// sprintf(buf2, "%s.sm0", _gameName.c_str());
- }
- } else if (!(_features & GF_SMALL_NAMES)) {
- sprintf(buf, "000.lfl");
- } else {
- sprintf(buf, "00.lfl");
- }
-
- if (md5_file(buf, md5sum)) {
- // HACK : changed to this code since PalmOS doesn't handle correctly %02x.
- // It returns only 8 chars string in upper case so i need to use hex[],
- // copy last 2 chars to md5str and convert result to lower case
- int j;
- char md5str[32+1];
- char hex[8+1];
- for (j = 0; j < 16; j++) {
- sprintf(hex, "%02x", (int)md5sum[j]);
- memcpy(md5str+j*2, hex + strlen(hex) - 2, 2);
- }
-
- for (j = 0; j < 32; j++)
- md5str[j] = tolower(md5str[j]);
- // --
-
- md5str[32] = 0;
- printf("%s %s\n", md5str, buf);
- const MD5Table *elem;
- elem = (const MD5Table *)bsearch(md5str, md5table, ARRAYSIZE(md5table)-1, sizeof(MD5Table), compareMD5Table);
- if (elem)
- printf("Match found in database: target %s, language %s, platform %s\n",
- elem->target, Common::getLanguageDescription(elem->language), Common::getPlatformDescription(elem->platform));
- else
- printf("Unknown MD5! Please report the details (language, platform, etc.) of this game to the ScummVM team\n");
-
- }
-#endif
-
_midiDriver = GameDetector::detectMusicDriver(gs.midi);
_copyProtection = ConfMan.getBool("copy_protection");