Record on which virtual screen we last drew masked text

svn-id: r13507
This commit is contained in:
Max Horn
2004-04-08 23:41:10 +00:00
parent 2b94290c97
commit 3dcd7bbfa8
2 changed files with 16 additions and 5 deletions
+10 -3
View File
@@ -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);
+6 -2
View File
@@ -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;