From 9b2ee566e423eeab97e3fd6041e2ebd6e9d5e63a Mon Sep 17 00:00:00 2001 From: BLooperZ Date: Sat, 17 Aug 2019 22:20:18 +0300 Subject: SCUMM: remove condition for aligning verb lines --- engines/scumm/string.cpp | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index 8db9cd6da4..872cb8ea77 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -1098,27 +1098,21 @@ void ScummEngine::drawString(int a, const byte *msg) { if (_game.id == GID_INDY4 && buf[0] == 127) { buf[0] = 32; } - if (_charset->getStringWidth(a, buf) > _screenWidth) { - int ll = 0; - byte* ltext = buf; - while (ltext[ll] == 0xFF) { - ll += 4; - } - byte lenbuf[270] = {0}; - memcpy(lenbuf, ltext, ll); - int pos = ll; - while (ltext[pos]) { - if ((ltext[pos] == 0xFF || (_game.version <= 6 && ltext[pos] == 0xFE)) && ltext[pos+1] == 8) { - break; - } - pos++; + int ll = 0; + byte* ltext = buf; + while (ltext[ll] == 0xFF) { + ll += 4; + } + byte lenbuf[270] = {0}; + int pos = ll; + while (ltext[pos]) { + if ((ltext[pos] == 0xFF || (_game.version <= 6 && ltext[pos] == 0xFE)) && ltext[pos+1] == 8) { + break; } - memcpy(lenbuf, ltext, pos); - - _charset->_left = _screenWidth - _charset->_startLeft - _charset->getStringWidth(a, lenbuf); - } else { - _charset->_left = _screenWidth - _charset->_startLeft - _charset->getStringWidth(a, buf); + pos++; } + memcpy(lenbuf, ltext, pos); + _charset->_left = _screenWidth - _charset->_startLeft - _charset->getStringWidth(a, lenbuf); } } -- cgit v1.2.3