[Scummvm-git-logs] scummvm master -> 6b3cc7498c9182f2169d48447f311c5d6640fb51

sev- sev at scummvm.org
Sat Jul 11 08:37:17 UTC 2020


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:
6b3cc7498c DIRECTOR: LINGO: Implement 'the clickLoc'


Commit: 6b3cc7498c9182f2169d48447f311c5d6640fb51
    https://github.com/scummvm/scummvm/commit/6b3cc7498c9182f2169d48447f311c5d6640fb51
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-07-11T10:36:51+02:00

Commit Message:
DIRECTOR: LINGO: Implement 'the clickLoc'

Changed paths:
    engines/director/events.cpp
    engines/director/lingo/lingo-the.cpp
    engines/director/movie.h


diff --git a/engines/director/events.cpp b/engines/director/events.cpp
index 15423aadb3..e0bb727011 100644
--- a/engines/director/events.cpp
+++ b/engines/director/events.cpp
@@ -111,6 +111,7 @@ void DirectorEngine::processEvents(bool bufferLingoEvents) {
 
 				m->_lastEventTime = g_director->getMacTicks();
 				m->_lastClickTime = m->_lastEventTime;
+				m->_lastClickPos = pos;
 
 				debugC(3, kDebugEvents, "event: Button Down @(%d, %d), sprite id: %d", pos.x, pos.y, spriteId);
 				_lingo->registerEvent(kEventMouseDown, spriteId);
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 9d207dad34..83b7d0b288 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -376,7 +376,11 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
 		getTheEntitySTUB(kTheCheckBoxType);
 		break;
 	case kTheClickLoc:
-		getTheEntitySTUB(kTheClickLoc);
+		d.u.farr = new DatumArray;
+
+		d.u.farr->push_back(_vm->getCurrentMovie()->_lastClickPos.x);
+		d.u.farr->push_back(_vm->getCurrentMovie()->_lastClickPos.y);
+		d.type = POINT;
 		break;
 	case kTheClickOn:
 		d.type = INT;
diff --git a/engines/director/movie.h b/engines/director/movie.h
index d76188e49f..e5ff8b7685 100644
--- a/engines/director/movie.h
+++ b/engines/director/movie.h
@@ -83,6 +83,7 @@ public:
 	uint32 _lastEventTime;
 	uint32 _lastRollTime;
 	uint32 _lastClickTime;
+	Common::Point _lastClickPos;
 	uint32 _lastKeyTime;
 	uint32 _lastTimerReset;
 	uint16 _stageColor;




More information about the Scummvm-git-logs mailing list