diff options
author | BLooperZ | 2019-08-17 22:20:18 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2020-01-01 00:31:21 +0100 |
commit | 9b2ee566e423eeab97e3fd6041e2ebd6e9d5e63a (patch) | |
tree | 4c7a56c1695d5f5c6e656995d97393a7953f8525 /engines/scumm | |
parent | 8bcdaa6e455fd164f5fa3b8e230251eea7456016 (diff) | |
download | scummvm-rg350-9b2ee566e423eeab97e3fd6041e2ebd6e9d5e63a.tar.gz scummvm-rg350-9b2ee566e423eeab97e3fd6041e2ebd6e9d5e63a.tar.bz2 scummvm-rg350-9b2ee566e423eeab97e3fd6041e2ebd6e9d5e63a.zip |
SCUMM: remove condition for aligning verb lines
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/string.cpp | 32 |
1 files 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); } } |