diff options
author | Paul Gilbert | 2017-06-22 06:48:23 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-06-22 06:48:23 -0400 |
commit | 007776ba16ad34320d6665ad646b64aa46615bf3 (patch) | |
tree | b10c8d2eab7c3ccae5995dc0d494073aaf5d0d41 /engines/titanic | |
parent | 0f084fb70346af8b00120b35d873dc68b665e4a3 (diff) | |
download | scummvm-rg350-007776ba16ad34320d6665ad646b64aa46615bf3.tar.gz scummvm-rg350-007776ba16ad34320d6665ad646b64aa46615bf3.tar.bz2 scummvm-rg350-007776ba16ad34320d6665ad646b64aa46615bf3.zip |
TITANIC: Add German handling to getSuffixedWord
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/true_talk/tt_vocab.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/titanic/true_talk/tt_vocab.cpp b/engines/titanic/true_talk/tt_vocab.cpp index dcd6a2258f..4ec7354534 100644 --- a/engines/titanic/true_talk/tt_vocab.cpp +++ b/engines/titanic/true_talk/tt_vocab.cpp @@ -232,6 +232,27 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const { TTstring tempStr(str);
TTword *word = nullptr;
+ if (g_vm->isGerman()) {
+ static const char *const SUFFIXES[13] = {
+ "est", "em", "en", "er", "es", "et", "st",
+ "s", "e", "n", "t"
+ };
+
+ for (int idx = 0; idx < 13; ++idx) {
+ if (tempStr.hasSuffix(SUFFIXES[idx])) {
+ tempStr.deleteSuffix(strlen(SUFFIXES[idx]));
+ word = getPrimeWord(tempStr);
+ if (word)
+ break;
+ tempStr = str;
+ }
+ }
+
+ if (word)
+ word->setSynStr(str);
+ return word;
+ }
+
if (tempStr.hasSuffix("s")) {
tempStr.deleteSuffix(1);
word = getPrimeWord(tempStr);
|