diff options
author | Max Horn | 2004-04-08 23:41:10 +0000 |
---|---|---|
committer | Max Horn | 2004-04-08 23:41:10 +0000 |
commit | 3dcd7bbfa8de79869a94ce1344fdb7ca141c0bf4 (patch) | |
tree | 0f600510d89d13313c91e11a1dc1badd2f65ad86 /scumm | |
parent | 2b94290c9738f3c3988c4b8e00edfab1663516f3 (diff) | |
download | scummvm-rg350-3dcd7bbfa8de79869a94ce1344fdb7ca141c0bf4.tar.gz scummvm-rg350-3dcd7bbfa8de79869a94ce1344fdb7ca141c0bf4.tar.bz2 scummvm-rg350-3dcd7bbfa8de79869a94ce1344fdb7ca141c0bf4.zip |
Record on which virtual screen we last drew masked text
svn-id: r13507
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/charset.cpp | 13 | ||||
-rw-r--r-- | scumm/charset.h | 8 |
2 files changed, 16 insertions, 5 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 8ddaf2d76c..2c0ba2ea56 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -40,6 +40,7 @@ CharsetRenderer::CharsetRenderer(ScummEngine *vm) { _dropShadow = false; _center = false; _hasMask = false; + _textScreenID = kMainVirtScreen; _ignoreCharsetMask = false; _blitAlso = false; _firstChar = false; @@ -978,8 +979,10 @@ void CharsetRendererV3::printChar(int chr) { _vm->markRectAsDirty(vs->number, _left, _left + width, drawTop, drawTop + height); - if (!_ignoreCharsetMask) + if (!_ignoreCharsetMask) { _hasMask = true; + _textScreenID = vs->number; + } drawBits1(vs, dest_ptr, char_ptr, mask_ptr, drawTop, 8, 8); @@ -1084,8 +1087,10 @@ void CharsetRendererClassic::printChar(int chr) { _vm->markRectAsDirty(vs->number, _left, _left + width, drawTop, drawTop + height + offsY); - if (!_ignoreCharsetMask) + if (!_ignoreCharsetMask) { _hasMask = true; + _textScreenID = vs->number; + } byte *mask = _vm->getMaskBuffer(_left, drawTop, 0); byte *dst = vs->screenPtr + vs->xstart + drawTop * vs->width + _left; @@ -1290,8 +1295,10 @@ void CharsetRendererNut::printChar(int chr) { shadow.right = _left + width + 2; shadow.bottom = _top + height + 2; - if (!_ignoreCharsetMask) + if (!_ignoreCharsetMask) { _hasMask = true; + _textScreenID = kMainVirtScreen; + } _current->drawShadowChar(chr, _left, _top, _color, !_ignoreCharsetMask, _curId != 3); _vm->markRectAsDirty(kMainVirtScreen, shadow); diff --git a/scumm/charset.h b/scumm/charset.h index 95b6ee0178..7ad92fd974 100644 --- a/scumm/charset.h +++ b/scumm/charset.h @@ -21,8 +21,9 @@ #ifndef CHARSET_H #define CHARSET_H -#include "common/rect.h" #include "common/scummsys.h" +#include "common/rect.h" +#include "scumm/gfx.h" namespace Scumm { @@ -47,7 +48,10 @@ protected: public: bool _center; - bool _hasMask; + + bool _hasMask; // True if "removable" text is visible somewhere (should be called _hasText or so) + VirtScreenNumber _textScreenID; // ID of the virtual screen on which the text is visible. + bool _ignoreCharsetMask; bool _blitAlso; bool _firstChar; |