diff options
author | Torbjörn Andersson | 2005-04-05 07:53:46 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-04-05 07:53:46 +0000 |
commit | 23e419969975d0da935498bfbb255448be7b6c2a (patch) | |
tree | 716f60913bbd79e777e9ddf7971f8c033424c83b /scumm/gfx.cpp | |
parent | 5de9e36ff84c64a56c2ec4434d802270543dbd5f (diff) | |
download | scummvm-rg350-23e419969975d0da935498bfbb255448be7b6c2a.tar.gz scummvm-rg350-23e419969975d0da935498bfbb255448be7b6c2a.tar.bz2 scummvm-rg350-23e419969975d0da935498bfbb255448be7b6c2a.zip |
Clear the text surface when loading a saved game, otherwise any text that
was displayed before loading the game will remain.
I hope this is the correct fix.
svn-id: r17382
Diffstat (limited to 'scumm/gfx.cpp')
-rw-r--r-- | scumm/gfx.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index b5bdcb312a..ae5334ece7 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -887,7 +887,7 @@ void CharsetRenderer::restoreCharsetBg() { if (vs->hasTwoBuffers) { // Clean out the charset mask - memset(_textSurface.pixels, CHARSET_MASK_TRANSPARENCY, _textSurface.pitch * _textSurface.h); + clearTextSurface(); } } } @@ -896,6 +896,10 @@ void CharsetRenderer::clearCharsetMask() { memset(_vm->getResourceAddress(rtBuffer, 9), 0, _vm->gdi._imgBufOffs[1]); } +void CharsetRenderer::clearTextSurface() { + memset(_textSurface.pixels, CHARSET_MASK_TRANSPARENCY, _textSurface.pitch * _textSurface.h); +} + byte *ScummEngine::getMaskBuffer(int x, int y, int z) { return gdi.getMaskBuffer((x + virtscr[0].xstart) / 8, y, z); } |