diff options
author | Tobia Tesan | 2017-06-21 10:56:59 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-05 08:35:33 +0200 |
commit | c267bc208ffed2aef1ef7b7c47ebba070acb4775 (patch) | |
tree | e26deee33aa8fdeb606cc619022c136721a25eeb /engines | |
parent | 963bc4a35121b6a9efacb5cf57194ee8e5ad23f8 (diff) | |
download | scummvm-rg350-c267bc208ffed2aef1ef7b7c47ebba070acb4775.tar.gz scummvm-rg350-c267bc208ffed2aef1ef7b7c47ebba070acb4775.tar.bz2 scummvm-rg350-c267bc208ffed2aef1ef7b7c47ebba070acb4775.zip |
DIRECTOR: Handle kEventPrepareFrame in processFrameEvent
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/lingo/lingo-events.cpp | 15 | ||||
-rw-r--r-- | engines/director/score.cpp | 2 |
2 files changed, 11 insertions, 6 deletions
diff --git a/engines/director/lingo/lingo-events.cpp b/engines/director/lingo/lingo-events.cpp index 573ee521d1..b65e752388 100644 --- a/engines/director/lingo/lingo-events.cpp +++ b/engines/director/lingo/lingo-events.cpp @@ -205,12 +205,17 @@ void Lingo::processFrameEvent(LEvent event) { if (g_lingo->dontPassEvent) { g_lingo->dontPassEvent = false; } else { - assert(score->_frames[score->getCurrentFrame()] != nullptr); - if (!g_lingo->_scripts[kFrameScript].contains(kFrameScript)) { - processEvent(event, - kFrameScript, - score->_frames[score->getCurrentFrame()]->_actionId); + int entity; + + if (event == kEventPrepareFrame) { + entity = score->getCurrentFrame(); + } else { + assert(score->_frames[score->getCurrentFrame()] != nullptr); + entity = score->_frames[score->getCurrentFrame()]->_actionId; } + processEvent(event, + kFrameScript, + entity); runMovieScript(event); } } diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 639ac90b41..9a1f5dc7d9 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -1195,7 +1195,7 @@ void Score::update() { // TODO: Director 6 step: send prepareFrame event to all sprites and the script channel in upcoming frame if (_vm->getVersion() >= 6) - _lingo->processEvent(kEventPrepareFrame, kFrameScript, _currentFrame); + _lingo->processEvent(kEventPrepareFrame); Common::SortedArray<Label *>::iterator i; if (_labels != NULL) { |