diff -ur ScummVM-cvs20021123/scummvm/scumm/scumm.h ScummVM-cvs20021123+hack/scummvm/scumm/scumm.h
old
|
new
|
|
194 | 194 | bool _blitAlso; |
195 | 195 | |
196 | 196 | int _strLeft, _strRight, _strTop, _strBottom; |
| 197 | int _strLeftPixel, _strRightPixel; |
197 | 198 | byte _curId; |
198 | 199 | |
199 | 200 | int _xpos2, _ypos2; |
diff -ur ScummVM-cvs20021123/scummvm/scumm/string.cpp ScummVM-cvs20021123+hack/scummvm/scumm/string.cpp
old
|
new
|
|
588 | 588 | charset._unk12 = 1; |
589 | 589 | charset._disableOffsX = 1; |
590 | 590 | |
| 591 | // In MonkeyVGA, the scroll arrows during insult sword-fighting are |
| 592 | // drawn - correctly, as far as I can tell - so that their background |
| 593 | // overlaps the insults/comebacks. This causes problems whenever the |
| 594 | // arrows are redrawn, because ScummVM simply erases the whole area |
| 595 | // it thinks the verb occupies. |
| 596 | // |
| 597 | // To fix this, keep track of the left- and rightmost pixels of the |
| 598 | // string that are actually drawn. I originally intended to do the |
| 599 | // same for top and bottom, but for whatever reason I could never get |
| 600 | // it to work right. Besides, I've never seen any case where it would |
| 601 | // be necessary anyway. |
| 602 | |
| 603 | charset._strLeftPixel = _realWidth; |
| 604 | charset._strRightPixel = -1; |
| 605 | |
591 | 606 | if (!(_features & GF_OLD256)) { |
592 | 607 | charsetptr = getResourceAddress(rtCharset, charset._curId); |
593 | 608 | assert(charsetptr); |
… |
… |
|
703 | 718 | if (charset._strBottom > gdi._mask_bottom) |
704 | 719 | gdi._mask_bottom = charset._strBottom; |
705 | 720 | } |
| 721 | |
| 722 | // If the string has no pixels (which at the very least happens in |
| 723 | // Indy3), then fall back on _strLeft and _strRight. |
| 724 | |
| 725 | if (charset._strLeftPixel == _realWidth) |
| 726 | charset._strLeftPixel = charset._strLeft; |
| 727 | if (charset._strRightPixel == -1) |
| 728 | charset._strRightPixel = charset._strRight; |
706 | 729 | } |
707 | 730 | |
708 | 731 | byte *Scumm::addMessageToStack(byte *msg) |
… |
… |
|
1089 | 1112 | mask[maskpos] |= maskmask; |
1090 | 1113 | } |
1091 | 1114 | *dst = _colorMap[color]; |
| 1115 | if (_left + x < _strLeftPixel) |
| 1116 | _strLeftPixel = _left + x; |
| 1117 | if (_left + x > _strRightPixel) |
| 1118 | _strRightPixel = _left + x; |
1092 | 1119 | } |
1093 | 1120 | dst++; |
1094 | 1121 | bits <<= _bpp; |
diff -ur ScummVM-cvs20021123/scummvm/scumm/verbs.cpp ScummVM-cvs20021123+hack/scummvm/scumm/verbs.cpp
old
|
new
|
|
160 | 160 | drawString(4); |
161 | 161 | charset._center = tmp; |
162 | 162 | |
163 | | vs->right = charset._strRight; |
| 163 | vs->right = charset._strRightPixel; |
164 | 164 | vs->bottom = charset._strBottom; |
165 | | vs->oldleft = charset._strLeft; |
166 | | vs->oldright = charset._strRight; |
| 165 | vs->oldleft = charset._strLeftPixel; |
| 166 | vs->oldright = charset._strRightPixel; |
167 | 167 | vs->oldtop = charset._strTop; |
168 | 168 | vs->oldbottom = charset._strBottom; |
169 | 169 | charset._strLeft = charset._strRight; |