diff options
author | stevenhoefel | 2017-01-10 09:24:21 +1100 |
---|---|---|
committer | stevenhoefel | 2017-01-10 09:24:21 +1100 |
commit | 60f936d1f7e0abb92e1bb12b19c61d2b45b53749 (patch) | |
tree | 29c1e509bdcfe2d6afcca457c1f7c9ec28c09ee5 /engines/director/lingo | |
parent | 0e20548c157f21e14381110d92b539c27bb9ef63 (diff) | |
download | scummvm-rg350-60f936d1f7e0abb92e1bb12b19c61d2b45b53749.tar.gz scummvm-rg350-60f936d1f7e0abb92e1bb12b19c61d2b45b53749.tar.bz2 scummvm-rg350-60f936d1f7e0abb92e1bb12b19c61d2b45b53749.zip |
DIRECTOR: More work to get events triggering. Loop all frames in score.
Diffstat (limited to 'engines/director/lingo')
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 2 | ||||
-rw-r--r-- | engines/director/lingo/lingo.cpp | 3 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index c9f9c14e84..7531a87157 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -856,7 +856,7 @@ void Lingo::c_call() { g_lingo->call(name, nargs); } -void Lingo::call(Common::String name, int nargs) { +void Lingo::call(Common::String name, int entityId) { bool dropArgs = false; Symbol *sym; diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index 5eb687fe99..2811c0cc65 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -269,6 +269,7 @@ ScriptType Lingo::event2script(LEvent ev) { } void Lingo::processEvent(LEvent event, int entityId) { + if (entityId <= 0) return; if (!_eventHandlerTypes.contains(event)) error("processEvent: Unknown event %d for entity %d", event, entityId); @@ -277,7 +278,7 @@ void Lingo::processEvent(LEvent event, int entityId) { if (st != kNoneScript) { executeScript(st, entityId + 1); } else if (_handlers.contains(_eventHandlerTypes[event])) { - call(_eventHandlerTypes[event], 0); + call(_eventHandlerTypes[event], entityId); pop(); } else { debugC(8, kDebugLingoExec, "STUB: processEvent(%s) for %d", _eventHandlerTypes[event], entityId); diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index 0ed69de587..a0355f3a36 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -275,7 +275,7 @@ public: static void c_le(); static void c_call(); - void call(Common::String name, int nargs); + void call(Common::String name, int entityId); static void c_procret(); |