diff options
Diffstat (limited to 'engines/mohawk/riven_stack.cpp')
-rw-r--r-- | engines/mohawk/riven_stack.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/mohawk/riven_stack.cpp b/engines/mohawk/riven_stack.cpp index f8dd6a30f1..490e4b538b 100644 --- a/engines/mohawk/riven_stack.cpp +++ b/engines/mohawk/riven_stack.cpp @@ -272,6 +272,24 @@ void RivenStack::mouseForceUp() { _mouseIsDown = false; } +void RivenStack::onFrame() { + if (!_vm->getCard() || _vm->_scriptMan->hasQueuedScripts()) { + return; + } + + _vm->_gfx->updateEffects(); + + RivenScriptPtr script(new RivenScript()); + if (_mouseIsDown) { + script += _vm->getCard()->onMouseDragUpdate(); + } else { + script += _vm->getCard()->onFrame(); + script += _vm->getCard()->onMouseUpdate(); + } + + _vm->_scriptMan->runScript(script, true); +} + RivenNameList::RivenNameList() { } |