aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2017-03-15 20:25:33 +0000
committerEugene Sandulenko2017-03-15 20:25:33 +0000
commit890122475f1277c4ebea6a39721fcd8a2b5f5087 (patch)
tree472f6c162bbb8e33a1728620ff561ef687228ef2 /engines/director
parente069605d25f0d6d3206c92367f57c57e0885d5dc (diff)
downloadscummvm-rg350-890122475f1277c4ebea6a39721fcd8a2b5f5087.tar.gz
scummvm-rg350-890122475f1277c4ebea6a39721fcd8a2b5f5087.tar.bz2
scummvm-rg350-890122475f1277c4ebea6a39721fcd8a2b5f5087.zip
DIRECTOR: Improvements to the event sequence
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;
}