fixed description centering in the FT and added hack for redraw descriptions in height while scrolling room

svn-id: r6890
This commit is contained in:
Paweł Kołodziejski 2003-03-30 19:32:12 +00:00
parent 776cdf2d08
commit 7ee96df673
2 changed files with 7 additions and 11 deletions

View file

@ -2452,11 +2452,6 @@ void Scumm_v6::o6_kernelSetFunctions() {
_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);

View file

@ -359,9 +359,10 @@ void Scumm::drawDescString(byte *msg) {
_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 @@ void Scumm::drawDescString(byte *msg) {
} 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) {