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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Mar 8 19:22:00 CET 2006


Revision: 21155
Author:   fingolfin
Date:     2006-03-08 19:21:23 -0800 (Wed, 08 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21155&view=rev

Log Message:
-----------
Add the known 'extra' info to the description string; and removed the old hack which added this information during launch (which really was a bad hack)

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/plugin.cpp
Modified: scummvm/trunk/engines/scumm/plugin.cpp
===================================================================
--- scummvm/trunk/engines/scumm/plugin.cpp	2006-03-09 03:09:21 UTC (rev 21154)
+++ scummvm/trunk/engines/scumm/plugin.cpp	2006-03-09 03:21:23 UTC (rev 21155)
@@ -1192,7 +1192,7 @@
 				// Find the GameDescriptor for that gameid
 				for (g = scumm_settings; g->gameid; ++g) {
 					if (0 == scumm_stricmp(g->gameid, gameid))
-							break;
+						break;
 				}
 				assert(g->gameid);
 				DetectedGame dg(g->gameid, findDescriptionFromGameID(g->gameid), elem->language);
@@ -1201,19 +1201,25 @@
 				else
 					dg.platform = elem->platform;
 
-				const bool customLanguage = (dg.language != Common::UNK_LANG);
-				const bool customPlatform = (dg.platform != Common::kPlatformUnknown);
+				const bool hasCustomLanguage = (dg.language != Common::UNK_LANG);
+				const bool hasCustomPlatform = (dg.platform != Common::kPlatformUnknown);
+				const bool hasExtraDesc = (elem->extra && elem->extra[0]);
 
 				// Adapt the description string if custom platform/language is set.
-				// TODO: Also use the 'extra' information, like "Demo" etc.
-				if (customLanguage || customPlatform) {
+				if (hasCustomLanguage || hasCustomPlatform || hasExtraDesc) {
 					dg.description += " (";
-					if (customLanguage)
+					if (hasCustomLanguage)
 						dg.description += Common::getLanguageDescription(dg.language);
-					if (customLanguage && customPlatform)
-						dg.description += "/";
-					if (customPlatform)
+					if (hasCustomPlatform) {
+						if (hasCustomLanguage)
+							dg.description += "/";
 						dg.description += Common::getPlatformDescription(dg.platform);
+					}
+					if (hasExtraDesc) {
+						if (hasCustomPlatform || hasCustomLanguage)
+							dg.description += "/";
+						dg.description += elem->extra;
+					}
 					dg.description += ")";
 				}
 				
@@ -1345,17 +1351,6 @@
 			// gameid (since we abused that field to store the MD5).
 			game = *g;
 			game.gameid = gameid;
-			if (game.extra) {
-				Common::String desc(findDescriptionFromGameID(gameid));
-				desc += " (";
-				desc += game.extra;
-				desc += ")";
-
-				// FIXME: Unconditionally setting the window caption here seems
-				// quite wrong. In particular, we override whatever custom
-				// description the user has set.
-				g_system->setWindowCaption(desc.c_str());
-			}
 			break;
 		}
 		g++;


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