aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/string.cpp32
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);
}
}