aboutsummaryrefslogtreecommitdiff
path: root/engines/director/events.cpp
diff options
context:
space:
mode:
authorTobia Tesan2017-06-19 12:22:20 +0200
committerEugene Sandulenko2017-07-05 08:35:33 +0200
commit963bc4a35121b6a9efacb5cf57194ee8e5ad23f8 (patch)
tree7c94a7e195e6ce22bc047c8b464991a3846a660f /engines/director/events.cpp
parent5a9a1571fadac7711a177527db92d191d22290bf (diff)
downloadscummvm-rg350-963bc4a35121b6a9efacb5cf57194ee8e5ad23f8.tar.gz
scummvm-rg350-963bc4a35121b6a9efacb5cf57194ee8e5ad23f8.tar.bz2
scummvm-rg350-963bc4a35121b6a9efacb5cf57194ee8e5ad23f8.zip
DIRECTOR: Move kEventMouseUp/Down handling to processInputEvent
Diffstat (limited to 'engines/director/events.cpp')
-rw-r--r--engines/director/events.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/engines/director/events.cpp b/engines/director/events.cpp
index f55a7c8991..81c80dcc1e 100644
--- a/engines/director/events.cpp
+++ b/engines/director/events.cpp
@@ -71,12 +71,7 @@ void DirectorEngine::processEvents() {
sc->_currentMouseDownSpriteId = spriteId;
debugC(3, kDebugEvents, "event: Button Down @(%d, %d), sprite id: %d", pos.x, pos.y, spriteId);
-
- if (getVersion() > 3) {
- // TODO: check that this is the order of script execution!
- _lingo->processEvent(kEventMouseDown, kCastScript, currentFrame->_sprites[spriteId]->_castId);
- _lingo->processEvent(kEventMouseDown, kSpriteScript, currentFrame->_sprites[spriteId]->_scriptId);
- }
+ _lingo->processEvent(kEventMouseDown);
if (currentFrame->_sprites[spriteId]->_moveable) {
warning("Moveable");
@@ -90,18 +85,7 @@ void DirectorEngine::processEvents() {
debugC(3, kDebugEvents, "event: Button Up @(%d, %d), sprite id: %d", pos.x, pos.y, spriteId);
- 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);
- } else {
- // Frame script overrides sprite script
- if (!currentFrame->_sprites[spriteId]->_scriptId)
- _lingo->processEvent(kEventNone, kSpriteScript, currentFrame->_sprites[spriteId]->_castId + 1024);
- else
- _lingo->processEvent(kEventNone, kFrameScript, currentFrame->_sprites[spriteId]->_scriptId);
- }
-
+ _lingo->processEvent(kEventMouseUp);
sc->_currentMouseDownSpriteId = 0;
break;