SCUMM: Some fixes for removing text

Drawing boxes and restoring verb backgrounds now also clears the text
surface in Macintosh Loom.
This commit is contained in:
Torbjörn Andersson 2021-05-15 23:16:39 +02:00 committed by Eugene Sandulenko
parent 5c0c64bc5a
commit ec6f0b1cf3

View File

@ -1151,6 +1151,11 @@ void ScummEngine::restoreBackground(Common::Rect rect, byte backColor) {
}
#endif
if (_macScreen) {
byte *mask = (byte *)_textSurface.getBasePtr(rect.left * _textSurfaceMultiplier, (rect.top + vs->topline) * _textSurfaceMultiplier);
fill(mask, _textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.format.bytesPerPixel);
}
if (_game.features & GF_16BIT_COLOR)
fill(screenBuf, vs->pitch, _16BitPalette[backColor], width, height, vs->format.bytesPerPixel);
else
@ -1450,6 +1455,11 @@ void ScummEngine::drawBox(int x, int y, int x2, int y2, int color) {
}
#endif
if (_macScreen) {
byte *mask = (byte *)_textSurface.getBasePtr(x * _textSurfaceMultiplier, (y - _screenTop + vs->topline) * _textSurfaceMultiplier);
fill(mask, _textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.format.bytesPerPixel);
}
fill(backbuff, vs->pitch, color, width, height, vs->format.bytesPerPixel);
}
}