diff options
author | Max Horn | 2004-04-08 01:38:07 +0000 |
---|---|---|
committer | Max Horn | 2004-04-08 01:38:07 +0000 |
commit | bf0e879aa168b1fbfe247c6774df550506dffcee (patch) | |
tree | e42a44cc09d1c91769fb7308c08c7e406538042a /scumm | |
parent | 1337c98434860281e1da7d60d44933fbe62caf89 (diff) | |
download | scummvm-rg350-bf0e879aa168b1fbfe247c6774df550506dffcee.tar.gz scummvm-rg350-bf0e879aa168b1fbfe247c6774df550506dffcee.tar.bz2 scummvm-rg350-bf0e879aa168b1fbfe247c6774df550506dffcee.zip |
Semi-experimental change: revised _hasMask handling -> simpler code (after removing those FIXME's that is :-), which should still produce identical results (let's wait for the regressions rolling in :-)
svn-id: r13498
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/charset.cpp | 9 | ||||
-rw-r--r-- | scumm/string.cpp | 13 |
2 files changed, 16 insertions, 6 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 9c2c115815..8ddaf2d76c 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -978,7 +978,7 @@ void CharsetRendererV3::printChar(int chr) { _vm->markRectAsDirty(vs->number, _left, _left + width, drawTop, drawTop + height); - if (vs->number == kMainVirtScreen && !_ignoreCharsetMask) + if (!_ignoreCharsetMask) _hasMask = true; drawBits1(vs, dest_ptr, char_ptr, mask_ptr, drawTop, 8, 8); @@ -1084,10 +1084,9 @@ void CharsetRendererClassic::printChar(int chr) { _vm->markRectAsDirty(vs->number, _left, _left + width, drawTop, drawTop + height + offsY); - if (vs->number == kMainVirtScreen && !_ignoreCharsetMask) + if (!_ignoreCharsetMask) _hasMask = true; - byte *mask = _vm->getMaskBuffer(_left, drawTop, 0); byte *dst = vs->screenPtr + vs->xstart + drawTop * vs->width + _left; @@ -1291,7 +1290,9 @@ void CharsetRendererNut::printChar(int chr) { shadow.right = _left + width + 2; shadow.bottom = _top + height + 2; - _hasMask = true; + if (!_ignoreCharsetMask) + _hasMask = true; + _current->drawShadowChar(chr, _left, _top, _color, !_ignoreCharsetMask, _curId != 3); _vm->markRectAsDirty(kMainVirtScreen, shadow); diff --git a/scumm/string.cpp b/scumm/string.cpp index 01748f1613..1d5981cb48 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -161,7 +161,10 @@ void ScummEngine::CHARSET_1() { if (!_keepText) { if (_version <= 3 && _gameId != GID_LOOM) { - _charset->_hasMask = true; +// FIXME: Remove this commented out code eventually +// if (!_charset->_hasMask) +// warning("_hasMask mismatch (case C) - please report to Fingolfin"); +// _charset->_hasMask = true; } _charset->restoreCharsetBg(); } @@ -310,7 +313,10 @@ void ScummEngine::CHARSET_1() { _charsetBufPos = buffer - _charsetBuffer; - _charset->_hasMask = (_charset->_str.left != -1); + // FIXME: Remove this and the next three lines eventually! + if (_charset->_hasMask != (_charset->_str.left != -1)) + warning("_hasMask mismatch (case A %d) - please report to Fingolfin", _charset->_hasMask); +// _charset->_hasMask = (_charset->_str.left != -1); } @@ -439,6 +445,9 @@ void ScummEngine::drawString(int a, const byte *msg) { _string[a].xpos = _charset->_str.right + 8; // Indy3: Fixes Grail Diary text positioning if (_version >= 7) { + // FIXME: Remove this and the next three lines eventually! + if (!_charset->_hasMask) + warning("_hasMask mismatch (case B %d) - please report to Fingolfin", _charset->_hasMask); _charset->_hasMask = true; } } |