diff options
author | Martin Kiewitz | 2016-02-10 19:54:03 +0100 |
---|---|---|
committer | Martin Kiewitz | 2016-02-10 19:54:03 +0100 |
commit | ccf328d725c4b4b0747c7af9b5d57c50dd4ba8d2 (patch) | |
tree | 1ea2d826aa1af1cad1d2668852207ee23bd258a7 /engines/agi/graphics.cpp | |
parent | b443ac7b95c92e1bc5b4bb3ea201cb06a15e8b6c (diff) | |
download | scummvm-rg350-ccf328d725c4b4b0747c7af9b5d57c50dd4ba8d2.tar.gz scummvm-rg350-ccf328d725c4b4b0747c7af9b5d57c50dd4ba8d2.tar.bz2 scummvm-rg350-ccf328d725c4b4b0747c7af9b5d57c50dd4ba8d2.zip |
AGI: Cleanup
Diffstat (limited to 'engines/agi/graphics.cpp')
-rw-r--r-- | engines/agi/graphics.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp index 06f9285bb3..af2e8ba499 100644 --- a/engines/agi/graphics.cpp +++ b/engines/agi/graphics.cpp @@ -539,6 +539,9 @@ void GfxMgr::block_restore(int16 x, int16 y, int16 width, int16 height, byte *bu void GfxMgr::copyDisplayRectToScreen(int16 x, int16 y, int16 width, int16 height) { g_system->copyRectToScreen(_displayScreen + y * DISPLAY_WIDTH + x, DISPLAY_WIDTH, x, y, width, height); } +void GfxMgr::copyDisplayToScreen() { + g_system->copyRectToScreen(_displayScreen, DISPLAY_WIDTH, 0, 0, DISPLAY_WIDTH, DISPLAY_HEIGHT); +} // coordinates are for visual screen, but are supposed to point somewhere inside the playscreen // attention: Clipping is done here against 160x200 instead of 160x168 @@ -741,7 +744,7 @@ void GfxMgr::shakeScreen(int16 repeatCount) { for (shakeNr = 0; shakeNr < shakeCount; shakeNr++) { if (shakeNr & 1) { // move back - copyDisplayRectToScreen(0, 0, DISPLAY_WIDTH, DISPLAY_HEIGHT); + copyDisplayToScreen(); } else { g_system->copyRectToScreen(_displayScreen, DISPLAY_WIDTH, SHAKE_HORIZONTAL_PIXELS, SHAKE_VERTICAL_PIXELS, DISPLAY_WIDTH - SHAKE_HORIZONTAL_PIXELS, DISPLAY_HEIGHT - SHAKE_VERTICAL_PIXELS); // additionally fill the remaining space with black |