aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2006-05-07 11:47:17 +0000
committerMax Horn2006-05-07 11:47:17 +0000
commit9a6c120b0ded4569586caf0aa8335a9365e56112 (patch)
tree731151eae3e39b6555b9b9fc1e459979c1f38c2d /engines
parentc4f6cc5819537fdc5e1c94d1cf3b4515a0fe2b16 (diff)
downloadscummvm-rg350-9a6c120b0ded4569586caf0aa8335a9365e56112.tar.gz
scummvm-rg350-9a6c120b0ded4569586caf0aa8335a9365e56112.tar.bz2
scummvm-rg350-9a6c120b0ded4569586caf0aa8335a9365e56112.zip
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
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/string.cpp17
1 files 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