diff options
author | Martin Kiewitz | 2015-04-26 15:50:12 +0200 |
---|---|---|
committer | Martin Kiewitz | 2015-04-26 15:50:12 +0200 |
commit | 031b9b8ced1007545099e0e6285ea4bbe1d3e97f (patch) | |
tree | 4fa74f3b9028aa51a98c72bbd274d7c5e526700b /engines/sci/graphics | |
parent | 5f53b9255eb2799906c324ff0e2ad096092a5dec (diff) | |
download | scummvm-rg350-031b9b8ced1007545099e0e6285ea4bbe1d3e97f.tar.gz scummvm-rg350-031b9b8ced1007545099e0e6285ea4bbe1d3e97f.tar.bz2 scummvm-rg350-031b9b8ced1007545099e0e6285ea4bbe1d3e97f.zip |
SCI: restore: clear screen when restoring
primarily to clear kPortrait graphics in kq6
when restoring during portrait animation
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/screen.cpp | 12 | ||||
-rw-r--r-- | engines/sci/graphics/screen.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp index 5a3b30f7ef..dfcb5dbc14 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -251,6 +251,18 @@ GfxScreen::~GfxScreen() { free(_displayScreen); } +// should not used regulary, only meant for restore game +void GfxScreen::clear() { + // reset all screen data + memset(_visualScreen, 0, _pixels); + memset(_priorityScreen, 0, _pixels); + memset(_controlScreen, 0, _pixels); + memset(_displayScreen, 0, _displayPixels); + memset(&_ditheredPicColors, 0, sizeof(_ditheredPicColors)); + _fontIsUpscaled = false; + copyToScreen(); +} + void GfxScreen::copyToScreen() { g_system->copyRectToScreen(_activeScreen, _displayWidth, 0, 0, _displayWidth, _displayHeight); } diff --git a/engines/sci/graphics/screen.h b/engines/sci/graphics/screen.h index 766e32614a..587d2ef3bc 100644 --- a/engines/sci/graphics/screen.h +++ b/engines/sci/graphics/screen.h @@ -76,6 +76,7 @@ public: byte getColorWhite() { return _colorWhite; } byte getColorDefaultVectorData() { return _colorDefaultVectorData; } + void clear(); void copyToScreen(); void copyFromScreen(byte *buffer); void kernelSyncWithFramebuffer(); |