diff options
author | Max Horn | 2011-06-17 14:12:03 +0200 |
---|---|---|
committer | Max Horn | 2011-06-17 14:21:18 +0200 |
commit | 2e2676526d97db7b1bff5be2838e4479aca3ba97 (patch) | |
tree | 37a85486f5f7dea5dfc8b7f91772f791e6142e63 | |
parent | 7c44582bb74bc3386040788b53d3ba27505723e7 (diff) | |
download | scummvm-rg350-2e2676526d97db7b1bff5be2838e4479aca3ba97.tar.gz scummvm-rg350-2e2676526d97db7b1bff5be2838e4479aca3ba97.tar.bz2 scummvm-rg350-2e2676526d97db7b1bff5be2838e4479aca3ba97.zip |
SCI: Improve 'extra' strings generated by fallback detector
-rw-r--r-- | engines/sci/detection.cpp | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 7d093a75d8..1cfedd6f1b 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -325,7 +325,7 @@ Common::String convertSierraGameId(Common::String sierraId, uint32 *gameFlags, R for (const OldNewIdTableEntry *cur = s_oldNewTable; cur->oldId[0]; ++cur) { if (sierraId == cur->oldId) { - // Distinguish same IDs from the SCI version + // Distinguish same IDs via the SCI version if (cur->version != SCI_VERSION_NONE && cur->version != getSciVersion()) continue; @@ -447,7 +447,6 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles, if (tmpStream->size() > 10 * 1024 * 1024) { // We got a CD version, so set the CD flag accordingly s_fallbackDesc.flags |= ADGF_CD; - s_fallbackDesc.extra = "CD"; } delete tmpStream; } @@ -550,22 +549,40 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles, } - // Fill in extras field + // Fill in "extra" field + + // Is this an EGA version that might have a VGA pendant? Then we want + // to mark it as such in the "extra" field. + const bool markAsEGA = (gameViews == kViewEga && s_fallbackDesc.platform != Common::kPlatformAmiga + && getSciVersion() > SCI_VERSION_1_EGA_ONLY); + + const bool isDemo = (s_fallbackDesc.flags & ADGF_DEMO); + const bool isCD = (s_fallbackDesc.flags & ADGF_CD); if (gameId.hasSuffix("sci")) { s_fallbackDesc.extra = "SCI"; // Differentiate EGA versions from the VGA ones, where needed - if (gameViews == kViewEga && s_fallbackDesc.platform != Common::kPlatformAmiga) + if (markAsEGA) s_fallbackDesc.extra = "SCI/EGA"; + + // Mark as demo. + // Note: This overwrites the 'EGA' info, if it was previously set. + if (isDemo) + s_fallbackDesc.extra = "SCI/Demo"; } else { - if (gameViews == kViewEga && s_fallbackDesc.platform != Common::kPlatformAmiga) + if (markAsEGA) s_fallbackDesc.extra = "EGA"; - } - // Add "demo" to the description for demos - if (s_fallbackDesc.flags & ADGF_DEMO) - s_fallbackDesc.extra = (gameId.hasSuffix("sci")) ? "SCI/Demo" : "Demo"; + // Set "CD" and "Demo" as appropriate. + // Note: This overwrites the 'EGA' info, if it was previously set. + if (isDemo && isCD) + s_fallbackDesc.extra = "CD Demo"; + else if (isDemo) + s_fallbackDesc.extra = "Demo"; + else if (isCD) + s_fallbackDesc.extra = "CD"; + } return (const ADGameDescription *)&s_fallbackDesc; } |