aboutsummaryrefslogtreecommitdiff
path: root/scumm/charset.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-06-08 15:17:14 +0000
committerTorbjörn Andersson2003-06-08 15:17:14 +0000
commitab7f8b337869b367a7a18d6235a9b481f9d05cfb (patch)
treef845c8e1f1a6a866d9018bb7a20a090ef4c56bde /scumm/charset.cpp
parent8ab745de662d1f58284a72b2db84ec69319d3491 (diff)
downloadscummvm-rg350-ab7f8b337869b367a7a18d6235a9b481f9d05cfb.tar.gz
scummvm-rg350-ab7f8b337869b367a7a18d6235a9b481f9d05cfb.tar.bz2
scummvm-rg350-ab7f8b337869b367a7a18d6235a9b481f9d05cfb.zip
Fixed recent regression (too many blast texts) in The Dig's end credits and
made the text scroll off the screen instead of just vanishing at the top. (The latter also applies to Full Throttle's end credits.) svn-id: r8402
Diffstat (limited to 'scumm/charset.cpp')
-rw-r--r--scumm/charset.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp
index b895043d25..c27d2a8c4a 100644
--- a/scumm/charset.cpp
+++ b/scumm/charset.cpp
@@ -597,7 +597,7 @@ void CharsetRendererClassic::printChar(int chr) {
_vm->checkRange(_vm->_maxCharsets - 1, 1, _curId, "Printing with bad charset %d");
- if ((vs = _vm->findVirtScreen(_top)) == NULL)
+ if ((vs = _vm->findVirtScreen(_top)) == NULL && (vs = _vm->findVirtScreen(_top + getFontHeight())) == NULL)
return;
if (chr == '@')
@@ -671,8 +671,6 @@ void CharsetRendererClassic::printChar(int chr) {
_str.top = _top;
int drawTop = _top - vs->topline;
- if (drawTop < 0)
- drawTop = 0;
_vm->updateDirtyRect(vs->number, _left, _left + width, drawTop, drawTop + height + offsY, 0);
@@ -740,7 +738,7 @@ void CharsetRendererClassic::drawBitsN(VirtScreen *vs, byte *dst, const byte *sr
for (x = 0; x < width; x++) {
color = (bits >> (8 - bpp)) & 0xFF;
- if (color) {
+ if (color && y + drawTop >= 0) {
*dst = _vm->_charsetColorMap[color];
if (useMask) {
mask[maskpos] |= maskmask;
@@ -778,7 +776,7 @@ void CharsetRendererCommon::drawBits1(VirtScreen *vs, byte *dst, const byte *src
for (x = 0; x < width; x++) {
if ((x % 8) == 0)
bits = *src++;
- if (bits & revBitMask[x % 8]) {
+ if ((bits & revBitMask[x % 8]) && y + drawTop >= 0) {
if (_dropShadow) {
*(dst + 1) = 0;
*(dst + _vm->_screenWidth) = 0;