diff options
author | stevenhoefel | 2017-01-12 14:08:53 +1100 |
---|---|---|
committer | stevenhoefel | 2017-01-12 14:08:53 +1100 |
commit | 1e47d4a13c591b35ebee848aeb9e7cfc41a8b67f (patch) | |
tree | 92fc1f5e41486b96a217949a7f4522f53fc3fd98 /engines/director/lingo/lingo.cpp | |
parent | 6cea9c4382e8f628415bb626b12cbdd09ca7ba1a (diff) | |
download | scummvm-rg350-1e47d4a13c591b35ebee848aeb9e7cfc41a8b67f.tar.gz scummvm-rg350-1e47d4a13c591b35ebee848aeb9e7cfc41a8b67f.tar.bz2 scummvm-rg350-1e47d4a13c591b35ebee848aeb9e7cfc41a8b67f.zip |
DIRECTOR: D3 frame/sprite scripts. Categorise scripts into groups.
Diffstat (limited to 'engines/director/lingo/lingo.cpp')
-rw-r--r-- | engines/director/lingo/lingo.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index 1fd4a43c3b..e6b4e11d49 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -282,8 +282,8 @@ Symbol *Lingo::getHandler(Common::String &name) { return _handlers[entityIndex]; } -void Lingo::processEvent(LEvent event, int entityId) { - if (entityId <= 0) +void Lingo::processEvent(LEvent event, ScriptType st, int entityId) { + if (entityId <= 0) return; _currentEntityId = entityId; @@ -291,13 +291,11 @@ void Lingo::processEvent(LEvent event, int entityId) { if (!_eventHandlerTypes.contains(event)) error("processEvent: Unknown event %d for entity %d", event, entityId); - ScriptType st = event2script(event); - - if (st != kNoneScript) { - executeScript(st, entityId + 1); - } else if (_handlers.contains(ENTITY_INDEX(event, entityId))) { - call(_eventHandlerTypes[event], 0); + if (_handlers.contains(ENTITY_INDEX(event, entityId))) { + call(_eventHandlerTypes[event], 0); //D4+ Events pop(); + } else if (_scripts[st].contains(entityId)) { + executeScript(st, entityId + 1); //D3 list of scripts. } else { debugC(8, kDebugLingoExec, "STUB: processEvent(%s) for %d", _eventHandlerTypes[event], entityId); } |