From c8328658753bacfb7c23497ee49e4059d59f7a8b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 3 Feb 2017 10:05:36 +0100 Subject: GRAPHICS: Fix MacText wrapping when formatting starts in the middle of a line --- graphics/macgui/mactext.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'graphics') diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp index 050de56894..bdcb9acb42 100644 --- a/graphics/macgui/mactext.cpp +++ b/graphics/macgui/mactext.cpp @@ -85,7 +85,7 @@ void MacText::splitString(Common::String &str) { for (uint j = 0; j < _textLines[i].chunks.size(); j++) debugN(7, "[%d] \"%s\"", _textLines[i].chunks[j].fontId, _textLines[i].chunks[j].text.c_str()); - debug(7, " --> %c %d", (*s > 0x20 ? *s : ' '), (byte)*s); + debug(7, " --> %c %d, '%s'", (*s > 0x20 ? *s : ' '), (byte)*s, tmp.c_str()); } if (*s == '\001') { @@ -109,13 +109,6 @@ void MacText::splitString(Common::String &str) { _currentFormatting.setValues(_wm, fontId, textSlant, unk3f, fontSize, palinfo1, palinfo2, palinfo3); - if (curLine == 0 && curChunk == 0 && _textLines[curLine].chunks[curChunk].text.empty()) { - _textLines[curLine].chunks[curChunk] = _currentFormatting; - } else { - _textLines[curLine].chunks.push_back(_currentFormatting); - curChunk++; - } - nextChunk = true; } } else if (*s == '\n' && prevCR) { // trean \r\n as one -- cgit v1.2.3