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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Feb 9 19:24:00 CET 2007


Revision: 25453
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25453&view=rev
Author:   fingolfin
Date:     2007-02-09 10:23:59 -0800 (Fri, 09 Feb 2007)

Log Message:
-----------
SCUMM: Added preferredtarget support

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

Modified: scummvm/trunk/engines/scumm/plugin.cpp
===================================================================
--- scummvm/trunk/engines/scumm/plugin.cpp	2007-02-09 17:57:49 UTC (rev 25452)
+++ scummvm/trunk/engines/scumm/plugin.cpp	2007-02-09 18:23:59 UTC (rev 25453)
@@ -975,7 +975,7 @@
 }
 
 struct DetectorDesc {
-  FilesystemNode node;
+	FilesystemNode node;
 	Common::String md5;
 	uint8 md5sum[16];
 	const MD5Table *md5Entry;	// Entry of the md5 table corresponding to this file, if any.
@@ -1346,7 +1346,6 @@
 
 using namespace Scumm;
 
-
 GameList Engine_SCUMM_gameIDList() {
 	const PlainGameDescriptor *g = gameDescriptions;
 	GameList games;
@@ -1393,6 +1392,27 @@
 		GameDescriptor dg(x->game.gameid, findDescriptionFromGameID(x->game.gameid),
 				x->language, x->game.platform);
 		dg.updateDesc(x->extra);	// Append additional information, if set, to the description.
+
+		// Compute and set the preferred target name for this game.
+		// Based on generateComplexID() in advancedDetector.cpp.
+		// TODO: Maybe also take the "extra" field into account, somehow?
+		// I.e. in order to distinguish  the target names of e.g. EGA and
+		// VGA versions.
+		// Alternatively: add a "preferredTargetPrefix" field to the gameVariantsTable
+		// (with value 0 by default, implying "use the gameid as prefix").
+		// If we do that, 
+		Common::String res(x->game.gameid);
+
+		if (x->game.platform != Common::kPlatformPC && x->game.platform != Common::kPlatformUnknown) {
+			res = res + "-" + Common::getPlatformAbbrev(x->game.platform);
+		}
+
+		if (x->language != Common::EN_ANY && x->language != Common::UNK_LANG) {
+			res = res + "-" + Common::getLanguageCode(x->language);
+		}
+
+		dg["preferredtarget"] = res;
+
 		detectedGames.push_back(dg);
 	}
 


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