diff options
Diffstat (limited to 'engines/avalanche/animation.cpp')
-rw-r--r-- | engines/avalanche/animation.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp index 9f9822eaa0..639abe99b3 100644 --- a/engines/avalanche/animation.cpp +++ b/engines/avalanche/animation.cpp @@ -1443,6 +1443,25 @@ void Animation::thunder() { _vm->_graphics->setBackgroundColor(kColorBlack); } +/** +* Makes the screen wobble. +*/ +void Animation::wobble() { + _vm->_graphics->saveScreen(); + + for (int i = 0; i < 26; i++) { + _vm->_graphics->shiftScreen(); + _vm->_graphics->refreshScreen(); + _vm->_system->delayMillis(i * 7); + + _vm->_graphics->restoreScreen(); + _vm->_system->delayMillis(i * 7); + } + + _vm->_graphics->restoreScreen(); + _vm->_graphics->removeBackup(); +} + void Animation::setDirection(Direction dir) { _direction = dir; } |