aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/charset.cpp
diff options
context:
space:
mode:
authorFlorian Kagerer2010-10-15 21:48:46 +0000
committerFlorian Kagerer2010-10-15 21:48:46 +0000
commitaf52d3a7f631cc4ff64f41ae7bfe20141de263c2 (patch)
tree1e24af03fced64212257ac2e6cb7a67bf322bef5 /engines/scumm/charset.cpp
parent87b5598720a2d2ddad8f785c740e0aa435c631f6 (diff)
downloadscummvm-rg350-af52d3a7f631cc4ff64f41ae7bfe20141de263c2.tar.gz
scummvm-rg350-af52d3a7f631cc4ff64f41ae7bfe20141de263c2.tar.bz2
scummvm-rg350-af52d3a7f631cc4ff64f41ae7bfe20141de263c2.zip
SCUMM/FM-TOWNS: fix display of dialogue options in Indy 4 Japanese
svn-id: r53519
Diffstat (limited to 'engines/scumm/charset.cpp')
-rw-r--r--engines/scumm/charset.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index b72ebc62d4..7c30085153 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -990,8 +990,16 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
_top += offsY;
_left += offsX;
- if (_left + origWidth / _vm->_textSurfaceMultiplier > _right + 1 || _left < 0) {
- _left += origWidth / _vm->_textSurfaceMultiplier;
+ int boxWidth = origWidth;
+ int boxHeight = origHeight;
+
+ if (is2byte) {
+ boxWidth /= _vm->_textSurfaceMultiplier;
+ boxHeight /= _vm->_textSurfaceMultiplier;
+ }
+
+ if (_left + boxWidth > _right + 1 || _left < 0) {
+ _left += boxWidth;
_top -= offsY;
return;
}
@@ -1029,7 +1037,7 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
printCharIntern(is2byte, charPtr, origWidth, origHeight, width, height, vs, ignoreCharsetMask);
- _left += origWidth / _vm->_textSurfaceMultiplier;
+ _left += boxWidth;
if (_str.right < _left) {
_str.right = _left;
@@ -1037,8 +1045,8 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
_str.right++;
}
- if (_str.bottom < _top + height / _vm->_textSurfaceMultiplier)
- _str.bottom = _top + height / _vm->_textSurfaceMultiplier;
+ if (_str.bottom < _top + boxHeight)
+ _str.bottom = _top + boxHeight;
_top -= offsY;
}