[Scummvm-cvs-logs] SF.net SVN: scummvm: [21704] scummvm/trunk/engines/scumm

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Apr 8 16:44:02 CEST 2006


Revision: 21704
Author:   fingolfin
Date:     2006-04-08 16:43:18 -0700 (Sat, 08 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21704&view=rev

Log Message:
-----------
Properly translate Common::Language values for COMI

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/scumm.cpp
    scummvm/trunk/engines/scumm/vars.cpp
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp	2006-04-08 23:20:15 UTC (rev 21703)
+++ scummvm/trunk/engines/scumm/scumm.cpp	2006-04-08 23:43:18 UTC (rev 21704)
@@ -879,11 +879,8 @@
 	// Setup the music engine
 	setupMusic(_game.midi);
 
-	// TODO: We shouldn't rely on the global Language values matching those COMI etc. expect.
-	// Rather we should explicitly translate them.
-	_language = Common::parseLanguage(ConfMan.get("language"));
-
 	// Load localization data, if present
+	_language = Common::parseLanguage(ConfMan.get("language"));
 	loadLanguageBundle();
 
 	// Load CJK font, if present

Modified: scummvm/trunk/engines/scumm/vars.cpp
===================================================================
--- scummvm/trunk/engines/scumm/vars.cpp	2006-04-08 23:20:15 UTC (rev 21703)
+++ scummvm/trunk/engines/scumm/vars.cpp	2006-04-08 23:43:18 UTC (rev 21704)
@@ -574,7 +574,40 @@
 
 	if (_game.version == 8) {	// FIXME: How do we deal with non-cd installs?
 		VAR(VAR_CURRENTDISK) = 1;
-		VAR(VAR_LANGUAGE) = _language;
+
+		switch (_language) {
+		case Common::EN_ANY:
+		case Common::EN_USA:
+		case Common::EN_GRB:
+			VAR(VAR_LANGUAGE) = 0;
+			break;
+		case Common::DE_DEU:
+			VAR(VAR_LANGUAGE) = 1;
+			break;
+		case Common::FR_FRA:
+			VAR(VAR_LANGUAGE) = 2;
+			break;
+		case Common::IT_ITA:
+			VAR(VAR_LANGUAGE) = 3;
+			break;
+		case Common::PT_BRA:
+			VAR(VAR_LANGUAGE) = 4;
+			break;
+		case Common::ES_ESP:
+			VAR(VAR_LANGUAGE) = 5;
+			break;
+		case Common::JA_JPN:
+			VAR(VAR_LANGUAGE) = 6;
+			break;
+		case Common::ZH_TWN:
+			VAR(VAR_LANGUAGE) = 7;
+			break;
+		case Common::KO_KOR:
+			VAR(VAR_LANGUAGE) = 8;
+			break;
+		default:
+			VAR(VAR_LANGUAGE) = 0;	// Default to english
+		}
 	} else {
 		VAR(VAR_V6_EMSSPACE) = 10000;
 		VAR(VAR_NUM_GLOBAL_OBJS) = _numGlobalObjects - 1;


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