aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2007-01-29 23:25:51 +0000
committerEugene Sandulenko2007-01-29 23:25:51 +0000
commitadcfd2cc5f64157bd5135e5a90b29443036233f2 (patch)
tree1ee0bbc7c06e93a9c584892b2261322dd32779fa
parent7bb9b05f551b81f3c34dacf3bea80ae7fd726fbc (diff)
downloadscummvm-rg350-adcfd2cc5f64157bd5135e5a90b29443036233f2.tar.gz
scummvm-rg350-adcfd2cc5f64157bd5135e5a90b29443036233f2.tar.bz2
scummvm-rg350-adcfd2cc5f64157bd5135e5a90b29443036233f2.zip
Now AdvancedDetector could use single ID per engine. Also it can suggest
more complex game IDs with platform and language specified. AGI engine benefits most from that. Also turned Cine, Parallaction and SAGA to single ID, autoupgrading old ID. svn-id: r25269
-rw-r--r--common/advancedDetector.cpp63
-rw-r--r--common/advancedDetector.h8
-rw-r--r--common/util.cpp39
-rw-r--r--common/util.h2
-rw-r--r--engines/agi/detection.cpp201
-rw-r--r--engines/cine/detection.cpp9
-rw-r--r--engines/parallaction/detection.cpp1
-rw-r--r--engines/saga/game.cpp9
-rw-r--r--gui/launcher.cpp11
9 files changed, 229 insertions, 114 deletions
diff --git a/common/advancedDetector.cpp b/common/advancedDetector.cpp
index ca0b9b547f..e7b72b6474 100644
--- a/common/advancedDetector.cpp
+++ b/common/advancedDetector.cpp
@@ -50,6 +50,25 @@ namespace AdvancedDetector {
static ADList detectGame(const FSList *fslist, const Common::ADParams &params, Language language, Platform platform);
+GameList genGameList(const Common::ADParams &params) {
+ if (params.singleid != NULL) {
+ GameList gl;
+
+ const PlainGameDescriptor *g = params.list;
+ while (g->gameid) {
+ if (0 == scumm_stricmp(params.singleid, g->gameid)) {
+ gl.push_back(GameDescriptor(g->gameid, g->description));
+
+ return gl;
+ }
+ g++;
+ }
+ error("Engine %s doesn't have its singleid specified in ids list", params.singleid);
+ }
+
+ return GameList(params.list);
+}
+
void upgradeTargetIfNecessary(const Common::ADParams &params) {
if (params.obsoleteList == 0)
return;
@@ -85,6 +104,10 @@ PluginError detectGameForEngineCreation(
GameList detectedGames = detectFunc(fslist);
+ // We have single ID set, so we have a game if there are hits
+ if (params.singleid != NULL && detectedGames.size())
+ return kNoError;
+
for (uint i = 0; i < detectedGames.size(); i++) {
if (detectedGames[i].gameid() == gameid) {
return kNoError;
@@ -106,6 +129,7 @@ GameDescriptor findGameID(
}
GameDescriptor gs;
+
if (params.obsoleteList != 0) {
const Common::ADObsoleteGameID *o = params.obsoleteList;
while (o->from) {
@@ -135,6 +159,26 @@ static GameDescriptor toGameDescriptor(const ADGameDescription &g, const PlainGa
return gd;
}
+/**
+ * Makes gameid in form of
+ * gameid-plaform-lang
+ */
+static String generateComplexID(const String id, int listPos, const Common::ADParams &params) {
+ const ADGameDescription *desc = (const ADGameDescription *)(params.descs + listPos * params.descItemSize);
+
+ String res(id);
+
+ if (desc->platform != kPlatformPC && desc->platform != kPlatformUnknown) {
+ res = res + "-" + getPlatformAbbrev(desc->platform);
+ }
+
+ if (desc->language != EN_ANY && desc->language != UNK_LANG) {
+ res = res + "-" + getLanguageCode(desc->language);
+ }
+
+ return res;
+}
+
GameList detectAllGames(
const FSList &fslist,
const Common::ADParams &params
@@ -142,8 +186,23 @@ GameList detectAllGames(
Common::ADList matches = detectGame(&fslist, params, Common::UNK_LANG, Common::kPlatformUnknown);
GameList detectedGames;
- for (uint i = 0; i < matches.size(); i++)
- detectedGames.push_back(toGameDescriptor(*(const ADGameDescription *)(params.descs + matches[i] * params.descItemSize), params.list));
+ for (uint i = 0; i < matches.size(); i++) {
+ GameDescriptor desc(toGameDescriptor(*(const ADGameDescription *)(params.descs + matches[i] * params.descItemSize), params.list));
+
+ if (params.singleid != NULL) {
+ desc["preferredtarget"] = desc["gameid"];
+ desc["gameid"] = params.singleid;
+ }
+
+ if (params.flags & kADFlagComplexID) {
+ if (!desc.contains("preferredtarget"))
+ desc["preferredtarget"] = desc["gameid"];
+
+ desc["preferredtarget"] = generateComplexID(desc["preferredtarget"], matches[i], params);
+ }
+
+ detectedGames.push_back(desc);
+ }
return detectedGames;
}
diff --git a/common/advancedDetector.h b/common/advancedDetector.h
index ea10e53b4e..cc5c9c06fc 100644
--- a/common/advancedDetector.h
+++ b/common/advancedDetector.h
@@ -82,6 +82,12 @@ typedef Array<const ADGameDescription*> ADGameDescList;
namespace AdvancedDetector {
/**
+ * Returns list of targets supported by the engine.
+ * Distinguishes engines with single ID
+ */
+GameList genGameList(const Common::ADParams &params);
+
+/**
* Scan through the game descriptors specified in params and search for
* 'gameid' in there. If a match is found, returns a GameDescriptor
* with gameid and description set.
@@ -127,7 +133,7 @@ PluginError detectGameForEngineCreation(
#define ADVANCED_DETECTOR_DEFINE_PLUGIN_WITH_FUNC(engine,factoryFunc,detectFunc,params) \
GameList Engine_##engine##_gameIDList() { \
- return GameList(params.list); \
+ return Common::AdvancedDetector::genGameList(params); \
} \
GameDescriptor Engine_##engine##_findGameID(const char *gameid) { \
return Common::AdvancedDetector::findGameID(gameid, params); \
diff --git a/common/util.cpp b/common/util.cpp
index d67027b873..2a4aacafe0 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -175,27 +175,27 @@ const char *getLanguageDescription(Language id) {
const PlatformDescription g_platforms[] = {
- {"3do", "3do", "3DO", kPlatform3DO},
- {"acorn", "acorn", "Acorn", kPlatformAcorn},
- {"amiga", "ami", "Amiga", kPlatformAmiga},
- {"atari", "atari-st", "Atari ST", kPlatformAtariST},
- {"c64", "c64", "Commodore 64", kPlatformC64},
- {"pc", "dos", "DOS", kPlatformPC},
+ {"3do", "3do", "3do", "3DO", kPlatform3DO},
+ {"acorn", "acorn", "acorn", "Acorn", kPlatformAcorn},
+ {"amiga", "ami", "amiga", "Amiga", kPlatformAmiga},
+ {"atari", "atari-st", "st", "Atari ST", kPlatformAtariST},
+ {"c64", "c64", "c64", "Commodore 64", kPlatformC64},
+ {"pc", "dos", "ibm", "DOS", kPlatformPC},
// The 'official' spelling seems to be "FM-TOWNS" (e.g. in the Indy4 demo).
// However, on the net many variations can be seen, like "FMTOWNS",
// "FM TOWNS", "FmTowns", etc.
- {"fmtowns", "towns", "FM-TOWNS", kPlatformFMTowns},
+ {"fmtowns", "towns", "fm", "FM-TOWNS", kPlatformFMTowns},
- {"linux", "linux", "Linux", kPlatformLinux},
- {"macintosh", "mac", "Macintosh", kPlatformMacintosh},
- {"nes", "nes", "NES", kPlatformNES},
- {"segacd", "segacd", "SegaCD", kPlatformSegaCD},
- {"windows", "win", "Windows", kPlatformWindows},
+ {"linux", "linux", "linux", "Linux", kPlatformLinux},
+ {"macintosh", "mac", "mac", "Macintosh", kPlatformMacintosh},
+ {"nes", "nes", "nes", "NES", kPlatformNES},
+ {"segacd", "segacd", "sega", "SegaCD", kPlatformSegaCD},
+ {"windows", "win", "win", "Windows", kPlatformWindows},
- {"2GS", "2gs", "Apple IIgs", kPlatformApple2GS },
+ {"2gs", "2gs", "2gs", "Apple IIgs", kPlatformApple2GS },
- {0, 0, "Default", kPlatformUnknown}
+ {0, 0, 0, "Default", kPlatformUnknown}
};
Platform parsePlatform(const String &str) {
@@ -215,7 +215,7 @@ Platform parsePlatform(const String &str) {
const PlatformDescription *l = g_platforms;
for (; l->code; ++l) {
- if (!scumm_stricmp(l->code, s) || !scumm_stricmp(l->code2, s))
+ if (!scumm_stricmp(l->code, s) || !scumm_stricmp(l->code2, s) || !scumm_stricmp(l->abbrev, s))
return l->id;
}
@@ -232,6 +232,15 @@ const char *getPlatformCode(Platform id) {
return 0;
}
+const char *getPlatformAbbrev(Platform id) {
+ const PlatformDescription *l = g_platforms;
+ for (; l->code; ++l) {
+ if (l->id == id)
+ return l->abbrev;
+ }
+ return 0;
+}
+
const char *getPlatformDescription(Platform id) {
const PlatformDescription *l = g_platforms;
for (; l->code; ++l) {
diff --git a/common/util.h b/common/util.h
index 49427c7922..9f5008f418 100644
--- a/common/util.h
+++ b/common/util.h
@@ -155,6 +155,7 @@ enum Platform {
struct PlatformDescription {
const char *code;
const char *code2;
+ const char *abbrev;
const char *description;
Common::Platform id;
};
@@ -164,6 +165,7 @@ extern const PlatformDescription g_platforms[];
/** Convert a string containing a platform name into a Platform enum value. */
extern Platform parsePlatform(const String &str);
extern const char *getPlatformCode(Platform id);
+extern const char *getPlatformAbbrev(Platform id);
extern const char *getPlatformDescription(Platform id);
/**
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index e6b1cffb54..ed723ff6a4 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -52,8 +52,25 @@ static GameList GAME_detectGames(const FSList &fslist);
}
static const PlainGameDescriptor agiGames[] = {
- {"agi", "Sierra AGI Engine" },
-
+ {"agi", "Sierra AGI game"},
+ {"agi-fanmade", "Fanmade AGI game"},
+ {"agidemo", "AGI Demo"},
+ {"bc", "Black Cauldron"},
+ {"ddp", "Donald Duck's Playground"},
+ {"goldrush", "Gold Rush"},
+ {"kq1", "King's Quest 1"},
+ {"kq2", "King's Quest 2"},
+ {"kq3", "King's Quest 3"},
+ {"kq4", "King's Quest 4"},
+ {"lsl1", "Leisure Suit Larry 1"},
+ {"mixedup", "Mixed-Up Mother Goose"},
+ {"mh1", "Manhunter 1: NY"},
+ {"mh2", "Manhunter 2: SF"},
+ {"pq1", "Police Quest 1"},
+ {"sq1", "Space Quest 1"},
+ {"sq2", "Space Quest 2"},
+ {"xmascard", "Xmas Card"},
+
{0, 0}
};
@@ -62,7 +79,7 @@ namespace Agi {
#define FANMADE_LV(name,md5,lang,ver) { \
{ \
- "agi", \
+ "agi-fanmade", \
name, \
AD_ENTRY1("logdir", md5), \
lang, \
@@ -80,8 +97,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Black Cauldron (Apple IIgs) 1.0O 2/24/89 (CE)
{
- "agi",
- "Black Cauldron (Apple IIgs) 1.0O 2/24/89 (CE)",
+ "bc",
+ "1.0O 2/24/89 (CE)",
AD_ENTRY1("bcdir", "dc09d30b147242692f4f85b9811962db"),
Common::EN_ANY,
Common::kPlatformApple2GS,
@@ -95,8 +112,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Black Cauldron (PC) 2.00 6/14/87 [AGI 2.439]
{
- "agi",
- "Black Cauldron (IBM) 2.00 6/14/87",
+ "bc",
+ "2.00 6/14/87",
AD_ENTRY1("logdir", "7f598d4712319b09d7bd5b3be10a2e4a"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -110,8 +127,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Black Cauldron (PC 5.25") 2.10 11/10/88 [AGI 3.002.098]
{
- "agi",
- "Black Cauldron (IBM 5.25\") 2.10 11/10/88",
+ "bc",
+ "5.25\" 2.10 11/10/88",
AD_ENTRY1("bcdir", "0c5a9acbcc7e51127c34818e75806df6"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -125,8 +142,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Donald Duck's Playground (ST) 1.0A 8/8/86
{
- "agi",
- "Donald Duck's Playground (ST) 1.0A 8/8/86",
+ "ddp",
+ "1.0A 8/8/86",
AD_ENTRY1("logdir", "64388812e25dbd75f7af1103bc348596"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -140,8 +157,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == AGI Demo 1 (PC) 05/87 [AGI 2.425]
{
- "agi",
- "AGI Demo 1 (IBM) 05/87",
+ "agidemo",
+ "Demo 1 05/87",
AD_ENTRY1("logdir", "9c4a5b09cc3564bc48b4766e679ea332"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -155,8 +172,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == AGI Demo 2 (IIgs) 1.0C (Censored)
{
- "agi",
- "AGI Demo 2 (Apple IIgs) 1.0C",
+ "agidemo",
+ "Demo 2 1.0C",
AD_ENTRY1("logdir", "580ffdc569ff158f56fb92761604f70e"),
Common::EN_ANY,
Common::kPlatformApple2GS,
@@ -170,8 +187,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == AGI Demo 2 (PC 3.5") 11/87 [AGI 2.915]
{
- "agi",
- "AGI Demo 2 (IBM 3.5\") 11/87",
+ "agidemo",
+ "Demo 2 3.5\" 11/87",
AD_ENTRY1("logdir", "e8ebeb0bbe978172fe166f91f51598c7"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -185,8 +202,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == AGI Demo 2 (PC 5.25") 11/87 [v1] [AGI 2.915]
{
- "agi",
- "AGI Demo 2 (IBM 5.25\") 11/87 [version 1]",
+ "agidemo",
+ "Demo 2 5.25\" 11/87 [version 1]",
AD_ENTRY1("logdir", "852ac303a374df62571642ca1e2d1f0a"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -200,8 +217,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == AGI Demo 2 (PC 5.25") 01/88 [v2] [AGI 2.917]
{
- "agi",
- "AGI Demo 2 (IBM 5.25\") 01/88 [version 2]",
+ "agidemo",
+ "Demo 2 5.25\" 01/88 [version 2]",
AD_ENTRY1("logdir", "1503f02086ea9f388e7e041c039eaa69"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -215,8 +232,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == AGI Demo 3 (PC) 09/88 [AGI 3.002.102]
{
- "agi",
- "AGI Demo 3 (IBM) 09/88",
+ "agidemo",
+ "Demo 3 09/88",
AD_ENTRY1("dmdir", "289c7a2c881f1d973661e961ced77d74"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -230,8 +247,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 4 demo (PC) [AGI 3.002.102]
{
- "agi",
- "King's Quest 4 demo (IBM)",
+ "kq4",
+ "Demo",
AD_ENTRY1("dmdir", "a3332d70170a878469d870b14863d0bf"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -245,8 +262,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Xmas Card 1986 (PC) [AGI 2.272]
{
- "agi",
- "Xmas Card 1986 (IBM) [version 1]",
+ "xmascard",
+ "1986 [version 1]",
AD_ENTRY1("logdir", "3067b8d5957e2861e069c3c0011bd43d"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -260,8 +277,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Gold Rush! (PC 5.25") 2.01 12/22/88 [AGI 3.002.149]
{
- "agi",
- "Gold Rush (IBM 5.25\") 2.01 12/22/88",
+ "goldrush",
+ "5.25\" 2.01 12/22/88",
AD_ENTRY1("grdir", "db733d199238d4009a9e95f11ece34e9"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -275,8 +292,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 1 (IIgs) 1.0S-88223
{
- "agi",
- "King's Quest 1 (Apple IIgs) 1.0S-88223",
+ "kq1",
+ "1.0S-88223",
AD_ENTRY1("logdir", "f4277aa34b43d37382bc424c81627617"),
Common::EN_ANY,
Common::kPlatformApple2GS,
@@ -290,8 +307,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 1 (Mac) 2.0C
{
- "agi",
- "King's Quest 1 (Mac) 2.0C",
+ "kq1",
+ "2.0C",
AD_ENTRY1("logdir", "d4c4739d4ac63f7dbd29255425077d48"),
Common::EN_ANY,
Common::kPlatformMacintosh,
@@ -305,8 +322,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 1 (PC 5.25"/3.5") 2.0F [AGI 2.917]
{
- "agi",
- "King's Quest 1 (IBM 5.25\"/3.5\") 2.0F",
+ "kq1",
+ "5.25\"/3.5\" 2.0F",
AD_ENTRY1("logdir", "10ad66e2ecbd66951534a50aedcd0128"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -320,8 +337,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 2 (Amiga) 2.0J (Broken)
{
- "agi",
- "King's Quest 2 (Amiga) 2.0J [OBJECT decrypted]",
+ "kq2",
+ "2.0J [OBJECT decrypted]",
AD_ENTRY1("logdir", "b866f0fab2fad91433a637a828cfa410"),
Common::EN_ANY,
Common::kPlatformAmiga,
@@ -335,8 +352,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 2 (Mac) 2.0R
{
- "agi",
- "King's Quest 2 (Mac) 2.0R",
+ "kq2",
+ "2.0R",
AD_ENTRY1("logdir", "cbdb0083317c8e7cfb7ac35da4bc7fdc"),
Common::EN_ANY,
Common::kPlatformMacintosh,
@@ -350,8 +367,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// King's Quest 2 (PC) 2.1 [AGI 2.411]; entry from DAGII, but missing from Sarien?
{
- "agi",
- "King's Quest 2 (IBM) 2.1",
+ "kq2",
+ "2.1",
AD_ENTRY1("logdir", "759e39f891a0e1d86dd29d7de485c6ac"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -365,8 +382,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 2 (PC 5.25"/3.5") 2.2 [AGI 2.426]
{
- "agi",
- "King's Quest 2 (IBM 5.25\"/3.5\") 2.2",
+ "kq2",
+ "5.25\"/3.5\" 2.2",
AD_ENTRY1("logdir", "b944c4ff18fb8867362dc21cc688a283"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -380,8 +397,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 3 (PC) 1.01 11/08/86 [AGI 2.272]
{
- "agi",
- "King's Quest 3 (IBM) 1.01 11/08/86",
+ "kq3",
+ "1.01 11/08/86",
AD_ENTRY1("logdir", "9c2b34e7ffaa89c8e2ecfeb3695d444b"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -395,8 +412,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 3 (PC 5.25") 2.00 5/25/87 [AGI 2.435]
{
- "agi",
- "King's Quest 3 (IBM 5.25\") 2.00 5/25/87",
+ "kq3",
+ "5.25\" 2.00 5/25/87",
AD_ENTRY1("logdir", "18aad8f7acaaff760720c5c6885b6bab"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -410,8 +427,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 3 (Mac) 2.14 3/15/88
{
- "agi",
- "King's Quest 3 (IBM 5.25\") 2.14 3/15/88",
+ "kq3",
+ "5.25\" 2.14 3/15/88",
AD_ENTRY1("logdir", "7650e659c7bc0f1e9f8a410b7a2e9de6"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -425,8 +442,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 3 (PC 3.5") 2.14 3/15/88 [AGI 2.936]
{
- "agi",
- "King's Quest 3 (IBM 3.5\") 2.14 3/15/88",
+ "kq3",
+ "3.5\" 2.14 3/15/88",
AD_ENTRY1("logdir", "d3d17b77b3b3cd13246749231d9473cd"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -440,8 +457,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 4 (PC 3.5") 2.0 7/27/88 [AGI 3.002.086]
{
- "agi",
- "King's Quest 4 (IBM 3.5\") 2.0 7/27/88",
+ "kq4",
+ "3.5\" 2.0 7/27/88",
AD_ENTRY1("kq4dir", "fe44655c42f16c6f81046fdf169b6337"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -455,8 +472,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == King's Quest 4 (PC 3.5") 2.2 9/27/88 [AGI 3.002.086]
{
- "agi",
- "King's Quest 4 (IBM 3.5\") 2.2 9/27/88",
+ "kq4",
+ "3.5\" 2.2 9/27/88",
AD_ENTRY1("kq4dir", "7470b3aeb49d867541fc66cc8454fb7d"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -470,8 +487,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Leisure Suit Larry 1 (Mac) 1.05 6/26/87
{
- "agi",
- "Leisure Suit Larry 1 (Mac) 1.05 6/26/87",
+ "lsl1",
+ "1.05 6/26/87",
AD_ENTRY1("logdir", "8a0076429890531832f0dc113285e31e"),
Common::EN_ANY,
Common::kPlatformMacintosh,
@@ -485,8 +502,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Leisure Suit Larry 1 (PC 5.25"/3.5") 1.00 6/1/87 [AGI 2.440]
{
- "agi",
- "Leisure Suit Larry 1 (IBM 5.25\"/3.5\") 1.00 6/1/87",
+ "lsl1",
+ "5.25\"/3.5\" 1.00 6/1/87",
AD_ENTRY1("logdir", "1fe764e66857e7f305a5f03ca3f4971d"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -501,8 +518,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Mixed Up Mother Goose (PC) [AGI 2.915] (Broken)
{
- "agi",
- "Mixed-Up Mother Goose (IBM) [corrupt/OBJECT from disk 1]",
+ "mixedup",
+ "[corrupt/OBJECT from disk 1]",
AD_ENTRY1("logdir", "e524655abf9b96a3b179ffcd1d0f79af"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -517,8 +534,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Mixed-Up Mother Goose (PC) [AGI 2.915]
{
- "agi",
- "Mixed-Up Mother Goose (IBM)",
+ "mixedup",
+ "",
AD_ENTRY1("logdir", "e524655abf9b96a3b179ffcd1d0f79af"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -532,8 +549,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Manhunter NY (IIgs) 2.0E 10/05/88 (CE)
{
- "agi",
- "Manhunter 1: NY (Apple IIgs) 2.0E 10/05/88 (CE)",
+ "mh1",
+ "2.0E 10/05/88 (CE)",
AD_ENTRY1("mhdir", "2f1509f76f24e6e7d213f2dadebbf156"),
Common::EN_ANY,
Common::kPlatformApple2GS,
@@ -547,8 +564,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Manhunter NY (Amiga) 1.06 3/18/89
{
- "agi",
- "Manhunter 1: NY (Amiga) 1.06 3/18/89",
+ "mh1",
+ "1.06 3/18/89",
AD_ENTRY1("mhdir", "92c6183042d1c2bb76236236a7d7a847"),
Common::EN_ANY,
Common::kPlatformAmiga,
@@ -561,8 +578,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Manhunter SF (PC 3.5") 3.02 7/26/89 [AGI 3.002.149]
{
- "agi",
- "Manhunter 2: SF (IBM 3.5\") 3.02 7/26/89",
+ "mh2",
+ "3.5\" 3.02 7/26/89",
AD_ENTRY1("mh2dir", "6fb6f0ee2437704c409cf17e081ba152"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -576,8 +593,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Police Quest 1 (IIgs) 2.0A-88318
{
- "agi",
- "Police Quest 1 (Apple IIgs) 2.0A-88318",
+ "pq1",
+ "2.0A-88318",
AD_ENTRY1("logdir", "8994e39d0901de3d07cecfb954075bb5"),
Common::EN_ANY,
Common::kPlatformApple2GS,
@@ -591,8 +608,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Police Quest 1 (PC) 2.0A 10/23/87 [AGI 2.903/2.911]
{
- "agi",
- "Police Quest 1 (IBM) 2.0A 10/23/87",
+ "pq1",
+ "2.0A 10/23/87",
AD_ENTRY1("logdir", "b9dbb305092851da5e34d6a9f00240b1"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -606,8 +623,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Police Quest 1 (Mac) 2.0G 12/3/87
{
- "agi",
- "Police Quest 1 (IBM 5.25\"/ST) 2.0G 12/03/87",
+ "pq1",
+ "5.25\"/ST 2.0G 12/03/87",
AD_ENTRY1("logdir", "231f3e28170d6e982fc0ced4c98c5c1c"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -621,8 +638,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Police Quest 1 (PC) 2.0G 12/3/87; entry from DAGII, but missing from Sarien?
{
- "agi",
- "Police Quest 1 (IBM) 2.0G 12/03/87", // not sure about disk format -- dsymonds
+ "pq1",
+ "2.0G 12/03/87", // not sure about disk format -- dsymonds
AD_ENTRY1("logdir", "d194e5d88363095f55d5096b8e32fbbb"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -636,8 +653,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Space Quest 1 (PC) 1.0X [AGI 2.089]
{
- "agi",
- "Space Quest 1 (IBM) 1.0X",
+ "sq1",
+ "1.0X",
AD_ENTRY1("logdir", "af93941b6c51460790a9efa0e8cb7122"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -651,8 +668,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Space Quest 1 (PC) 1.1A [AGI 2.272]
{
- "agi",
- "Space Quest 1 (IBM) 1.1A",
+ "sq1",
+ "1.1A",
AD_ENTRY1("logdir", "8d8c20ab9f4b6e4817698637174a1cb6"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -666,8 +683,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Space Quest 1 (PC 5.25"/3.5") 2.2 [AGI 2.426/2.917]
{
- "agi",
- "Space Quest 1 (IBM 5.25\"/3.5\") 2.2",
+ "sq1",
+ "5.25\"/3.5\" 2.2",
AD_ENTRY1("logdir", "5d67630aba008ec5f7f9a6d0a00582f4"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -681,8 +698,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Space Quest 2 (Amiga) 2.0F
{
- "agi",
- "Space Quest 2 (Amiga) 2.0F [VOL.2->PICTURE.16 broken]",
+ "sq2",
+ "2.0F [VOL.2->PICTURE.16 broken]",
AD_ENTRY1("logdir", "28add5125484302d213911df60d2aded"),
Common::EN_ANY,
Common::kPlatformAmiga,
@@ -696,8 +713,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Space Quest 2 (Mac) 2.0D
{
- "agi",
- "Space Quest 2 (Mac) 2.0D",
+ "sq2",
+ "2.0D",
AD_ENTRY1("logdir", "bfbebe0b59d83f931f2e1c62ce9484a7"),
Common::EN_ANY,
Common::kPlatformMacintosh,
@@ -711,8 +728,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Space Quest 2 (PC 5.25"/ST) 2.0C/A [AGI 2.915]
{
- "agi",
- "Space Quest 2 (IBM 5.25\"/ST) 2.0C [A]",
+ "sq2",
+ "5.25\"/ST 2.0C [A]",
AD_ENTRY1("logdir", "bd71fe54869e86945041700f1804a651"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -726,8 +743,8 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Space Quest 2 (PC 3.5") 2.0F [AGI 2.936]
{
- "agi",
- "Space Quest 2 (IBM 3.5\") 2.0F",
+ "sq2",
+ "3.5\" 2.0F",
AD_ENTRY1("logdir", "28add5125484302d213911df60d2aded"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -813,7 +830,7 @@ static const AGIGameDescription gameDescriptions[] = {
{
// Sarien Name == Groza
{
- "agi",
+ "agi-fanmade",
"Groza (russian) [AGDS sample]",
AD_ENTRY1("logdir", "421da3a18004122a966d64ab6bd86d2e"),
Common::RU_RUS,
diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp
index d507fef484..c455322a85 100644
--- a/engines/cine/detection.cpp
+++ b/engines/cine/detection.cpp
@@ -48,11 +48,18 @@ static GameList GAME_detectGames(const FSList &fslist);
}
static const PlainGameDescriptor cineGames[] = {
+ {"cine", "Cinematique evo.1 engine game"},
{"fw", "Future Wars"},
{"os", "Operation Stealth"},
{0, 0}
};
+static const Common::ADObsoleteGameID obsoleteGameIDsTable[] = {
+ {"fw", "cine", Common::kPlatformUnknown},
+ {"os", "cine", Common::kPlatformUnknown},
+ {0, 0, Common::kPlatformUnknown}
+};
+
namespace Cine {
static const CINEGameDescription gameDescriptions[] = {
@@ -440,7 +447,7 @@ static const Common::ADParams detectionParams = {
// List of all engine targets
cineGames,
// Structure for autoupgrading obsolete targets
- 0,
+ obsoleteGameIDsTable,
// Name of single gameid (optional)
"cine",
// Flags
diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp
index 6bc1590910..898df9d7da 100644
--- a/engines/parallaction/detection.cpp
+++ b/engines/parallaction/detection.cpp
@@ -46,6 +46,7 @@ static GameList GAME_detectGames(const FSList &fslist);
}
static const PlainGameDescriptor parallactionGames[] = {
+ {"parallaction", "Parallaction engine game"},
{"nippon", "Nippon Safes Inc."},
{0, 0}
};
diff --git a/engines/saga/game.cpp b/engines/saga/game.cpp
index 3c54e2df3f..f2c3ff0628 100644
--- a/engines/saga/game.cpp
+++ b/engines/saga/game.cpp
@@ -83,11 +83,18 @@ static GameList GAME_detectGames(const FSList &fslist);
}
static const PlainGameDescriptor sagaGames[] = {
+ {"saga", "SAGA Engine game"},
{"ite", "Inherit the Earth: Quest for the Orb"},
{"ihnm", "I Have No Mouth and I Must Scream"},
{0, 0}
};
+static const Common::ADObsoleteGameID obsoleteGameIDsTable[] = {
+ {"ite", "saga", Common::kPlatformUnknown},
+ {"ihnm", "saga", Common::kPlatformUnknown},
+ {0, 0, Common::kPlatformUnknown}
+};
+
namespace Saga {
#include "sagagame.cpp"
@@ -104,7 +111,7 @@ static const Common::ADParams detectionParams = {
// List of all engine targets
sagaGames,
// Structure for autoupgrading obsolete targets
- 0,
+ obsoleteGameIDsTable,
// Name of single gameid (optional)
"saga",
// Flags
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index a9f25dcf42..33b4aa17ab 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -694,15 +694,22 @@ void LauncherDialog::addGameToConf(const FilesystemNode &dir, const GameDescript
// The auto detector or the user made a choice.
// Pick a domain name which does not yet exist (after all, we
// are *adding* a game to the config, not replacing).
- String domain(result.gameid());
+ String domain;
+
+ if (result.contains("preferredtarget"))
+ domain = result["preferredtarget"];
+ else
+ domain = result.gameid();
+
assert(!domain.empty());
if (ConfMan.hasGameDomain(domain)) {
int suffixN = 1;
char suffix[16];
+ String gameid(domain);
while (ConfMan.hasGameDomain(domain)) {
snprintf(suffix, 16, "-%d", suffixN);
- domain = result.gameid() + suffix;
+ domain = gameid + suffix;
suffixN++;
}
}