diff options
author | Bastien Bouclet | 2017-02-20 18:02:57 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-03 08:50:10 +0200 |
commit | f977b5712328133b638c33992d4e111624d1881d (patch) | |
tree | c8480f6b0f9f3f2471f44fa09c894015fdc49ba1 /engines/mohawk/riven_graphics.cpp | |
parent | 9153393219b398ce5a7a8122d9af38e32e128059 (diff) | |
download | scummvm-rg350-f977b5712328133b638c33992d4e111624d1881d.tar.gz scummvm-rg350-f977b5712328133b638c33992d4e111624d1881d.tar.bz2 scummvm-rg350-f977b5712328133b638c33992d4e111624d1881d.zip |
MOHAWK: Rewrite the Riven movie manager
Diffstat (limited to 'engines/mohawk/riven_graphics.cpp')
-rw-r--r-- | engines/mohawk/riven_graphics.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp index 04562f82ba..a4fd6d0aa7 100644 --- a/engines/mohawk/riven_graphics.cpp +++ b/engines/mohawk/riven_graphics.cpp @@ -282,6 +282,7 @@ RivenGraphics::RivenGraphics(MohawkEngine_Riven* vm) : GraphicsManager(), _vm(vm _screenUpdateNesting = 0; _screenUpdateRunning = false; + _enableCardUpdateScript = true; _scheduledTransition = kRivenTransitionNone; _dirtyScreen = false; @@ -651,7 +652,9 @@ void RivenGraphics::applyScreenUpdate(bool force) { if (_screenUpdateNesting <= 0 && !_screenUpdateRunning) { _screenUpdateRunning = true; - _vm->getCard()->runScript(kCardUpdateScript); + if (_enableCardUpdateScript) { + _vm->getCard()->runScript(kCardUpdateScript); + } _vm->_sound->triggerDrawSound(); updateScreen(); @@ -686,6 +689,17 @@ void RivenGraphics::updateEffects() { } } +void RivenGraphics::copySystemRectToScreen(const Common::Rect &rect) { + Graphics::Surface *screen = _vm->_system->lockScreen(); + _mainScreen->copyRectToSurface(*screen, rect.left, rect.top, rect); + _effectScreen->copyRectToSurface(*screen, rect.left, rect.top, rect); + _vm->_system->unlockScreen(); +} + +void RivenGraphics::enableCardUpdateScript(bool enable) { + _enableCardUpdateScript = enable; +} + const FliesEffect::FliesEffectData FliesEffect::_firefliesParameters = { true, true, |