aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/events.cpp7
-rw-r--r--engines/director/score.cpp3
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/director/events.cpp b/engines/director/events.cpp
index 32fe58859e..cb9e1773ec 100644
--- a/engines/director/events.cpp
+++ b/engines/director/events.cpp
@@ -49,10 +49,6 @@ void DirectorEngine::processEvents() {
Frame *currentFrame = sc->_frames[sc->getCurrentFrame()];
uint16 spriteId = 0;
- // TODO: re-instate when we know which script to run.
- //if (currentFrame > 0)
- // _lingo->processEvent(kEventIdle, currentFrame - 1);
-
Common::Point pos;
while (g_system->getMillis() < endTime) {
@@ -131,6 +127,9 @@ void DirectorEngine::processEvents() {
g_system->updateScreen();
g_system->delayMillis(10);
+
+ if (currentFrame > 0)
+ _lingo->processEvent(kEventIdle, kFrameScript, sc->getCurrentFrame());
}
}
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 97152f818c..14ab831d16 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -1065,7 +1065,6 @@ void Score::update() {
// Enter and exit from previous frame (Director 4)
_lingo->processEvent(kEventEnterFrame, kFrameScript, _frames[_currentFrame]->_actionId);
- _lingo->processEvent(kEventExitFrame, kFrameScript, _frames[_currentFrame]->_actionId);
// TODO Director 6 - another order
// TODO Director 6 step: send beginSprite event to any sprites whose span begin in the upcoming frame
@@ -1133,6 +1132,8 @@ void Score::update() {
}
}
+ _lingo->processEvent(kEventExitFrame, kFrameScript, _frames[_currentFrame]->_actionId);
+
_nextFrameTime = g_system->getMillis() + (float)_currentFrameRate / 60 * 1000;
}