diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/string.cpp | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index 872cb8ea77..c418186004 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -1157,26 +1157,22 @@ void ScummEngine::drawString(int a, const byte *msg) { if (_charset->_center) { _charset->_left = _charset->_startLeft - _charset->getStringWidth(a, buf + i); } else if (_game.version >= 4 && _game.version < 7 && (_language == Common::HE_ISR || true)) { - if (_charset->getStringWidth(a, buf + i) > _screenWidth) { - int ll = 0; - byte* ltext = buf + i; - while (ltext[ll] == 0xFF) { - ll += 4; - } - byte lenbuf[270] = {0}; - memcpy(lenbuf, ltext, ll); - int u = ll; - while (ltext[u]) { - if ((ltext[u] == 0xFF || (_game.version <= 6 && ltext[u] == 0xFE)) && ltext[u + 1] == 8) { - break; - } - u++; + int ll = 0; + byte* ltext = buf + i; + while (ltext[ll] == 0xFF) { + ll += 4; + } + byte lenbuf[270] = {0}; + memcpy(lenbuf, ltext, ll); + int u = ll; + while (ltext[u]) { + if ((ltext[u] == 0xFF || (_game.version <= 6 && ltext[u] == 0xFE)) && ltext[u + 1] == 8) { + break; } - memcpy(lenbuf, ltext, u); - _charset->_left = _screenWidth - _charset->_startLeft - _charset->getStringWidth(a, lenbuf); - } else { - _charset->_left = _screenWidth - _charset->_startLeft - _charset->getStringWidth(a, buf + i); + u++; } + memcpy(lenbuf, ltext, u); + _charset->_left = _screenWidth - _charset->_startLeft - _charset->getStringWidth(a, lenbuf); } else { _charset->_left = _charset->_startLeft; } |