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

bluegr noreply at scummvm.org
Thu Apr 30 23:20:04 UTC 2026


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

Summary:
eb31ecd47f NANCY: Make the lathe lever work like in the original in Nancy8


Commit: eb31ecd47f5b27cbbc207c17c3d2eba734a2d445
    https://github.com/scummvm/scummvm/commit/eb31ecd47f5b27cbbc207c17c3d2eba734a2d445
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-05-01T02:19:54+03:00

Commit Message:
NANCY: Make the lathe lever work like in the original in Nancy8

Clicking it increases the depth (right rotation) and clicking it at
max depth resets it to 0 (left rotation).

Fix #16719

Changed paths:
    engines/nancy/action/puzzle/cuttingpuzzle.cpp


diff --git a/engines/nancy/action/puzzle/cuttingpuzzle.cpp b/engines/nancy/action/puzzle/cuttingpuzzle.cpp
index 258efddeb6a..f6442dddb90 100644
--- a/engines/nancy/action/puzzle/cuttingpuzzle.cpp
+++ b/engines/nancy/action/puzzle/cuttingpuzzle.cpp
@@ -378,20 +378,16 @@ void CuttingPuzzle::handleInput(NancyInput &input) {
 		}
 	}
 
-	// Lever: left half of the rect rotates the knob left (decrement depth),
-	// right half rotates right (increment depth).
+	// Lever: clicking it increases the depth (right rotation)
+	// and clicking it at max depth resets it to 0 (left rotation).
 	if (_leverDest.contains(localMouse)) {
-		int midX = (_leverDest.left + _leverDest.right) / 2;
-		bool rotateLeft = localMouse.x < midX;
+		bool rotateLeft = _currentLeverDepth == 3;
 
 		g_nancy->_cursor->setCursorType(rotateLeft ? CursorManager::kRotateCCW
 		                                            : CursorManager::kRotateCW);
 
 		if (input.input & NancyInput::kLeftMouseButtonUp) {
-			if (rotateLeft)
-				_currentLeverDepth = (_currentLeverDepth == 0) ? 3 : _currentLeverDepth - 1;
-			else
-				_currentLeverDepth = (_currentLeverDepth + 1) % 4;
+			_currentLeverDepth = (_currentLeverDepth == 3) ? 0 : _currentLeverDepth + 1;
 			g_nancy->_sound->playSound(_depthSound);
 			redrawSurface();
 		}




More information about the Scummvm-git-logs mailing list