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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Apr 8 16:57:01 CEST 2006


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

Log Message:
-----------
Properly translate Common::Language values for V0-V2 games, too

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/script_c64.cpp
    scummvm/trunk/engines/scumm/script_v2.cpp
Modified: scummvm/trunk/engines/scumm/script_c64.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_c64.cpp	2006-04-08 23:43:18 UTC (rev 21704)
+++ scummvm/trunk/engines/scumm/script_c64.cpp	2006-04-08 23:56:09 UTC (rev 21705)
@@ -493,20 +493,31 @@
 		// The prepositions, like the fonts, were hard code in the engine. Thus
 		// we have to do that, too, and provde localized versions for all the
 		// languages MM/Zak are available in.
-		//
-		// The order here matches the one defined in gameDetector.h
 		const char *prepositions[][5] = {
-			{ " ", " in", " with", " on", " to" },	// English
-			{ " ", " mit", " mit", " mit", " zu" },	// German
-			{ " ", " dans", " avec", " sur", " <" },// French
-			{ " ", " in", " con", " su", " a" },	// Italian
-			{ " ", " in", " with", " on", " to" },	// Portugese
-			{ " ", " en", " con", " en", " a" },	// Spanish
-			{ " ", " in", " with", " on", " to" },	// Japanese
-			{ " ", " in", " with", " on", " to" },	// Chinese
-			{ " ", " in", " with", " on", " to" }	// Korean
+			{ " ", " in", " with", " on", " to" },   // English
+			{ " ", " mit", " mit", " mit", " zu" },  // German
+			{ " ", " dans", " avec", " sur", " <" }, // French
+			{ " ", " in", " con", " su", " a" },     // Italian
+			{ " ", " en", " con", " en", " a" },     // Spanish
 			};
-		int lang = (_language <= 8) ? _language : 0;	// Default to english
+		int lang;
+		switch (_language) {
+		case Common::DE_DEU:
+			lang = 1;
+			break;
+		case Common::FR_FRA:
+			lang = 2;
+			break;
+		case Common::IT_ITA:
+			lang = 3;
+			break;
+		case Common::ES_ESP:
+			lang = 4;
+			break;
+		default:
+			lang = 0;	// Default to english
+		}
+
 		strcat(sentence, prepositions[lang][sentencePrep]);
 	}
 

Modified: scummvm/trunk/engines/scumm/script_v2.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v2.cpp	2006-04-08 23:43:18 UTC (rev 21704)
+++ scummvm/trunk/engines/scumm/script_v2.cpp	2006-04-08 23:56:09 UTC (rev 21705)
@@ -1013,20 +1013,31 @@
 		// The prepositions, like the fonts, were hard code in the engine. Thus
 		// we have to do that, too, and provde localized versions for all the
 		// languages MM/Zak are available in.
-		//
-		// The order here matches the one defined in gameDetector.h
 		const char *prepositions[][5] = {
-			{ " ", " in", " with", " on", " to" },	// English
-			{ " ", " mit", " mit", " mit", " zu" },	// German
-			{ " ", " dans", " avec", " sur", " <" },	// French
-			{ " ", " in", " con", " su", " a" },	// Italian
-			{ " ", " in", " with", " on", " to" },	// Portugese
-			{ " ", " en", " con", " en", " a" },	// Spanish
-			{ " ", " in", " with", " on", " to" },	// Japanese
-			{ " ", " in", " with", " on", " to" },	// Chinese
-			{ " ", " in", " with", " on", " to" }	// Korean
+			{ " ", " in", " with", " on", " to" },   // English
+			{ " ", " mit", " mit", " mit", " zu" },  // German
+			{ " ", " dans", " avec", " sur", " <" }, // French
+			{ " ", " in", " con", " su", " a" },     // Italian
+			{ " ", " en", " con", " en", " a" },     // Spanish
 			};
-		int lang = (_language <= 8) ? _language : 0;	// Default to english
+		int lang;
+		switch (_language) {
+		case Common::DE_DEU:
+			lang = 1;
+			break;
+		case Common::FR_FRA:
+			lang = 2;
+			break;
+		case Common::IT_ITA:
+			lang = 3;
+			break;
+		case Common::ES_ESP:
+			lang = 4;
+			break;
+		default:
+			lang = 0;	// Default to english
+		}
+
 		if (_game.platform == Common::kPlatformNES) {
 			strcat(sentence, (const char *)(getResourceAddress(rtCostume, 78) + VAR(VAR_SENTENCE_PREPOSITION) * 8 + 2));
 		} else


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