From e2f33c69ab00835f74467765b92e07a69fc76fd1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 23 Mar 2005 04:22:11 +0000 Subject: Fix MM NES text rendering so old messages are cleared up correctly. svn-id: r17202 --- scumm/charset.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 98d0b8810d..57684f5441 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -1781,8 +1781,14 @@ void CharsetRendererNES::printChar(int chr) { _hasMask = true; _textScreenID = vs->number; } - dst = (byte *)_vm->gdi._textSurface.pixels + _top * _vm->gdi._textSurface.pitch + _left; - drawBits1(_vm->gdi._textSurface, dst, charPtr, drawTop, origWidth, origHeight); + + if (_ignoreCharsetMask || !vs->hasTwoBuffers) { + dst = vs->getPixels(_left, drawTop); + drawBits1(*vs, dst, charPtr, drawTop, origWidth, origHeight); + } else { + dst = (byte *)_vm->gdi._textSurface.pixels + _top * _vm->gdi._textSurface.pitch + _left; + drawBits1(_vm->gdi._textSurface, dst, charPtr, drawTop, origWidth, origHeight); + } if (_str.left > _left) _str.left = _left; -- cgit v1.2.3