[Scummvm-git-logs] scummvm master -> 927f53368b52f6340d7e1ba467655a5d659b9522

dreammaster dreammaster at scummvm.org
Sat Jan 28 15:22:36 CET 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:
927f53368b TITANIC: Properly handle uppercase and 's when normalizing conv text


Commit: 927f53368b52f6340d7e1ba467655a5d659b9522
    https://github.com/scummvm/scummvm/commit/927f53368b52f6340d7e1ba467655a5d659b9522
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-01-28T09:22:26-05:00

Commit Message:
TITANIC: Properly handle uppercase and 's when normalizing conv text

Changed paths:
    engines/titanic/true_talk/tt_parser.cpp
    engines/titanic/true_talk/tt_parser.h


diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp
index bd89079..c557359 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 5fd997a..458a719 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





More information about the Scummvm-git-logs mailing list