aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-07-12 17:05:32 -0400
committerPaul Gilbert2015-07-12 17:05:32 -0400
commit1599ae55fa20265b617ef54114ad3b2e32fa3a58 (patch)
tree2b19a04698864545e0b964c40553421823db76b7
parentfaf8c364ef2aa638a60997ed21efeef42ee46a86 (diff)
downloadscummvm-rg350-1599ae55fa20265b617ef54114ad3b2e32fa3a58.tar.gz
scummvm-rg350-1599ae55fa20265b617ef54114ad3b2e32fa3a58.tar.bz2
scummvm-rg350-1599ae55fa20265b617ef54114ad3b2e32fa3a58.zip
SHERLOCK: RT: Fix splitting up lines for talk dialog
-rw-r--r--engines/sherlock/tattoo/widget_talk.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/sherlock/tattoo/widget_talk.cpp b/engines/sherlock/tattoo/widget_talk.cpp
index 2b79aa1eec..55f7df3eee 100644
--- a/engines/sherlock/tattoo/widget_talk.cpp
+++ b/engines/sherlock/tattoo/widget_talk.cpp
@@ -64,9 +64,13 @@ void WidgetTalk::getTalkWindowSize() {
// Now that we have a width, split up the text into individual lines
int numLines = 0;
for (uint idx = 0; idx < talk._statements.size(); ++idx) {
+ Common::StringArray statementLines;
if (talk._statements[idx]._talkMap != -1) {
- splitLines(talk._statements[idx]._statement, lines, width, 999);
- numLines += lines.size();
+ splitLines(talk._statements[idx]._statement, statementLines, width, 999);
+ numLines += statementLines.size();
+
+ for (uint sIdx = 0; sIdx < statementLines.size(); ++sIdx)
+ lines.push_back(statementLines[sIdx]);
}
}