diff options
author | Paweł Kołodziejski | 2003-03-30 19:32:12 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-03-30 19:32:12 +0000 |
commit | 7ee96df673902a6352c9c819b1ac89cbe776d3eb (patch) | |
tree | 450755154c53d8d97cd91a4379add798ab790862 | |
parent | 776cdf2d086f51b75f84041313276c87acf8ce61 (diff) | |
download | scummvm-rg350-7ee96df673902a6352c9c819b1ac89cbe776d3eb.tar.gz scummvm-rg350-7ee96df673902a6352c9c819b1ac89cbe776d3eb.tar.bz2 scummvm-rg350-7ee96df673902a6352c9c819b1ac89cbe776d3eb.zip |
fixed description centering in the FT and added hack for redraw descriptions in height while scrolling room
svn-id: r6890
-rw-r--r-- | scumm/script_v6.cpp | 5 | ||||
-rw-r--r-- | scumm/string.cpp | 13 |
2 files changed, 7 insertions, 11 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 8fcf3bc078..4632ac2604 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -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); diff --git a/scumm/string.cpp b/scumm/string.cpp index 201b3a63c9..a5bc387f3d 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -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) { |