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

fracturehill noreply at scummvm.org
Sun Nov 26 21:40:44 UTC 2023


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:
f6480a4717 NANCY: Fix for overlapping records in nancy2


Commit: f6480a47174c6e42ea434009bb7391f3c0f76f9f
    https://github.com/scummvm/scummvm/commit/f6480a47174c6e42ea434009bb7391f3c0f76f9f
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-11-26T23:03:57+02:00

Commit Message:
NANCY: Fix for overlapping records in nancy2

Modified the special case input handling in Overlay so that
it no longer gets triggered at all for nancy2 and older games.
This fixes an issue with the TV in nancy2, which will get
turned off even when not holding the remote.

Changed paths:
    engines/nancy/action/overlay.cpp


diff --git a/engines/nancy/action/overlay.cpp b/engines/nancy/action/overlay.cpp
index 991fb03f472..ba1ceed9b1f 100644
--- a/engines/nancy/action/overlay.cpp
+++ b/engines/nancy/action/overlay.cpp
@@ -50,19 +50,20 @@ void Overlay::init() {
 }
 
 void Overlay::handleInput(NancyInput &input) {
-	// For no apparent reason, the original engine handles Overlay input as a special case,
+	// For no apparent reason, from nancy3 on the original engine handles Overlay input as a special case,
 	// rather than simply set the general hotspot inside the ActionRecord struct. Special cases
 	// (a.k.a puzzle types) get handled before regular ActionRecords, which means an Overlay
 	// must take precedence when handling the mouse. Thus, out ActionManager class first iterates
 	// through all records and calls their handleInput() function just to make sure this special
 	// case is handled. This fixes nancy3 scene 7081.
-	if (_hasHotspot) {
-		if (NancySceneState.getViewport().convertViewportToScreen(_hotspot).contains(input.mousePos)) {
-			g_nancy->_cursorManager->setCursorType(CursorManager::kHotspot);
+	if (g_nancy->getGameType() >= kGameTypeNancy3) {
+		if (_hasHotspot) {
+			if (NancySceneState.getViewport().convertViewportToScreen(_hotspot).contains(input.mousePos)) {
+				g_nancy->_cursorManager->setCursorType(CursorManager::kHotspot);
+
+				if (input.input & NancyInput::kLeftMouseButtonUp) {
+					_state = kActionTrigger;
 
-			if (input.input & NancyInput::kLeftMouseButtonUp) {
-				_state = kActionTrigger;
-				if (g_nancy->getGameType() >= kGameTypeNancy3) {
 					// Make sure nothing else gets triggered
 					// This is nancy3 and up, since we actually want to trigger other records in nancy2 (e.g. scene 2541)
 					input.eatMouseInput();




More information about the Scummvm-git-logs mailing list