From adcfd2cc5f64157bd5135e5a90b29443036233f2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 29 Jan 2007 23:25:51 +0000 Subject: 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 --- common/util.cpp | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'common/util.cpp') 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) { -- cgit v1.2.3