aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2007-02-14 23:46:39 +0000
committerMax Horn2007-02-14 23:46:39 +0000
commitec27c53491a60258ecb8a67a023964d5ff94b9ab (patch)
treef67139506f8d96ac5d32542e0bb8e0ee1bd5c77e /engines
parent247110b19b97971295b1b9972aa9457971d18181 (diff)
downloadscummvm-rg350-ec27c53491a60258ecb8a67a023964d5ff94b9ab.tar.gz
scummvm-rg350-ec27c53491a60258ecb8a67a023964d5ff94b9ab.tar.bz2
scummvm-rg350-ec27c53491a60258ecb8a67a023964d5ff94b9ab.zip
AdvancedDetector: revamped the file based fallback code
svn-id: r25599
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/detection.cpp113
1 files changed, 58 insertions, 55 deletions
diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp
index 8dca4c4eb7..2711d368fd 100644
--- a/engines/gob/detection.cpp
+++ b/engines/gob/detection.cpp
@@ -64,18 +64,6 @@ static const ADObsoleteGameID obsoleteGameIDsTable[] = {
namespace Gob {
static const GOBGameDescription gameDescriptions[] = {
- { // Dummy entry for fallback detection
- {
- "gob1",
- "unknown",
- AD_ENTRY1(0, 0),
- UNK_LANG,
- kPlatformPC,
- Common::ADGF_NO_FLAGS
- },
- GF_GOB1,
- "intro"
- },
{ // Supplied by Florian Zeitz on scummvm-devel
{
"gob1",
@@ -112,18 +100,6 @@ static const GOBGameDescription gameDescriptions[] = {
GF_GOB1,
"intro"
},
- { // Dummy entry for fallback detection
- {
- "gob1cd",
- "unknown",
- AD_ENTRY1(0, 0),
- UNK_LANG,
- kPlatformPC,
- Common::ADGF_NO_FLAGS
- },
- GF_GOB1 | GF_CD,
- "intro"
- },
{ // CD 1.000 version.
{
"gob1cd",
@@ -328,18 +304,6 @@ static const GOBGameDescription gameDescriptions[] = {
GF_GOB1,
"intro"
},
- { // Dummy entry for fallback detection
- {
- "gob2",
- "unknown",
- AD_ENTRY1(0, 0),
- UNK_LANG,
- kPlatformPC,
- Common::ADGF_NO_FLAGS
- },
- GF_GOB2,
- "intro"
- },
{
{
"gob2",
@@ -440,18 +404,6 @@ static const GOBGameDescription gameDescriptions[] = {
GF_GOB2,
"intro"
},
- { // Dummy entry for fallback detection
- {
- "gob2cd",
- "unknown",
- AD_ENTRY1(0, 0),
- UNK_LANG,
- kPlatformPC,
- Common::ADGF_NO_FLAGS
- },
- GF_GOB2 | GF_CD,
- "intro"
- },
{
{
"gob2cd",
@@ -887,13 +839,64 @@ static const GOBGameDescription gameDescriptions[] = {
{ AD_TABLE_END_MARKER, 0, NULL }
};
-static const char *fileBased[] = {
- "gob1", "intro.stk", "disk1.stk", "disk2.stk", "disk3.stk", "disk4.stk", 0,
- "gob1cd", "intro.stk", "gob.lic", 0,
- "gob2", "intro.stk", 0,
- "gob2", "intro.stk", "disk2.stk", "disk3.stk", 0,
- "gob2cd", "intro.stk", "gobnew.lic", 0,
- 0
+static const GOBGameDescription fallbackDescs[] = {
+ {
+ {
+ "gob1",
+ "unknown",
+ AD_ENTRY1(0, 0),
+ UNK_LANG,
+ kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ GF_GOB1,
+ "intro"
+ },
+ {
+ {
+ "gob1cd",
+ "unknown",
+ AD_ENTRY1(0, 0),
+ UNK_LANG,
+ kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ GF_GOB1 | GF_CD,
+ "intro"
+ },
+ {
+ {
+ "gob2",
+ "unknown",
+ AD_ENTRY1(0, 0),
+ UNK_LANG,
+ kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ GF_GOB2,
+ "intro"
+ },
+ {
+ {
+ "gob2cd",
+ "unknown",
+ AD_ENTRY1(0, 0),
+ UNK_LANG,
+ kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ GF_GOB2 | GF_CD,
+ "intro"
+ },
+};
+
+static const ADFileBasedFallback fileBased[] = {
+ { &fallbackDescs[0], { "intro.stk", "disk1.stk", "disk2.stk", "disk3.stk", "disk4.stk", 0 } },
+ { &fallbackDescs[1], { "intro.stk", "gob.lic", 0 } },
+ { &fallbackDescs[2], { "intro.stk", 0 } },
+ { &fallbackDescs[2], { "intro.stk", "disk2.stk", "disk3.stk", 0 } },
+ { &fallbackDescs[3], { "intro.stk", "gobnew.lic", 0 } },
+ { 0, { 0 } }
};
}