aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2020-01-08 22:13:54 +0100
committerEugene Sandulenko2020-01-08 23:08:13 +0100
commit3780c42858bb5e3065e7c64b74e138d2312de400 (patch)
tree53d73bc40ccfad010b24f73674c963c602bfda08 /engines/director
parent5fb8660a544f0b5f7d5b17ee1b57aedac388916a (diff)
downloadscummvm-rg350-3780c42858bb5e3065e7c64b74e138d2312de400.tar.gz
scummvm-rg350-3780c42858bb5e3065e7c64b74e138d2312de400.tar.bz2
scummvm-rg350-3780c42858bb5e3065e7c64b74e138d2312de400.zip
DIRECTOR: LINGO: Fix MovieScript event processing
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/lingo/lingo-events.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/director/lingo/lingo-events.cpp b/engines/director/lingo/lingo-events.cpp
index 2a04a57e88..ab3b62aa50 100644
--- a/engines/director/lingo/lingo-events.cpp
+++ b/engines/director/lingo/lingo-events.cpp
@@ -200,8 +200,9 @@ void Lingo::runMovieScript(LEvent event) {
if (_dontPassEvent)
return;
- for (uint i = 0; i < _scriptContexts[kMovieScript].size(); i++) {
- processEvent(event, kMovieScript, i);
+ for (ScriptContextHash::iterator it = _scriptContexts[kMovieScript].begin();
+ it != _scriptContexts[kMovieScript].end(); ++it) {
+ processEvent(event, kMovieScript, it->_key);
// TODO: How do know which script handles the message?
}
debugC(9, kDebugEvents, "STUB: processEvent(event, kMovieScript, ?)");
@@ -243,12 +244,13 @@ void Lingo::processFrameEvent(LEvent event) {
void Lingo::processGenericEvent(LEvent event) {
// Movie Script
int id = -1;
- if (event == kEventStart || event == kEventPrepareMovie)
+ if (event == kEventStart || event == kEventPrepareMovie ||
+ event == kEventStartMovie || event == kEventStopMovie)
id = 0;
else
- warning("STUB: processGenericEvent called for something else than kEventStart or kEventPrepareMovie, additional logic probably needed");
+ warning("STUB: processGenericEvent called for unprocessed event, additional logic probably needed");
- processEvent(event, kMovieScript, id);
+ runMovieScript(event);
}
void Lingo::processSpriteEvent(LEvent event) {