aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/true_talk
diff options
context:
space:
mode:
authorPaul Gilbert2017-01-28 09:22:26 -0500
committerPaul Gilbert2017-01-28 09:22:26 -0500
commit927f53368b52f6340d7e1ba467655a5d659b9522 (patch)
tree26e65bf37157fdd6503557262362e5295461bb29 /engines/titanic/true_talk
parentca55163ea1daa6e322ef1ddf4615ad73b4634e0d (diff)
downloadscummvm-rg350-927f53368b52f6340d7e1ba467655a5d659b9522.tar.gz
scummvm-rg350-927f53368b52f6340d7e1ba467655a5d659b9522.tar.bz2
scummvm-rg350-927f53368b52f6340d7e1ba467655a5d659b9522.zip
TITANIC: Properly handle uppercase and 's when normalizing conv text
Diffstat (limited to 'engines/titanic/true_talk')
-rw-r--r--engines/titanic/true_talk/tt_parser.cpp4
-rw-r--r--engines/titanic/true_talk/tt_parser.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp
index bd89079cf1..c557359295 100644
--- a/engines/titanic/true_talk/tt_parser.cpp
+++ b/engines/titanic/true_talk/tt_parser.cpp
@@ -131,7 +131,7 @@ int TTparser::normalize(TTsentence *sentence) {
if (!destLine->empty() && destLine->lastChar() != ' ')
(*destLine) += ' ';
} else if (Common::isUpper(c)) {
- (*destLine) += toupper(c);
+ (*destLine) += tolower(c);
} else if (Common::isDigit(c)) {
if (c == '0' && isEmoticon(srcLine, index)) {
sentence->set38(10);
@@ -256,7 +256,7 @@ int TTparser::isEmoticon(const TTstring &str, int &index) {
}
}
-bool TTparser::normalizeContraction(const TTstring &srcLine, int srcIndex, TTstring &destLine) {
+bool TTparser::normalizeContraction(const TTstring &srcLine, int &srcIndex, TTstring &destLine) {
int startIndex = srcIndex + 1;
switch (srcLine[startIndex]) {
case 'd':
diff --git a/engines/titanic/true_talk/tt_parser.h b/engines/titanic/true_talk/tt_parser.h
index 5fd997a985..458a719e1f 100644
--- a/engines/titanic/true_talk/tt_parser.h
+++ b/engines/titanic/true_talk/tt_parser.h
@@ -95,7 +95,7 @@ private:
* Submethod called by normalize to handle expanding contacted word pairs
* like can't, should've, and so on.
*/
- bool normalizeContraction(const TTstring &srcLine, int srcIndex, TTstring &destLine);
+ bool normalizeContraction(const TTstring &srcLine, int &srcIndex, TTstring &destLine);
/**
* Checks for what is likely special developer cheat codes