[Scummvm-git-logs] scummvm master -> 007776ba16ad34320d6665ad646b64aa46615bf3
dreammaster
dreammaster at scummvm.org
Thu Jun 22 12:49:17 CEST 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
007776ba16 TITANIC: Add German handling to getSuffixedWord
Commit: 007776ba16ad34320d6665ad646b64aa46615bf3
https://github.com/scummvm/scummvm/commit/007776ba16ad34320d6665ad646b64aa46615bf3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-06-22T06:48:23-04:00
Commit Message:
TITANIC: Add German handling to getSuffixedWord
Changed paths:
engines/titanic/true_talk/tt_vocab.cpp
diff --git a/engines/titanic/true_talk/tt_vocab.cpp b/engines/titanic/true_talk/tt_vocab.cpp
index dcd6a22..4ec7354 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);
More information about the Scummvm-git-logs
mailing list