From 9a6c120b0ded4569586caf0aa8335a9365e56112 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 7 May 2006 11:47:17 +0000 Subject: Handle line breaks/overflow for V1-V3 games *after* processing newline codes, to avoid double breaks (which result in spurious empty lines) svn-id: r22375 --- engines/scumm/string.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index bd92416a3a..ae795a0657 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -567,6 +567,15 @@ void ScummEngine::CHARSET_1() { continue; } + // Handle line overflow for V3. See also bug #1306269. + if (_game.version == 3 && _charset->_nextLeft >= _screenWidth) { + _charset->_nextLeft = _screenWidth; + } + // Handle line breaks for V1-V2 + if (_game.version <= 2 && _charset->_nextLeft >= _screenWidth) { + goto newLine; + } + _charset->_left = _charset->_nextLeft; _charset->_top = _charset->_nextTop; @@ -615,14 +624,6 @@ void ScummEngine::CHARSET_1() { } else { _talkDelay += (int)VAR(VAR_CHARINC); } - // Handle line overflow for V3 - if (_game.version == 3 && _charset->_nextLeft >= _screenWidth) { - _charset->_nextLeft = _screenWidth; - } - // Handle line breaks for V1-V2 - if (_game.version <= 2 && _charset->_nextLeft >= _screenWidth) { - goto newLine; - } } #ifndef DISABLE_SCUMM_7_8 -- cgit v1.2.3