diff --git a/engines/mm/mm1/messages.cpp b/engines/mm/mm1/messages.cpp index 2ab8d9d872c..f646f571b57 100644 --- a/engines/mm/mm1/messages.cpp +++ b/engines/mm/mm1/messages.cpp @@ -100,13 +100,7 @@ InfoMessage &InfoMessage::operator=(const InfoMessage &src) { } size_t Line::size() const { - size_t total = 0; - for (uint i = 0; i < _text.size(); ++i) { - if (_text[i] != '|') - ++total; - } - - return total; + return _text.size(); } } // namespace MM1 diff --git a/engines/mm/mm1/views/combat.cpp b/engines/mm/mm1/views/combat.cpp index d3b34e9d82a..19c46403da9 100644 --- a/engines/mm/mm1/views/combat.cpp +++ b/engines/mm/mm1/views/combat.cpp @@ -681,6 +681,7 @@ void Combat::writeMonsterAttack() { if (!_lines.back()._text.empty()) writeString(0, yp, _lines.back()._text); + _lines.clear(); } } @@ -757,16 +758,9 @@ void Combat::shoot() { } void Combat::writeMessage() { - size_t idx; - resetBottom(); - for (const auto &line : _message) { - Common::String text = line._text; - while ((idx = text.findFirstOf('|')) != Common::String::npos) - text.deleteChar(idx); - - writeString(line.x, line.y, text); - } + for (const auto &line : _message) + writeString(line.x, line.y, line._text); } void Combat::writeCharAttackDamage() { diff --git a/engines/mm/mm1/views/text_view.cpp b/engines/mm/mm1/views/text_view.cpp index ceccaf7c2d1..3954be21c23 100644 --- a/engines/mm/mm1/views/text_view.cpp +++ b/engines/mm/mm1/views/text_view.cpp @@ -60,8 +60,7 @@ void TextView::writeChar(int x, int y, unsigned char c) { void TextView::writeString(const Common::String &str) { for (const unsigned char *s = (const unsigned char *)str.c_str(); *s; ++s) { - if (*s != '|') - writeChar(*s); + writeChar(*s); if (*s >= ' ' && _textPos.x == 0 && (*(s + 1) == '\r' || *(s + 1) == '\n')) // Ignore carraige returns right after line wraps. The original didn't