[Scummvm-cvs-logs] SF.net SVN: scummvm:[46946] scummvm/trunk/engines
sev at users.sourceforge.net
sev at users.sourceforge.net
Sun Jan 3 22:07:40 CET 2010
Revision: 46946
http://scummvm.svn.sourceforge.net/scummvm/?rev=46946&view=rev
Author: sev
Date: 2010-01-03 21:07:40 +0000 (Sun, 03 Jan 2010)
Log Message:
-----------
Introduced new ADGF flag ADGF_USEEXTRAASTITLE.
Documented ADFlags.
Modified Paths:
--------------
scummvm/trunk/engines/advancedDetector.cpp
scummvm/trunk/engines/advancedDetector.h
Modified: scummvm/trunk/engines/advancedDetector.cpp
===================================================================
--- scummvm/trunk/engines/advancedDetector.cpp 2010-01-03 20:47:04 UTC (rev 46945)
+++ scummvm/trunk/engines/advancedDetector.cpp 2010-01-03 21:07:40 UTC (rev 46946)
@@ -142,15 +142,23 @@
static GameDescriptor toGameDescriptor(const ADGameDescription &g, const PlainGameDescriptor *sg) {
const char *title = 0;
+ const char *extra;
- while (sg->gameid) {
- if (!scumm_stricmp(g.gameid, sg->gameid))
- title = sg->description;
- sg++;
+ if (g.flags & ADGF_USEEXTRAASTITLE) {
+ title = g.extra;
+ extra = "";
+ } else {
+ while (sg->gameid) {
+ if (!scumm_stricmp(g.gameid, sg->gameid))
+ title = sg->description;
+ sg++;
+ }
+
+ extra = g.extra;
}
GameDescriptor gd(g.gameid, title, g.language, g.platform);
- gd.updateDesc(g.extra);
+ gd.updateDesc(extra);
return gd;
}
Modified: scummvm/trunk/engines/advancedDetector.h
===================================================================
--- scummvm/trunk/engines/advancedDetector.h 2010-01-03 20:47:04 UTC (rev 46945)
+++ scummvm/trunk/engines/advancedDetector.h 2010-01-03 21:07:40 UTC (rev 46946)
@@ -43,11 +43,12 @@
enum ADGameFlags {
ADGF_NO_FLAGS = 0,
+ ADGF_USEEXTRAASTITLE = (1 << 26), // Extra field value will be used as main game title, not gameid
ADGF_KEEPMATCH = (1 << 27), // this entry is kept even when there are matched
// entries with more files
ADGF_DROPLANGUAGE = (1 << 28), // don't add language to gameid
- ADGF_CD = (1 << 29), // add "-cd" to gameid
- ADGF_DEMO = (1 << 30) // add "-demo" to gameid
+ ADGF_CD = (1 << 29), // add "-cd" to gameid
+ ADGF_DEMO = (1 << 30) // add "-demo" to gameid
};
struct ADGameDescription {
@@ -102,7 +103,16 @@
* not equal to english) and platform (if not equal to PC).
*/
kADFlagDontAugmentPreferredTarget = (1 << 0),
+ /**
+ * Warn user about new variant if his version was detected with fallback
+ */
kADFlagPrintWarningOnFileBasedFallback = (1 << 1),
+ /**
+ * Store value of extra field in config file, and use it as a hint
+ * on subsequent runs. Could be used when there is no way to autodetect
+ * game (when more than one game sits in same directory), and user picks
+ * up a variant manually.
+ */
kADFlagUseExtraAsHint = (1 << 2)
};
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