[Scummvm-cvs-logs] SF.net SVN: scummvm:[43751] scummvm/trunk/engines/sci/detection.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Aug 26 03:26:56 CEST 2009
Revision: 43751
http://scummvm.svn.sourceforge.net/scummvm/?rev=43751&view=rev
Author: thebluegr
Date: 2009-08-26 01:26:56 +0000 (Wed, 26 Aug 2009)
Log Message:
-----------
Started working on distinguishing the Sierra game demos. Also added a note about a potential problem with language detection with some SCI games
Modified Paths:
--------------
scummvm/trunk/engines/sci/detection.cpp
Modified: scummvm/trunk/engines/sci/detection.cpp
===================================================================
--- scummvm/trunk/engines/sci/detection.cpp 2009-08-26 00:37:04 UTC (rev 43750)
+++ scummvm/trunk/engines/sci/detection.cpp 2009-08-26 01:26:56 UTC (rev 43751)
@@ -167,7 +167,8 @@
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,8 +186,10 @@
// 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";
if (sierraId == "emc")
@@ -407,6 +410,9 @@
// 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 @@
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list