diff options
-rw-r--r-- | engines/director/lingo/lingo.cpp | 4 | ||||
-rw-r--r-- | engines/director/score.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index 7639e6a607..a37b66f360 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -304,8 +304,8 @@ void Lingo::processEvent(LEvent event, ScriptType st, int entityId) { if (_handlers.contains(ENTITY_INDEX(event, entityId))) { call(_eventHandlerTypes[event], 0); // D4+ Events pop(); - } else if (_scripts[st].contains(entityId + 1)) { - executeScript(st, entityId + 1); // D3 list of scripts. + } else if (_scripts[st].contains(entityId)) { + executeScript(st, entityId); // D3 list of scripts. } else { debugC(8, kDebugLingoExec, "STUB: processEvent(%s) for %d", _eventHandlerTypes[event], entityId); } diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 53d15469b4..d4bebdc0fc 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -863,8 +863,8 @@ void Score::update() { _surface->copyFrom(*_trailSurface); // Enter and exit from previous frame (Director 4) - _lingo->processEvent(kEventEnterFrame, kFrameScript, _frames[_currentFrame]->_actionId); - _lingo->processEvent(kEventExitFrame, kFrameScript, _frames[_currentFrame]->_actionId); + _lingo->processEvent(kEventEnterFrame, kFrameScript, _frames[_currentFrame]->_actionId - 1); + _lingo->processEvent(kEventExitFrame, kFrameScript, _frames[_currentFrame]->_actionId - 1); // TODO Director 6 - another order // TODO Director 6 step: send beginSprite event to any sprites whose span begin in the upcoming frame @@ -971,7 +971,7 @@ void Score::processEvents() { _lingo->processEvent(kEventMouseUp, kSpriteScript, _frames[_currentFrame]->_sprites[spriteId]->_scriptId); } else { // D3 doesn't have cast member or sprite scripts. Just Frame Scripts. - _lingo->processEvent(kEventMouseUp, kFrameScript, _frames[_currentFrame]->_sprites[spriteId]->_scriptId); + _lingo->processEvent(kEventMouseUp, kFrameScript, _frames[_currentFrame]->_sprites[spriteId]->_scriptId + 1); } } |