aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/game.cpp
diff options
context:
space:
mode:
authorSven Hesse2007-07-27 13:05:24 +0000
committerSven Hesse2007-07-27 13:05:24 +0000
commitd8e4d70b674ef2fc86300d01a1827b215c6abc6c (patch)
treeb783a9bbd3773a48c69bc482421407420552d197 /engines/gob/game.cpp
parent806a0d9f0a900b7c9dcf80173ecc02fffe4f6e90 (diff)
downloadscummvm-rg350-d8e4d70b674ef2fc86300d01a1827b215c6abc6c.tar.gz
scummvm-rg350-d8e4d70b674ef2fc86300d01a1827b215c6abc6c.tar.bz2
scummvm-rg350-d8e4d70b674ef2fc86300d01a1827b215c6abc6c.zip
The language fallback now prefers the other english if USA or GRB was requested but wasn't found in the game data.
svn-id: r28237
Diffstat (limited to 'engines/gob/game.cpp')
-rw-r--r--engines/gob/game.cpp33
1 files changed, 27 insertions, 6 deletions
diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp
index a5993fd1de..e47dc1809f 100644
--- a/engines/gob/game.cpp
+++ b/engines/gob/game.cpp
@@ -672,18 +672,39 @@ byte *Game::loadLocTexts(int32 *dataSize) {
handle = openLocTextFile(locTextFile, _vm->_global->_languageWanted);
if (handle >= 0) {
+
_foundTotLoc = true;
_vm->_global->_language = _vm->_global->_languageWanted;
- }
- else if (!_foundTotLoc) {
- for (i = 0; i < 10; i++) {
- handle = openLocTextFile(locTextFile, i);
+
+ } else if (!_foundTotLoc) {
+ bool found = false;
+
+ if (_vm->_global->_languageWanted == 2) {
+ handle = openLocTextFile(locTextFile, 5);
+ if (handle >= 0) {
+ _vm->_global->_language = 5;
+ found = true;
+ }
+ } else if (_vm->_global->_languageWanted == 5) {
+ handle = openLocTextFile(locTextFile, 2);
if (handle >= 0) {
- _vm->_global->_language = i;
- break;
+ _vm->_global->_language = 2;
+ found = true;
}
}
+
+ if (!found) {
+ for (i = 0; i < 10; i++) {
+ handle = openLocTextFile(locTextFile, i);
+ if (handle >= 0) {
+ _vm->_global->_language = i;
+ break;
+ }
+ }
+ }
+
}
+
debugC(1, kDebugFileIO, "Using language %d for %s",
_vm->_global->_language, _curTotFile);