From c4f6cc5819537fdc5e1c94d1cf3b4515a0fe2b16 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 7 May 2006 11:45:55 +0000 Subject: Perform (horizontal) charset text clipping for V1-V3, too svn-id: r22374 --- engines/scumm/charset.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/scumm/charset.cpp') 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; -- cgit v1.2.3