[Scummvm-cvs-logs] SF.net SVN: scummvm: [28237] scummvm/trunk/engines/gob/game.cpp

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Fri Jul 27 15:05:24 CEST 2007


Revision: 28237
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28237&view=rev
Author:   drmccoy
Date:     2007-07-27 06:05:24 -0700 (Fri, 27 Jul 2007)

Log Message:
-----------
The language fallback now prefers the other english if USA or GRB was requested but wasn't found in the game data.

Modified Paths:
--------------
    scummvm/trunk/engines/gob/game.cpp

Modified: scummvm/trunk/engines/gob/game.cpp
===================================================================
--- scummvm/trunk/engines/gob/game.cpp	2007-07-27 13:02:43 UTC (rev 28236)
+++ scummvm/trunk/engines/gob/game.cpp	2007-07-27 13:05:24 UTC (rev 28237)
@@ -672,18 +672,39 @@
 
 	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 = i;
-				break;
+				_vm->_global->_language = 5;
+				found = true;
 			}
+		} else if (_vm->_global->_languageWanted == 5) {
+			handle = openLocTextFile(locTextFile, 2);
+			if (handle >= 0) {
+				_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);
 


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