[Scummvm-cvs-logs] CVS: scummvm/saga saga.cpp,1.89,1.90

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Fri Jan 14 03:23:16 CET 2005


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4718

Modified Files:
	saga.cpp 
Log Message:
I've changed getTextString() slightly so that if the translated string is
NULL it'll use the English string instead. It seems unnecessary to store
the same string twice, even if it's possible that the compiler is smart
enough to eliminate the duplicates.

Either way it doesn't make much difference now, but we may want to add the
intro strings to the getTextString() mechanism eventually. In that case
most of the credits would be duplicates, for instance.


Index: saga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.cpp,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- saga.cpp	14 Jan 2005 01:17:34 -0000	1.89
+++ saga.cpp	14 Jan 2005 11:22:45 -0000	1.90
@@ -63,24 +63,24 @@
 static const char *interfaceTextStrings[][39] = {
 	{
 		"Walk to", "Look At", "Pick Up", "Talk to", "Open",
-		"Close", "Use",	"Give", "Options", "Test",
+		"Close", "Use", "Give", "Options", "Test",
 		"Demo", "Help", "Quit Game", "Fast", "Slow",
 		"On", "Off", "Continue Playing", "Load", "Save",
 		"Game Options", "Reading Speed", "Music", "Sound", "Cancel",
 		"Quit", "OK", "Mid", "Click",
 		"10%", "20%", "30%", "40%", "50%",
-		"60%", 	"70%", "80%", "90%", "Max"
+		"60%", "70%", "80%", "90%", "Max"
 	},
 	// German
 	{
 		"Gehe zu", "Schau an", "Nimm", "Rede mit", "\231ffne",
-		"Schlie$e", "Benutze",	"Gib", "Optionen", "Test",
+		"Schlie$e", "Benutze", "Gib", "Optionen", "Test",
 		"Demo", "Hilfe", "Spiel beenden", "S", "L",
 		"An", "Aus", "Weiterspielen", "Laden", "Sichern",
 		"Spieleoptionen", "Lesegeschw.", "Musik", "Sound", "Abbr.",
-		"Beenden", "OK", "M", "Klick",
-		"10%", "20%", "30%", "40%", "50%",
-		"60%", 	"70%", "80%", "90%", "Max"
+		"Beenden", NULL, "M", "Klick",
+		NULL, NULL, NULL, NULL, NULL,
+		NULL, NULL, NULL, NULL, NULL
 	}
 };
 
@@ -358,10 +358,14 @@
 }
 
 const char *SagaEngine::getTextString(int textStringId) {
-
+	const char *string;
 	int lang = _vm->getFeatures() & GF_LANG_DE ? 1 : 0;
 
-	return interfaceTextStrings[lang][textStringId];
+	string = interfaceTextStrings[lang][textStringId];
+	if (!string)
+		string = interfaceTextStrings[0][textStringId];
+
+	return string;
 }
 
 } // End of namespace Saga





More information about the Scummvm-git-logs mailing list