aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-08-26 01:26:56 +0000
committerFilippos Karapetis2009-08-26 01:26:56 +0000
commitfcf4366230ca076eddd260532d06f8a79d4568fa (patch)
treed405d6d72c1768478b839ac152765a49be40a9d3 /engines
parent3583216c825f5127116187ab026d610b65875a24 (diff)
downloadscummvm-rg350-fcf4366230ca076eddd260532d06f8a79d4568fa.tar.gz
scummvm-rg350-fcf4366230ca076eddd260532d06f8a79d4568fa.tar.bz2
scummvm-rg350-fcf4366230ca076eddd260532d06f8a79d4568fa.zip
Started working on distinguishing the Sierra game demos. Also added a note about a potential problem with language detection with some SCI games
svn-id: r43751
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/detection.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 1ae974b4ef..1ce0b5ae29 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -167,7 +167,8 @@ public:
Common::String convertSierraGameId(Common::String sierraId) {
// TODO: SCI32 IDs
- // TODO: The internal id of christmas1988 is "demo"
+ if (sierraId == "demo")
+ return "christmas1988";
if (sierraId == "card") {
// This could either be christmas1990 or christmas1992
// christmas1990 has a "resource.001" file, whereas
@@ -185,7 +186,9 @@ Common::String convertSierraGameId(Common::String sierraId) {
// longbow is the same
if (sierraId == "eco")
return "ecoquest";
- if (sierraId == "rain")
+ if (sierraId == "eco2") // EcoQuest 2 demo
+ return "ecoquest2";
+ if (sierraId == "rain") // EcoQuest 2 full
return "ecoquest2";
if (sierraId == "fp")
return "freddypharkas";
@@ -407,6 +410,9 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl
// Non-English versions contain strings like XXXX#YZZZZ
// Where XXXX is the English string, #Y a separator indicating the language
// (e.g. #G for German) and ZZZZ is the translated text
+ // NOTE: This doesn't work for games which use message instead of text resources
+ // (like, for example, Eco Quest 1). As far as we know, these games store the messages
+ // of each language in separate resources, and it's not possible to detect that easily
Resource *text = resourceManager->findResource(ResourceId(kResourceTypeText, 0), 0);
uint seeker = 0;
if (text) {
@@ -421,6 +427,18 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl
delete resourceManager;
+ // Distinguish demos from full versions
+ if (!strcmp(s_fallbackDesc.desc.gameid, "camelot") && !Common::File::exists("resource.002"))
+ s_fallbackDesc.desc.flags |= ADGF_DEMO;
+
+ if (!strcmp(s_fallbackDesc.desc.gameid, "castlebrain") && !Common::File::exists("resource.002")) {
+ if (s_fallbackDesc.desc.language != Common::ES_ESP) // the Spanish version doesn't have resource.002
+ s_fallbackDesc.desc.flags |= ADGF_DEMO;
+ }
+
+ if (!strcmp(s_fallbackDesc.desc.gameid, "ecoquest2") && !Common::File::exists("resource.aud"))
+ s_fallbackDesc.desc.flags |= ADGF_DEMO;
+
SearchMan.remove("SCI_detection");
return (const ADGameDescription *)&s_fallbackDesc;