aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/detection.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2010-01-06 18:25:43 +0000
committerMartin Kiewitz2010-01-06 18:25:43 +0000
commit11d9f150106cbcc6be196902f3970badb8de70f5 (patch)
treebdcce2eac0674e25c0a99e42e178152ae6f4483e /engines/sci/detection.cpp
parent254850aa23c2dfc227d4f3176fac8ad37fbb0d56 (diff)
downloadscummvm-rg350-11d9f150106cbcc6be196902f3970badb8de70f5.tar.gz
scummvm-rg350-11d9f150106cbcc6be196902f3970badb8de70f5.tar.bz2
scummvm-rg350-11d9f150106cbcc6be196902f3970badb8de70f5.zip
SCI: search for %J in text resources to identify japanese games, switch to upscaled hires when japanese games are started, removed TODO
svn-id: r47088
Diffstat (limited to 'engines/sci/detection.cpp')
-rw-r--r--engines/sci/detection.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index ce6cfe14c1..8660b56704 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -318,14 +318,22 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl
// (like, for example, Eco Quest 1 and all SCI1.1 games and newer, e.g. Freddy Pharkas).
// 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
+ // Also look for "%J" which is used in japanese games
Resource *text = resMan->findResource(ResourceId(kResourceTypeText, 0), 0);
uint seeker = 0;
if (text) {
while (seeker < text->size) {
- if (text->data[seeker] == '#') {
- s_fallbackDesc.language = charToScummVMLanguage(text->data[seeker + 1]);
+ if (text->data[seeker] == '#') {
+ if (seeker + 1 < text->size)
+ s_fallbackDesc.language = charToScummVMLanguage(text->data[seeker + 1]);
break;
}
+ if (text->data[seeker] == '%') {
+ if ((seeker + 1 < text->size) && (text->data[seeker + 1] == 'J')) {
+ s_fallbackDesc.language = charToScummVMLanguage(text->data[seeker + 1]);
+ break;
+ }
+ }
seeker++;
}
}