diff options
| author | Max Horn | 2002-12-21 01:11:42 +0000 |
|---|---|---|
| committer | Max Horn | 2002-12-21 01:11:42 +0000 |
| commit | 50f7ffbeb6109eb92461b45678a7514b84ea54a4 (patch) | |
| tree | 961fafa6f44d7a1b63d9f61b42ff520e94d9c853 /scumm/string.cpp | |
| parent | f2fe67fbdb535b43ddee032a1a322dc2631f530b (diff) | |
| download | scummvm-rg350-50f7ffbeb6109eb92461b45678a7514b84ea54a4.tar.gz scummvm-rg350-50f7ffbeb6109eb92461b45678a7514b84ea54a4.tar.bz2 scummvm-rg350-50f7ffbeb6109eb92461b45678a7514b84ea54a4.zip | |
got rid of _curVirtScreen and VirtScreen::unk1; added some comments to gfx.cpp; added a hack to enable smooth scrolling in V7 games (note: when I say hack, I mean it, it is buggy as hell and not enabled by default, use at your own risk and don't report problems with it, it's disabled by default)
svn-id: r6037
Diffstat (limited to 'scumm/string.cpp')
| -rw-r--r-- | scumm/string.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp index b63b707623..328cd4ef14 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -320,17 +320,18 @@ void CharsetRenderer::printChar(int chr) + drawTop * _vm->gdi._numStrips + _left / 8 + _vm->_screenStartStrip; byte *dst = vs->screenPtr + vs->xstart + drawTop * _vm->_realWidth + _left; + bool useMask = (vs->number == 0 && !_ignoreCharsetMask); if (_blitAlso) { byte *back = dst; dst = _vm->getResourceAddress(rtBuffer, vs->number + 5) + vs->xstart + drawTop * _vm->_realWidth + _left; - drawBits(dst, mask, drawTop, width, height); + drawBits(dst, mask, drawTop, width, height, useMask); _vm->blit(back, dst, width, height); } else { - drawBits(dst, mask, drawTop, width, height); + drawBits(dst, mask, drawTop, width, height, useMask); } _left += width; @@ -343,17 +344,14 @@ void CharsetRenderer::printChar(int chr) _top -= _offsY; } -void CharsetRenderer::drawBits(byte *dst, byte *mask, int drawTop, int width, int height) +void CharsetRenderer::drawBits(byte *dst, byte *mask, int drawTop, int width, int height, bool useMask) { - bool usemask; byte maskmask; int y, x; int maskpos; int color; byte numbits, bits; - usemask = (_vm->_curVirtScreen->number == 0 && !_ignoreCharsetMask); - bits = *_charPtr++; numbits = 8; @@ -370,7 +368,7 @@ void CharsetRenderer::drawBits(byte *dst, byte *mask, int drawTop, int width, in assert(color == myColor); if (color) { - if (usemask) { + if (useMask) { mask[maskpos] |= maskmask; } *dst = _colorMap[color]; |
