[Scummvm-git-logs] scummvm master -> 8731ac5f53db33912192495304bac94a964311be

bluegr noreply at scummvm.org
Thu Jul 9 01:30:55 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:
39d995205f NANCY: NANCY10: Add workaround for invalid task check
8731ac5f53 NANCY: NANCY10: Persist icon notification badges


Commit: 39d995205ff182cba738c209a16a1d19e9f089fa
    https://github.com/scummvm/scummvm/commit/39d995205ff182cba738c209a16a1d19e9f089fa
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-07-09T04:30:45+03:00

Commit Message:
NANCY: NANCY10: Add workaround for invalid task check

Fix #16933

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


diff --git a/engines/nancy/action/datarecords.cpp b/engines/nancy/action/datarecords.cpp
index 852248d260b..169f46cf02b 100644
--- a/engines/nancy/action/datarecords.cpp
+++ b/engines/nancy/action/datarecords.cpp
@@ -446,6 +446,18 @@ void ModifyListEntry::readData(Common::SeekableReadStream &stream) {
 		_sceneID = stream.readUint16LE();
 		if (_mark < 10 && _mark != 7)
 			_sceneID = kNoScene;
+
+		// WORKAROUND: Shadow Ranch (Nancy 10) ships the "Ask Dave for the key to
+		// the rolltop desk" task (SHAT04) with completion event-flag 1824 (index
+		// 824), which is out of range (816 flags). For a checkable task (mark 7)
+		// the sceneID doubles as that flag; the original engine reads it out of
+		// bounds and happens to pass, so the box appears tickable, but we bounds-
+		// check and would reject it forever. The intended flag is
+		// EV_DG_Said_Rolltop_Key (1169).
+		if (g_nancy->getGameType() == kGameTypeNancy10 && _mark == 7 &&
+				_sceneID == 1824 && _stringID.equalsIgnoreCase("SHAT04")) {
+			_sceneID = 1169;
+		}
 	} else if (g_nancy->getGameType() >= kGameTypeNancy9 && _mark >= 10) {
 		// Nancy 9: the trailing sceneID is only present when mark >= 10.
 		_sceneID = stream.readUint16LE();


Commit: 8731ac5f53db33912192495304bac94a964311be
    https://github.com/scummvm/scummvm/commit/8731ac5f53db33912192495304bac94a964311be
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-07-09T04:30:46+03:00

Commit Message:
NANCY: NANCY10: Persist icon notification badges

Fix #16924

Changed paths:
    engines/nancy/nancy.h
    engines/nancy/puzzledata.cpp
    engines/nancy/puzzledata.h
    engines/nancy/ui/taskbar.cpp
    engines/nancy/ui/taskbar.h


diff --git a/engines/nancy/nancy.h b/engines/nancy/nancy.h
index e207cf4ae2c..ad776b60a81 100644
--- a/engines/nancy/nancy.h
+++ b/engines/nancy/nancy.h
@@ -54,7 +54,7 @@ class Serializer;
  */
 namespace Nancy {
 
-static const int kSavegameVersion = 4;
+static const int kSavegameVersion = 5;
 
 struct NancyGameDescription;
 
diff --git a/engines/nancy/puzzledata.cpp b/engines/nancy/puzzledata.cpp
index 8d290a8b4ca..3da8d93012a 100644
--- a/engines/nancy/puzzledata.cpp
+++ b/engines/nancy/puzzledata.cpp
@@ -397,6 +397,16 @@ void TaskbarData::synchronize(Common::Serializer &ser) {
 		ser.syncAsSint16LE(overrides[i].endScene);
 		ser.syncAsUint16LE(overrides[i].clickSoundMode);
 	}
+
+	// Notification badges were added in savegame version 5. Older saves don't
+	// have these bytes; the flags stay at their default (cleared) state.
+	if (ser.getVersion() >= 5) {
+		for (uint i = 0; i < kNumButtons; ++i) {
+			for (uint s = 0; s < kNumNotificationSubCategories; ++s) {
+				ser.syncAsByte(notifications[i][s]);
+			}
+		}
+	}
 }
 
 PuzzleData *makePuzzleData(const uint32 tag) {
diff --git a/engines/nancy/puzzledata.h b/engines/nancy/puzzledata.h
index c64aade9d32..2d02b0da929 100644
--- a/engines/nancy/puzzledata.h
+++ b/engines/nancy/puzzledata.h
@@ -307,6 +307,7 @@ struct UIResourceData : public PuzzleData {
 // load into a scene that doesn't itself re-run the AR.
 struct TaskbarData : public PuzzleData {
 	static const uint kNumButtons = 6;
+	static const uint kNumNotificationSubCategories = 3;
 
 	struct Override {
 		bool active = false;
@@ -322,6 +323,10 @@ struct TaskbarData : public PuzzleData {
 	virtual void synchronize(Common::Serializer &ser);
 
 	Override overrides[kNumButtons];
+	// Notification badge flags, mirrored from the Taskbar so they survive a
+	// load. Set by AR triggers (inventory add, ModifyListEntryAdd, etc.) that
+	// won't re-run when loading into a later scene.
+	bool notifications[kNumButtons][kNumNotificationSubCategories] = {};
 };
 
 PuzzleData *makePuzzleData(const uint32 tag);
diff --git a/engines/nancy/ui/taskbar.cpp b/engines/nancy/ui/taskbar.cpp
index 92ef2fcb6f0..13e89c82143 100644
--- a/engines/nancy/ui/taskbar.cpp
+++ b/engines/nancy/ui/taskbar.cpp
@@ -232,6 +232,7 @@ void Taskbar::setNotification(uint buttonIndex, uint subCategory) {
 		return;
 	}
 	_notifications[buttonIndex][subCategory] = true;
+	persistNotifications(buttonIndex);
 
 	if ((int)buttonIndex != _hoveredButton) {
 		drawButton(buttonIndex, restingState(buttonIndex));
@@ -243,6 +244,7 @@ void Taskbar::clearNotification(uint buttonIndex, uint subCategory) {
 		return;
 	}
 	_notifications[buttonIndex][subCategory] = false;
+	persistNotifications(buttonIndex);
 
 	if ((int)buttonIndex != _hoveredButton) {
 		drawButton(buttonIndex, restingState(buttonIndex));
@@ -256,6 +258,7 @@ void Taskbar::clearAllNotifications(uint buttonIndex) {
 	for (uint s = 0; s < kNumNotificationSubCategories; ++s) {
 		_notifications[buttonIndex][s] = false;
 	}
+	persistNotifications(buttonIndex);
 
 	if ((int)buttonIndex != _hoveredButton) {
 		drawButton(buttonIndex, restingState(buttonIndex));
@@ -311,6 +314,19 @@ void Taskbar::persistOverride(uint index) {
 	data->overrides[index].clickSoundMode = (uint16)_overrides[index].clickSoundMode;
 }
 
+void Taskbar::persistNotifications(uint index) {
+	if (index >= TASK::kNumButtons || index >= TaskbarData::kNumButtons) {
+		return;
+	}
+	TaskbarData *data = (TaskbarData *)NancySceneState.getPuzzleData(TaskbarData::getTag());
+	if (!data) {
+		return;
+	}
+	for (uint s = 0; s < kNumNotificationSubCategories; ++s) {
+		data->notifications[index][s] = _notifications[index][s];
+	}
+}
+
 void Taskbar::syncFromPuzzleData() {
 	TaskbarData *data = (TaskbarData *)NancySceneState.getPuzzleData(TaskbarData::getTag());
 	if (!data) {
@@ -321,6 +337,10 @@ void Taskbar::syncFromPuzzleData() {
 		_overrides[i].startScene = data->overrides[i].startScene;
 		_overrides[i].endScene = data->overrides[i].endScene;
 		_overrides[i].clickSoundMode = data->overrides[i].clickSoundMode;
+
+		for (uint s = 0; s < kNumNotificationSubCategories; ++s) {
+			_notifications[i][s] = data->notifications[i][s];
+		}
 	}
 }
 
diff --git a/engines/nancy/ui/taskbar.h b/engines/nancy/ui/taskbar.h
index 8536d3e90a5..f5d18a54962 100644
--- a/engines/nancy/ui/taskbar.h
+++ b/engines/nancy/ui/taskbar.h
@@ -117,6 +117,8 @@ private:
 	ButtonState restingState(uint index) const;
 	// Mirror one button's override into the persisted TaskbarData chunk.
 	void persistOverride(uint index);
+	// Mirror one button's notification flags into the persisted TaskbarData chunk.
+	void persistNotifications(uint index);
 	// True when the button currently accepts hover/click (not disabled).
 	bool isButtonActive(uint index) const;
 




More information about the Scummvm-git-logs mailing list