diff options
author | Eugene Sandulenko | 2008-04-28 18:57:17 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2008-04-28 18:57:17 +0000 |
commit | e95a4b42acda5c53d88701f7b5f8c38c50db1c37 (patch) | |
tree | 65eb9c73f4f357c62ca15b6447e0cd8969b519f5 /engines/scumm | |
parent | 3af2d8d0fde10ccbdcdc8f7576927849bfd0120e (diff) | |
download | scummvm-rg350-e95a4b42acda5c53d88701f7b5f8c38c50db1c37.tar.gz scummvm-rg350-e95a4b42acda5c53d88701f7b5f8c38c50db1c37.tar.bz2 scummvm-rg350-e95a4b42acda5c53d88701f7b5f8c38c50db1c37.zip |
Narrow corrections to clipping code introduced with commit r31757 to
SCUMM 6+ as pointed out by Fingolfin
svn-id: r31759
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/string.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index 834896d021..c3925fc2bf 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -485,13 +485,23 @@ void ScummEngine::CHARSET_1() { _string[0].ypos = _screenHeight - 40; } - if (_string[0].ypos < 10) - _string[0].ypos = 10; + if (_game.version >= 6) { + if (_string[0].ypos < 10) + _string[0].ypos = 10; + + if (_string[0].xpos < 5) + _string[0].xpos = 5; + if (_string[0].xpos > _screenWidth - 10) + _string[0].xpos = _screenWidth - 10; + } else { + if (_string[0].ypos < 1) + _string[0].ypos = 1; - if (_string[0].xpos < 5) - _string[0].xpos = 5; - if (_string[0].xpos > _screenWidth - 10) - _string[0].xpos = _screenWidth - 10; + if (_string[0].xpos < 80) + _string[0].xpos = 80; + if (_string[0].xpos > _screenWidth - 80) + _string[0].xpos = _screenWidth - 80; + } } @@ -558,7 +568,7 @@ void ScummEngine::CHARSET_1() { if (_charset->_center) { _nextLeft -= _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) / 2; if (_nextLeft < 0) - _nextLeft = _string[0].xpos; + _nextLeft = _game.version >= 6 ? _string[0].xpos : 0; } _charset->_disableOffsX = _charset->_firstChar = !_keepText; @@ -584,7 +594,7 @@ void ScummEngine::CHARSET_1() { if (_charset->_center) { _nextLeft -= _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) / 2; if (_nextLeft < 0) - _nextLeft = _string[0].xpos; + _nextLeft = _game.version >= 6 ? _string[0].xpos : 0; } if (_game.version == 0) { |