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

fracturehill noreply at scummvm.org
Fri Dec 6 10:48:40 UTC 2024


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:
e877ebc170 NANCY: Fixup RippedLetterPuzzle fix


Commit: e877ebc17016a54029a808fbdc2559585bfeb6a5
    https://github.com/scummvm/scummvm/commit/e877ebc17016a54029a808fbdc2559585bfeb6a5
Author: tunnelsociety (150493071+tunnelsociety at users.noreply.github.com)
Date: 2024-12-06T11:48:37+01:00

Commit Message:
NANCY: Fixup RippedLetterPuzzle fix

If a piece is swapped with another piece, the LastPos is forgotten too soon;
after viewing an inventory item with the new piece in hand, that piece can't be
put down.

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


diff --git a/engines/nancy/action/puzzle/rippedletterpuzzle.cpp b/engines/nancy/action/puzzle/rippedletterpuzzle.cpp
index 59611e729f2..90a4d64b8f9 100644
--- a/engines/nancy/action/puzzle/rippedletterpuzzle.cpp
+++ b/engines/nancy/action/puzzle/rippedletterpuzzle.cpp
@@ -361,6 +361,7 @@ void RippedLetterPuzzle::handleInput(NancyInput &input) {
 						if (_puzzleState->order[i] == -1) {
 							// No, hide the picked up piece graphic
 							_pickedUpPiece.setVisible(false);
+							_puzzleState->_pickedUpPieceLastPos = -1;
 						} else {
 							// Yes, change the picked piece graphic
 							if (!_useCustomPickUpTile) {
@@ -374,7 +375,6 @@ void RippedLetterPuzzle::handleInput(NancyInput &input) {
 
 						SWAP<int8>(_puzzleState->order[i], _puzzleState->_pickedUpPieceID);
 						SWAP<byte>(_puzzleState->rotations[i], _puzzleState->_pickedUpPieceRot);
-						_puzzleState->_pickedUpPieceLastPos = -1;
 
 						// Draw the newly placed piece
 						drawPiece(i, _puzzleState->rotations[i], _puzzleState->order[i]);




More information about the Scummvm-git-logs mailing list