[Scummvm-git-logs] scummvm master -> 628349e964d31e07cd60d18fd4ce904bf5628cac

dreammaster noreply at scummvm.org
Sun Aug 16 09:35:15 UTC 2026


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

Summary:
1527601c2c VOYEUR: Lock the mouse as per the original when viewing the mansion
628349e964 VOYEUR: Allow the Escape key to open the GMM


Commit: 1527601c2c39f05635b76787c23cef5cf763960b
    https://github.com/scummvm/scummvm/commit/1527601c2c39f05635b76787c23cef5cf763960b
Author: nigenigenige (nigejones at gmail.com)
Date: 2026-08-16T19:35:10+10:00

Commit Message:
VOYEUR: Lock the mouse as per the original when viewing the mansion

Changed paths:
    engines/voyeur/files_threads.cpp
    engines/voyeur/voyeur.h


diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 67249bbaee1..da34bf58c2b 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -1382,9 +1382,14 @@ int ThreadResource::doInterface() {
 		_vm->doTimeBar();
 		_vm->_eventsManager->getMouseInfo();
 
+		Common::Point pt = _vm->_eventsManager->getMousePos();
+
 		if (checkMansionScroll())
 			_vm->doScroll(_vm->_mansionViewPos);
 
+		g_system->warpMouse(MANSION_VIEW_X + MANSION_VIEW_WIDTH / 2, MANSION_VIEW_Y + MANSION_VIEW_HEIGHT / 2);
+		pt = _vm->_eventsManager->getMousePos();
+
 		_vm->checkPhoneCall();
 		if (!_vm->_soundManager->getVOCStatus()) {
 			_vm->_currentVocId = 151 - _vm->getRandomNumber(5);
@@ -1392,7 +1397,6 @@ int ThreadResource::doInterface() {
 		}
 
 		// Calculate the mouse position within the entire mansion
-		Common::Point pt = _vm->_eventsManager->getMousePos();
 		if (!mansionViewBounds.contains(pt))
 			pt = Common::Point(-1, -1);
 		else
@@ -1513,22 +1517,24 @@ bool ThreadResource::checkMansionScroll() {
 	bool result = false;
 
 	// Scroll mansion view if close to any of the mansion edges
-	if (pt.x >= 0 && pt.x < MANSION_SCROLL_AREA_X && viewPos.x > 0) {
-		viewPos.x = MAX(viewPos.x - MANSION_SCROLL_INC_X, 0);
+	const int xDiff = MANSION_VIEW_WIDTH / 2 - pt.x;
+	const int yDiff = MANSION_VIEW_HEIGHT / 2 - pt.y;
+	if (pt.x >= 0 && xDiff > 0 && viewPos.x > 0) {
+		viewPos.x = MAX(viewPos.x - xDiff, 0);
 		result = true;
 	}
-	if  (pt.x >= (MANSION_VIEW_WIDTH - MANSION_SCROLL_AREA_X) &&
-			pt.x < MANSION_VIEW_WIDTH && viewPos.x < MANSION_MAX_X) {
-		viewPos.x = MIN(viewPos.x + MANSION_SCROLL_INC_X, MANSION_MAX_X);
+	if (pt.x < MANSION_VIEW_WIDTH && xDiff < 0 &&
+		viewPos.x < MANSION_MAX_X) {
+		viewPos.x = MIN(viewPos.x - xDiff, MANSION_MAX_X);
 		result = true;
 	}
-	if (pt.y >= 0 && pt.y < MANSION_SCROLL_AREA_Y && viewPos.y > 0) {
-		viewPos.y = MAX(viewPos.y - MANSION_SCROLL_INC_Y, 0);
+	if (pt.y >= 0 && yDiff > 0 && viewPos.y > 0) {
+		viewPos.y = MAX(viewPos.y - yDiff, 0);
 		result = true;
 	}
-	if  (pt.y >= (MANSION_VIEW_HEIGHT - MANSION_SCROLL_AREA_Y) &&
-			pt.y < MANSION_VIEW_HEIGHT && viewPos.y < MANSION_MAX_Y) {
-		viewPos.y = MIN(viewPos.y + MANSION_SCROLL_INC_Y, MANSION_MAX_Y);
+	if (pt.y < MANSION_VIEW_HEIGHT && yDiff < 0 &&
+		viewPos.y < MANSION_MAX_Y) {
+		viewPos.y = MIN(viewPos.y - yDiff, MANSION_MAX_Y);
 		result = true;
 	}
 
diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h
index 0d8bce007b0..f75fdd5f731 100644
--- a/engines/voyeur/voyeur.h
+++ b/engines/voyeur/voyeur.h
@@ -59,8 +59,6 @@ namespace Voyeur {
 #define MANSION_VIEW_Y 27
 #define MANSION_VIEW_WIDTH 240
 #define MANSION_VIEW_HEIGHT 148
-#define MANSION_SCROLL_AREA_X 20
-#define MANSION_SCROLL_AREA_Y 20
 #define MANSION_SCROLL_INC_X 4
 #define MANSION_SCROLL_INC_Y 4
 


Commit: 628349e964d31e07cd60d18fd4ce904bf5628cac
    https://github.com/scummvm/scummvm/commit/628349e964d31e07cd60d18fd4ce904bf5628cac
Author: nigenigenige (nigejones at gmail.com)
Date: 2026-08-16T19:35:10+10:00

Commit Message:
VOYEUR: Allow the Escape key to open the GMM

Changed paths:
    engines/voyeur/events.cpp
    engines/voyeur/events.h


diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp
index 3df6792e25d..c4863a36a63 100644
--- a/engines/voyeur/events.cpp
+++ b/engines/voyeur/events.cpp
@@ -73,9 +73,7 @@ EventsManager::EventsManager(VoyeurEngine *vm) : _intPtr(_gameData),
 	Common::fill(&_cycleNext[0], &_cycleNext[4], (byte *)nullptr);
 	_cyclePtr = nullptr;
 
-	_leftClick = _rightClick = false;
-	_mouseClicked = _newMouseClicked = false;
-	_newLeftClick = _newRightClick = false;
+	resetEvents();
 
 	_videoDead = 0;
 
@@ -86,6 +84,12 @@ EventsManager::EventsManager(VoyeurEngine *vm) : _intPtr(_gameData),
 		_cycleNext[i] = nullptr;
 }
 
+void EventsManager::resetEvents() {
+	_leftClick = _rightClick = false;
+	_mouseClicked = _newMouseClicked = false;
+	_newLeftClick = _newRightClick = false;
+}
+
 void EventsManager::startMainClockInt() {
 	_mainIntNode._intFunc = &EventsManager::mainVoyeurIntFunc;
 	_mainIntNode._flags = 0;
@@ -244,6 +248,10 @@ void EventsManager::pollEvents() {
 			return;
 
 		case Common::EVENT_KEYDOWN:
+			if (event.kbd.keycode == Common::KEYCODE_ESCAPE) {
+				_vm->openMainMenuDialog();
+				resetEvents();
+			}
 			return;
 		case Common::EVENT_LBUTTONDOWN:
 			_newLeftClick = true;
diff --git a/engines/voyeur/events.h b/engines/voyeur/events.h
index 22396475abd..7c871c97c47 100644
--- a/engines/voyeur/events.h
+++ b/engines/voyeur/events.h
@@ -74,6 +74,7 @@ private:
 	Common::List<IntNode *> _intNodes;
 	Common::Point _mousePos;
 
+	void resetEvents();
 	void mainVoyeurIntFunc();
 	void checkForNextFrameCounter();
 	void voyeurTimer();




More information about the Scummvm-git-logs mailing list