diff options
-rw-r--r-- | engines/agi/detection.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 55ccef7ea3..a56c547c28 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -2126,7 +2126,18 @@ Common::EncapsulatedADGameDesc fallbackDetector(const FSList *fslist) { // so we don't have to change it here. matchedUsingFilenames = true; - if (allFiles.contains("pal.101")) { // Check if it is AGIPAL + // Check for AGIPAL by checking for existence of any of the files "pal.100" - "pal.109" + bool agipal = false; + char agipalFile[] = "pal.xxx"; + for (uint i = 100; i <= 109; i++) { + sprintf(agipalFile, "pal.%d", i); + if (allFiles.contains(agipalFile)) { + agipal = true; // We found a file "pal.x" where 100 <= x <= 109 so it's AGIPAL + break; + } + } + + if (agipal) { // Check if it is AGIPAL description = "Unknown v2 AGIPAL Game"; g_fallbackDesc.features |= GF_AGIPAL; // Add AGIPAL feature flag } else { // Not AGIPAL so just plain v2 |