[Scummvm-cvs-logs] SF.net SVN: scummvm: [22198] scummvm/trunk/engines/scumm/plugin.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Apr 28 16:45:01 CEST 2006


Revision: 22198
Author:   fingolfin
Date:     2006-04-28 16:43:56 -0700 (Fri, 28 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22198&view=rev

Log Message:
-----------
Report unknown MD5s again

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/plugin.cpp
Modified: scummvm/trunk/engines/scumm/plugin.cpp
===================================================================
--- scummvm/trunk/engines/scumm/plugin.cpp	2006-04-28 23:15:43 UTC (rev 22197)
+++ scummvm/trunk/engines/scumm/plugin.cpp	2006-04-28 23:43:56 UTC (rev 22198)
@@ -879,7 +879,7 @@
 	const MD5Table *md5Entry;	// Entry of the md5 table corresponding to this file, if any.
 };
 
-void detectGames(const FSList &fslist, Common::List<DetectorResult> &results, const char *gameid_XXX) {
+void detectGames(const FSList &fslist, Common::List<DetectorResult> &results, const char *gameid) {
 	typedef Common::HashMap<Common::String, DetectorDesc, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> DescMap;
 	DescMap fileMD5Map;
 	const GameSettings *g;
@@ -896,9 +896,9 @@
 
 	// Iterate over all filename patterns.
 	for (const GameFilenamePattern *gfp = gameFilenamesTable; gfp->gameid; ++gfp) {
-		// If gameid_XXX was specified, we only try to detect that specific game,
+		// If a gameid was specified, we only try to detect that specific game,
 		// so we can just skip over everything with a differing gameid.
-		if (gameid_XXX && scumm_stricmp(gameid_XXX, gfp->gameid))
+		if (gameid && scumm_stricmp(gameid, gfp->gameid))
 			continue;
 	
 		// Generate the detectname corresponding to the gfp. If the file doesn't
@@ -1316,7 +1316,7 @@
 		warning("ScummEngine: unable to locate game data");
 		return new Engine_Empty(syst);
 	}
-
+	
 	DetectorResult res(*(results.begin()));
 
 /*
@@ -1338,6 +1338,14 @@
 		warning("Engine_SCUMM_create: No unique game candidate found, using first one");
 	}
 	
+	// Print the MD5 of the game; either verbose using printf, in case of an
+	// 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)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", res.md5.c_str());
+	} else {
+		debug(5, "Using MD5 '%s'", res.md5.c_str());
+	}
 
 
 	// TODO: Do we really still need / want the platform override ?


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