[Scummvm-git-logs] scummvm master -> 5068bec9ad4e54dcd5c2e7d298396c0038c12a44

fracturehill noreply at scummvm.org
Wed Sep 27 18:08:34 UTC 2023


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

Summary:
52b5d5fa62 NANCY: Fix record processing flow
1e9ad8c3e1 DEVTOOLS: Fix nancy5 data errors in nancy.dat
c57ae0e097 NANCY: Fix nancy5 clock
5068bec9ad NANCY: Static mode overlay fix


Commit: 52b5d5fa6271f3c94979a8da6bac6af2f0416432
    https://github.com/scummvm/scummvm/commit/52b5d5fa6271f3c94979a8da6bac6af2f0416432
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-09-27T21:08:07+03:00

Commit Message:
NANCY: Fix record processing flow

Changed the ActionRecord processing logic so that
dependencies are evaluated regardless of whether the
record is active or not. This fixes nancy5 scene 3008, where
at the beginning of the game one would be unable to
get the phone call, and would instead hear the general
"can't" sound (which should never play).

Changed paths:
    engines/nancy/action/actionmanager.cpp
    engines/nancy/action/soundrecords.h


diff --git a/engines/nancy/action/actionmanager.cpp b/engines/nancy/action/actionmanager.cpp
index 1cd82940aab..34aa021335c 100644
--- a/engines/nancy/action/actionmanager.cpp
+++ b/engines/nancy/action/actionmanager.cpp
@@ -72,7 +72,7 @@ void ActionManager::handleInput(NancyInput &input) {
 					if (rec->_cursorDependency != nullptr) {
 						NancySceneState.playItemCantSound(rec->_cursorDependency->label);
 					} else {
-						NancySceneState.playItemCantSound();
+						continue;
 					}
 				} else {
 					rec->_state = ActionRecord::ExecutionState::kActionTrigger;
@@ -243,12 +243,9 @@ void ActionManager::processActionRecords() {
 			continue;
 		}
 
-		if (!record->_isActive) {
-			processDependency(record->_dependencies, *record, record->canHaveHotspot());
-			if (record->_dependencies.satisfied) {
-				record->_isActive = true;
-			}
-		}
+		// Process dependencies every call
+		processDependency(record->_dependencies, *record, record->canHaveHotspot());
+		record->_isActive = record->_dependencies.satisfied;
 
 		if (record->_isActive) {
 			if(record->_state == ActionRecord::kBegin) {
diff --git a/engines/nancy/action/soundrecords.h b/engines/nancy/action/soundrecords.h
index d579b8cc29e..b7d9ddbe431 100644
--- a/engines/nancy/action/soundrecords.h
+++ b/engines/nancy/action/soundrecords.h
@@ -87,6 +87,7 @@ public:
 	Common::Array<HotspotDescription> _hotspots; // 0x31
 
 protected:
+	bool canHaveHotspot() const override { return true; }
 	Common::String getRecordTypeName() const override { return "PlaySoundMultiHS"; }
 };
 


Commit: 1e9ad8c3e1201e015bba315bc787e712d8186302
    https://github.com/scummvm/scummvm/commit/1e9ad8c3e1201e015bba315bc787e712d8186302
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-09-27T21:08:08+03:00

Commit Message:
DEVTOOLS: Fix nancy5 data errors in nancy.dat

Changed paths:
    devtools/create_nancy/nancy5_data.h


diff --git a/devtools/create_nancy/nancy5_data.h b/devtools/create_nancy/nancy5_data.h
index 88316c42aff..1a3f12966f2 100644
--- a/devtools/create_nancy/nancy5_data.h
+++ b/devtools/create_nancy/nancy5_data.h
@@ -45,17 +45,17 @@ const Common::Array<Common::Array<ConditionalDialogue>> _nancy5ConditionalDialog
 {	// Brady, 7 responses + 1 repeat
 	{	0, 1050, "NBA50",
 		{ { kEv, 142, true }, { kEv, 47, false } } },
-	{	1, 1051, "NBA51",
+	{	1, 1051, "NBA051",
 		{ { kEv, 116, true }, { kEv, 46, false } } },
-	{	1, 1051, "NBA51",
+	{	1, 1051, "NBA051",
 		{ { kEv, 138, true }, { kEv, 46, false } } },
-	{	2, 1052, "NBA52",
+	{	2, 1052, "NBA052",
 		{ { kEv, 129, true }, { kEv, 40, false } } },
-	{	3, 1053, "NBA53",
+	{	3, 1053, "NBA053",
 		{ { kEv, 129, true }, { kEv, 42, false } } },
 	{	4, 1054, "NNF652",
 		{ { kEv, 129, true }, { kEv, 119, true }, { kEv, 37, false } } },
-	{	5, 1060, "NBA61",
+	{	5, 1060, "NBA061",
 		{ { kEv, 43, true }, { kEv, 45, false } } },
 	{	6, 1061, "NNF654",
 		{ { kEv, 58, true }, { kEv, 44, false } } },
@@ -76,15 +76,19 @@ const Common::Array<Common::Array<ConditionalDialogue>> _nancy5ConditionalDialog
 	{	11, 1256, "NSM256",
 		{ { kEv, 49, true }, { kEv, 216, false } } },
 },
-{	// Joseph, 9 responses
+{	// Joseph, 9 responses + 2 repeat
 	{	12, 1450, "NJH450",
 		{ { kEv, 132, true }, { kEv, 164, true }, { kEv, 105, false } } },
 	{	13, 1452, "NJH452",
 		{ { kEv, 270, true }, { kEv, 59, false }, { kEv, 117, false } } },
 	{	14, 1453, "NJH453",
-		{ { kEv, 107, true }, { kEv, 152, true }, { kEv, 120, false } } },
+		{ { kEv, 107, true }, { kEv, 120, false } } },
+	{	14, 1453, "NJH453",
+		{ { kEv, 152, true }, { kEv, 120, false } } },
+	{	15, 1455, "NJH455",
+		{ { kEv, 152, true }, { kEv, 108, false } } },
 	{	15, 1455, "NJH455",
-		{ { kEv, 152, true }, { kEv, 155, true }, { kEv, 108, false } } },
+		{ { kEv, 155, true }, { kEv, 108, false } } },
 	{	16, 1456, "NJH456",
 		{ { kEv, 166, true }, { kEv, 111, false } } },
 	{	17, 1457, "NJH457",
@@ -102,7 +106,7 @@ const Common::Array<Common::Array<ConditionalDialogue>> _nancy5ConditionalDialog
 	{	21, 1650, "NNF650",
 		{ { kEv, 166, true }, { kEv, 156, false } } },
 	{	22, 1651, "NNF651",
-		{ { kEv, 165, true }, { kEv, 155, false } } },
+		{ { kEv, 135, true }, { kEv, 155, false } } },
 	{	4, 1652, "NNF652",
 		{ { kEv, 135, true }, { kEv, 119, true }, { kEv, 147, false } } },
 	{	6, 1654, "NNF654",
@@ -335,18 +339,18 @@ const Common::Array<Common::Array<const char *>> _nancy5ConditionalDialogueTexts
 const Common::Array<Common::Array<const char *>> _nancy5GoodbyeTexts = {
 {	// English
 	"I'll talk to you later, Brady.<h>", // NBA090
-	"OK, you two. I'll talk to you soon!<h>", // NBG90
 	"I think your phone's about to ring.<h>", // NSM290
 	"Gotta go now!<h>", // NJH90
 	"Catch ya later.<h>", // NNF690
+	"OK, you two. I'll talk to you soon!<h>", // NBG90
 	"Bye, Ned.<h>" // NDN90
 },
 {	// Russian
 	"\xcf\xee\xe3\xee\xe2\xee\xf0\xe8\xec \xef\xee\xe7\xe6\xe5, \xc1\xf0\xfd\xe4\xe8.<h>", // NBA090
-	"\xcc\xed\xe5 \xef\xee\xf0\xe0. \xdf \xe2\xe0\xec \xef\xe5\xf0\xe5\xe7\xe2\xee\xed\xfe!<h>", // NBG90
 	"\xca\xe0\xe6\xe5\xf2\xf1\xff, \xf3 \xe2\xe0\xf1 \xec\xed\xee\xe3\xee \xe4\xe5\xeb. \xcd\xe5 \xe1\xf3\xe4\xf3 \xec\xe5\xf8\xe0\xf2\xfc.<h>", // NSM290
 	"\xcc\xed\xe5 \xef\xee\xf0\xe0!<h>", // NJH90
 	"\xcf\xee\xea\xe0.<h>", // NNF690
+	"\xcc\xed\xe5 \xef\xee\xf0\xe0. \xdf \xe2\xe0\xec \xef\xe5\xf0\xe5\xe7\xe2\xee\xed\xfe!<h>", // NBG90
 	"\xcf\xee\xea\xe0, \xcd\xfd\xe4.<h>", // NDN90
 }
 };


Commit: c57ae0e09730fc60fd8496986ae057af7d1a9efb
    https://github.com/scummvm/scummvm/commit/c57ae0e09730fc60fd8496986ae057af7d1a9efb
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-09-27T21:08:08+03:00

Commit Message:
NANCY: Fix nancy5 clock

Fixed an issue where the nancy5 day counter "clock"
would keep resetting to a different day.

Changed paths:
    engines/nancy/ui/clock.cpp


diff --git a/engines/nancy/ui/clock.cpp b/engines/nancy/ui/clock.cpp
index 32d1366a8e2..104ee8737ba 100644
--- a/engines/nancy/ui/clock.cpp
+++ b/engines/nancy/ui/clock.cpp
@@ -196,19 +196,19 @@ void Nancy5Clock::init() {
 void Nancy5Clock::updateGraphics() {
 	// Show current day
 	if (_currentDay < 3) {
-		if (NancySceneState.getEventFlag(59, true) && _currentDay != 2) {
+		if (NancySceneState.getEventFlag(59, true) && _currentDay == 1) {
 			_currentDay = 2;
 			_drawSurface.create(g_nancy->_graphicsManager->_object0, _clockData->nancy5DaySrcs[2]);
 			moveTo(_clockData->staticImageDest);
 			setVisible(true);
 			setTransparent(true);
-		} else if (NancySceneState.getEventFlag(58, true) && _currentDay != 1) {
+		} else if (NancySceneState.getEventFlag(58, true) && _currentDay == 0) {
 			_currentDay = 1;
 			_drawSurface.create(g_nancy->_graphicsManager->_object0, _clockData->nancy5DaySrcs[1]);
 			moveTo(_clockData->staticImageDest);
 			setVisible(true);
 			setTransparent(true);
-		} else if (NancySceneState.getEventFlag(57, true) && _currentDay != 0) {
+		} else if (NancySceneState.getEventFlag(57, true) && _currentDay == -1) {
 			_currentDay = 0;
 			_drawSurface.create(g_nancy->_graphicsManager->_object0, _clockData->nancy5DaySrcs[0]);
 			moveTo(_clockData->staticImageDest);


Commit: 5068bec9ad4e54dcd5c2e7d298396c0038c12a44
    https://github.com/scummvm/scummvm/commit/5068bec9ad4e54dcd5c2e7d298396c0038c12a44
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-09-27T21:08:08+03:00

Commit Message:
NANCY: Static mode overlay fix

Fix for yet another Overlay edge case

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


diff --git a/engines/nancy/action/overlay.cpp b/engines/nancy/action/overlay.cpp
index 77544017f95..c899b4e0fa7 100644
--- a/engines/nancy/action/overlay.cpp
+++ b/engines/nancy/action/overlay.cpp
@@ -337,8 +337,16 @@ void Overlay::setFrame(uint frame) {
 		// We can achieve the same results by doung the calculations below
 		Common::Rect staticSrc = _blitDescriptions[frame].src;
 		srcRect.translate(staticSrc.left, staticSrc.top);
-		srcRect.setWidth(staticSrc.width());
-		srcRect.setHeight(staticSrc.height());
+
+		if (srcRect.isEmpty()) {
+			srcRect.setWidth(staticSrc.width());
+			srcRect.setHeight(staticSrc.height());
+		} else {
+			// Grab whichever dimensions are smaller. Fixes the book in nancy5 scene 3000
+			srcRect.setWidth(MIN<int>(staticSrc.width(), srcRect.width()));
+			srcRect.setHeight(MIN<int>(staticSrc.height(), srcRect.height()));
+		}
+		
 	}
 
 	_drawSurface.create(_fullSurface, srcRect);




More information about the Scummvm-git-logs mailing list