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

fracturehill noreply at scummvm.org
Sun Feb 4 15:30:31 UTC 2024


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

Summary:
140a8a209b NANCY: Get rid of PlaySecondaryVideo parameter
898903f535 NANCY: Fix reading of SetVolume AR
5b15c4c6f0 NANCY: Fix incorrect navigation AR name
1483cb1834 NANCY: Fix switching between item scenes
c49c10432c NANCY: Respect text end marker


Commit: 140a8a209bf66c53c12e7deff3c8d80dd2fe0435
    https://github.com/scummvm/scummvm/commit/140a8a209bf66c53c12e7deff3c8d80dd2fe0435
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2024-02-04T16:29:55+01:00

Commit Message:
NANCY: Get rid of PlaySecondaryVideo parameter

Was completely functionless, and multiple channels don't
seem to be used after TVD anyway.

Changed paths:
    engines/nancy/action/arfactory.cpp
    engines/nancy/action/secondaryvideo.h


diff --git a/engines/nancy/action/arfactory.cpp b/engines/nancy/action/arfactory.cpp
index 8113023abbd..a924d42358a 100644
--- a/engines/nancy/action/arfactory.cpp
+++ b/engines/nancy/action/arfactory.cpp
@@ -127,9 +127,8 @@ ActionRecord *ActionManager::createActionRecord(uint16 type, Common::SeekableRea
 	case 50:
 		return new ConversationVideo(); // PlayPrimaryVideoChan0
 	case 51:
-		return new PlaySecondaryVideo(0);
 	case 52:
-		return new PlaySecondaryVideo(1);
+		return new PlaySecondaryVideo();
 	case 53:
 		return new PlaySecondaryMovie();
 	case 54:
diff --git a/engines/nancy/action/secondaryvideo.h b/engines/nancy/action/secondaryvideo.h
index f460293606d..d90f659786e 100644
--- a/engines/nancy/action/secondaryvideo.h
+++ b/engines/nancy/action/secondaryvideo.h
@@ -39,7 +39,7 @@ public:
 
 	enum HoverState { kNoHover, kHover, kEndHover };
 
-	PlaySecondaryVideo(uint chan) : RenderActionRecord(8), channel(chan) {}
+	PlaySecondaryVideo() : RenderActionRecord(8) {}
 	virtual ~PlaySecondaryVideo() { _decoder.close(); }
 
 	void init() override;
@@ -70,7 +70,7 @@ public:
 
 protected:
 	bool canHaveHotspot() const override { return true; }
-	Common::String getRecordTypeName() const override { return Common::String::format("PlaySecondaryVideoChan%i", channel); }
+	Common::String getRecordTypeName() const override { return "PlaySecondaryVideo"; }
 	bool isViewportRelative() const override { return true; }
 
 	Graphics::ManagedSurface _fullFrame;
@@ -80,8 +80,6 @@ protected:
 	int _currentViewportScroll = -1;
 	bool _isInFrame = false;
 	bool _isHovered = false;
-
-	uint channel;
 };
 
 } // End of namespace Action


Commit: 898903f535ba1f840134f4c17b437bf95c3ed63b
    https://github.com/scummvm/scummvm/commit/898903f535ba1f840134f4c17b437bf95c3ed63b
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2024-02-04T16:29:55+01:00

Commit Message:
NANCY: Fix reading of SetVolume AR

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


diff --git a/engines/nancy/action/soundrecords.cpp b/engines/nancy/action/soundrecords.cpp
index e3a41225445..63cc699e76d 100644
--- a/engines/nancy/action/soundrecords.cpp
+++ b/engines/nancy/action/soundrecords.cpp
@@ -35,7 +35,7 @@ namespace Action {
 
 void SetVolume::readData(Common::SeekableReadStream &stream) {
 	channel = stream.readUint16LE();
-	volume = stream.readUint16LE();
+	volume = stream.readByte();
 }
 
 void SetVolume::execute() {
diff --git a/engines/nancy/action/soundrecords.h b/engines/nancy/action/soundrecords.h
index 0fe5fd3e9c5..d3ab18868c6 100644
--- a/engines/nancy/action/soundrecords.h
+++ b/engines/nancy/action/soundrecords.h
@@ -34,7 +34,7 @@ public:
 	void execute() override;
 
 	uint16 channel = 0;
-	uint16 volume = 0;
+	byte volume = 0;
 
 protected:
 	Common::String getRecordTypeName() const override { return "SetVolume"; }


Commit: 5b15c4c6f0411579a32b24a8aa20aa453818f15f
    https://github.com/scummvm/scummvm/commit/5b15c4c6f0411579a32b24a8aa20aa453818f15f
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2024-02-04T16:29:55+01:00

Commit Message:
NANCY: Fix incorrect navigation AR name

Changed paths:
    engines/nancy/action/navigationrecords.h


diff --git a/engines/nancy/action/navigationrecords.h b/engines/nancy/action/navigationrecords.h
index 85c06131a57..35cd2835b72 100644
--- a/engines/nancy/action/navigationrecords.h
+++ b/engines/nancy/action/navigationrecords.h
@@ -109,7 +109,7 @@ protected:
 		case CursorManager::kMoveLeft:
 			return "Hot1FrLeftSceneChange";
 		case CursorManager::kMoveRight:
-			return "Hot1FrUpSceneChange";
+			return "Hot1FrRightSceneChange";
 		default:
 			return "Hot1FrSceneChange";
 		}


Commit: 1483cb183484e67d8aa786abb9d07b6627d49ce2
    https://github.com/scummvm/scummvm/commit/1483cb183484e67d8aa786abb9d07b6627d49ce2
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2024-02-04T16:29:55+01:00

Commit Message:
NANCY: Fix switching between item scenes

When inside an item's scene, opening another item's
scene no longer softlocks the game.

Changed paths:
    engines/nancy/state/scene.cpp


diff --git a/engines/nancy/state/scene.cpp b/engines/nancy/state/scene.cpp
index 21e65893025..6536a2e49a3 100644
--- a/engines/nancy/state/scene.cpp
+++ b/engines/nancy/state/scene.cpp
@@ -245,7 +245,15 @@ void Scene::pushScene(int16 itemID) {
 		_sceneState.pushedScene = _sceneState.currentScene;
 		_sceneState.isScenePushed = true;
 	} else {
-		_sceneState.pushedInvScene = _sceneState.currentScene;
+		if (_sceneState.isInvScenePushed) {
+			// Re-add current pushed item
+			addItemToInventory(_sceneState.pushedInvItemID);
+		} else {
+			// Only set this when another item hasn't been pushed, otherwise
+			// the player will never be able to exit
+			_sceneState.pushedInvScene = _sceneState.currentScene;
+		}
+		
 		_sceneState.isInvScenePushed = true;
 		_sceneState.pushedInvItemID = itemID;
 	}
@@ -261,6 +269,8 @@ void Scene::popScene(bool inventory) {
 		changeScene(_sceneState.pushedInvScene);
 		_sceneState.isInvScenePushed = false;
 		addItemToInventory(_sceneState.pushedInvItemID);
+		_sceneState.pushedInvItemID = kEvNoEvent;
+		_sceneState.pushedInvScene.sceneID = kNoScene;
 	}
 }
 


Commit: c49c10432cfe1404a749bd30c700f927fb5f274b
    https://github.com/scummvm/scummvm/commit/c49c10432cfe1404a749bd30c700f927fb5f274b
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2024-02-04T16:29:55+01:00

Commit Message:
NANCY: Respect text end marker

It appears the <e> marker also expects the text
renderer to ignore everything past it. Doing so fixes the
broken string in nancy7 scene 5770.

Changed paths:
    engines/nancy/misc/hypertext.cpp


diff --git a/engines/nancy/misc/hypertext.cpp b/engines/nancy/misc/hypertext.cpp
index b80d4653681..9db0385cefe 100644
--- a/engines/nancy/misc/hypertext.cpp
+++ b/engines/nancy/misc/hypertext.cpp
@@ -85,7 +85,8 @@ void HypertextParser::drawAllText(const Common::Rect &textBounds, uint leftOffse
 		Common::StringTokenizer tokenizer(_textLines[lineID], "<>\"");
 
 		Common::String curToken;
-		while(!tokenizer.empty()) {
+		bool reachedEndTag = false;
+		while(!tokenizer.empty() && !reachedEndTag) {
 			curToken = tokenizer.nextToken();
 
 			if (tokenizer.delimitersAtTokenBegin().lastChar() == '<' && tokenizer.delimitersAtTokenEnd().firstChar() == '>') {
@@ -95,14 +96,20 @@ void HypertextParser::drawAllText(const Common::Rect &textBounds, uint leftOffse
 					// fall through
 				case 'o' :
 					// CC end
-					// fall through
+					if (curToken.size() != 1) {
+						break;
+					}
+					
+					continue;
 				case 'e' :
-					// End conversation. Originally used for quickly ending dialogue when debugging
-					// We do nothing and just skip
+					// End conversation. Originally used for quickly ending dialogue when debugging, but
+					// also marks the ending of the current text line.
 					if (curToken.size() != 1) {
 						break;
 					}
 
+					// Ignore the rest of the text. This fixes nancy7 scene 5770
+					reachedEndTag = true;
 					continue;
 				case 'h' :
 					// Hotspot




More information about the Scummvm-git-logs mailing list