[Scummvm-cvs-logs] SF.net SVN: scummvm: [25695] scummvm/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Feb 18 19:07:33 CET 2007


Revision: 25695
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25695&view=rev
Author:   fingolfin
Date:     2007-02-18 10:07:32 -0800 (Sun, 18 Feb 2007)

Log Message:
-----------
Improved (I hope) the 'Unknown MD5' messages in our detectors a little bit

Modified Paths:
--------------
    scummvm/trunk/common/advancedDetector.cpp
    scummvm/trunk/engines/lure/lure.cpp
    scummvm/trunk/engines/scumm/plugin.cpp

Modified: scummvm/trunk/common/advancedDetector.cpp
===================================================================
--- scummvm/trunk/common/advancedDetector.cpp	2007-02-18 18:03:57 UTC (rev 25694)
+++ scummvm/trunk/common/advancedDetector.cpp	2007-02-18 18:07:32 UTC (rev 25695)
@@ -403,11 +403,17 @@
 	if (!filesMD5.empty()) {
 		// TODO: This message should be cleaned up / made more specific.
 		// For example, we should specify at least which engine triggered this.
-		printf("MD5s of your game version are unknown. Please, report following data to\n");
-		printf("ScummVM team along with your game name and version:\n");
+		//
+		// Might also be helpful to display the full path (for when this is used
+		// from the mass detector).
+		printf("Your game version appears to be unknown. Please, report the following\n");
+		printf("data to the ScummVM team along with name of the game you tried to add\n");
+		printf("and its version/language/etc.:\n");
 
 		for (StringMap::const_iterator file = filesMD5.begin(); file != filesMD5.end(); ++file)
-			printf("%s: \"%s\", %d\n", file->_key.c_str(), file->_value.c_str(), filesSize[file->_key]);
+			printf("  %s: '%s', %d\n", file->_key.c_str(), file->_value.c_str(), filesSize[file->_key]);
+
+		printf("\n");
 	}
 
 	if (params.fileBasedFallback != 0) {

Modified: scummvm/trunk/engines/lure/lure.cpp
===================================================================
--- scummvm/trunk/engines/lure/lure.cpp	2007-02-18 18:03:57 UTC (rev 25694)
+++ scummvm/trunk/engines/lure/lure.cpp	2007-02-18 18:07:32 UTC (rev 25695)
@@ -139,7 +139,11 @@
 			}
 		}
 		if (detectedGames.empty()) {
-			debug("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str);
+			printf("Your game version appears to be unknown. Please, report the following\n");
+			printf("data to the ScummVM team along with name of the game you tried to add\n");
+			printf("and its version/language/etc.:\n");
+			
+			printf("  LURE MD5 '%s'\n\n", md5str);
 
 			const PlainGameDescriptor *g1 = lure_list;
 			while (g1->gameid) {

Modified: scummvm/trunk/engines/scumm/plugin.cpp
===================================================================
--- scummvm/trunk/engines/scumm/plugin.cpp	2007-02-18 18:03:57 UTC (rev 25694)
+++ scummvm/trunk/engines/scumm/plugin.cpp	2007-02-18 18:07:32 UTC (rev 25695)
@@ -938,29 +938,29 @@
 	return buf;
 }
 
-static Common::String generateFilenameForDetection(const GameFilenamePattern &gfp) {
+static Common::String generateFilenameForDetection(const char *pattern, FilenameGenMethod genMethod) {
 	char buf[128];
 
-	switch (gfp.genMethod) {
+	switch (genMethod) {
 	case kGenDiskNum:
 	case kGenRoomNum:
-		snprintf(buf, sizeof(buf), gfp.pattern, 0);
+		snprintf(buf, sizeof(buf), pattern, 0);
 		break;
 
 	case kGenHEPC:
-		snprintf(buf, sizeof(buf), "%s.he0", gfp.pattern);
+		snprintf(buf, sizeof(buf), "%s.he0", pattern);
 		break;
 
 	case kGenHEMac:
-		snprintf(buf, sizeof(buf), "%s (0)", gfp.pattern);
+		snprintf(buf, sizeof(buf), "%s (0)", pattern);
 		break;
 
 	case kGenHEMacNoParens:
-		snprintf(buf, sizeof(buf), "%s 0", gfp.pattern);
+		snprintf(buf, sizeof(buf), "%s 0", pattern);
 		break;
 
 	case kGenUnchanged:
-		strncpy(buf, gfp.pattern, sizeof(buf));
+		strncpy(buf, pattern, sizeof(buf));
 		break;
 
 	default:
@@ -1119,7 +1119,7 @@
 		// Generate the detectname corresponding to the gfp. If the file doesn't
 		// exist in the directory we are looking at, we can skip to the next
 		// one immediately.
-		Common::String file(generateFilenameForDetection(*gfp));
+		Common::String file(generateFilenameForDetection(gfp->pattern, gfp->genMethod));
 		if (!fileMD5Map.contains(file))
 			continue;
 
@@ -1576,8 +1576,14 @@
 	// unknown MD5, or with a medium debug level in case of a known MD5 (for
 	// debugging purposes).
 	if (!findInMD5Table(res.md5.c_str())) {
-		printf("Unknown MD5 (%s)! If this is an official version of the game (and not e.g. a fan made translation), "
-		       "please report the details (language, platform, etc.) of this game to the ScummVM team\n", res.md5.c_str());
+		printf("Your game version appears to be unknown. Please, report the following\n");
+		printf("data to the ScummVM team along with name of the game you tried to add\n");
+		printf("and its version/language/etc.:\n");
+		
+		printf("  SCUMM gameid '%s', file '%s', MD5 '%s'\n\n",
+				res.game.gameid,
+				generateFilenameForDetection(res.fp.pattern, res.fp.genMethod).c_str(),
+				res.md5.c_str());
 	} else {
 		debug(1, "Using MD5 '%s'", res.md5.c_str());
 	}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list