aboutsummaryrefslogtreecommitdiff
path: root/common/util.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2007-01-29 23:25:51 +0000
committerEugene Sandulenko2007-01-29 23:25:51 +0000
commitadcfd2cc5f64157bd5135e5a90b29443036233f2 (patch)
tree1ee0bbc7c06e93a9c584892b2261322dd32779fa /common/util.cpp
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
Diffstat (limited to 'common/util.cpp')
-rw-r--r--common/util.cpp39
1 files changed, 24 insertions, 15 deletions
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) {