Introduced new ADGF flag ADGF_USEEXTRAASTITLE.

Documented ADFlags.

svn-id: r46946
This commit is contained in:
Eugene Sandulenko 2010-01-03 21:07:40 +00:00
parent c83058d30b
commit eccf0cc429
2 changed files with 25 additions and 7 deletions

View file

@ -142,15 +142,23 @@ GameDescriptor findGameID(
static GameDescriptor toGameDescriptor(const ADGameDescription &g, const PlainGameDescriptor *sg) {
const char *title = 0;
const char *extra;
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;
}

View file

@ -43,6 +43,7 @@ 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
@ -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)
};