mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
MM: MM1: Remove some deprecated checks for | character
Originally I was going use this to wrap character names, for formatting them in the enhanced version. However, I've since changed all text to be lowercase by default, and simply uppercased for the original displays
This commit is contained in:
parent
355175534e
commit
872c667b2e
@ -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
|
||||
|
@ -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() {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user