[Scummvm-git-logs] scummvm master -> 7b157f10709e622fe33011f1771aab5af6045ac2

bluegr noreply at scummvm.org
Mon Jul 7 01:09:55 UTC 2025


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:
7b157f1070 NANCY: Update puzzle stubs for Nancy 9, which now progresses greatly


Commit: 7b157f10709e622fe33011f1771aab5af6045ac2
    https://github.com/scummvm/scummvm/commit/7b157f10709e622fe33011f1771aab5af6045ac2
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-07-07T04:07:03+03:00

Commit Message:
NANCY: Update puzzle stubs for Nancy 9, which now progresses greatly

Changed paths:
    engines/nancy/action/arfactory.cpp
    engines/nancy/action/puzzle/memorypuzzle.cpp
    engines/nancy/action/puzzle/multibuildpuzzle.cpp
    engines/nancy/action/puzzle/onebuildpuzzle.cpp
    engines/nancy/action/puzzle/quizpuzzle.cpp
    engines/nancy/action/puzzle/soundmatchpuzzle.cpp
    engines/nancy/action/puzzle/whalesurvivorpuzzle.cpp
    engines/nancy/state/scene.cpp


diff --git a/engines/nancy/action/arfactory.cpp b/engines/nancy/action/arfactory.cpp
index 58dc3a375c7..fa129aacf89 100644
--- a/engines/nancy/action/arfactory.cpp
+++ b/engines/nancy/action/arfactory.cpp
@@ -290,6 +290,10 @@ ActionRecord *ActionManager::createActionRecord(uint16 type, Common::SeekableRea
 		return new GoInvViewScene();
 	case 140:
 		return new SetVolume();
+	case 148:
+		// MakeScreenFile - seems to save a cropped image of the screen in a bitmap file?
+		// TODO: Used in Nancy 9, sand castle puzzle
+		return nullptr;
 	case 149:
 		if (g_nancy->getGameType() >= kGameTypeNancy9) {
 			// This got moved in nancy9
diff --git a/engines/nancy/action/puzzle/memorypuzzle.cpp b/engines/nancy/action/puzzle/memorypuzzle.cpp
index bde985b7149..854c8983e0b 100644
--- a/engines/nancy/action/puzzle/memorypuzzle.cpp
+++ b/engines/nancy/action/puzzle/memorypuzzle.cpp
@@ -46,9 +46,9 @@ void MemoryPuzzle::execute() {
 	// TODO
 	// Stub - move to the winning screen
 	warning("STUB - Memory puzzle");
-	NancySceneState.setEventFlag(423, g_nancy->_true); // Set puzzle flag to solved
+	NancySceneState.setEventFlag(423, g_nancy->_true); // EV_Solved_Necklace_Box
 	SceneChangeDescription scene;
-	scene.sceneID = 3879;
+	scene.sceneID = 3846;
 	NancySceneState.resetStateToInit();
 	NancySceneState.changeScene(scene);
 }
diff --git a/engines/nancy/action/puzzle/multibuildpuzzle.cpp b/engines/nancy/action/puzzle/multibuildpuzzle.cpp
index 4f19d55b709..e36014c8fd1 100644
--- a/engines/nancy/action/puzzle/multibuildpuzzle.cpp
+++ b/engines/nancy/action/puzzle/multibuildpuzzle.cpp
@@ -56,8 +56,9 @@ void MultiBuildPuzzle::execute() {
 		break;
 	case 2575:
 		warning("STUB - Nancy 9 Sandwich making puzzle");
-		NancySceneState.setEventFlag(429, g_nancy->_true); // Set puzzle flag to solved
-		scene.sceneID = 2574;
+		NancySceneState.setEventFlag(428, g_nancy->_true); // EV_Solved_Sandwich_Bad
+		NancySceneState.setEventFlag(429, g_nancy->_true); // EV_Solved_Sandwich_Good
+		scene.sceneID = 2572;
 		break;
 	case 2585:
 		warning("STUB - Nancy 9 Book sorting puzzle");
diff --git a/engines/nancy/action/puzzle/onebuildpuzzle.cpp b/engines/nancy/action/puzzle/onebuildpuzzle.cpp
index 1497dff492f..c6878336146 100644
--- a/engines/nancy/action/puzzle/onebuildpuzzle.cpp
+++ b/engines/nancy/action/puzzle/onebuildpuzzle.cpp
@@ -44,13 +44,26 @@ void OneBuildPuzzle::execute() {
 	}
 
 	// TODO
-	// Stub - move to the winning screen
-	warning("STUB - Nancy 9 Pipe joining puzzle under sink");
-	NancySceneState.setEventFlag(425, g_nancy->_true); // Set puzzle flag to solved
+	const uint16 sceneId = NancySceneState.getSceneInfo().sceneID;
 	SceneChangeDescription scene;
-	scene.sceneID = 6520;
-	NancySceneState.resetStateToInit();
-	NancySceneState.changeScene(scene);
+
+	if (sceneId == 6519) {
+		// Stub - move to the winning screen
+		warning("STUB - Nancy 9 Pipe joining puzzle under sink");
+		NancySceneState.setEventFlag(425, g_nancy->_true); // EV_Solved_Pipes
+		scene.sceneID = 6520;
+		NancySceneState.resetStateToInit();
+		NancySceneState.changeScene(scene);
+	} else if (sceneId == 2916) {
+		// Stub - move to the winning screen
+		warning("STUB - Nancy 9 Carborosaurus Puzzle");
+		NancySceneState.setEventFlag(424, g_nancy->_true); // EV_Solved_Permit_Task
+		scene.sceneID = 2915;
+		NancySceneState.resetStateToInit();
+		NancySceneState.changeScene(scene);
+	} else {
+		warning("STUB - Nancy 9 One Build Puzzle");
+	}
 }
 
 void OneBuildPuzzle::readData(Common::SeekableReadStream &stream) {
diff --git a/engines/nancy/action/puzzle/quizpuzzle.cpp b/engines/nancy/action/puzzle/quizpuzzle.cpp
index c9cb2c15115..19eb91b92ae 100644
--- a/engines/nancy/action/puzzle/quizpuzzle.cpp
+++ b/engines/nancy/action/puzzle/quizpuzzle.cpp
@@ -38,7 +38,34 @@ void QuizPuzzle::init() {
 
 void QuizPuzzle::execute() {
 	// TODO
-	warning("STUB - Nancy 8 Quiz Puzzle");
+
+	if (g_nancy->getGameType() == kGameTypeNancy8) {
+		warning("STUB - Nancy 8 Quiz Puzzle");
+	} else if (g_nancy->getGameType() == kGameTypeNancy9) {
+		const uint16 sceneId = NancySceneState.getSceneInfo().sceneID;
+		if (sceneId == 6450) {
+			warning("STUB - Nancy 9 Quiz Puzzle - Holt Scotto's quiz");
+			// Set the puzzle event flags to flag it as done
+			NancySceneState.setEventFlag(59, g_nancy->_true); // EV_Answered_SQ_Q06
+			NancySceneState.setEventFlag(61, g_nancy->_true); // EV_Answered_SQ_Q09
+		} else if (sceneId == 6342) {
+			warning("STUB - Nancy 9 Quiz Puzzle - GPS new waypoint");
+			// Set the GPS waypoint as discovered
+			NancySceneState.setEventFlag(410, g_nancy->_true);	// EV_Solved_GPS_Beach
+		} else if (sceneId == 6431) {
+			warning("STUB - Nancy 9 Quiz Puzzle - Hilda Swenson's letter");
+			NancySceneState.setEventFlag(179, g_nancy->_true); // EV_Hilda_Said_Objects
+		} else if (sceneId == 6443) {
+			warning("STUB - Nancy 9 Quiz Puzzle - Holt Scotto's chess problem");
+			NancySceneState.setEventFlag(119, g_nancy->_true);	// EV_Finished_Chess_Quiz
+		} else if (sceneId == 4184) {
+			warning("STUB - Nancy 9 Quiz Puzzle - Lighthouse Morse code");
+			NancySceneState.setEventFlag(420, g_nancy->_true);	// EV_Solved_Morse_Code
+		} else {
+			warning("STUB - Nancy 9 Quiz Puzzle");
+		}
+	}
+
 	_isDone = true;
 }
 
diff --git a/engines/nancy/action/puzzle/soundmatchpuzzle.cpp b/engines/nancy/action/puzzle/soundmatchpuzzle.cpp
index ba9fe24d3cf..b7250489386 100644
--- a/engines/nancy/action/puzzle/soundmatchpuzzle.cpp
+++ b/engines/nancy/action/puzzle/soundmatchpuzzle.cpp
@@ -46,9 +46,9 @@ void SoundMatchPuzzle::execute() {
 	// TODO
 	// Stub - move to the winning screen
 	warning("STUB - Nancy 9 Whale sounds puzzle");
-	NancySceneState.setEventFlag(436, g_nancy->_true); // Set puzzle flag to solved
+	NancySceneState.setEventFlag(436, g_nancy->_true); // EV_Solved_Whale_Call
 	SceneChangeDescription scene;
-	scene.sceneID = 2985;
+	scene.sceneID = 2936;
 	NancySceneState.resetStateToInit();
 	NancySceneState.changeScene(scene);
 }
diff --git a/engines/nancy/action/puzzle/whalesurvivorpuzzle.cpp b/engines/nancy/action/puzzle/whalesurvivorpuzzle.cpp
index 593c5dd3afd..cdc32e9ec3d 100644
--- a/engines/nancy/action/puzzle/whalesurvivorpuzzle.cpp
+++ b/engines/nancy/action/puzzle/whalesurvivorpuzzle.cpp
@@ -46,9 +46,9 @@ void WhaleSurvivorPuzzle::execute() {
 	// TODO
 	// Stub - move to the winning screen
 	warning("STUB - Whale survivor puzzle");
-	NancySceneState.setEventFlag(425, g_nancy->_true); // Set puzzle flag to solved
+	NancySceneState.setEventFlag(439, g_nancy->_true); // EV_Solved_Whale_Survivor
 	SceneChangeDescription scene;
-	scene.sceneID = 2990;
+	scene.sceneID = 2926;
 	NancySceneState.resetStateToInit();
 	NancySceneState.changeScene(scene);
 }
diff --git a/engines/nancy/state/scene.cpp b/engines/nancy/state/scene.cpp
index 36225439197..bfd8be50047 100644
--- a/engines/nancy/state/scene.cpp
+++ b/engines/nancy/state/scene.cpp
@@ -233,6 +233,19 @@ void Scene::changeScene(const SceneChangeDescription &sceneDescription) {
 		return;
 	}
 
+	// HACK: Nancy 9 tries to reload the same scene when changing
+	// angle/power in scene 5651 (stuck bottle in rocks). This ends up
+	// resetting the scene flags, which makes the angle/power buttons
+	// unresponsive. We avoid reloading the scene in this case, if the
+	// new scene is the same as the current one. This has the negative
+	// side-effect that the button arrows are not updated, but at least
+	// it makes them usable.
+	// TODO: find a better solution for this.
+	if (sceneDescription.sceneID == _sceneState.currentScene.sceneID &&
+		g_nancy->getGameType() == kGameTypeNancy9 && sceneDescription.sceneID == 5651) {
+		return;
+	}
+
 	_sceneState.nextScene = sceneDescription;
 	_state = kLoad;
 }




More information about the Scummvm-git-logs mailing list