aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-01-14 11:22:45 +0000
committerTorbjörn Andersson2005-01-14 11:22:45 +0000
commit96d5a1c88d3a8efb82b810f9dfba11f43adf1a0d (patch)
tree8e5546a1c91ec1b1200b610998a2f3b0656bc915 /saga
parentb56f4fd2f620988c447064b35f2ed7ebaccd2fea (diff)
downloadscummvm-rg350-96d5a1c88d3a8efb82b810f9dfba11f43adf1a0d.tar.gz
scummvm-rg350-96d5a1c88d3a8efb82b810f9dfba11f43adf1a0d.tar.bz2
scummvm-rg350-96d5a1c88d3a8efb82b810f9dfba11f43adf1a0d.zip
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
Diffstat (limited to 'saga')
-rw-r--r--saga/saga.cpp20
1 files changed, 12 insertions, 8 deletions
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