aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2010-01-03 21:07:40 +0000
committerEugene Sandulenko2010-01-03 21:07:40 +0000
commiteccf0cc429a0d79ce81a0813305279b9377169f9 (patch)
treeaffa86922199f09c0bfe16f28b98a9885aa6e12d /engines
parentc83058d30b8e58576e1604fc48581027b0a150d0 (diff)
downloadscummvm-rg350-eccf0cc429a0d79ce81a0813305279b9377169f9.tar.gz
scummvm-rg350-eccf0cc429a0d79ce81a0813305279b9377169f9.tar.bz2
scummvm-rg350-eccf0cc429a0d79ce81a0813305279b9377169f9.zip
Introduced new ADGF flag ADGF_USEEXTRAASTITLE.
Documented ADFlags. svn-id: r46946
Diffstat (limited to 'engines')
-rw-r--r--engines/advancedDetector.cpp18
-rw-r--r--engines/advancedDetector.h14
2 files changed, 25 insertions, 7 deletions
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 1c60ea949d..04f78bf49f 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -142,15 +142,23 @@ GameDescriptor findGameID(
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;
}
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index c024d560b6..f5d0b4c2ee 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -43,11 +43,12 @@ struct ADGameFileDescription {
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 @@ enum ADFlags {
* 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)
};