aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2007-01-29 21:06:39 +0000
committerMax Horn2007-01-29 21:06:39 +0000
commit004b17446c1e8855d484670ccc49aae2027324f4 (patch)
treeb3c12e63de88b319b9c0f9876ee7b0b52386f029
parent9b9117d0c638071780bd6ccb4feb8c0ac2fa1a3e (diff)
downloadscummvm-rg350-004b17446c1e8855d484670ccc49aae2027324f4.tar.gz
scummvm-rg350-004b17446c1e8855d484670ccc49aae2027324f4.tar.bz2
scummvm-rg350-004b17446c1e8855d484670ccc49aae2027324f4.zip
cleanup
svn-id: r25266
-rw-r--r--engines/scumm/string.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 95b236544f..47f96e17b3 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -400,7 +400,7 @@ bool ScummEngine_v72he::handleNextCharsetCode(Actor *a, int *code) {
void ScummEngine::CHARSET_1() {
Actor *a;
- int t, c = 0;
+ int c = 0;
#ifndef DISABLE_SCUMM_7_8
byte subtitleBuffer[200];
byte *subtitleLine = subtitleBuffer;
@@ -514,15 +514,16 @@ void ScummEngine::CHARSET_1() {
}
}
- t = _charset->_right - _string[0].xpos - 1;
- if (_charset->_center) {
- if (t > _nextLeft)
- t = _nextLeft;
- t *= 2;
- }
+ if (_game.version > 3) {
+ int maxwidth = _charset->_right - _string[0].xpos - 1;
+ if (_charset->_center) {
+ if (maxwidth > _nextLeft)
+ maxwidth = _nextLeft;
+ maxwidth *= 2;
+ }
- if (_game.version > 3)
- _charset->addLinebreaks(0, _charsetBuffer + _charsetBufPos, 0, t);
+ _charset->addLinebreaks(0, _charsetBuffer + _charsetBufPos, 0, maxwidth);
+ }
if (_charset->_center) {
_nextLeft -= _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) / 2;