[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6.cpp,1.87,1.88 string.cpp,1.94,1.95
Pawel Kolodziejski
aquadran at users.sourceforge.net
Sun Mar 30 11:33:05 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv18746
Modified Files:
script_v6.cpp string.cpp
Log Message:
fixed description centering in the FT and added hack for redraw descriptions in height while scrolling room
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- script_v6.cpp 30 Mar 2003 12:34:36 -0000 1.87
+++ script_v6.cpp 30 Mar 2003 19:32:12 -0000 1.88
@@ -2452,11 +2452,6 @@
_string[0].color = (byte)args[2];
_string[0].xpos = args[3];
_string[0].ypos = args[4];
- _charset->setCurID(_string[0].charset);
- _string[0].xpos -= _charset->getStringWidth(0, buf_output) >> 1;
- if (_string[0].xpos < 0) {
- _string[0].xpos = 0;
- }
drawDescString(buf_output);
} else {
setStringVars(0);
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- string.cpp 30 Mar 2003 19:03:12 -0000 1.94
+++ string.cpp 30 Mar 2003 19:32:12 -0000 1.95
@@ -359,9 +359,10 @@
_charset->_nextTop = _string[0].ypos;
// Center text
- _charset->_nextLeft -= _charset->getStringWidth(0, buffer) >> 1;
- if (_charset->_nextLeft < 0)
- _charset->_nextLeft = 0;
+ _string[0].xpos -= _charset->getStringWidth(0, buffer) >> 1;
+ if (_string[0].xpos < 0) {
+ _string[0].xpos = 0;
+ }
_talkDelay = 1;
@@ -383,12 +384,12 @@
} while (c);
_haveMsg = 1;
- // hack: more 8 pixels at width redraw before and after text
+ // hack: more 8 pixels at width and height while redraw
// for proper description redraw while scrolling room
gdi._mask_left = _charset->_strLeft - 8;
gdi._mask_right = _charset->_strRight + 8;
- gdi._mask_top = _charset->_strTop;
- gdi._mask_bottom = _charset->_strBottom;
+ gdi._mask_top = _charset->_strTop - 8;
+ gdi._mask_bottom = _charset->_strBottom + 8;
}
void Scumm::drawString(int a) {
More information about the Scummvm-git-logs
mailing list