Trimming of excess spaces in drawString, only applies to SCUMM 4+ games. Cofirmed via disssembly.
svn-id: r26282
This commit is contained in:
parent
661944a0f9
commit
00ea91c5d6
1 changed files with 17 additions and 14 deletions
|
@ -688,6 +688,7 @@ void ScummEngine::drawString(int a, const byte *msg) {
|
|||
|
||||
fontHeight = _charset->getFontHeight();
|
||||
|
||||
if (_game.version >= 4) {
|
||||
// trim from the right
|
||||
byte *tmp = buf;
|
||||
space = NULL;
|
||||
|
@ -702,11 +703,13 @@ void ScummEngine::drawString(int a, const byte *msg) {
|
|||
}
|
||||
if (space)
|
||||
*space = '\0';
|
||||
}
|
||||
|
||||
if (_charset->_center) {
|
||||
_charset->_left -= _charset->getStringWidth(a, buf) / 2;
|
||||
}
|
||||
|
||||
if (!buf[0]) {
|
||||
if (_game.version >= 5 && !buf[0]) {
|
||||
buf[0] = ' ';
|
||||
buf[1] = 0;
|
||||
}
|
||||
|
@ -798,7 +801,7 @@ void ScummEngine::drawString(int a, const byte *msg) {
|
|||
_nextTop = _charset->_top;
|
||||
}
|
||||
|
||||
_string[a].xpos = _charset->_str.right + 8; // Indy3: Fixes Grail Diary text positioning
|
||||
_string[a].xpos = _charset->_str.right;
|
||||
}
|
||||
|
||||
int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue