diff options
author | Max Horn | 2004-09-24 22:30:51 +0000 |
---|---|---|
committer | Max Horn | 2004-09-24 22:30:51 +0000 |
commit | bad5721c63e2e8c494e30f69fc529b4e54617f35 (patch) | |
tree | df473acae7c12d1b1e6818ba437daacad51f765f /scumm/charset.cpp | |
parent | 5d655be798a811831c74064601121136a6cf6917 (diff) | |
download | scummvm-rg350-bad5721c63e2e8c494e30f69fc529b4e54617f35.tar.gz scummvm-rg350-bad5721c63e2e8c494e30f69fc529b4e54617f35.tar.bz2 scummvm-rg350-bad5721c63e2e8c494e30f69fc529b4e54617f35.zip |
Fix charset text in V7_SMOOTH_SCROLLING_HACK mode
svn-id: r15257
Diffstat (limited to 'scumm/charset.cpp')
-rw-r--r-- | scumm/charset.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 5481b187d1..4e95977110 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -1289,21 +1289,28 @@ void CharsetRendererClassic::printChar(int chr) { _hasMask = true; _textScreenID = vs->number; } + + Graphics::Surface dstSurface; + Graphics::Surface backSurface; if (_ignoreCharsetMask || !vs->hasTwoBuffers) { + dstSurface = *vs; dst = vs->getPixels(_left, drawTop); } else { + dstSurface = _vm->gdi._textSurface; dst = (byte *)_vm->gdi._textSurface.pixels + (_top - _vm->_screenTop) * _vm->gdi._textSurface.pitch + _left; } if (_blitAlso && vs->hasTwoBuffers) { + backSurface = dstSurface; back = dst; + dstSurface = *vs; dst = vs->getBackPixels(_left, drawTop); } if (is2byte) { - drawBits1(*vs, dst, charPtr, drawTop, origWidth, origHeight); + drawBits1(dstSurface, dst, charPtr, drawTop, origWidth, origHeight); } else { - drawBitsN(*vs, dst, charPtr, *_fontPtr, drawTop, origWidth, origHeight); + drawBitsN(dstSurface, dst, charPtr, *_fontPtr, drawTop, origWidth, origHeight); } if (_blitAlso && vs->hasTwoBuffers) { @@ -1319,8 +1326,8 @@ void CharsetRendererClassic::printChar(int chr) { int h = height; do { memcpy(back, dst, width); - back += vs->pitch; - dst += vs->pitch; + back += backSurface.pitch; + dst += dstSurface.pitch; } while (--h); } |