[Scummvm-git-logs] scummvm master -> ccc6cbfb9106d17777422aa4b3c10d19d5330328

sev- sev at scummvm.org
Mon Mar 20 19:55:41 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ccc6cbfb91 DIRECTOR: Fix event processing for generic events


Commit: ccc6cbfb9106d17777422aa4b3c10d19d5330328
    https://github.com/scummvm/scummvm/commit/ccc6cbfb9106d17777422aa4b3c10d19d5330328
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-03-20T19:55:34+01:00

Commit Message:
DIRECTOR: Fix event processing for generic events

Changed paths:
    engines/director/events.cpp
    engines/director/lingo/lingo.cpp
    engines/director/score.cpp


diff --git a/engines/director/events.cpp b/engines/director/events.cpp
index e60af22..5021018 100644
--- a/engines/director/events.cpp
+++ b/engines/director/events.cpp
@@ -88,14 +88,14 @@ void DirectorEngine::processEvents() {
 
 				if (getVersion() > 3) {
 					// TODO: check that this is the order of script execution!
-					_lingo->processEvent(kEventMouseUp, kCastScript, currentFrame->_sprites[spriteId]->_castId);
-					_lingo->processEvent(kEventMouseUp, kSpriteScript, currentFrame->_sprites[spriteId]->_scriptId);
+					_lingo->processEvent(kEventNone, kCastScript, currentFrame->_sprites[spriteId]->_castId);
+					_lingo->processEvent(kEventNone, kSpriteScript, currentFrame->_sprites[spriteId]->_scriptId);
 				} else {
 					// Frame script overrides sprite script
 					if (!currentFrame->_sprites[spriteId]->_scriptId)
-						_lingo->processEvent(kEventMouseUp, kSpriteScript, currentFrame->_sprites[spriteId]->_castId + 1024);
+						_lingo->processEvent(kEventNone, kSpriteScript, currentFrame->_sprites[spriteId]->_castId + 1024);
 					else
-						_lingo->processEvent(kEventMouseUp, kFrameScript, currentFrame->_sprites[spriteId]->_scriptId);
+						_lingo->processEvent(kEventNone, kFrameScript, currentFrame->_sprites[spriteId]->_scriptId);
 				}
 
 				sc->_currentMouseDownSpriteId = 0;
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index a51ff22..482531d 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -309,12 +309,12 @@ void Lingo::processEvent(LEvent event, ScriptType st, int entityId) {
 	if (_handlers.contains(ENTITY_INDEX(event, entityId))) {
 		debugC(1, kDebugEvents, "Lingo::processEvent(%s, %s, %d), _eventHandler", _eventHandlerTypes[event], scriptType2str(st), entityId);
 		call(_eventHandlerTypes[event], 0); // D4+ Events
-	} else if (_scripts[st].contains(entityId)) {
+	} else if (event == kEventNone && _scripts[st].contains(entityId)) {
 		debugC(1, kDebugEvents, "Lingo::processEvent(%s, %s, %d), script", _eventHandlerTypes[event], scriptType2str(st), entityId);
 
 		executeScript(st, entityId); // D3 list of scripts.
 	} else {
-		debugC(3, kDebugLingoExec, "STUB: processEvent(%s) for %d", _eventHandlerTypes[event], entityId);
+		//debugC(3, kDebugLingoExec, "STUB: processEvent(%s) for %d", _eventHandlerTypes[event], entityId);
 	}
 }
 
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 4f19ba7..c744a91 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -1093,6 +1093,7 @@ void Score::update() {
 
 	// Enter and exit from previous frame (Director 4)
 	_lingo->processEvent(kEventEnterFrame, kFrameScript, _frames[_currentFrame]->_actionId);
+	_lingo->processEvent(kEventNone, 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





More information about the Scummvm-git-logs mailing list