diff options
author | Max Horn | 2006-05-07 11:45:55 +0000 |
---|---|---|
committer | Max Horn | 2006-05-07 11:45:55 +0000 |
commit | c4f6cc5819537fdc5e1c94d1cf3b4515a0fe2b16 (patch) | |
tree | 0d6fe80ede844997fff36fe08cda9c80ac0ac046 /engines/scumm | |
parent | 58cd5ec5d5fb49d8ce12def6fd73802eda00e3c1 (diff) | |
download | scummvm-rg350-c4f6cc5819537fdc5e1c94d1cf3b4515a0fe2b16.tar.gz scummvm-rg350-c4f6cc5819537fdc5e1c94d1cf3b4515a0fe2b16.tar.bz2 scummvm-rg350-c4f6cc5819537fdc5e1c94d1cf3b4515a0fe2b16.zip |
Perform (horizontal) charset text clipping for V1-V3, too
svn-id: r22374
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/charset.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index 5190475c37..35670d9972 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -1220,11 +1220,14 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) { height = _vm->_2byteHeight; } else { charPtr = _fontPtr + chr * 8; -// width = height = 8; width = getCharWidth(chr); height = 8; } + // Clip at the right side (to avoid drawing "outside" the screen bounds). + if (_left + origWidth > _right + 1) + return; + origWidth = width; origHeight = height; |