diff options
author | Colin Snover | 2016-08-02 09:49:04 -0500 |
---|---|---|
committer | Colin Snover | 2016-08-19 13:57:40 -0500 |
commit | 6e2e862d8e5db0c8e786525fff2e2ae1f878f919 (patch) | |
tree | 1e996531be3b6083667e33cd52254d66f748f313 /engines/sci/graphics/frameout.cpp | |
parent | b74532fc1e3dfe034eff5df7f284feac7502b354 (diff) | |
download | scummvm-rg350-6e2e862d8e5db0c8e786525fff2e2ae1f878f919.tar.gz scummvm-rg350-6e2e862d8e5db0c8e786525fff2e2ae1f878f919.tar.bz2 scummvm-rg350-6e2e862d8e5db0c8e786525fff2e2ae1f878f919.zip |
SCI32: Implement kShakeScreen for SCI32
Diffstat (limited to 'engines/sci/graphics/frameout.cpp')
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 4bd7b46914..c0d8f15c74 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -1274,6 +1274,30 @@ void GfxFrameout::showRect(const Common::Rect &rect) { } } +void GfxFrameout::shakeScreen(int16 numShakes, const ShakeDirection direction) { + if (direction & kShakeHorizontal) { + // Used by QFG4 room 750 + warning("TODO: Horizontal shake not implemented"); + return; + } + + while (numShakes--) { + if (direction & kShakeVertical) { + g_system->setShakePos(_isHiRes ? 8 : 4); + } + + g_system->updateScreen(); + g_sci->getEngineState()->wait(3); + + if (direction & kShakeVertical) { + g_system->setShakePos(0); + } + + g_system->updateScreen(); + g_sci->getEngineState()->wait(3); + } +} + #pragma mark - #pragma mark Mouse cursor |