[Scummvm-cvs-logs] SF.net SVN: scummvm: [31759] scummvm/trunk/engines/scumm/string.cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Mon Apr 28 20:57:18 CEST 2008
Revision: 31759
http://scummvm.svn.sourceforge.net/scummvm/?rev=31759&view=rev
Author: sev
Date: 2008-04-28 11:57:17 -0700 (Mon, 28 Apr 2008)
Log Message:
-----------
Narrow corrections to clipping code introduced with commit r31757 to
SCUMM 6+ as pointed out by Fingolfin
Modified Paths:
--------------
scummvm/trunk/engines/scumm/string.cpp
Modified: scummvm/trunk/engines/scumm/string.cpp
===================================================================
--- scummvm/trunk/engines/scumm/string.cpp 2008-04-28 16:10:40 UTC (rev 31758)
+++ scummvm/trunk/engines/scumm/string.cpp 2008-04-28 18:57:17 UTC (rev 31759)
@@ -485,14 +485,24 @@
_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;
+ 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 < 80)
+ _string[0].xpos = 80;
+ if (_string[0].xpos > _screenWidth - 80)
+ _string[0].xpos = _screenWidth - 80;
+ }
+
}
_charset->_top = _string[0].ypos + _screenTop;
@@ -558,7 +568,7 @@
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 @@
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) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list