From 96d5a1c88d3a8efb82b810f9dfba11f43adf1a0d Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Fri, 14 Jan 2005 11:22:45 +0000 Subject: 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. svn-id: r16560 --- saga/saga.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'saga') diff --git a/saga/saga.cpp b/saga/saga.cpp index 4b380fe72b..e9b8a8c5db 100644 --- a/saga/saga.cpp +++ b/saga/saga.cpp @@ -63,24 +63,24 @@ static const GameSettings saga_games[] = { 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::getObjectName(uint16 objectId) { } 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 -- cgit v1.2.3