[Scummvm-git-logs] scummvm master -> 467f7002884a8b9e5ae4fc978045e29400f0a041

neuromancer noreply at scummvm.org
Mon Nov 30 12:10:11 UTC 2026


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

Summary:
00dd8b00a6 HOLLYWOOD: RUNAWAY: fixed some animations that were out of sync
4d82f59ceb HOLLYWOOD: RUNAWAY: corrected looping animation in 8370 and 8380
fe3d40611c HOLLYWOOD: RUNAWAY: fixed the caravan arrival sequence
c7d0fc589c HOLLYWOOD: RUNAWAY: missing interactions, animations and fixes for Oscar when he is named sheriff
e47e1f6fa8 HOLLYWOOD: RUNAWAY: do not keep playing Gina recover comment over and over again
4eb9835886 HOLLYWOOD: RUNAWAY: restore another Oscar response to tobacco
27855e0f3d HOLLYWOOD: RUNAWAY: restore alternative comment on steam
c9df221471 HOLLYWOOD: RUNAWAY: restore additional comment from the end of chapter 3
c21490f191 HOLLYWOOD: RUNAWAY: added missing animations
467f700288 HOLLYWOOD: RUNAWAY: resolve some original pathfinding bugs


Commit: 00dd8b00a619f9c52624884a3f2ddd3cf4d71dfb
    https://github.com/scummvm/scummvm/commit/00dd8b00a619f9c52624884a3f2ddd3cf4d71dfb
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-11-30T13:09:49+01:00

Commit Message:
HOLLYWOOD: RUNAWAY: fixed some animations that were out of sync

Changed paths:
    engines/hollywood/runaway/scene.cpp
    engines/hollywood/runaway/scene.h
    engines/hollywood/runaway/scene4050.cpp
    engines/hollywood/runaway/scene4050.h
    engines/hollywood/runaway/scene5060.cpp
    engines/hollywood/runaway/scene5060.h
    engines/hollywood/runaway/scene6090.cpp
    engines/hollywood/runaway/scene6290.cpp
    engines/hollywood/runaway/scene6300.cpp
    engines/hollywood/runaway/scene7020.cpp
    engines/hollywood/runaway/scene8090.cpp
    engines/hollywood/runaway/scene8370.cpp
    engines/hollywood/runaway/scene8370.h
    engines/hollywood/runaway/scene8380.cpp
    engines/hollywood/runaway/scene8420.cpp
    engines/hollywood/runaway/scene8420.h


diff --git a/engines/hollywood/runaway/scene.cpp b/engines/hollywood/runaway/scene.cpp
index 6e2d904e941..26665cf109b 100644
--- a/engines/hollywood/runaway/scene.cpp
+++ b/engines/hollywood/runaway/scene.cpp
@@ -303,6 +303,7 @@ bool RunawayRoomScene::enterRoom(uint16 number, Common::Point position, byte fac
 	_pendingAction = 0;
 	_lines.clear();
 	_lineIndex = 0;
+	_preparingSpeech = false;
 	_speech.reset();
 	_caption.clear();
 	for (uint i = 0; i < ARRAYSIZE(_foreground); ++i)
@@ -568,6 +569,7 @@ void RunawayRoomScene::click(Common::Point mouse, RunawayVerb verb, byte item) {
 }
 
 void RunawayRoomScene::showLine() {
+	_preparingSpeech = false;
 	while (_lineIndex < _lines.size() && _lines[_lineIndex].pickup && !_lines[_lineIndex].animatePickup) {
 		_inventory.add(_lines[_lineIndex].pickup, false);
 		++_lineIndex;
@@ -579,6 +581,10 @@ void RunawayRoomScene::showLine() {
 		return;
 	}
 	const SpeechLine &line = _lines[_lineIndex];
+	if (!line.pickup && !prepareSpeech(line.speaker)) {
+		_preparingSpeech = true;
+		return;
+	}
 	if (line.pickup)
 		_inventory.beginPickup(line.pickup, line.pickupEffect);
 	else
@@ -688,7 +694,7 @@ void RunawayRoomScene::skipSpeech() {
 		_sequence.skipSpeech();
 		return;
 	}
-	if (!speaking())
+	if (!speaking() || _preparingSpeech)
 		return;
 	_speech.stop();
 	advanceLine();
@@ -1007,7 +1013,9 @@ void RunawayRoomScene::update(uint32 now, int scrollDirection, bool inventoryOpe
 		}
 		return;
 	}
-	if (speaking() && _speech.finished(now))
+	if (_preparingSpeech)
+		showLine();
+	else if (speaking() && _speech.finished(now))
 		skipSpeech();
 	if (_lineIndex < _lines.size() && _lines[_lineIndex].pickup && !_inventory.pickingUp())
 		advanceLine();
@@ -1122,14 +1130,14 @@ void RunawayRoomScene::updateActor(uint elapsed, int scrollDirection, bool inven
 		_idleBody.reset(_now);
 		return;
 	}
-	if (_idleBody.active() && _walkPath.active() && !speaking() && !_headMovement.active()) {
+	if (_idleBody.active() && _walkPath.active() && (!speaking() || canWalkDuringSpeech()) && !_headMovement.active()) {
 		_idleBody.interact(_now);
 		_idleHead.reset(_now);
 		if (_idleBody.update(_now, true, false, _facing, _actor, _random))
 			return;
 	}
 	uint cameraElapsed = elapsed;
-	if (_walkPath.active() && !speaking() && !_headMovement.active()) {
+	if (_walkPath.active() && (!speaking() || canWalkDuringSpeech()) && !_headMovement.active()) {
 		_cameraFollow.reset();
 		uint footsteps = 0;
 		while (cameraElapsed && _walkPath.active()) {
@@ -1154,7 +1162,7 @@ void RunawayRoomScene::updateActor(uint elapsed, int scrollDirection, bool inven
 		}
 	}
 	// Dialogue can pause a queued walk, including one scheduled on arrival.
-	const bool walking = _walkPath.active() && !speaking() && !_headMovement.active();
+	const bool walking = _walkPath.active() && (!speaking() || canWalkDuringSpeech()) && !_headMovement.active();
 	const bool idle = !walking && !busy() && shouldDrawActor();
 	_idleHead.update(_now, idle && !_idleBody.active(), _random, _game == kRunawayMuseumDemo);
 	const bool bodyIdle = _idleBody.update(_now, idle && _game != kRunawayMuseumDemo,
@@ -1263,6 +1271,7 @@ void RunawayRoomScene::beginAnimation(uint16 action, uint frames, const byte *or
 	_actionUsesActor = false;
 	_actionHoldSpeech = false;
 	_actionLoopSpeech = false;
+	_actionParallel = false;
 	for (uint i = 0; i < (order ? count : frames); ++i)
 		_actionFrames.push_back(order ? order[i] : i);
 	_roomAction = action;
@@ -1312,12 +1321,16 @@ void RunawayRoomScene::playAnimationFootsteps(uint frame, byte surface, const An
 void RunawayRoomScene::updateRoomAnimation() {
 	if (!_roomAction || _actionFrames.empty())
 		return;
-	if ((speaking() && !_actionLoopSpeech) || _walkPath.active()) {
+	if (!_actionParallel && ((speaking() && !_actionLoopSpeech) || _walkPath.active())) {
 		_actionStarted = _now;
 		return;
 	}
 	while (_now - _actionStarted >= _actionFrameDuration) {
 		_actionStarted += _actionFrameDuration;
+		if (_actionParallel && _actionStep + 1 == _actionFrames.size() && (speaking() || _walkPath.active())) {
+			_actionStarted = _now;
+			return;
+		}
 		if (++_actionStep == _actionFrames.size()) {
 			if (_actionLoopSpeech && speaking()) {
 				_actionStep = 0;
diff --git a/engines/hollywood/runaway/scene.h b/engines/hollywood/runaway/scene.h
index ea8df4921eb..a7163135d07 100644
--- a/engines/hollywood/runaway/scene.h
+++ b/engines/hollywood/runaway/scene.h
@@ -137,8 +137,8 @@ public:
 	bool inventoryPresentation() const override { return _reviewingDesertPlan || presentingPickup(); }
 	byte inventoryFrame() const override;
 	byte inventorySpeechPose() const override { return _lineIndex < _lines.size() ? _lines[_lineIndex].inventoryPose : 0; }
-	bool speaking() const override { return _sequence.active() ? !_sequence.subtitle().empty() : !_speech.subtitle().empty(); }
-	byte speechFrame() const override { return _sequence.active() ? _sequence.speechFrame() : _speech.frame(_now); }
+	bool speaking() const override { return _sequence.active() ? !_sequence.subtitle().empty() : _preparingSpeech || !_speech.subtitle().empty(); }
+	byte speechFrame() const override { return _sequence.active() ? _sequence.speechFrame() : _preparingSpeech ? 0 : _speech.frame(_now); }
 	bool playingVideo() const override { return _sequence.active(); }
 	void skipVideo() override { _sequence.skip(); }
 	bool escaped() const override { return _chapterComplete; }
@@ -181,6 +181,7 @@ protected:
 	virtual void finishCustomConversation() {}
 	virtual void resumeAmbientAudio(bool entering);
 	virtual void stopAmbientSpeech() {}
+	virtual bool prepareSpeech(byte speaker) { return true; }
 	virtual void runExitSideEffectsAfterLoop() {}
 	virtual void updateActor(uint elapsed, int scrollDirection, bool inventoryOpen);
 	virtual void findWalkPath(Common::Point target);
@@ -197,6 +198,7 @@ protected:
 	virtual bool shouldFollowCamera() const { return shouldDrawActor() && (!drawingRoomAnimation() || !_actionHidesActor); }
 	virtual bool roomAnimationInForeground() const { return false; }
 	virtual bool shouldUpdateActor() const { return true; }
+	virtual bool canWalkDuringSpeech() const { return false; }
 	virtual bool shouldPlayGameplayClickPath() const { return true; }
 	virtual int8 customizeSceneActionApproach(byte id, bool use, byte item, int8 approach) const { return approach; }
 	// Accept the adjusted target without the shared floor-mask adjustment.
@@ -246,7 +248,7 @@ protected:
 	void holdRoomAnimation(uint16 action, uint chunk, uint frames, uint frame, bool hideActor = true);
 	void loopRoomAnimationDuringSpeech(uint16 action, uint chunk, uint frames, uint first, uint last, bool hideActor = true);
 	void setRoomAnimationOverlay(uint chunk, uint frames, const byte *order, uint count);
-	bool drawingRoomAnimation() const { return !_actionUsesActor && _roomAction && !_actionFrames.empty() && (_actionHoldSpeech || !speaking()) && !_walkPath.active(); }
+	bool drawingRoomAnimation() const { return !_actionUsesActor && _roomAction && !_actionFrames.empty() && (_actionHoldSpeech || _actionParallel || !speaking()) && (_actionParallel || !_walkPath.active()); }
 	void updateRoomAnimation();
 	void playAnimationFootsteps(uint frame, byte surface, const AnimationFootstep *steps, uint count);
 	virtual float actorHeight() const { return 455; }
@@ -286,7 +288,7 @@ protected:
 	void updateConversation();
 	void buildDialogueChoices();
 	void finishConversation();
-	byte speaker() const { return speaking() && _lineIndex < _lines.size() ? _lines[_lineIndex].speaker : 0; }
+	byte speaker() const { return !_preparingSpeech && speaking() && _lineIndex < _lines.size() ? _lines[_lineIndex].speaker : 0; }
 
 	bool desertChapter() const { return _game != kRunawayMuseumDemo && _room / 1000 == 5; }
 	void startDesert();
@@ -360,6 +362,7 @@ protected:
 	Common::U32String _caption;
 	Common::Point _position, _camera;
 	uint _lineIndex = 0;
+	bool _preparingSpeech = false;
 	const RunawayRoom *_roomData = nullptr;
 	uint16 _room = 0, _pendingAction = 0;
 	byte _facing = 3, _pendingHotspot = 0, _pendingItem = 0;
@@ -399,6 +402,7 @@ protected:
 	bool _actionUsesActor = false;
 	bool _actionHoldSpeech = false;
 	bool _actionLoopSpeech = false;
+	bool _actionParallel = false; // Animate alongside speech and walking, waiting at the last frame.
 	byte _actionStage = 0;
 	uint _actionStep = 0;
 	uint _actionFrameDuration = 80;
diff --git a/engines/hollywood/runaway/scene4050.cpp b/engines/hollywood/runaway/scene4050.cpp
index 63d1440608a..4776605f3af 100644
--- a/engines/hollywood/runaway/scene4050.cpp
+++ b/engines/hollywood/runaway/scene4050.cpp
@@ -164,8 +164,9 @@ bool Scene4050::applyCustomBackgroundPatches() {
 			_museum.susan == 1 ? 170 : _museum.susan == 3 ? 2 : 75)) {
 		return false;
 	}
-	_susanFrame = _museum.susan == 3 ? 1 : 0;
+	_susanFrame = _susanHoldingCoffee ? 143 : _museum.susan == 3 ? 1 : 0;
 	_susanTalking = false;
+	_susanPreparingReply = false;
 	_susanWorkCycles = 0;
 	_susanTick = _now;
 	return true;
@@ -228,6 +229,19 @@ void Scene4050::resumeAmbientAudio(bool entering) {
 	updateSusanToolSound();
 }
 
+bool Scene4050::prepareSpeech(byte person) {
+	_susanPreparingReply = false;
+	if (_game != kRunawayFullGame || person != 1 || _museum.susan >= 2 || _susanHoldingCoffee)
+		return true;
+	const byte first = _museum.susan == 1 ? 52 : 45;
+	const byte last = _museum.susan == 1 ? 79 : 72;
+	if ((_susanFrame == first - 1 && _now - _susanTick >= 80) || (_susanFrame >= first && _susanFrame < last)) {
+		return true;
+	}
+	_susanPreparingReply = true;
+	return false;
+}
+
 void Scene4050::advanceCustomGameplayLoop(uint32 delta) {
 	if (_susanSpeech.finished(_now) || busy() || _inventoryOpen || _museum.susan != 1) {
 		stopAmbientSpeech();
@@ -235,6 +249,13 @@ void Scene4050::advanceCustomGameplayLoop(uint32 delta) {
 	const bool complaining = !_susanSpeech.subtitle().empty();
 	if (_museum.susan >= 2) {
 		_susanFrame = 1;
+	} else if (_susanHoldingCoffee) {
+		_susanFrame = 143 + (speaker() == 1 ? speechFrame() : 0);
+	} else if (_susanPreparingReply) {
+		if (_now - _susanTick >= 80) {
+			_susanTick = _now;
+			advanceSusanIdle();
+		}
 	} else if (speaker() || complaining) {
 		_susanFrame = (_museum.susan == 1 ? 52 : 45) + (complaining ? _susanSpeech.frame(_now) : speechFrame());
 		_susanTalking = true;
@@ -271,6 +292,19 @@ void Scene4050::updateSusanToolSound() {
 }
 
 void Scene4050::advanceSusanIdle() {
+	if (_susanPreparingReply) {
+		if (_museum.susan == 1) {
+			if (_susanFrame == 33 || _susanFrame == 83 || _susanFrame == 101)
+				_susanFrame = 34;
+			else if (_susanFrame < 51 || _susanFrame >= 79)
+				++_susanFrame;
+		} else if (_susanFrame == 14 || _susanFrame == 27 || _susanFrame == 39 || _susanFrame == 74) {
+			_susanFrame = 41;
+		} else if (_susanFrame < 44 || _susanFrame >= 72) {
+			++_susanFrame;
+		}
+		return;
+	}
 	if (_museum.susan == 1) {
 		const bool idle = !busy() && !_walkPath.active() && !_inventoryOpen;
 		if (_susanFrame == 33 || _susanFrame == 83 || _susanFrame == 101) {
@@ -568,6 +602,7 @@ void Scene4050::finishCustomAnimation(uint16 action) {
 		beginRoomAnimationRange(454, 15, 170, 117, 143, false);
 		return;
 	case 454: // Finish the exchange with Susan.
+		_susanHoldingCoffee = true;
 		say(26, 1);
 		say(26, 2, false, 1);
 		if (_restoredContent) {
diff --git a/engines/hollywood/runaway/scene4050.h b/engines/hollywood/runaway/scene4050.h
index 6c3a7f024b5..fd561192c09 100644
--- a/engines/hollywood/runaway/scene4050.h
+++ b/engines/hollywood/runaway/scene4050.h
@@ -43,6 +43,7 @@ private:
 	void runCustomEntrySequence() override;
 	void resumeAmbientAudio(bool entering) override;
 	void stopAmbientSpeech() override;
+	bool prepareSpeech(byte speaker) override;
 	void advanceCustomGameplayLoop(uint32 delta) override;
 	void drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport) override;
 	void drawCustomForegroundComposite(Graphics::ManagedSurface &viewport) override;
@@ -65,6 +66,8 @@ private:
 	byte _susanFrame = 0;
 	byte _susanWorkCycles = 0;
 	bool _susanTalking = false;
+	bool _susanPreparingReply = false;
+	bool _susanHoldingCoffee = false;
 	int8 _susanBenchFrame = -1;
 	uint32 _susanTick = 0;
 	uint32 _nextLaser = 0;
diff --git a/engines/hollywood/runaway/scene5060.cpp b/engines/hollywood/runaway/scene5060.cpp
index c1ae6148523..ed6e10c45a7 100644
--- a/engines/hollywood/runaway/scene5060.cpp
+++ b/engines/hollywood/runaway/scene5060.cpp
@@ -220,7 +220,6 @@ RunawayRoomScene::ActionResult Scene5060::dispatchCustomSceneAction(uint16 actio
 				say(21, 2, false, 2);
 				say(20, 4);
 				say(21, 3, false, 2);
-				say(20, 5);
 				_desert.lulaCalled = 1;
 			}
 		} else {
@@ -234,7 +233,6 @@ RunawayRoomScene::ActionResult Scene5060::dispatchCustomSceneAction(uint16 actio
 				say(20, 13);
 				say(21, 9, false, 2);
 			}
-			say(20, 8);
 			_desert.lulaRefused = 1;
 		}
 		deferDesertAction(414);
@@ -248,6 +246,11 @@ RunawayRoomScene::ActionResult Scene5060::dispatchCustomSceneAction(uint16 actio
 			frames.push_back(i);
 		}
 		beginRoomAnimation(action, 12, 195, frames.data(), frames.size(), false);
+		if (_desert.visited[6] || _desert.guardWeaknessKnown) {
+			walkTo(_position, 4, true);
+			_actionParallel = true;
+			_actionStage = 1;
+		}
 		break;
 	}
 	case 1414: // Finish the conversation with Lula.
@@ -370,11 +373,11 @@ RunawayRoomScene::ActionResult Scene5060::dispatchCustomSceneAction(uint16 actio
 		break;
 	case 1449: // Approach Lula after she catches the ball.
 		_inventory.remove(15);
+		say(18, 6, false, 2);
 		walkTo(Common::Point(349, 442), 7);
 		deferDesertAction(459);
 		break;
 	case 459: // Reveal Lula's identity and arrange the distraction.
-		say(18, 6, false, 2);
 		for (uint i = 1; i <= 5; ++i) {
 			say(17, i);
 			say(18, i - 1, false, 2);
@@ -466,6 +469,10 @@ void Scene5060::playLulaFootstep(uint frame) {
 }
 
 void Scene5060::advanceCustomGameplayLoop(uint32 delta) {
+	if (_roomAction == 414 && _actionStage == 1 && !_walkPath.active()) {
+		_actionStage = 2;
+		say(20, _desert.guardWeaknessKnown ? 8 : 5);
+	}
 	if (lulaDancing()) {
 		for (uint32 tick = (_now - delta) / 80 + 1; tick <= _now / 80; ++tick) {
 			playLulaFootstep(120 + tick % 75);
diff --git a/engines/hollywood/runaway/scene5060.h b/engines/hollywood/runaway/scene5060.h
index 1ddbd8667cc..bb598e0e09f 100644
--- a/engines/hollywood/runaway/scene5060.h
+++ b/engines/hollywood/runaway/scene5060.h
@@ -36,6 +36,7 @@ private:
 	bool applyCustomBackgroundPatches() override;
 	void applyCustomHotspotState() override;
 	float actorHeight() const override;
+	bool canWalkDuringSpeech() const override { return _roomAction == 459 && speaker() == 2; }
 	ActionResult dispatchCustomSceneAction(uint16 action) override;
 	void runCustomEntrySequence() override;
 	Common::U32String hotspotName(byte id) const override;
diff --git a/engines/hollywood/runaway/scene6090.cpp b/engines/hollywood/runaway/scene6090.cpp
index ea2d0c51547..253b4f3f213 100644
--- a/engines/hollywood/runaway/scene6090.cpp
+++ b/engines/hollywood/runaway/scene6090.cpp
@@ -188,6 +188,9 @@ RunawayRoomScene::ActionResult Scene6090::dispatchCustomSceneAction(uint16 actio
 	case 412: // Step back after giving Oscar the tobacco.
 		_oscar.setTalking(false);
 		walkTo(Common::Point(718, 543), 4);
+		deferTownAction(414);
+		break;
+	case 414: // Comment once Brian has stepped away from Oscar.
 		say(9, 6);
 		break;
 	case 312: // Examine the clay vessel.
diff --git a/engines/hollywood/runaway/scene6290.cpp b/engines/hollywood/runaway/scene6290.cpp
index 6ba1aa8565d..c8a0aaa2c8a 100644
--- a/engines/hollywood/runaway/scene6290.cpp
+++ b/engines/hollywood/runaway/scene6290.cpp
@@ -731,6 +731,7 @@ RunawayRoomScene::ActionResult Scene6290::dispatchCustomSceneAction(uint16 actio
 		walkTo(Common::Point(607, 549), 7, true);
 		_joshuaAnimating = true;
 		beginRoomAnimation(442, 29, 113, nullptr, 0, false);
+		_actionParallel = true;
 		setCameraX(0);
 		break;
 	case 1442: // Start the motorcycle and engage the machine.
@@ -743,16 +744,15 @@ RunawayRoomScene::ActionResult Scene6290::dispatchCustomSceneAction(uint16 actio
 		_town.machinePowered = 1;
 		_audio.playEffectAt(78, kMotorcycleSoundPosition, 70, 1, true);
 		say(25, 10);
+		deferTownAction(445);
+		return kBackgroundChanged;
+	case 445: // Brian and Joshua return to their conversation together.
 		walkTo(Common::Point(440, 556), 7, true);
 		_joshuaAnimating = true;
-		beginRoomAnimationRange(444, 30, 189, 0, 149, false);
-		return kBackgroundChanged;
-	case 1444: // Joshua calls out while completing his return gesture.
-		say(25, 11, false, 1);
-		beginRoomAnimationRange(446, 30, 189, 150, 187, false);
-		_actionHoldSpeech = _actionLoopSpeech = true;
+		beginRoomAnimationRange(444, 30, 189, 0, 187, false);
+		_actionParallel = true;
 		break;
-	case 1446: // Joshua explains the five-note combination and the rule against repeats.
+	case 1444: // Joshua explains the five-note combination and the rule against repeats.
 		setJoshuaAnimation(10, 131);
 		_joshuaTalking = true;
 		for (uint i = 12; i <= 18; ++i) {
@@ -768,6 +768,9 @@ RunawayRoomScene::ActionResult Scene6290::dispatchCustomSceneAction(uint16 actio
 	case 1450: // Brian takes his place at the keyboard.
 		_joshuaDown = true;
 		walkTo(Common::Point(419, 527), 1, true);
+		deferTownAction(447);
+		break;
+	case 447: // Joshua calls up once Brian has reached the keyboard.
 		say(30, 0, false, 1);
 		deferTownAction(452);
 		break;
@@ -925,17 +928,14 @@ void Scene6290::handleAnimationFrameHook() {
 		const byte frame = _actionFrames[_actionStep];
 		if (frame == 62 || frame == 83) {
 			say(0, frame == 62 ? 2 : 3, false, 1);
-			_actionHoldSpeech = _actionLoopSpeech = true;
-		} else if (_actionStep == _actionFrames.size() - 1) {
-			_actionLoopSpeech = false;
+			_actionParallel = true;
 		}
 	} else if (_roomAction == 440 || _roomAction == 540) {
 		if (_actionStep == 11 || _actionStep == 33 || _actionStep == 106) {
 			_audio.playEffect(_actionStep == 11 ? 35 : _actionStep == 33 ? 36 : 37, 80);
 		}
-	} else if (_roomAction == 446 && _actionStep == _actionFrames.size() - 1) {
-		_actionLoopSpeech = false;
-		_actionStarted = _now;
+	} else if (_roomAction == 444 && _actionStep == 150) {
+		say(25, 11, false, 1);
 	} else if (_roomAction == 443 && _actionStep == 16) {
 		_audio.playEffect(38);
 	} else if (_roomAction == 470 && _actionStep == 11) {
diff --git a/engines/hollywood/runaway/scene6300.cpp b/engines/hollywood/runaway/scene6300.cpp
index 08e04f1234d..35b87ee2ad6 100644
--- a/engines/hollywood/runaway/scene6300.cpp
+++ b/engines/hollywood/runaway/scene6300.cpp
@@ -581,7 +581,7 @@ RunawayRoomScene::ActionResult Scene6300::dispatchCustomSceneAction(uint16 actio
 		static const byte brian[] = {19};
 		setRoomAnimationOverlay(26, 20, brian, ARRAYSIZE(brian));
 		say(10, _town.catapult ? 1 : 10);
-		_actionHoldSpeech = _actionLoopSpeech = true;
+		_actionParallel = true;
 		break;
 	}
 	case 1415: // Follow the projectile to the bank.
@@ -783,16 +783,10 @@ void Scene6300::handleAnimationFrameHook() {
 	}
 	if (_roomAction == 414 && _actionStep == 15) {
 		_audio.playEffectAt(26, Common::Point(846, 200), 100, 1);
-	} else if (_roomAction == 415 && _actionStep == _actionFrames.size() - 1) {
-		// Keep the final launch frame until Brian finishes his line.
-		_actionLoopSpeech = false;
-		_actionStarted = _now;
 	} else if (_roomAction == 445 || _roomAction == 449) {
 		if (_actionFrames[_actionStep] == 14) {
 			say(28, _roomAction == 445 ? 9 : 10, false, 1);
-			_actionHoldSpeech = _actionLoopSpeech = true;
-		} else if (_actionStep == _actionFrames.size() - 1) {
-			_actionLoopSpeech = false;
+			_actionParallel = true;
 		}
 	} else if (_roomAction == 422 && _actionStep == 52) {
 		_audio.playEffect(31);
diff --git a/engines/hollywood/runaway/scene7020.cpp b/engines/hollywood/runaway/scene7020.cpp
index be96a85be36..c701cdfeccb 100644
--- a/engines/hollywood/runaway/scene7020.cpp
+++ b/engines/hollywood/runaway/scene7020.cpp
@@ -398,15 +398,9 @@ void Scene7020::handleAnimationFrameHook() {
 		}
 	} else if (_roomAction == 401) {
 		_camera.y = MIN<int>(200, _camera.y + 8);
-		if (_actionStep == _actionFrames.size() - 1) {
-			_actionLoopSpeech = false;
-		}
 	} else if (_roomAction == 427 && _actionStep == 51) {
 		_audio.playEffect(21);
 	} else if (_roomAction == 432) {
-		if (_actionStep == _actionFrames.size() - 1) {
-			_actionLoopSpeech = false;
-		}
 		if (_actionStep == 22) {
 			_audio.playEffect(26);
 		} else if (_actionStep == 52) {
@@ -456,8 +450,7 @@ void Scene7020::startSplintAnimation() {
 	}
 	beginRoomAnimation(432, 10, 43, brian.data(), brian.size());
 	setRoomAnimationOverlay(11, 34, gina.data(), gina.size());
-	_actionHoldSpeech = true;
-	_actionLoopSpeech = true;
+	_actionParallel = true;
 }
 
 RunawayRoomScene::ActionResult Scene7020::dispatchCustomSceneAction(uint16 action) {
@@ -567,16 +560,12 @@ RunawayRoomScene::ActionResult Scene7020::dispatchCustomSceneAction(uint16 actio
 			say(18);
 		}
 		break;
-	case 1400: // Brian reaches the ground and calls to Gina.
-		say(0);
-		holdRoomAnimation(402, 5, 55, 54);
-		break;
-	case 1402: // Gina calls back as Brian runs over to her.
+	case 1400: // Brian and Gina call to each other as he runs over to her.
 		_arrivalStage = 2;
+		say(0);
 		say(0, 1, false, 1);
 		beginRoomAnimationRange(401, 6, 40, 0, 30);
-		_actionHoldSpeech = true;
-		_actionLoopSpeech = true;
+		_actionParallel = true;
 		break;
 	case 1401: // Brian is relieved to find Gina alive.
 		say(0, 2);
diff --git a/engines/hollywood/runaway/scene8090.cpp b/engines/hollywood/runaway/scene8090.cpp
index 484ab98a6e4..81f428d84b1 100644
--- a/engines/hollywood/runaway/scene8090.cpp
+++ b/engines/hollywood/runaway/scene8090.cpp
@@ -215,6 +215,11 @@ bool Scene8090::drawCustomComposite(Graphics::ManagedSurface &viewport) {
 }
 
 void Scene8090::handleAnimationFrameHook() {
+	if (_roomAction == 421 && _actionStep == 22) {
+		say(20, 5, false, 1);
+		say(20, 6);
+		_actionParallel = true;
+	}
 	if (_roomAction == 402 && _actionStep == 9) {
 		_audio.playFootstep(1, _random.getRandomBit(), 90, 696);
 	} else if (_roomAction == 403 && (_actionStep == 5 || _actionStep == 9)) {
@@ -400,8 +405,8 @@ RunawayRoomScene::ActionResult Scene8090::dispatchCustomSceneAction(uint16 actio
 		_animatesOscar = false;
 		setOscarPose(13, 100, 60);
 		_oscarMouth = 60;
-		for (uint i = 5; i <= 11; ++i) {
-			say(20, i, false, i == 5 || i == 8 || i == 10);
+		for (uint i = 7; i <= 11; ++i) {
+			say(20, i, false, i == 8 || i == 10);
 		}
 		deferAction(422);
 		break;
diff --git a/engines/hollywood/runaway/scene8370.cpp b/engines/hollywood/runaway/scene8370.cpp
index 0aedfadbfac..53ab68ab551 100644
--- a/engines/hollywood/runaway/scene8370.cpp
+++ b/engines/hollywood/runaway/scene8370.cpp
@@ -144,6 +144,7 @@ void Scene8370::runCustomEntrySequence() {
 		_facing = 5;
 		if (!_finale.hotelVisited || _finale.bankResearch == 2) {
 			_upstairsScene = _finale.bankResearch == 2 ? 8384 : 8380;
+			_sushiGreeting = true;
 			_sushiCalling = true;
 			say(0, _upstairsScene == 8384 ? 2 : 0, false, 1);
 			walkTo(Common::Point(1160, 701), 7, false, true);
@@ -182,13 +183,21 @@ void Scene8370::runCustomEntrySequence() {
 void Scene8370::advanceCustomGameplayLoop(uint32 delta) {
 	updateOutdoorMusic(5);
 	updateSatelliteDish();
-	if (_sushiCalling || _sushiAnimating) {
+	if (_sushiCalling) {
 		_sushiTick = _now;
 		return;
 	}
 	while (_now - _sushiTick >= 80) {
 		_sushiTick += 80;
 		switch (_sushiState) {
+		case 0: // Return to the computer while Brian heads upstairs.
+			if (_sushiStep < 69) {
+				++_sushiStep;
+			} else {
+				_sushiStep = 71;
+				_sushiState = 1;
+			}
+			break;
 		case 1:
 			if (_sushiStep < 95) {
 				++_sushiStep;
@@ -249,10 +258,8 @@ void Scene8370::updateSatelliteDish() {
 void Scene8370::drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport) {
 	_dish.draw(viewport, _dishFrame, _camera.x, -_camera.y);
 	_fire.draw(viewport, (_now / 80) % 20, _camera.x, -_camera.y);
-	if (!_sushiAnimating || !drawingRoomAnimation()) {
-		const uint frame = _sushiCalling ? (speaker() ? speechFrame() % 6 : 0) : kSushiFrames[_sushiStep];
-		_sushi.draw(viewport, frame, _camera.x, -_camera.y);
-	}
+	const uint frame = _sushiCalling ? (speaker() ? speechFrame() % 6 : 0) : kSushiFrames[_sushiStep];
+	_sushi.draw(viewport, frame, _camera.x, -_camera.y);
 }
 
 float Scene8370::actorHeight() const {
@@ -365,21 +372,17 @@ RunawayRoomScene::ActionResult Scene8370::dispatchCustomSceneAction(uint16 actio
 		_actionStarted = _now;
 		deferAction(431);
 		break;
-	case 431:
-		_sushiAnimating = true;
-		beginRoomAnimationRange(401, 4, 94, 6, 55, false);
-		break;
-	case 1401: // Lower Brian's head after Sushi returns to her computer.
-		_sushiCalling = _sushiAnimating = false;
+	case 431: // Lower Brian's head once Sushi has finished calling him.
 		returnHeadToCenter(432);
 		break;
-	case 432:
-		say(0, _upstairsScene == 8384 ? 3 : 1);
-		deferAction(433);
-		break;
-	case 433: // Follow Sushi upstairs after answering her.
+	case 432: // Answer while walking upstairs and Sushi returns to her computer.
+		_sushiCalling = false;
+		_sushiState = 0;
+		_sushiStep = 20;
+		_sushiTick = _now;
 		_lookingUp = false;
 		_finale.hotelVisited = 1;
+		say(0, _upstairsScene == 8384 ? 3 : 1);
 		walkTo(Common::Point(775, 466), 6, false, true);
 		leaveRoom(_upstairsScene);
 		break;
@@ -430,6 +433,14 @@ RunawayRoomScene::ActionResult Scene8370::dispatchCustomSceneAction(uint16 actio
 }
 
 bool Scene8370::updateCustomSequence() {
+	if (_roomAction == 400) {
+		// Brian looks up on arrival even if Sushi is still calling him.
+		if (!_walkPath.active()) {
+			_roomAction = 0;
+			execute(400);
+		}
+		return true;
+	}
 	if (_roomAction == 431) {
 		const uint ticks = (_now - _actionStarted) / 10;
 		_actionStarted += ticks * 10;
diff --git a/engines/hollywood/runaway/scene8370.h b/engines/hollywood/runaway/scene8370.h
index 877245f1368..619c9e27895 100644
--- a/engines/hollywood/runaway/scene8370.h
+++ b/engines/hollywood/runaway/scene8370.h
@@ -44,6 +44,7 @@ private:
 	float actorHeight() const override;
 	int sceneViewportYOffset() const override;
 	bool shouldFollowCamera() const override { return !_lookingUp && Scene6370::shouldFollowCamera(); }
+	bool canWalkDuringSpeech() const override { return _sushiGreeting; }
 	void setupActorDepth(RunawayActor::RenderParams &params) const override;
 	void findWalkPath(Common::Point target) override;
 	bool adjustCustomWalkTargetToFloorMask(Common::Point &target) const override;
@@ -58,7 +59,7 @@ private:
 	uint32 _sushiTick = 0, _heatUntil = 0;
 	uint _sushiStep = 70;
 	byte _sushiState = 1;
-	bool _sushiCalling = false, _sushiAnimating = false;
+	bool _sushiGreeting = false, _sushiCalling = false;
 	bool _lookingUp = false;
 	uint16 _upstairsScene = 8380;
 };
diff --git a/engines/hollywood/runaway/scene8380.cpp b/engines/hollywood/runaway/scene8380.cpp
index 83d2dc4783f..ddc4b848b65 100644
--- a/engines/hollywood/runaway/scene8380.cpp
+++ b/engines/hollywood/runaway/scene8380.cpp
@@ -158,6 +158,11 @@ void Scene8380::runCustomEntrySequence() {
 	}
 	_walkPath.reset(_position);
 	updateCamera();
+	if ((_entryScene == 8380 && !_finale.sushiVisited) || _entryScene == 8384) {
+		// Sushi is already facing Brian after inviting him upstairs.
+		_sushiState = kTalking;
+		_sushiStep = 90;
+	}
 	switch (_entryScene) {
 	case 8380: // Meet Sushi, or tell her what happened during the séance.
 		if (!_finale.sushiVisited || (_finale.seanceComplete && !_finale.sushiTruthTold)) {
diff --git a/engines/hollywood/runaway/scene8420.cpp b/engines/hollywood/runaway/scene8420.cpp
index 9ecf699800c..690f69b044d 100644
--- a/engines/hollywood/runaway/scene8420.cpp
+++ b/engines/hollywood/runaway/scene8420.cpp
@@ -80,6 +80,8 @@ void Scene8420::runCustomEntrySequence() {
 		_dreaming = true;
 		startNightmareMovement(0, 37, 420);
 	} else {
+		_position = Common::Point(1123, 450);
+		_walkPath.reset(_position);
 		walkTo(Common::Point(851, 480), 5, true);
 		deferAction(400);
 	}
@@ -213,18 +215,12 @@ void Scene8420::startNightmareMovement(byte first, byte last, uint16 nextAction)
 RunawayRoomScene::ActionResult Scene8420::dispatchCustomSceneAction(uint16 action) {
 	switch (action) {
 	case 400: // Greet Gina from the bedroom entrance.
-		say(40, (_finale.ginaVisited || _finale.seanceComplete) ? 11 : 0);
-		deferAction(401);
-		break;
-	case 401: // Let Gina finish moving her injured leg before answering.
 		_waitingForGina = true;
+		say(40, (_finale.ginaVisited || _finale.seanceComplete) ? 11 : 0);
 		deferAction(402);
 		break;
-	case 402: // Gina recognizes Brian.
+	case 402: // Approach the bed while Gina greets Brian.
 		say(50, (_finale.ginaVisited || _finale.seanceComplete) ? 11 : 0, false, 1);
-		deferAction(403);
-		break;
-	case 403: // Walk over to the bed.
 		walkTo(Common::Point(462, 505), 5, true);
 		deferAction(404);
 		break;
@@ -341,7 +337,7 @@ RunawayRoomScene::ActionResult Scene8420::dispatchCustomSceneAction(uint16 actio
 		break;
 	case 430: // Leave Gina resting and return to the house or the street.
 		_ginaFrame = 0;
-		walkTo(Common::Point(1023, 450), 3, true);
+		walkTo(Common::Point(1123, 450), 3, true);
 		leaveRoom(_destination);
 		break;
 	default:
diff --git a/engines/hollywood/runaway/scene8420.h b/engines/hollywood/runaway/scene8420.h
index e279f026f45..829e0e9f6f2 100644
--- a/engines/hollywood/runaway/scene8420.h
+++ b/engines/hollywood/runaway/scene8420.h
@@ -44,6 +44,7 @@ private:
 	void advanceCustomGameplayLoop(uint32 delta) override;
 	void drawCustomForegroundComposite(Graphics::ManagedSurface &viewport) override;
 	bool shouldDrawActor() const override { return _showBrian; }
+	bool canWalkDuringSpeech() const override { return _roomAction == 404 && speaker() == 1; }
 	bool shouldPlayGameplayClickPath() const override { return false; }
 	bool updateCustomSequence() override;
 	float actorHeight() const override;


Commit: 4d82f59cebe28fe209d9bbac9824e248f8f7436a
    https://github.com/scummvm/scummvm/commit/4d82f59cebe28fe209d9bbac9824e248f8f7436a
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-11-30T13:09:49+01:00

Commit Message:
HOLLYWOOD: RUNAWAY: corrected looping animation in 8370 and 8380

Changed paths:
    engines/hollywood/runaway/animation.cpp
    engines/hollywood/runaway/animation.h
    engines/hollywood/runaway/scene8370.cpp
    engines/hollywood/runaway/scene8370.h
    engines/hollywood/runaway/scene8380.cpp
    engines/hollywood/runaway/scene8380.h


diff --git a/engines/hollywood/runaway/animation.cpp b/engines/hollywood/runaway/animation.cpp
index 12da1e3d412..b48f2709b33 100644
--- a/engines/hollywood/runaway/animation.cpp
+++ b/engines/hollywood/runaway/animation.cpp
@@ -22,6 +22,7 @@
 #include "common/file.h"
 #include "common/util.h"
 #include "hollywood/runaway/animation.h"
+#include "hollywood/runaway/audio.h"
 #include "hollywood/runaway/graphics.h"
 
 namespace Hollywood {
@@ -425,4 +426,30 @@ uint RunawayCarlaAnimation::frame(byte mouth) const {
 	return _step;
 }
 
+void RunawayAntennaAnimation::update(uint32 now, Common::RandomSource &random, RunawayAudio &audio) {
+	// Both hotel views pause at frames 0, 47 and 96, reversing between them.
+	while (now - _tick >= 80) {
+		_tick += 80;
+		if (_moving) {
+			if (_frame == _target) {
+				_moving = false;
+				audio.stopEffect(1);
+			} else {
+				_frame += _frame < _target ? 1 : -1;
+			}
+		} else if (!random.getRandomNumber(99)) {
+			_target = _frame == 47 ? (random.getRandomBit() ? 0 : 96) : 47;
+			_frame += _frame < _target ? 1 : -1;
+			_moving = true;
+			resumeAudio(audio);
+		}
+	}
+}
+
+void RunawayAntennaAnimation::resumeAudio(RunawayAudio &audio) const {
+	if (_moving && !audio.effectPlaying(1)) {
+		audio.playEffectAt(55, Common::Point(30, 200), 3, 1, true);
+	}
+}
+
 } // End of namespace Hollywood
diff --git a/engines/hollywood/runaway/animation.h b/engines/hollywood/runaway/animation.h
index 9f7148335a5..3b7d8597105 100644
--- a/engines/hollywood/runaway/animation.h
+++ b/engines/hollywood/runaway/animation.h
@@ -29,6 +29,7 @@
 namespace Hollywood {
 
 class RunawayActor;
+class RunawayAudio;
 
 // The room actor, inventory portrait and other speakers share the original
 // text-derived mouth shapes (0..5), with a closed-eye set at 6..11.
@@ -115,6 +116,19 @@ private:
 	bool _hasDrunk = false;
 };
 
+class RunawayAntennaAnimation {
+public:
+	void resetTimer(uint32 now) { _tick = now; }
+	void update(uint32 now, Common::RandomSource &random, RunawayAudio &audio);
+	void resumeAudio(RunawayAudio &audio) const;
+	byte frame() const { return _frame; }
+
+private:
+	uint32 _tick = 0;
+	byte _frame = 0, _target = 0;
+	bool _moving = false;
+};
+
 } // End of namespace Hollywood
 
 #endif // HOLLYWOOD_RUNAWAY_ANIMATION_H
diff --git a/engines/hollywood/runaway/scene8370.cpp b/engines/hollywood/runaway/scene8370.cpp
index 53ab68ab551..28d562439aa 100644
--- a/engines/hollywood/runaway/scene8370.cpp
+++ b/engines/hollywood/runaway/scene8370.cpp
@@ -121,13 +121,12 @@ void Scene8370::applyCustomHotspotState() {
 
 void Scene8370::prepareCustomGameplayLoop() {
 	_sushiTick = _now;
-	_dishTick = _now;
+	_antennaMovement.resetTimer(_now);
 }
 
 void Scene8370::resumeAmbientAudio(bool entering) {
 	_audio.playEffect(39, 30, 2, true);
-	if (_dishMoving)
-		_audio.playEffectAt(55, Common::Point(30, 200), 3, 1, true);
+	_antennaMovement.resumeAudio(_audio);
 	if (entering || !_audio.musicPlaying()) {
 		_audio.playMusic(12 + _random.getRandomNumber(4), false);
 	}
@@ -182,7 +181,7 @@ void Scene8370::runCustomEntrySequence() {
 
 void Scene8370::advanceCustomGameplayLoop(uint32 delta) {
 	updateOutdoorMusic(5);
-	updateSatelliteDish();
+	_antennaMovement.update(_now, _random, _audio);
 	if (_sushiCalling) {
 		_sushiTick = _now;
 		return;
@@ -235,28 +234,8 @@ void Scene8370::advanceCustomGameplayLoop(uint32 delta) {
 	}
 }
 
-void Scene8370::updateSatelliteDish() {
-	// Native 0x55dd50 uses an 80 ms timer and pauses at each end or the midpoint.
-	while (_now - _dishTick >= 80) {
-		_dishTick += 80;
-		if (_dishMoving) {
-			if (_dishFrame == _dishTarget) {
-				_dishMoving = false;
-				_audio.stopEffect(1);
-			} else {
-				_dishFrame += _dishFrame < _dishTarget ? 1 : -1;
-			}
-		} else if (!_random.getRandomNumber(99)) {
-			_dishTarget = _dishFrame == 47 ? (_random.getRandomBit() ? 0 : 96) : 47;
-			_dishFrame += _dishFrame < _dishTarget ? 1 : -1;
-			_dishMoving = true;
-			_audio.playEffectAt(55, Common::Point(30, 200), 3, 1, true);
-		}
-	}
-}
-
 void Scene8370::drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport) {
-	_dish.draw(viewport, _dishFrame, _camera.x, -_camera.y);
+	_dish.draw(viewport, _antennaMovement.frame(), _camera.x, -_camera.y);
 	_fire.draw(viewport, (_now / 80) % 20, _camera.x, -_camera.y);
 	const uint frame = _sushiCalling ? (speaker() ? speechFrame() % 6 : 0) : kSushiFrames[_sushiStep];
 	_sushi.draw(viewport, frame, _camera.x, -_camera.y);
diff --git a/engines/hollywood/runaway/scene8370.h b/engines/hollywood/runaway/scene8370.h
index 619c9e27895..cbbc5738794 100644
--- a/engines/hollywood/runaway/scene8370.h
+++ b/engines/hollywood/runaway/scene8370.h
@@ -39,7 +39,6 @@ private:
 	void runCustomEntrySequence() override;
 	void resumeAmbientAudio(bool entering) override;
 	void advanceCustomGameplayLoop(uint32 delta) override;
-	void updateSatelliteDish();
 	void drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport) override;
 	float actorHeight() const override;
 	int sceneViewportYOffset() const override;
@@ -53,9 +52,7 @@ private:
 	bool updateCustomSequence() override;
 
 	RunawayAnimation _sushi, _fire, _dish;
-	uint32 _dishTick = 0;
-	byte _dishFrame = 0, _dishTarget = 0;
-	bool _dishMoving = false;
+	RunawayAntennaAnimation _antennaMovement;
 	uint32 _sushiTick = 0, _heatUntil = 0;
 	uint _sushiStep = 70;
 	byte _sushiState = 1;
diff --git a/engines/hollywood/runaway/scene8380.cpp b/engines/hollywood/runaway/scene8380.cpp
index ddc4b848b65..05750e85b10 100644
--- a/engines/hollywood/runaway/scene8380.cpp
+++ b/engines/hollywood/runaway/scene8380.cpp
@@ -135,10 +135,12 @@ void Scene8380::applyCustomHotspotState() {
 
 void Scene8380::prepareCustomGameplayLoop() {
 	_sushiTick = _now;
+	_antennaMovement.resetTimer(_now);
 }
 
 void Scene8380::resumeAmbientAudio(bool entering) {
 	_audio.stopEffect(2);
+	_antennaMovement.resumeAudio(_audio);
 	if (entering || !_audio.musicPlaying()) {
 		_audio.playMusic(21);
 	}
@@ -224,7 +226,7 @@ void Scene8380::advanceSushi() {
 	case kTyping:
 		if (_sushiStep < 36) {
 			if (++_sushiStep == 12) {
-				_audio.playEffect(44, 70, 1);
+				_audio.playEffect(44, 70);
 			}
 		} else if (_waitingForSushi) {
 			_sushiState = _sushiGoal == kTalking ? kTurnToBrian : kUseMicrophone;
@@ -297,6 +299,7 @@ void Scene8380::advanceCustomGameplayLoop(uint32 delta) {
 	if (!_audio.musicPlaying()) {
 		resumeAmbientAudio(false);
 	}
+	_antennaMovement.update(_now, _random, _audio);
 	while (_now - _sushiTick >= 80) {
 		_sushiTick += 80;
 		advanceSushi();
@@ -331,7 +334,7 @@ void Scene8380::drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport
 	}
 	_monitor.draw(viewport, monitorFrame, 0, 0);
 	drawAmbientAnimations(viewport, _equipment, ARRAYSIZE(_equipment));
-	_antenna.draw(viewport, (_now / 80) % 97, 0, 0);
+	_antenna.draw(viewport, _antennaMovement.frame(), 0, 0);
 	const bool talking = (_sushiState == kTalking || _sushiState == kMicrophoneSpeech) && speaker() == 1;
 	const uint step = _sushiStep + (talking ? speechFrame() : 0);
 	_sushi.draw(viewport, kSushiFrames[step], 0, 0);
diff --git a/engines/hollywood/runaway/scene8380.h b/engines/hollywood/runaway/scene8380.h
index 750006c38c7..569316dc415 100644
--- a/engines/hollywood/runaway/scene8380.h
+++ b/engines/hollywood/runaway/scene8380.h
@@ -65,6 +65,7 @@ private:
 	void beginPhoneRange(uint first, uint last, uint16 nextAction);
 
 	RunawayAnimation _sushi, _antenna, _monitor, _equipment[16];
+	RunawayAntennaAnimation _antennaMovement;
 	SushiState _sushiState = kTyping, _sushiGoal = kTalking;
 	uint _sushiStep = 10;
 	uint32 _sushiTick = 0;


Commit: fe3d40611c0a00a1c0c453a8458f3449cda4eb67
    https://github.com/scummvm/scummvm/commit/fe3d40611c0a00a1c0c453a8458f3449cda4eb67
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-11-30T13:09:49+01:00

Commit Message:
HOLLYWOOD: RUNAWAY: fixed the caravan arrival sequence

Changed paths:
    engines/hollywood/runaway/scene8400.cpp
    engines/hollywood/runaway/scene8400.h


diff --git a/engines/hollywood/runaway/scene8400.cpp b/engines/hollywood/runaway/scene8400.cpp
index 9d2a41c95a1..a5f2eacc02f 100644
--- a/engines/hollywood/runaway/scene8400.cpp
+++ b/engines/hollywood/runaway/scene8400.cpp
@@ -77,8 +77,8 @@ namespace Runaway {
 
 Scene8400::Scene8400(RunawayAudio &audio, RunawayInventory &inventory, const RunawayStrings &strings, RunawayGameType game) :
 	RunawayRoomScene(audio, inventory, strings, game) {
-	_speechColors[1] = 27; // Gustav.
-	_speechColors[2] = 22; // Feodor.
+	_speechColors[1] = 22; // Feodor.
+	_speechColors[2] = 27; // Gustav.
 }
 
 byte Scene8400::actionCursor(byte id) const {
@@ -87,8 +87,8 @@ byte Scene8400::actionCursor(byte id) const {
 
 bool Scene8400::loadCustomResources() {
 	return _door.load(_archive, 4, 3) && _scenery.load(_archive, 9, 123) &&
-		_parkedCar.load(_archive, 10, 2) && _feodor.load(_archive, 11, 126) &&
-		_gustav.load(_archive, 12, 99) && _arrivingCar.load(_archive, 13, 111) && _brian.load(_archive, 15, 39);
+		_parkedCar.load(_archive, 10, 2) && _gustav.load(_archive, 11, 126) &&
+		_feodor.load(_archive, 12, 99) && _arrivingCar.load(_archive, 13, 111) && _brian.load(_archive, 15, 39);
 }
 
 void Scene8400::applyCustomHotspotState() {
@@ -114,7 +114,7 @@ void Scene8400::runCustomEntrySequence() {
 	if (_entryScene == 8403) {
 		_cinematic = true;
 		setCameraX(1568);
-		beginRoomAnimationRange(420, 15, 39, 0, 14);
+		beginRoomAnimationRange(420, 15, 39, 0, 14, true, 60);
 	} else if (_entryScene == 8401 || _entryScene == 8402) {
 		_position = kDoor;
 		_walkPath.reset(_position);
@@ -123,7 +123,7 @@ void Scene8400::runCustomEntrySequence() {
 		if (_entryScene == 8402) {
 			_carParked = false;
 		}
-		beginRoomAnimation(410, 6, 36);
+		beginRoomAnimation(410, 6, 36, nullptr, 0, true, 60);
 	} else {
 		_facing = 5;
 		walkTo(kTrailEnd, 5, true);
@@ -160,16 +160,18 @@ void Scene8400::advanceCustomGameplayLoop(uint32 delta) {
 			_cameraTarget = -1;
 		}
 	}
-	while ((_carMoving || _gangstersEntering) && _now - _castTick >= 80) {
+	while (_carMoving && _now - _castTick >= 60) {
+		_castTick += 60;
+		_carMoving = ++_carFrame < 110;
+	}
+	while (_gangstersEntering && _now - _castTick >= 80) {
 		_castTick += 80;
-		if (_carMoving && ++_carFrame == 110) {
-			_carMoving = false;
-			_carParked = true;
-		}
-		if (_gangstersEntering) {
-			_gustavFrame = MIN<uint>(31, _gustavFrame + 1);
-			_feodorFrame = MIN<uint>(20, _feodorFrame + 1);
-			_gangstersEntering = _gustavFrame < 31;
+		_gustavFrame = MIN<uint>(20, _gustavFrame + 1);
+		if (_feodorFrame < 31) {
+			++_feodorFrame;
+		} else {
+			_gangstersEntering = false;
+			say(20, 4, false, 1);
 		}
 	}
 }
@@ -179,8 +181,8 @@ bool Scene8400::updateCustomSequence() {
 }
 
 void Scene8400::drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport) {
-	_door.draw(viewport, _doorFrame, _camera.x, 0);
 	_scenery.draw(viewport, _sceneryFrame, _camera.x, 0);
+	_door.draw(viewport, _doorFrame, _camera.x, 0);
 	_parkedCar.draw(viewport, _carParked ? 0 : 1, _camera.x, 0);
 }
 
@@ -189,8 +191,8 @@ void Scene8400::drawCustomForegroundComposite(Graphics::ManagedSurface &viewport
 		_arrivingCar.draw(viewport, _carFrame, _camera.x, 0);
 	}
 	if (_gangstersVisible) {
-		_gustav.draw(viewport, _gustavFrame + (!_gangstersEntering && speaker() == 1 ? speechFrame() : 0), _camera.x, 0);
-		_feodor.draw(viewport, _feodorFrame + (!_gangstersEntering && speaker() == 2 ? speechFrame() : 0), _camera.x, 0);
+		_feodor.draw(viewport, _feodorFrame + (!_gangstersEntering && speaker() == 1 ? speechFrame() : 0), _camera.x, 0);
+		_gustav.draw(viewport, _gustavFrame + (!_gangstersEntering && speaker() == 2 ? speechFrame() : 0), _camera.x, 0);
 	}
 	if (_brianPose >= 0 && !drawingRoomAnimation()) {
 		const uint mouth = _brianPose == 14 && speaking() && !speaker() ? speechFrame() : 0;
@@ -253,7 +255,7 @@ void Scene8400::enterTrailer() {
 void Scene8400::withdraw(uint16 action) {
 	static const byte frames[] = {14, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38};
 	_brianPose = -1;
-	beginRoomAnimation(action, 15, 39, frames, ARRAYSIZE(frames));
+	beginRoomAnimation(action, 15, 39, frames, ARRAYSIZE(frames), true, 60);
 }
 
 void Scene8400::handleAnimationFrameHook() {
@@ -281,11 +283,13 @@ void Scene8400::handleAnimationFrameHook() {
 			_audio.playFootstep(2, _random.getRandomBit(), 40, 1065);
 		}
 	} else if (_roomAction == 439) {
-		const uint gustav = 43 + _actionStep;
-		const uint feodor = _actionStep >= 5 ? 32 + _actionStep - 5 : 20;
-		if (gustav == 53 || gustav == 84 || gustav == 87 || gustav == 94 || gustav == 98 ||
-				feodor == 85 || feodor == 89 || feodor == 96 || feodor == 103 || feodor == 109 || feodor == 122) {
-			_audio.playFootstep(5, _random.getRandomBit(), 75);
+		const uint gustav = _actionStep >= 5 ? 32 + _actionStep - 5 : 20;
+		const uint feodor = 43 + _actionStep;
+		if (gustav == 85 || gustav == 89 || gustav == 96 || gustav == 103 || gustav == 109 || gustav == 122) {
+			_audio.playFootstep(5, _random.getRandomBit(), 75, 1065);
+		}
+		if (feodor == 53 || feodor == 84 || feodor == 87 || feodor == 94 || feodor == 98) {
+			_audio.playFootstep(5, _random.getRandomBit(), 75, 1065);
 		}
 	}
 }
@@ -425,13 +429,19 @@ RunawayRoomScene::ActionResult Scene8400::dispatchCustomSceneAction(uint16 actio
 		break;
 	case 430: // Hear something approaching after leaving the trailer.
 		_audio.playMusic(41);
-		_facing = 5;
+		walkTo(_position, 5, true);
+		deferAction(450);
+		break;
+	case 450: // Speak after turning toward the noise.
 		say(20, 1);
 		deferAction(431);
 		break;
-	case 431: // Recognize the sound of the gangsters' car.
-		_facing = 4;
-		_audio.playEffect(66);
+	case 431: // Turn toward the approaching car.
+		walkTo(_position, 4, true);
+		deferAction(451);
+		break;
+	case 451: // Recognize the sound of the gangsters' car.
+		_audio.playEffectAt(66, Common::Point(100, 200));
 		say(20, 2);
 		deferAction(432);
 		break;
@@ -451,6 +461,7 @@ RunawayRoomScene::ActionResult Scene8400::dispatchCustomSceneAction(uint16 actio
 		panTo(1568, 8, 435);
 		break;
 	case 435: // Identify the two visitors.
+		_carParked = true;
 		say(20, 3);
 		deferAction(436);
 		break;
@@ -465,7 +476,7 @@ RunawayRoomScene::ActionResult Scene8400::dispatchCustomSceneAction(uint16 actio
 		panTo(552, 4, 438);
 		break;
 	case 438: // Listen to Gustav and Feodor discuss their search.
-		for (uint variation = 4; variation <= 12; ++variation) {
+		for (uint variation = 5; variation <= 12; ++variation) {
 			say(20, variation, false, variation % 2 ? 2 : 1);
 		}
 		deferAction(439);
@@ -473,12 +484,12 @@ RunawayRoomScene::ActionResult Scene8400::dispatchCustomSceneAction(uint16 actio
 	case 439: { // Watch both gangsters walk through the trailer door.
 		byte gustav[99], feodor[99];
 		for (uint i = 0; i < ARRAYSIZE(gustav); ++i) {
-			gustav[i] = MIN<uint>(98, 43 + i);
-			feodor[i] = i < 5 ? 20 : MIN<uint>(125, 32 + i - 5);
+			gustav[i] = i < 5 ? 20 : MIN<uint>(125, 32 + i - 5);
+			feodor[i] = MIN<uint>(98, 43 + i);
 		}
 		_gangstersVisible = false;
-		beginRoomAnimation(439, 12, 99, gustav, ARRAYSIZE(gustav));
-		setRoomAnimationOverlay(11, 126, feodor, ARRAYSIZE(feodor));
+		beginRoomAnimation(439, 12, 99, feodor, ARRAYSIZE(feodor));
+		setRoomAnimationOverlay(11, 126, gustav, ARRAYSIZE(gustav));
 		break;
 	}
 	case 1439: // Pan back after the gangsters have gone inside.
@@ -486,7 +497,7 @@ RunawayRoomScene::ActionResult Scene8400::dispatchCustomSceneAction(uint16 actio
 		panTo(1568, 8, 440);
 		break;
 	case 440: // Check that the coast is clear.
-		beginRoomAnimationRange(440, 15, 39, 0, 14);
+		beginRoomAnimationRange(440, 15, 39, 0, 14, true, 60);
 		break;
 	case 1440: // Decide to return to Douglasville for help.
 		_brianPose = 14;
diff --git a/engines/hollywood/runaway/scene8400.h b/engines/hollywood/runaway/scene8400.h
index 063e3c6116a..db2e147b756 100644
--- a/engines/hollywood/runaway/scene8400.h
+++ b/engines/hollywood/runaway/scene8400.h
@@ -49,6 +49,10 @@ private:
 	const char *actionCaptionVariant(byte id, bool look, byte item) const override;
 	bool shouldDrawActor() const override { return !_cinematic; }
 	bool shouldUpdateActor() const override { return !_cinematic; }
+	bool shouldFollowCamera() const override {
+		// Keep the camera at the trailer while Brian walks into hiding.
+		return _roomAction != 433 && RunawayRoomScene::shouldFollowCamera();
+	}
 	bool updateCustomSequence() override;
 	ActionResult dispatchCustomSceneAction(uint16 action) override;
 	void handleAnimationFrameHook() override;


Commit: c7d0fc589c7687253ae3b3942cdf87d5eb1ca5d9
    https://github.com/scummvm/scummvm/commit/c7d0fc589c7687253ae3b3942cdf87d5eb1ca5d9
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-11-30T13:09:49+01:00

Commit Message:
HOLLYWOOD: RUNAWAY: missing interactions, animations and fixes for Oscar when he is named sheriff

Changed paths:
    engines/hollywood/runaway/oscar.cpp
    engines/hollywood/runaway/oscar.h
    engines/hollywood/runaway/saveload.cpp
    engines/hollywood/runaway/saveload.h
    engines/hollywood/runaway/scene8090.cpp
    engines/hollywood/runaway/scene8130.cpp
    engines/hollywood/runaway/scene8130.h
    engines/hollywood/runaway/scene8370.cpp


diff --git a/engines/hollywood/runaway/oscar.cpp b/engines/hollywood/runaway/oscar.cpp
index 6e65731e8a2..78e0d8282e1 100644
--- a/engines/hollywood/runaway/oscar.cpp
+++ b/engines/hollywood/runaway/oscar.cpp
@@ -41,21 +41,29 @@ const byte kOscarFrames[] = {
 
 } // End of anonymous namespace
 
-void OscarAnimation::update(uint32 now, Common::RandomSource &random, RunawayAudio &audio) {
+void OscarAnimation::update(uint32 now, Common::RandomSource &random, RunawayAudio &audio, bool allowGestures) {
 	if (_talking) {
 		_tick = now;
 		return;
 	}
-	if (now - _tick < 80) {
+	if (!allowGestures && _idle != 3) {
+		startIdle();
+	}
+	if (now - _tick < _frameDelay) {
 		return;
 	}
 	_tick = now;
+	_frameDelay = 80;
 	const uint last = _idle == 1 ? 62 : _idle == 2 ? 121 : _closeup ? 165 : 164;
 	if (_step < last) {
 		++_step;
 		if (_closeup && _idle == 2 && _step == 80) {
 			audio.playEffect(_chapter == 6 ? 64 : 80, 10, 1);
 		}
+	} else if (!allowGestures) {
+		// Hold the neutral pose before the next chewing cycle.
+		_step = 129;
+		_frameDelay = random.getRandomNumberRng(2000, 5000);
 	} else if (_idle == 3 && !random.getRandomNumber(_closeup ? 4 : 9)) {
 		_idle = 1 + random.getRandomBit();
 		_step = _idle == 1 ? 0 : 70;
@@ -80,6 +88,7 @@ void OscarAnimation::startIdle() {
 	_talking = false;
 	_idle = 3;
 	_step = 130;
+	_frameDelay = 80;
 }
 
 } // End of namespace Runaway
diff --git a/engines/hollywood/runaway/oscar.h b/engines/hollywood/runaway/oscar.h
index afc5987e082..d8c54276463 100644
--- a/engines/hollywood/runaway/oscar.h
+++ b/engines/hollywood/runaway/oscar.h
@@ -37,7 +37,7 @@ class OscarAnimation {
 public:
 	explicit OscarAnimation(bool closeup, byte chapter = 4) : _closeup(closeup), _chapter(chapter) {}
 	void resume(uint32 now) { _tick = now; }
-	void update(uint32 now, Common::RandomSource &random, RunawayAudio &audio);
+	void update(uint32 now, Common::RandomSource &random, RunawayAudio &audio, bool allowGestures = true);
 	uint frame(bool speaking, byte speechFrame) const;
 	void setTalking(bool talking) { _talking = talking; }
 	void startIdle();
@@ -49,6 +49,7 @@ private:
 	uint16 _step = 130;
 	byte _idle = 3;
 	uint32 _tick = 0;
+	uint32 _frameDelay = 80;
 };
 
 } // End of namespace Runaway
diff --git a/engines/hollywood/runaway/saveload.cpp b/engines/hollywood/runaway/saveload.cpp
index 1416f5ad1ef..5517835d248 100644
--- a/engines/hollywood/runaway/saveload.cpp
+++ b/engines/hollywood/runaway/saveload.cpp
@@ -388,6 +388,7 @@ void RunawaySaveState::sync(Common::Serializer &s) {
 	s.syncAsByte(town.wateringCanTaken, 29);
 	s.syncAsByte(town.cellVisited, 29);
 	s.syncAsByte(hopi.cryptReturnVisited, 30);
+	s.syncAsByte(finale.oscarNeedsRifle, 31);
 }
 
 byte RunawaySaveState::chapter() const {
@@ -549,7 +550,7 @@ bool RunawaySaveState::valid() const {
 		return false;
 	}
 	if (finale.doritaMet > 1 || finale.mediumDiscussed > 1 || finale.mediumTests > 3 || finale.seanceComplete > 1 ||
-			finale.oscarAway > 1 || finale.gangsters > 2 || finale.trailerFound > 2 || finale.moneyFound > 3 ||
+			finale.oscarAway > 1 || finale.oscarNeedsRifle > 1 || finale.gangsters > 2 || finale.trailerFound > 2 || finale.moneyFound > 3 ||
 			finale.nunsHabit > 2 || finale.recordingPlan > 1 || finale.recordings > 3 || finale.ginaUpdates > 7 ||
 			finale.ginaVisitPending > 1 || finale.gangstersMet > 1 || finale.gangsterBag > 3) {
 		return false;
@@ -590,7 +591,7 @@ bool RunawaySaveState::read(Common::SeekableReadStream &stream) {
 	if (stream.readUint32BE() != MKTAG('R', 'U', 'N', 'A'))
 		return false;
 	const uint16 version = stream.readUint16LE();
-	if (version < 1 || version > 30)
+	if (version < 1 || version > 31)
 		return false;
 	Common::Serializer s(&stream, nullptr);
 	s.setVersion(version);
@@ -620,9 +621,9 @@ bool RunawaySaveState::write(Common::WriteStream &stream) {
 	if (!valid())
 		return false;
 	stream.writeUint32BE(MKTAG('R', 'U', 'N', 'A'));
-	stream.writeUint16LE(30);
+	stream.writeUint16LE(31);
 	Common::Serializer s(nullptr, &stream);
-	s.setVersion(30);
+	s.setVersion(31);
 	sync(s);
 	return !s.err();
 }
diff --git a/engines/hollywood/runaway/saveload.h b/engines/hollywood/runaway/saveload.h
index 2ee3118e8e7..df537cb1f74 100644
--- a/engines/hollywood/runaway/saveload.h
+++ b/engines/hollywood/runaway/saveload.h
@@ -145,6 +145,7 @@ struct RunawaySaveState {
 	struct Finale {
 		byte doritaMet = 0, mediumDiscussed = 0, mediumTests = 0, seanceComplete = 0;
 		byte oscarAway = 0, gangsters = 0, moneyFound = 0, nunsHabit = 0;
+		byte oscarNeedsRifle = 0;
 		byte trailerFound = 0; // Unknown, directions from Saturn, visited.
 		byte recordingPlan = 0, recordings = 0, ginaUpdates = 0, ginaVisitPending = 0;
 		byte gangstersMet = 0, gangsterBag = 0; // Bag: absent, present, examined, taken.
diff --git a/engines/hollywood/runaway/scene8090.cpp b/engines/hollywood/runaway/scene8090.cpp
index 81f428d84b1..d3cedfae20b 100644
--- a/engines/hollywood/runaway/scene8090.cpp
+++ b/engines/hollywood/runaway/scene8090.cpp
@@ -49,7 +49,8 @@ const RunawayResponse kResponses[] = {
 
 const RunawayItemAction kItemActions[] = {
 	{8090, 12, 4, 325}, // Offer Oscar the sheriff's badge.
-	{8090, 22, 4, 314}  // Offer raw tobacco leaves (native item 27).
+	{8090, 22, 4, 314}, // Offer raw tobacco leaves (native item 27).
+	{8090, 11, 4, 328}  // Bring the new sheriff his rifle.
 };
 
 } // End of anonymous namespace
@@ -100,6 +101,9 @@ void Scene8090::applyCustomHotspotState() {
 
 void Scene8090::prepareCustomGameplayLoop() {
 	_oscar.resume(_now);
+	if (_finale.oscarNeedsRifle) {
+		setOscarPose(13, 100, 94);
+	}
 }
 
 void Scene8090::runCustomEntrySequence() {
@@ -116,12 +120,20 @@ void Scene8090::runCustomEntrySequence() {
 		_arrivalStarted = _now;
 		break;
 	case 8093: // Oscar returns armed, ready to confront the gangsters.
-		_inventory.remove(11);
+		_finale.oscarNeedsRifle = 0;
 		_position = Common::Point(676, 510);
 		_walkPath.reset(_position);
 		_facing = 7;
-		_animatesOscar = true;
-		beginRoomAnimationRange(430, 14, 53, 0, 13, false);
+		if (_inventory.contains(11)) {
+			_inventory.select(0);
+			setOscarPose(13, 100, 94);
+			beginActorAnimation(424, 214, 11);
+			for (int frame = 9; frame >= 0; --frame) {
+				_actionFrames.push_back(frame);
+			}
+		} else {
+			deferAction(430);
+		}
 		break;
 	case 8094: // Follow Oscar's plan back to Sushi.
 		_position = Common::Point(676, 510);
@@ -215,7 +227,10 @@ bool Scene8090::drawCustomComposite(Graphics::ManagedSurface &viewport) {
 }
 
 void Scene8090::handleAnimationFrameHook() {
-	if (_roomAction == 421 && _actionStep == 22) {
+	if (_roomAction == 420 && _actionStep == 24) {
+		// The badge leaves Brian's hand and becomes part of Oscar's pose.
+		setOscarPose(13, 100, 0);
+	} else if (_roomAction == 421 && _actionStep == 22) {
 		say(20, 5, false, 1);
 		say(20, 6);
 		_actionParallel = true;
@@ -356,6 +371,13 @@ RunawayRoomScene::ActionResult Scene8090::dispatchCustomSceneAction(uint16 actio
 	case 327: // Return to the town overview.
 		leaveRoom(8350);
 		break;
+	case 328: // Give Oscar the rifle after he has asked for it.
+		if (_finale.oscarNeedsRifle && _inventory.contains(11)) {
+			leaveRoom(8093);
+		} else {
+			executeItemAction(defaultItemAction(11, 4));
+		}
+		break;
 	case 400: // Oscar resumes chewing after the conversation.
 		_oscar.startIdle();
 		break;
@@ -386,6 +408,9 @@ RunawayRoomScene::ActionResult Scene8090::dispatchCustomSceneAction(uint16 actio
 		_animatesOscar = false;
 		_oscarPose = 0;
 		_oscar.startIdle();
+		if (_finale.oscarNeedsRifle) {
+			setOscarPose(13, 100, 94);
+		}
 		_position = Common::Point(696, 510);
 		_walkPath.reset(_position);
 		_facing = 4;
@@ -426,10 +451,20 @@ RunawayRoomScene::ActionResult Scene8090::dispatchCustomSceneAction(uint16 actio
 		}
 		deferAction(423);
 		break;
-	case 423: // Arm Oscar with the borrowed rifle, or fetch it from Sushi.
-		_oscarPose = 0;
-		_oscar.startIdle();
-		leaveRoom(_inventory.contains(11) ? 8093 : 8373);
+	case 423: // Wait for the player to give Oscar the rifle in restored content.
+		if (_restoredContent) {
+			_finale.oscarNeedsRifle = 1;
+		} else {
+			_oscarPose = 0;
+			_oscar.startIdle();
+			leaveRoom(_inventory.contains(11) ? 8093 : 8373);
+		}
+		break;
+	case 1424: // Finish offering the rifle before Oscar accepts it.
+	case 430:
+		_inventory.remove(11);
+		_animatesOscar = true;
+		beginRoomAnimationRange(430, 14, 53, 0, 13, false);
 		break;
 	case 1430: // Oscar shows Brian his rifle.
 		_animatesOscar = false;
@@ -481,8 +516,15 @@ void Scene8090::startOscarConversation() {
 	_afterConversation = 400;
 	_oscar.setTalking(true);
 	_audio.stopEffect(1);
-	say(82, 0);
-	say(92, 0, false, 1);
+	if (_finale.oscarNeedsRifle) {
+		say(20, 14, false, 1);
+		if (!_inventory.contains(11)) {
+			say(20, 19);
+		}
+	} else {
+		say(82, 0);
+		say(92, 0, false, 1);
+	}
 	static const DialogueChoice topics[] = {
 		{1, 0, 0, 1, 1, 2, 255}, {1, 0, 0, 2, 2, 3, 255},
 		{1, 0, 3, 3, 3, 5, 255}, {0, 0, 3, 3, 3, 1, 255},
diff --git a/engines/hollywood/runaway/scene8130.cpp b/engines/hollywood/runaway/scene8130.cpp
index 79210b1d172..4a06e9e9aed 100644
--- a/engines/hollywood/runaway/scene8130.cpp
+++ b/engines/hollywood/runaway/scene8130.cpp
@@ -54,7 +54,16 @@ Scene8130::Scene8130(RunawayAudio &audio, RunawayInventory &inventory, const Run
 	RunawayRoomScene(audio, inventory, strings, game), _oscar(false, 6) {}
 
 bool Scene8130::loadCustomResources() {
-	return _oscarAnimation.load(_archive, 6, 106) && _departureAnimation.load(_archive, 7, 40);
+	if (!_oscarAnimation.load(_archive, 6, 106) || !_departureAnimation.load(_archive, 7, 40)) {
+		return false;
+	}
+	// Reuse the badge from the first departure frame at the idle sprite's scale.
+	const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
+	Graphics::ManagedSurface badge(14, 13, format);
+	_departureAnimation.draw(badge, 0, 403, -254);
+	_sheriffBadge.create(8, 7, format);
+	_sheriffBadge.blitFrom(badge, badge.getBounds(), _sheriffBadge.getBounds());
+	return true;
 }
 
 bool Scene8130::applyCustomBackgroundPatches() {
@@ -104,7 +113,8 @@ void Scene8130::resumeAmbientAudio(bool entering) {
 void Scene8130::advanceCustomGameplayLoop(uint32 delta) {
 	updateFinaleOutdoorAudio(20);
 	if (!_finale.oscarAway && !_departing) {
-		_oscar.update(_now, _random, _audio);
+		// Keep the badge unobstructed while Oscar waits for the rifle.
+		_oscar.update(_now, _random, _audio, !_finale.oscarNeedsRifle);
 	}
 }
 
@@ -133,7 +143,17 @@ bool Scene8130::updateCustomSequence() {
 
 void Scene8130::drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport) {
 	if (!_finale.oscarAway && !_departing) {
-		_oscarAnimation.draw(viewport, _oscar.frame(false, 0), _camera.x, -_camera.y);
+		const uint frame = _oscar.frame(false, 0);
+		_oscarAnimation.draw(viewport, frame, _camera.x, -_camera.y);
+		if (_finale.oscarNeedsRifle) {
+			int badgeX = 456;
+			if (frame >= 76 && frame <= 94) {
+				--badgeX;
+			} else if (frame >= 101 && frame <= 104) {
+				++badgeX;
+			}
+			viewport.blitFrom(_sheriffBadge, Common::Point(badgeX - _camera.x, 215 - _camera.y));
+		}
 	}
 }
 
diff --git a/engines/hollywood/runaway/scene8130.h b/engines/hollywood/runaway/scene8130.h
index 2ee3b006b24..799d257af6a 100644
--- a/engines/hollywood/runaway/scene8130.h
+++ b/engines/hollywood/runaway/scene8130.h
@@ -51,6 +51,7 @@ private:
 
 	OscarAnimation _oscar;
 	RunawayAnimation _oscarAnimation, _departureAnimation;
+	Graphics::ManagedSurface _sheriffBadge;
 	bool _departing = false;
 	byte _departureFrame = 0;
 	uint32 _departureTick = 0;
diff --git a/engines/hollywood/runaway/scene8370.cpp b/engines/hollywood/runaway/scene8370.cpp
index 28d562439aa..4f72b0e3e9a 100644
--- a/engines/hollywood/runaway/scene8370.cpp
+++ b/engines/hollywood/runaway/scene8370.cpp
@@ -316,8 +316,13 @@ RunawayRoomScene::ActionResult Scene8370::dispatchCustomSceneAction(uint16 actio
 		if (_finale.rifle == 2) {
 			break;
 		}
-		if (_restoredContent) {
-			say(15, 1);
+		if (_restoredContent || _finale.oscarNeedsRifle) {
+			if (_finale.oscarNeedsRifle) {
+				say(31, _finale.rifle == 0);
+			} else {
+				say(15, 1);
+			}
+			walkTo(Common::Point(1137, 348), 0, true);
 			deferAction(420);
 		} else {
 			say(15, 0);
@@ -365,7 +370,11 @@ RunawayRoomScene::ActionResult Scene8370::dispatchCustomSceneAction(uint16 actio
 		walkTo(Common::Point(775, 466), 6, false, true);
 		leaveRoom(_upstairsScene);
 		break;
-	case 410: // Take the rifle straight back to Oscar.
+	case 410: // Fetch the rifle for Oscar.
+	case 420: // Borrow the rifle before Oscar needs it.
+		beginActorAnimation(action, 147, 8);
+		break;
+	case 1410: // Take the rifle straight back to Oscar after reaching for it.
 		_finale.rifle = 2;
 		leaveRoom(8093);
 		return kBackgroundChanged;
@@ -401,7 +410,7 @@ RunawayRoomScene::ActionResult Scene8370::dispatchCustomSceneAction(uint16 actio
 		_inventory.finale().scalpel = 1;
 		say(19, 4);
 		break;
-	case 420: // Remove the rifle from the room and keep it in the inventory.
+	case 1420: // Remove the rifle from the room and keep it in the inventory.
 		_finale.rifle = 2;
 		pickUp(11, 15, 2);
 		return kBackgroundChanged;


Commit: e47e1f6fa81bcef322a07918f08d61c590431572
    https://github.com/scummvm/scummvm/commit/e47e1f6fa81bcef322a07918f08d61c590431572
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-11-30T13:09:49+01:00

Commit Message:
HOLLYWOOD: RUNAWAY: do not keep playing Gina recover comment over and over again

Changed paths:
    engines/hollywood/runaway/saveload.cpp
    engines/hollywood/runaway/scene8090.cpp


diff --git a/engines/hollywood/runaway/saveload.cpp b/engines/hollywood/runaway/saveload.cpp
index 5517835d248..61dc92b1606 100644
--- a/engines/hollywood/runaway/saveload.cpp
+++ b/engines/hollywood/runaway/saveload.cpp
@@ -551,7 +551,7 @@ bool RunawaySaveState::valid() const {
 	}
 	if (finale.doritaMet > 1 || finale.mediumDiscussed > 1 || finale.mediumTests > 3 || finale.seanceComplete > 1 ||
 			finale.oscarAway > 1 || finale.oscarNeedsRifle > 1 || finale.gangsters > 2 || finale.trailerFound > 2 || finale.moneyFound > 3 ||
-			finale.nunsHabit > 2 || finale.recordingPlan > 1 || finale.recordings > 3 || finale.ginaUpdates > 7 ||
+			finale.nunsHabit > 2 || finale.recordingPlan > 1 || finale.recordings > 3 || finale.ginaUpdates > 15 ||
 			finale.ginaVisitPending > 1 || finale.gangstersMet > 1 || finale.gangsterBag > 3) {
 		return false;
 	}
diff --git a/engines/hollywood/runaway/scene8090.cpp b/engines/hollywood/runaway/scene8090.cpp
index d3cedfae20b..41a9de452ae 100644
--- a/engines/hollywood/runaway/scene8090.cpp
+++ b/engines/hollywood/runaway/scene8090.cpp
@@ -593,9 +593,12 @@ void Scene8090::describeGinaVisit() {
 		return;
 	}
 	const byte variation = pendingGinaUpdate();
-	if (variation) {
-		_finale.ginaUpdates |= 1 << (variation - 1);
+	// Story updates use bits 0..2; the general recovery comment uses bit 3.
+	const byte updateMask = 1 << (variation ? variation - 1 : 3);
+	if (_finale.ginaUpdates & updateMask) {
+		return;
 	}
+	_finale.ginaUpdates |= updateMask;
 	say(40, variation);
 }
 


Commit: 4eb9835886a6a24c0b35f3234586979491f86e80
    https://github.com/scummvm/scummvm/commit/4eb9835886a6a24c0b35f3234586979491f86e80
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-11-30T13:09:49+01:00

Commit Message:
HOLLYWOOD: RUNAWAY: restore another Oscar response to tobacco

Changed paths:
    engines/hollywood/runaway/scene.cpp
    engines/hollywood/runaway/scene8220.cpp


diff --git a/engines/hollywood/runaway/scene.cpp b/engines/hollywood/runaway/scene.cpp
index 26665cf109b..dc8db495556 100644
--- a/engines/hollywood/runaway/scene.cpp
+++ b/engines/hollywood/runaway/scene.cpp
@@ -55,7 +55,7 @@ const RunawayResponse kGlobalResponses[] = {
 	{0, 31, 25, 0},
 };
 
-// New bindings for the original, unused response handlers.
+// Additional item interactions enabled by restored content.
 const RunawayItemAction kRestoredItemActions[] = {
 	{kHospitalStoreroom, 2, 8, 9, 0}, // Try the car keys in the left file cabinet.
 	{kHospitalStoreroom, 2, 9, 9, 0}, // Try the car keys in the right file cabinet.
@@ -72,6 +72,7 @@ const RunawayItemAction kRestoredItemActions[] = {
 	{kMuseumLaboratory, 9, 7, 12, 0}, // Discard the varnish in the wastepaper basket.
 	{kMuseumLaboratory, 9, 12, 26, 0}, // Return the varnish to the briefcase.
 	{6190, 20, 4, 27, 0}, // Return the ancient stapler to the bank shelves.
+	{8220, 22, 9, 324}, // Offer tobacco leaves to Oscar outside the sheriff's office.
 };
 
 } // End of anonymous namespace
diff --git a/engines/hollywood/runaway/scene8220.cpp b/engines/hollywood/runaway/scene8220.cpp
index de1d822f890..11d9edee638 100644
--- a/engines/hollywood/runaway/scene8220.cpp
+++ b/engines/hollywood/runaway/scene8220.cpp
@@ -349,6 +349,10 @@ RunawayRoomScene::ActionResult Scene8220::dispatchCustomSceneAction(uint16 actio
 		say(14, _finale.sheriffThanked ? 7 : 0);
 		deferAction(400);
 		break;
+	case 324: // Wait for Oscar to finish chewing before offering tobacco leaves.
+		_waitingForOscar = true;
+		deferAction(430);
+		break;
 	case 400: // Let Oscar finish his idle gesture before answering.
 		_waitingForOscar = true;
 		deferAction(401);
@@ -440,6 +444,22 @@ RunawayRoomScene::ActionResult Scene8220::dispatchCustomSceneAction(uint16 actio
 	case 420: // Oscar has parked and locked up the prisoners; return to Sushi.
 		leaveRoom(8375);
 		break;
+	case 430: { // Reuse the leaf-refusal exchange from Mama Dorita's doorway.
+		SceneTextStore text;
+		if (text.loadStage("RESOURCE.003", "Runaway Oscar tobacco", 609)) {
+			say(text, text.stageCue(12, 0), false);
+			say(text, text.stageCue(12, 1), false, 1);
+			_town.rawTobaccoRefused = 1;
+		} else {
+			executeItemAction(1);
+		}
+		deferAction(431);
+		break;
+	}
+	case 431: // Resume Oscar's idle animation after refusing the leaves.
+		_oscarTalking = false;
+		_oscar.startIdle();
+		break;
 	default:
 		return kUnhandled;
 	}


Commit: 27855e0f3df5f5e9784feb5d865437f5a0ee6cca
    https://github.com/scummvm/scummvm/commit/27855e0f3df5f5e9784feb5d865437f5a0ee6cca
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-11-30T13:09:50+01:00

Commit Message:
HOLLYWOOD: RUNAWAY: restore alternative comment on steam

Changed paths:
    engines/hollywood/runaway/scene6263.cpp


diff --git a/engines/hollywood/runaway/scene6263.cpp b/engines/hollywood/runaway/scene6263.cpp
index 3c2119deb6e..7eadd495fb3 100644
--- a/engines/hollywood/runaway/scene6263.cpp
+++ b/engines/hollywood/runaway/scene6263.cpp
@@ -228,8 +228,10 @@ RunawayRoomScene::ActionResult Scene6263::dispatchCustomSceneAction(uint16 actio
 	case 1306: // Show the steam burst outside, or explain why it did not dislodge the key.
 		if (_town.boiler == 3 && !_town.locomotiveKey) {
 			leaveTownRoom(6262);
+		} else if (_town.boiler == 3) {
+			say(26, _restoredContent ? 3 + _random.getRandomBit() : 3);
 		} else {
-			say(26, _town.boiler < 2 ? 0 : _town.boiler == 2 ? 1 : 3);
+			say(26, _town.boiler < 2 ? 0 : 1);
 		}
 		break;
 	case 307: // Identify the pressure wheel.


Commit: c9df2214712f8b64eadf1d3c44fde1820008d1cd
    https://github.com/scummvm/scummvm/commit/c9df2214712f8b64eadf1d3c44fde1820008d1cd
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-11-30T13:09:50+01:00

Commit Message:
HOLLYWOOD: RUNAWAY: restore additional comment from the end of chapter 3

Changed paths:
    engines/hollywood/runaway/scene5020.cpp


diff --git a/engines/hollywood/runaway/scene5020.cpp b/engines/hollywood/runaway/scene5020.cpp
index 75e1c486ec3..ba52342e71d 100644
--- a/engines/hollywood/runaway/scene5020.cpp
+++ b/engines/hollywood/runaway/scene5020.cpp
@@ -202,7 +202,13 @@ void Scene5020::startRescueFilm() {
 		// The explosion draws the guards outside.
 		{S::kEffect, 78, 100}, {S::kPlay, 346, 374}, {S::kSpeech, 50, 12, 0, 0, 22},
 		{S::kPlay, 375, 430}, {S::kWaitSpeech}, {S::kStill, 430},
-		{S::kTalk, 50, 13, 7, 0, 27}, {S::kTalk, 50, 14, 9, 0, 22},
+		{S::kTalk, 50, 13, 7, 0, 27}, {S::kTalk, 50, 14, 9, 0, 22}
+	};
+	if (_restoredContent) {
+		_filmCommands.push_back(S::Command(S::kTalk, 50, 15, 7, 0, 27));
+		_filmCommands.push_back(S::Command(S::kTalk, 50, 16, 9, 0, 22));
+	}
+	const S::Command escape[] = {
 		// Gina escapes while Lula covers the retreat.
 		{S::kEffect, 79, 100}, {S::kPlay, 454, 499}, {S::kSpeech, 50, 17, 17, 0, 27}, {S::kSpeech, 50, 18, 19, 0, 22},
 		{S::kPlay, 500, 699}, {S::kSpeech, 50, 20, 0, 0, 22}, {S::kPlay, 700, 1173},
@@ -211,6 +217,9 @@ void Scene5020::startRescueFilm() {
 		{S::kSpeech, 50, 23, 23, 0, 28}, {S::kSpeech, 50, 24, 24, 0, 11}, {S::kSpeech, 50, 31}, {S::kPlay, 1380, 1524}, {S::kWaitSpeech},
 		{S::kTalk, 50, 32, 0, 0, 25}, {S::kTalk, 50, 33}, {S::kTalk, 50, 34, 0, 0, 25}, {S::kWaitEffect, 5000}, {S::kEnd}
 	};
+	for (uint i = 0; i < ARRAYSIZE(escape); ++i) {
+		_filmCommands.push_back(escape[i]);
+	}
 	if (Common::File::exists("DATAVC00.000")) {
 		// GOG removes the CD portrait frames and keeps three separate stills
 		// inside the movie. The remaining action retains its original timing.


Commit: c21490f1912013641d2e7d88a7cde4a74f28ac93
    https://github.com/scummvm/scummvm/commit/c21490f1912013641d2e7d88a7cde4a74f28ac93
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-11-30T13:09:50+01:00

Commit Message:
HOLLYWOOD: RUNAWAY: added missing animations

Changed paths:
    engines/hollywood/runaway/museum.cpp
    engines/hollywood/runaway/scene4060.cpp
    engines/hollywood/runaway/scene4100.cpp
    engines/hollywood/runaway/scene4100.h
    engines/hollywood/runaway/scene4140.cpp
    engines/hollywood/runaway/scene4140.h
    engines/hollywood/runaway/scene5020.cpp
    engines/hollywood/runaway/scene5060.cpp
    engines/hollywood/runaway/scene5060.h
    engines/hollywood/runaway/scene6290.cpp
    engines/hollywood/runaway/scene6290.h


diff --git a/engines/hollywood/runaway/museum.cpp b/engines/hollywood/runaway/museum.cpp
index 2b4501d8be8..dd04bd8a319 100644
--- a/engines/hollywood/runaway/museum.cpp
+++ b/engines/hollywood/runaway/museum.cpp
@@ -354,7 +354,7 @@ void RunawayRoomScene::startMuseumFilm(MuseumFilm film) {
 	if (film == kPhoneFilm) {
 		draw();
 	}
-	_sequence.start(_filmCommands.data(), _filmText, _now, 'D');
+	_sequence.start(_filmCommands.data(), _filmText, _now, 'D', film == kPhoneFilm);
 	if (film == kPhoneFilm) {
 		_sequence.setBackground(_screen, demo ? Common::Rect(106, 316, 394, 604) :
 			Common::Rect(116, kRunawayViewportTop + 320, 396, kRunawayViewportTop + 600));
diff --git a/engines/hollywood/runaway/scene4060.cpp b/engines/hollywood/runaway/scene4060.cpp
index 7f027ff917f..ad666d12176 100644
--- a/engines/hollywood/runaway/scene4060.cpp
+++ b/engines/hollywood/runaway/scene4060.cpp
@@ -35,6 +35,15 @@ const byte kCoffeeCupFrames[] = {
 	48,
 };
 
+const byte kKeypadHandlingFrames[] = {0, 0, 1, 2, 3, 4, 5, 6};
+const byte kPhoneDialFrames[] = {
+	0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+	14, 15, 16, 17, 14, 15, 16, 17, 14, 15, 16, 17,
+	14, 15, 16, 17, 14, 15, 16, 17, 14, 15, 16, 17,
+	18, 19, 20, 21, 22, 23, 24, 25, 26
+};
+const byte kPhoneHangupFrames[] = {11, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
+
 const RunawayHotspot kHotspots[] = {
 	{0, 0, 0, {0, 0}, {0, 0}, {0, 0}},
 	{-25, 319, 7, {301, 302}, {0, 1}, {68, 371}, 7, false, false, true}, // 1: Stairs.
@@ -416,7 +425,7 @@ RunawayRoomScene::ActionResult Scene4060::dispatchCustomSceneAction(uint16 actio
 				say(15, 3);
 			} else {
 				say(15, _museum.phoneUsed ? 2 : 1);
-				beginRoomAnimation(325, 13, 27);
+				deferMuseumAction(450);
 			}
 			return kHandled;
 		case 334: // Show the tape recorder to Willy.
@@ -434,7 +443,7 @@ RunawayRoomScene::ActionResult Scene4060::dispatchCustomSceneAction(uint16 actio
 				say(26, 3);
 			} else {
 				say(26, 1);
-				deferMuseumAction(337);
+				beginRoomAnimation(337, 12, 7, kKeypadHandlingFrames, ARRAYSIZE(kKeypadHandlingFrames), true, 60);
 			}
 			return kHandled;
 		case 338: // Dust the keypad with talcum powder.
@@ -448,7 +457,7 @@ RunawayRoomScene::ActionResult Scene4060::dispatchCustomSceneAction(uint16 actio
 				say(26, 3);
 			} else {
 				say(27, 2);
-				deferMuseumAction(338);
+				beginRoomAnimation(338, 12, 7, kKeypadHandlingFrames, ARRAYSIZE(kKeypadHandlingFrames), true, 60);
 			}
 			return kHandled;
 		case 342: // Give the bowl of coffee to Willy.
@@ -651,10 +660,21 @@ void Scene4060::finishCustomAnimation(uint16 action) {
 		_museum.coffeeMachine = 2;
 		pickUp(15, 12, 2);
 		break;
+	case 450: // Lift the receiver after the introductory line.
+		if (!applyPatch(15)) {
+			error("Cannot update Runaway telephone background");
+		}
+		beginRoomAnimation(325, 13, 27, kPhoneDialFrames, ARRAYSIZE(kPhoneDialFrames), true, 60);
+		break;
 	case 325: // Start the telephone conversation.
+		holdRoomAnimation(325, 13, 27, 26);
+		_audio.playEffectAt(15, Common::Point(807, 200), 70);
 		startMuseumFilm(kPhoneFilm);
 		break;
 	case 474: // Hide after putting down the telephone.
+		if (!applyPatch(14)) {
+			error("Cannot restore Runaway telephone background");
+		}
 		say(15, 4);
 		walkTo(Common::Point(1440, 271), 7, true);
 		deferMuseumAction(460);
@@ -671,6 +691,9 @@ void Scene4060::finishCustomAnimation(uint16 action) {
 }
 
 void Scene4060::handleAnimationFrameHook() {
+	if ((_roomAction == 325 && _actionStep == 8) || (_roomAction == 474 && _actionStep == 6)) {
+		_audio.playEffectAt(_roomAction == 325 ? 16 : 17, Common::Point(1439, 200), 70);
+	}
 	if (_roomAction == 476) {
 		if (_actionStep <= 18) {
 			setCameraX(_entranceCameraX * (18 - _actionStep) / 18);
@@ -708,13 +731,14 @@ void Scene4060::finishCustomFilm() {
 		_audio.playMusic(13, false);
 		break;
 	case kPhoneFilm:
+		_audio.stopEffect();
 		_museum.phoneUsed = 1;
 		_museum.willyInLab = 1;
 		_museum.sawCode = 2;
 		if (_museum.keypad == 1) {
 			_museum.keypad = 2;
 		}
-		beginRoomAnimationRange(474, 13, 27, 26, 0);
+		beginRoomAnimation(474, 13, 27, kPhoneHangupFrames, ARRAYSIZE(kPhoneHangupFrames), true, 60);
 		break;
 	case kMuseumExitFilm:
 		leaveMuseumRoom(4100, Common::Point(141, 468));
diff --git a/engines/hollywood/runaway/scene4100.cpp b/engines/hollywood/runaway/scene4100.cpp
index 144b3adde0b..ce040dbb9c7 100644
--- a/engines/hollywood/runaway/scene4100.cpp
+++ b/engines/hollywood/runaway/scene4100.cpp
@@ -31,6 +31,8 @@ const byte kPressButtonFrames[] = {
 	0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
 };
 
+const byte kDoorButtonFrames[] = {0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
+
 const byte kFreezeBatteryFrames[] = {
 	0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
 	19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
@@ -115,9 +117,15 @@ const char *Scene4100::actionCaptionVariant(byte id, bool look, byte item) const
 }
 
 bool Scene4100::loadCustomResources() {
-	return !museumChapter() || (_ambientAnimation.load(_archive, 4, 121) && _overlayAnimation.load(_archive, 5, 121) &&
+	if (!museumChapter()) {
+		return true;
+	}
+	Graphics::ManagedSurface scratch(1, 1, _screen.format);
+	return _archive.readVariableChunk(6, _foregroundPatch) && applyRunawayPatch(_foregroundPatch, scratch) &&
+		_ambientAnimation.load(_archive, 4, 121) && _overlayAnimation.load(_archive, 5, 121) &&
 		_leftMachineAnimation.load(_archive, 12, 42) && _rightMachineAnimation.load(_archive, 20, 45) &&
-		_computerAnimation.load(_archive, 9, 49) && _rejectionLight.load(_archive, 11, 7));
+		_computerAnimation.load(_archive, 9, 49) && _rejectionLight.load(_archive, 11, 7) &&
+		_monitorAnimation.load(_archive, 30, 5);
 }
 
 bool Scene4100::applyCustomBackgroundPatches() {
@@ -175,6 +183,9 @@ void Scene4100::advanceCustomGameplayLoop(uint32 delta) {
 	if (_now - _machineTick >= 80) {
 		_machineTick = _now;
 		_computerFrame = speaker() && !_cliveVisible ? _random.getRandomNumber(48) : 48;
+		if (_monitorActive) {
+			_monitorFrame = _random.getRandomNumber(4);
+		}
 		for (uint i = 0; i < 2; ++i) {
 			if (_museum.chamberOpen) {
 				_machinePosition[i] = MIN<uint>(i ? 405 : 512, _machinePosition[i] + 1);
@@ -218,6 +229,9 @@ void Scene4100::drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport
 		}
 		(machine ? _rightMachineAnimation : _leftMachineAnimation).draw(viewport, index, _camera.x, 0);
 	}
+	if (_monitorActive) {
+		_monitorAnimation.draw(viewport, _monitorFrame, _camera.x, 0);
+	}
 	if (_cliveVisible) {
 		_cliveAnimation.draw(viewport, 17 + (speaker() ? speechFrame() : 0), _camera.x, 0);
 	}
@@ -230,6 +244,13 @@ void Scene4100::drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport
 	}
 }
 
+void Scene4100::drawCustomForegroundComposite(Graphics::ManagedSurface &viewport) {
+	if (museumChapter()) {
+		// Native placement is 580 - cameraX in the room buffer, before viewport clipping.
+		applyRunawayPatch(_foregroundPatch, viewport, 0, 580 - 2 * _camera.x);
+	}
+}
+
 RunawayRoomScene::ActionResult Scene4100::dispatchCustomSceneAction(uint16 action) {
 	if (!museumChapter()) {
 		return kUnhandled;
@@ -239,8 +260,7 @@ RunawayRoomScene::ActionResult Scene4100::dispatchCustomSceneAction(uint16 actio
 		if (_skippingExit) {
 			finishCustomAnimation(451);
 		} else {
-			beginRoomAnimation(450, 21, 13, nullptr, 0, false);
-			_audio.playEffectAt(32, Common::Point(43, 200));
+			beginRoomAnimation(452, 31, 10, kDoorButtonFrames, ARRAYSIZE(kDoorButtonFrames), true, 60);
 		}
 		return kHandled;
 	case 305: // Look inside the thermal chamber.
@@ -338,6 +358,11 @@ RunawayRoomScene::ActionResult Scene4100::dispatchCustomSceneAction(uint16 actio
 
 void Scene4100::finishCustomAnimation(uint16 action) {
 	switch (action) {
+	case 452: // Open the door after Brian presses its control.
+		beginRoomAnimation(450, 21, 13, nullptr, 0, false);
+		_actionFrames.insert_at(0, 0);
+		_audio.playEffectAt(32, Common::Point(0, 200));
+		break;
 	case 450: // Keep the security door open while Brian leaves.
 		_actionAnimation.draw(_background, 12, 0, 0);
 		walkTo(Common::Point(0, 465), 0xff, true);
@@ -469,6 +494,9 @@ void Scene4100::finishCustomAnimation(uint16 action) {
 }
 
 void Scene4100::handleAnimationFrameHook() {
+	if (_roomAction == 452 && _actionStep == 10) {
+		_audio.playEffectAt(34, Common::Point(0, 200), 90);
+	}
 	if ((_roomAction == 308 || _roomAction == 340) && _actionStep == 12) {
 		_audio.playEffect(34, 90);
 	}
@@ -495,6 +523,8 @@ void Scene4100::finishCustomFilm() {
 		if (!applyPatch(28)) {
 			error("Cannot update Runaway scanner");
 		}
+		_monitorActive = true;
+		_monitorFrame = 0;
 		walkTo(Common::Point(915, 547), 4, true);
 		deferMuseumAction(413);
 		break;
diff --git a/engines/hollywood/runaway/scene4100.h b/engines/hollywood/runaway/scene4100.h
index 7b1caeac141..c5b135a7730 100644
--- a/engines/hollywood/runaway/scene4100.h
+++ b/engines/hollywood/runaway/scene4100.h
@@ -40,6 +40,7 @@ private:
 	void resumeAmbientAudio(bool entering) override;
 	void advanceCustomGameplayLoop(uint32 delta) override;
 	void drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport) override;
+	void drawCustomForegroundComposite(Graphics::ManagedSurface &viewport) override;
 	ActionResult dispatchCustomSceneAction(uint16 action) override;
 	void finishCustomAnimation(uint16 action) override;
 	void handleAnimationFrameHook() override;
@@ -59,11 +60,12 @@ private:
 
 	RunawayAnimation _ambientAnimation, _overlayAnimation;
 	RunawayAnimation _leftMachineAnimation, _rightMachineAnimation, _cliveAnimation;
-	RunawayAnimation _computerAnimation, _rejectionLight;
+	RunawayAnimation _computerAnimation, _rejectionLight, _monitorAnimation;
+	Common::Array<byte> _foregroundPatch;
 	uint32 _machineTick = 0;
 	uint16 _machinePosition[2] = {0, 0};
-	byte _computerFrame = 48;
-	bool _cliveVisible = false, _computerReject = false;
+	byte _computerFrame = 48, _monitorFrame = 0;
+	bool _cliveVisible = false, _computerReject = false, _monitorActive = false;
 };
 
 } // End of namespace Runaway
diff --git a/engines/hollywood/runaway/scene4140.cpp b/engines/hollywood/runaway/scene4140.cpp
index d1e6b84ddff..54b72cc9c00 100644
--- a/engines/hollywood/runaway/scene4140.cpp
+++ b/engines/hollywood/runaway/scene4140.cpp
@@ -48,7 +48,7 @@ void Scene4140::click(Common::Point mouse, RunawayVerb verb, byte item) {
 		return;
 	}
 	_pressedKey = id;
-	_keyUntil = _now + 180;
+	_keyUntil = _now + 480;
 	_keyResult = 0;
 	if (!id) { // Leave the keypad close-up.
 		leaveMuseumRoom(4063, Common::Point(1153, 297), 7);
@@ -71,9 +71,7 @@ void Scene4140::click(Common::Point mouse, RunawayVerb verb, byte item) {
 				say(3, _museum.keypad == 4 ? 4 : 2);
 			}
 		}
-		_keyUntil = _now + 500;
-		_keyCount = 0;
-		_museum.keypadDigits = 0;
+		_resultUntil = _now + 720;
 	} else { // Enter a digit; button 11 is zero.
 		const byte digit = id == 11 ? 0 : id;
 		_audio.playEffect(18 + digit);
@@ -98,11 +96,15 @@ void Scene4140::update(uint32 now, int scrollDirection, bool inventoryOpen) {
 	if (_pressedKey && (int32)(now - _keyUntil) >= 0) {
 		_pressedKey = 0;
 	}
+	if (_keyResult && (int32)(now - _resultUntil) >= 0) {
+		_keyCount = 0;
+		_museum.keypadDigits = 0;
+	}
 	RunawayRoomScene::update(now, scrollDirection, inventoryOpen);
 }
 
 bool Scene4140::canSave() const {
-	return RunawayRoomScene::canSave() && !_pressedKey;
+	return RunawayRoomScene::canSave() && !_pressedKey && !showingResult();
 }
 
 bool Scene4140::loadCustomResources() {
@@ -111,7 +113,7 @@ bool Scene4140::loadCustomResources() {
 			return false;
 		}
 	}
-	return true;
+	return _resultLights[0].load(_archive, 25, 13) && _resultLights[1].load(_archive, 26, 13);
 }
 
 void Scene4140::runCustomEntrySequence() {
@@ -139,8 +141,11 @@ bool Scene4140::drawCustomComposite(Graphics::ManagedSurface &viewport) {
 	if (valid && _pressedKey && (int32)(_now - _keyUntil) < 0) {
 		valid = applyRunawayPatch(_keyPatches[2 + _pressedKey], viewport);
 	}
-	if (valid && _keyResult && (int32)(_now - _keyUntil) < 0) {
-		valid = applyRunawayPatch(_keyPatches[18 + _keyResult], viewport);
+	if (valid && showingResult()) {
+		// Native 0x478e70: 72 steps at 10 ms, rising to frame 12 and fading back to 0.
+		const uint step = (_now - (_resultUntil - 720)) / 10;
+		const uint frame = MIN<uint>(12, MIN<uint>(step + 1, 71 - step));
+		_resultLights[_keyResult - 1].draw(viewport, frame, 0, 0);
 	}
 	if (!valid) {
 		error("Invalid museum keypad image");
@@ -150,6 +155,10 @@ bool Scene4140::drawCustomComposite(Graphics::ManagedSurface &viewport) {
 
 void Scene4140::finishCustomAnimation(uint16 action) {
 	if (action == 414) {
+		if (showingResult()) {
+			deferMuseumAction(action);
+			return;
+		}
 		if (_keyResult == 2 && _museum.keypad != 4) {
 			_museum.keypad = 4;
 			if (museumChapter()) {
diff --git a/engines/hollywood/runaway/scene4140.h b/engines/hollywood/runaway/scene4140.h
index 0f1b52e28b8..61be79f3b15 100644
--- a/engines/hollywood/runaway/scene4140.h
+++ b/engines/hollywood/runaway/scene4140.h
@@ -36,7 +36,7 @@ public:
 	Common::U32String actionCaption(byte id, RunawayVerb verb, byte item) const override;
 	void update(uint32 now, int scrollDirection, bool inventoryOpen) override;
 	bool canSave() const override;
-	bool busy() const override { return _pressedKey != 0 || RunawayRoomScene::busy(); }
+	bool busy() const override { return _pressedKey != 0 || showingResult() || RunawayRoomScene::busy(); }
 
 private:
 	Common::U32String hotspotName(byte id) const override;
@@ -46,10 +46,12 @@ private:
 	void finishCustomAnimation(uint16 action) override;
 	bool shouldUpdateActor() const override;
 	bool isValidHotspot(byte id) const override;
+	bool showingResult() const { return _keyResult && (int32)(_now - _resultUntil) < 0; }
 
 	Common::Array<byte> _keyPatches[25];
+	RunawayAnimation _resultLights[2];
 	byte _pressedKey = 0, _keyResult = 0;
-	uint32 _keyUntil = 0;
+	uint32 _keyUntil = 0, _resultUntil = 0;
 };
 
 } // End of namespace Runaway
diff --git a/engines/hollywood/runaway/scene5020.cpp b/engines/hollywood/runaway/scene5020.cpp
index ba52342e71d..966afbaeda6 100644
--- a/engines/hollywood/runaway/scene5020.cpp
+++ b/engines/hollywood/runaway/scene5020.cpp
@@ -133,7 +133,16 @@ RunawayRoomScene::ActionResult Scene5020::dispatchCustomSceneAction(uint16 actio
 		if (!_desert.hatchSeen) {
 			_desert.hatchSeen = 1;
 			say(8);
+		} else if (_skippingExit) {
+			leaveDesertRoom(5031);
+			break;
 		}
+		beginRoomAnimation(309, 11, 39, nullptr, 0, true, 60);
+		_actionFrames.insert_at(0, 0);
+		// The original repeats frame 29 in place of frame 28.
+		_actionFrames[29] = 29;
+		break;
+	case 1309: // Finish descending before changing to the cabin interior.
 		leaveDesertRoom(5031);
 		break;
 	case 313: // Take the bucket.
diff --git a/engines/hollywood/runaway/scene5060.cpp b/engines/hollywood/runaway/scene5060.cpp
index ed6e10c45a7..ba1f8450b0a 100644
--- a/engines/hollywood/runaway/scene5060.cpp
+++ b/engines/hollywood/runaway/scene5060.cpp
@@ -99,16 +99,26 @@ Scene5060::Scene5060(RunawayAudio &audio, RunawayInventory &inventory, const Run
 }
 
 bool Scene5060::loadCustomResources() {
-	return _ambientAnimations[0].load(_archive, 15, 543) &&
+	_darkGlasses = false;
+	Graphics::ManagedSurface scratch(1, 1, _screen.format);
+	return _archive.readVariableChunk(4, _foregroundTree) && applyRunawayPatch(_foregroundTree, scratch) &&
+		_ambientAnimations[0].load(_archive, 15, 543) &&
 		_ambientAnimations[1].load(_archive, 16, 411) &&
 		_ambientAnimations[2].load(_archive, 17, 791) &&
 		_ambientAnimations[3].load(_archive, 18, 769) &&
 		loadForeground(0, 8) &&
 		_mariolaAnimation.load(_archive, 7, 201) &&
-		_lulaAnimation.load(_archive, 12, 195);
+		_lulaAnimation.load(_archive, 12, 195) && _basketball.load(_archive, 14, 6);
 }
 
 bool Scene5060::applyCustomBackgroundPatches() {
+	const bool darkGlasses = _desert.mariolaHelped != 0;
+	if (_darkGlasses != darkGlasses) {
+		if (!_mariolaAnimation.load(_archive, darkGlasses ? 20 : 7, 201)) {
+			return false;
+		}
+		_darkGlasses = darkGlasses;
+	}
 	return _desert.tanningOil != 2 || applyPatch(9);
 }
 
@@ -311,7 +321,7 @@ RunawayRoomScene::ActionResult Scene5060::dispatchCustomSceneAction(uint16 actio
 		deferDesertAction(412);
 		break;
 	case 412: // Let Mariola turn toward Brian.
-		beginRoomAnimation(action, 7, 201, kMariolaTurnFrames, ARRAYSIZE(kMariolaTurnFrames), false);
+		beginRoomAnimation(action, _desert.mariolaHelped ? 20 : 7, 201, kMariolaTurnFrames, ARRAYSIZE(kMariolaTurnFrames), false);
 		break;
 	case 1412: // Listen to Mariola's answer about the oil.
 		say(9, _desert.mariolaHelped != 0, false, 1);
@@ -321,7 +331,7 @@ RunawayRoomScene::ActionResult Scene5060::dispatchCustomSceneAction(uint16 actio
 		deferDesertAction(422);
 		break;
 	case 422: // Take the oil if Mariola agrees.
-		beginRoomAnimation(432, 7, 201, kMariolaRestFrames, ARRAYSIZE(kMariolaRestFrames), false);
+		beginRoomAnimation(432, _desert.mariolaHelped ? 20 : 7, 201, kMariolaRestFrames, ARRAYSIZE(kMariolaRestFrames), false);
 		if (_desert.mariolaHelped) {
 			_desert.tanningOil = 2;
 			pickUp(12, 8, 2);
@@ -364,7 +374,7 @@ RunawayRoomScene::ActionResult Scene5060::dispatchCustomSceneAction(uint16 actio
 		for (uint i = 0; i < ARRAYSIZE(lula); ++i) {
 			lula[i] = i == ARRAYSIZE(lula) - 1 ? 5 : MIN<uint>(i, 4);
 		}
-		beginRoomAnimationRange(439, 13, 62, 42, 61);
+		beginRoomAnimationRange(439, 13, 62, 42, 61, true, 60);
 		setRoomAnimationOverlay(21, 102, lula, ARRAYSIZE(lula));
 		break;
 	}
@@ -405,7 +415,7 @@ RunawayRoomScene::ActionResult Scene5060::dispatchCustomSceneAction(uint16 actio
 		_desert.mariolaHelped = 1;
 		_inventory.desert().glasses = 2;
 		say(16, 2);
-		break;
+		return kBackgroundChanged;
 	default:
 		return kUnhandled;
 	}
@@ -508,9 +518,16 @@ void Scene5060::drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport
 }
 
 void Scene5060::drawCustomForegroundComposite(Graphics::ManagedSurface &viewport) {
+	if (drawingRoomAnimation() && _roomAction == 439 && _actionStep >= 15 && _actionStep < 19) {
+		// Native 0x5a956c releases the ball at Brian's frame 57. Lula's catch cel already contains it.
+		_basketball.draw(viewport, _actionStep - 14, _camera.x, -_camera.y);
+	}
 	if (_position.x < 670) {
 		drawForeground(viewport, 0);
 	}
+	if (_camera.x > 100) {
+		applyRunawayPatch(_foregroundTree, viewport, 0, 1200 - _camera.x / 2 - _camera.x);
+	}
 }
 
 void Scene5060::handleAnimationFrameHook() {
diff --git a/engines/hollywood/runaway/scene5060.h b/engines/hollywood/runaway/scene5060.h
index bb598e0e09f..642a2adef21 100644
--- a/engines/hollywood/runaway/scene5060.h
+++ b/engines/hollywood/runaway/scene5060.h
@@ -49,7 +49,9 @@ private:
 	void playLulaFootstep(uint frame);
 
 	RunawayAnimation _ambientAnimations[4];
-	RunawayAnimation _mariolaAnimation, _lulaAnimation;
+	RunawayAnimation _mariolaAnimation, _lulaAnimation, _basketball;
+	Common::Array<byte> _foregroundTree;
+	bool _darkGlasses = false;
 };
 
 } // End of namespace Runaway
diff --git a/engines/hollywood/runaway/scene6290.cpp b/engines/hollywood/runaway/scene6290.cpp
index c8a0aaa2c8a..7615e24a357 100644
--- a/engines/hollywood/runaway/scene6290.cpp
+++ b/engines/hollywood/runaway/scene6290.cpp
@@ -269,6 +269,11 @@ void Scene6290::drawCustomForegroundComposite(Graphics::ManagedSurface &viewport
 }
 
 void Scene6290::drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport) {
+	if (_portalActive) {
+		const uint step = (_now - _portalStarted) / 80;
+		// Native 0x4fb4e0 opens once, then repeats frames 17 through 82.
+		_portalAnimation.draw(viewport, step < 83 ? step : 17 + (step - 83) % 66, _camera.x, 0);
+	}
 	// Native 0x4e4ad0 draws Joshua before the machine and its drive belt.
 	if (_joshuaAnimating && !_actionHidesActor && drawingRoomAnimation()) {
 		RunawayRoomScene::drawRoomAnimation(viewport);
@@ -793,6 +798,10 @@ RunawayRoomScene::ActionResult Scene6290::dispatchCustomSceneAction(uint16 actio
 		}
 		break;
 	case 460: // Approach the crater as the dimensional door opens.
+		if (!_portalAnimation.load(_archive, 31, 83))
+			error("Cannot load Runaway dimensional door animation");
+		_portalStarted = _now;
+		_portalActive = true;
 		_audio.playMusic(23, false);
 		walkTo(Common::Point(212, 471), 0, true);
 		deferTownAction(461);
@@ -909,6 +918,7 @@ RunawayRoomScene::ActionResult Scene6290::dispatchCustomSceneAction(uint16 actio
 }
 
 void Scene6290::finishCustomFilm() {
+	_portalActive = false;
 	deferTownAction(463);
 }
 
diff --git a/engines/hollywood/runaway/scene6290.h b/engines/hollywood/runaway/scene6290.h
index bd2677b9db8..be41891566e 100644
--- a/engines/hollywood/runaway/scene6290.h
+++ b/engines/hollywood/runaway/scene6290.h
@@ -75,8 +75,11 @@ private:
 	RunawayAnimation _keyboardBrian, _keyboardButtons, _keyboardPlatform;
 	Common::Array<byte> _keyboardMask, _keyboardMaps;
 	RunawayAnimation _machineAmbientAnimation, _machineOverlayAnimation, _machineIndicator;
+	RunawayAnimation _portalAnimation;
 	byte _joshuaFrame = 0;
 	uint32 _joshuaTick = 0;
+	uint32 _portalStarted = 0;
+	bool _portalActive = false;
 	bool _joshuaTalking = false, _joshuaAnimating = false, _joshuaDown = false;
 	bool _keyboard = false, _reviewingMelody = false;
 	bool _noteSoundPlayed = false;


Commit: 467f7002884a8b9e5ae4fc978045e29400f0a041
    https://github.com/scummvm/scummvm/commit/467f7002884a8b9e5ae4fc978045e29400f0a041
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-11-30T13:09:50+01:00

Commit Message:
HOLLYWOOD: RUNAWAY: resolve some original pathfinding bugs

Changed paths:
    engines/hollywood/runaway/navigation.cpp
    engines/hollywood/runaway/navigation.h
    engines/hollywood/runaway/scene.cpp
    engines/hollywood/runaway/scene.h
    engines/hollywood/runaway/scene6090.cpp
    engines/hollywood/runaway/scene6240.cpp
    engines/hollywood/runaway/scene6240.h
    engines/hollywood/runaway/scene8090.cpp
    engines/hollywood/runaway/scene8130.cpp
    engines/hollywood/runaway/scene8240.cpp
    engines/hollywood/runaway/scene_data.h


diff --git a/engines/hollywood/runaway/navigation.cpp b/engines/hollywood/runaway/navigation.cpp
index 98a1309733b..e8c8976f78d 100644
--- a/engines/hollywood/runaway/navigation.cpp
+++ b/engines/hollywood/runaway/navigation.cpp
@@ -118,6 +118,8 @@ bool RunawayWalkMap::findZonePath(Common::Point position, Common::Point target,
 		return false;
 	byte zone = nearestZone(position);
 	const byte targetZone = nearestZone(target);
+	debugC(2, kDebugPath, "Runaway zones: (%d,%d) zone %u -> (%d,%d) zone %u",
+		position.x, position.y, zone, target.x, target.y, targetZone);
 	if (!zone || zone >= kWalkZoneCount || !targetZone || targetZone >= kWalkZoneCount)
 		return false;
 	const byte *route = _routes->data() + kZonePointBytes + (zone * kWalkZoneCount + targetZone) * kZoneRouteLength;
@@ -146,6 +148,8 @@ bool RunawayWalkMap::findZonePath(Common::Point position, Common::Point target,
 		}
 		if (bestDistance == 0x7fffffff)
 			return false;
+		debugC(2, kDebugPath, "Runaway boundary %u: zone %u -> %u at (%d,%d)",
+			step, zone, nextZone, next.x, next.y);
 		path.push_back(next);
 		position = next;
 		zone = nextZone;
@@ -209,13 +213,15 @@ void RunawayWalkMap::findPath(Common::Point position, Common::Point target, Comm
 		path.push_back(previous);
 		i = next - 1;
 	}
-	debugC(1, kDebugScene, "Runaway: walk to %d,%d, reachable %d,%d, %u waypoints",
+	debugC(1, kDebugPath, "Runaway floor search: walk to %d,%d, reachable %d,%d, %u waypoints",
 		target.x, target.y, closest % _width, closest / _width, path.size());
 }
 
-void RunawayWalkPath::reset(Common::Point position) {
+void RunawayWalkPath::reset(Common::Point position, byte frame) {
+	assert(frame < 19);
 	clear();
 	_position = position;
+	_frame = frame;
 }
 
 void RunawayWalkPath::clear() {
@@ -250,18 +256,22 @@ void RunawayWalkPath::appendTurn(Step &step, byte facing) {
 	}
 }
 
-void RunawayWalkPath::start(byte facing, byte arrivalFacing, const Common::Array<float> &scales, bool museum) {
+void RunawayWalkPath::start(byte facing, byte arrivalFacing, const Common::Array<float> &scales, bool museum, bool stop) {
 	assert(facing < 8 && (arrivalFacing < 8 || arrivalFacing == 0xff));
 	assert(scales.size() == _points.size() + 1);
 	_steps.clear();
 	_index = _elapsed = 0;
 	Step step(_position, facing, _frame);
+	debugC(2, kDebugPath, "Runaway walk: from (%d,%d), facing %u, frame %u, arrival facing %u, stop %u, %u waypoints",
+		_position.x, _position.y, facing, _frame, arrivalFacing, stop, _points.size());
 	// Native strides per animation cel, clockwise from north (full game 0x40eac0).
 	static const byte strides[] = {8, 11, 19, 11, 8, 11, 19, 11};
 	for (uint i = 0; i < _points.size(); ++i) {
 		const Common::Point from = step.position, target = _points[i];
 		const bool last = i + 1 == _points.size();
 		const float dx = target.x - from.x, dy = target.y - from.y;
+		debugC(2, kDebugPath, "Runaway waypoint %u: (%d,%d) -> (%d,%d), scale %.3f -> %.3f",
+			i, from.x, from.y, target.x, target.y, scales[i], scales[i + 1]);
 		if (from == target) {
 			if (!last)
 				continue;
@@ -284,21 +294,22 @@ void RunawayWalkPath::start(byte facing, byte arrivalFacing, const Common::Array
 		else if (dx || dy)
 			direction = dy > 0 ? (dx > 0 ? 3 : 5) : (dx > 0 ? 1 : 7);
 
-		// Native 0x42f4e0 also joins a new path from an interrupted transition.
-		if (!step.frame) {
+		// Native 0x42f4e0 starts with the next queued cel, then joins any
+		// interrupted startup or stopping transition before turning.
+		const byte previousFrame = step.frame;
+		step.frame = previousFrame == 12 ? 1 : previousFrame + 1;
+		if (!previousFrame) {
 			appendFrame(step, 13);
 			appendFrame(step, 14);
 			appendFrame(step, 11);
-		} else if (step.frame == 13 || step.frame == 14) {
-			if (step.frame == 13)
-				appendFrame(step, 14);
+		} else if (previousFrame == 13 || previousFrame == 14) {
 			appendFrame(step, 11);
-		} else if (step.frame == 15 || step.frame == 16) {
-			if (step.frame == 16)
+		} else if (previousFrame == 15 || previousFrame == 16) {
+			if (previousFrame == 15)
 				appendFrame(step, 15);
 			appendFrame(step, 3);
-		} else if (step.frame == 17 || step.frame == 18) {
-			if (step.frame == 18)
+		} else if (previousFrame == 17 || previousFrame == 18) {
+			if (previousFrame == 17)
 				appendFrame(step, 17);
 			appendFrame(step, 9);
 		}
@@ -312,15 +323,19 @@ void RunawayWalkPath::start(byte facing, byte arrivalFacing, const Common::Array
 		int frames = (int)count;
 		if (count - frames > 0.5f)
 			++frames;
-		frames = MAX(1, frames);
-		if (last) {
-			// Finish on gait cel 3 or 9, which joins the two stopping poses.
-			const byte endFrame = 1 + (step.frame + frames - 1) % 12;
+		if (last && stop) {
+			// Native stopping alignment also accepts a rounded count of zero.
+			// Clamping it first adds an extra gait cel to very short walks.
+			const byte endFrame = 1 + (step.frame + MAX(1, frames) - 1) % 12;
 			int adjustment = 3 - endFrame % 6;
-			if (frames + adjustment <= 0)
+			if (frames + adjustment < 0)
 				adjustment += 6;
 			frames += adjustment;
 		}
+		// The native builder always appends the destination, even at zero.
+		frames = MAX(1, frames);
+		debugC(2, kDebugPath, "Runaway segment %u: facing %u, distance %.3f, stride %u, requested frames %.3f, movement frames %d",
+			i, direction, distance, strides[direction], count, frames);
 		for (int j = 1; j <= frames; ++j) {
 			step.position = Common::Point(from.x + (int)(dx * j / frames), from.y + (int)(dy * j / frames));
 			appendFrame(step, 1 + step.frame % 12);
@@ -329,6 +344,8 @@ void RunawayWalkPath::start(byte facing, byte arrivalFacing, const Common::Array
 			continue;
 		if (arrivalFacing != 0xff)
 			appendTurn(step, arrivalFacing);
+		if (!stop)
+			continue;
 		const byte stopFrame = step.frame == 3 ? 15 : 17;
 		appendFrame(step, stopFrame);
 		appendFrame(step, stopFrame + 1);
@@ -338,6 +355,22 @@ void RunawayWalkPath::start(byte facing, byte arrivalFacing, const Common::Array
 	}
 	if (_steps.empty())
 		_frame = 0;
+	debugC(2, kDebugPath, "Runaway walk queued: %u frames", _steps.size());
+}
+
+bool RunawayWalkPath::isSingleStep() const {
+	if (_points.size() != 1)
+		return false;
+	Common::Point position = _position;
+	uint movements = 0;
+	for (uint i = 0; i < _steps.size(); ++i) {
+		if (_steps[i].position != position) {
+			if (++movements > 1)
+				return false;
+			position = _steps[i].position;
+		}
+	}
+	return true;
 }
 
 uint RunawayWalkPath::advance(uint elapsed, Common::Point &position, byte &facing) {
@@ -346,6 +379,9 @@ uint RunawayWalkPath::advance(uint elapsed, Common::Point &position, byte &facin
 	while (_elapsed >= kFrameDuration && active()) {
 		_elapsed -= kFrameDuration;
 		const Step &step = _steps[_index++];
+		debugC(3, kDebugPath, "Runaway step %u/%u: (%d,%d) facing %u frame %u -> (%d,%d) facing %u frame %u",
+			_index, _steps.size(), _position.x, _position.y, facing, _frame,
+			step.position.x, step.position.y, step.facing, step.frame);
 		if (step.position != _position || step.facing != facing || step.frame != _frame) {
 			// Native 0x431950 sounds cels 6, 12 and 0, suppressing adjacent contacts.
 			if (!_footContact && (step.frame == 6 || step.frame == 12 || step.frame == 0)) {
diff --git a/engines/hollywood/runaway/navigation.h b/engines/hollywood/runaway/navigation.h
index 4690345abae..d8aedc82cc5 100644
--- a/engines/hollywood/runaway/navigation.h
+++ b/engines/hollywood/runaway/navigation.h
@@ -52,16 +52,17 @@ class RunawayWalkPath {
 public:
 	static const uint kFrameDuration = 60;
 	explicit RunawayWalkPath(Common::Point position = Common::Point()) : _position(position) {}
-	void reset(Common::Point position);
+	void reset(Common::Point position, byte frame = 0);
 	void clear();
 	void findPath(const RunawayWalkMap &map, Common::Point target);
 	void setTarget(Common::Point target);
 	const Common::Array<Common::Point> &points() const { return _points; }
 	// Perspective scales at the starting position and each waypoint.
-	void start(byte facing, byte arrivalFacing, const Common::Array<float> &scales, bool museum = false);
+	void start(byte facing, byte arrivalFacing, const Common::Array<float> &scales, bool museum = false, bool stop = true);
 	// Advance the original 60 ms cels and return the number of foot contacts.
 	uint advance(uint elapsed, Common::Point &position, byte &facing);
 	bool active() const { return _index < _steps.size(); }
+	bool isSingleStep() const;
 	byte frame() const { return _frame; }
 	uint timeToNextFrame() const { return kFrameDuration - _elapsed; }
 
diff --git a/engines/hollywood/runaway/scene.cpp b/engines/hollywood/runaway/scene.cpp
index dc8db495556..f4cdbcda145 100644
--- a/engines/hollywood/runaway/scene.cpp
+++ b/engines/hollywood/runaway/scene.cpp
@@ -19,10 +19,12 @@
  *
  */
 
+#include "common/debug.h"
 #include "common/endian.h"
 #include "common/str-enc.h"
 #include "common/textconsole.h"
 #include "common/util.h"
+#include "hollywood/debug.h"
 #include "hollywood/runaway/navigation.h"
 #include "hollywood/runaway/saveload.h"
 #include "hollywood/runaway/scene.h"
@@ -418,7 +420,9 @@ Common::U32String RunawayRoomScene::actionCaption(byte id, RunawayVerb verb, byt
 	return _strings.text(verb == kVerbLook ? RunawayStrings::kLook : RunawayStrings::kUse) + name;
 }
 
-void RunawayRoomScene::walkTo(Common::Point target, byte facing, bool scripted, bool reserved) {
+void RunawayRoomScene::walkTo(Common::Point target, byte facing, bool scripted, bool reserved, bool stop) {
+	debugC(1, kDebugPath, "Runaway room %u walk: (%d,%d) -> (%d,%d), facing %u -> %u, scripted %u, reserved %u, stop %u",
+		_room, _position.x, _position.y, target.x, target.y, _facing, facing, scripted, reserved, stop);
 	if (scripted) {
 		_walkPath.setTarget(target);
 	} else if (reserved) {
@@ -436,7 +440,16 @@ void RunawayRoomScene::walkTo(Common::Point target, byte facing, bool scripted,
 		scales.push_back(actorWalkScale());
 	}
 	_position = position;
-	_walkPath.start(_facing, facing, scales, _game == kRunawayMuseumDemo);
+	_walkPath.start(_facing, facing, scales, _game == kRunawayMuseumDemo, stop);
+	const byte cursor = actionCursor(_pendingHotspot);
+	if (!stop && !_pendingItem && cursor >= 4 && cursor <= 7 &&
+			_walkPath.isSingleStep() && _walkPath.points()[0] == target) {
+		// WORKAROUND: The original can turn Brian back toward an exit's
+		// exact approach pixel for a single movement cel. He is close enough.
+		debugC(1, kDebugPath, "Runaway room %u: already at exit %u, keeping (%d,%d)",
+			_room, _pendingHotspot, _position.x, _position.y);
+		_walkPath.clear();
+	}
 	if (!_walkPath.active())
 		arrive();
 }
@@ -446,6 +459,8 @@ void RunawayRoomScene::findWalkPath(Common::Point target) {
 }
 
 void RunawayRoomScene::arrive() {
+	debugC(1, kDebugPath, "Runaway room %u arrived: (%d,%d), facing %u, frame %u, hotspot %u, action %u, item %u",
+		_room, _position.x, _position.y, _facing, _walkPath.frame(), _pendingHotspot, _pendingAction, _pendingItem);
 	_arrivalFacing = 0xff;
 	const byte id = _pendingHotspot;
 	_pendingHotspot = 0;
@@ -505,6 +520,7 @@ void RunawayRoomScene::waitForExitClick(uint32 now) {
 void RunawayRoomScene::skipExit(byte id) {
 	if (busy() || !canSkipExit(id))
 		return;
+	debugC(1, kDebugPath, "Runaway room %u skip exit: hotspot %u, position (%d,%d)", _room, id, _position.x, _position.y);
 	_walkPath.clear();
 	_arrivalFacing = 0xff;
 	_pendingHotspot = _pendingItem = 0;
@@ -547,10 +563,12 @@ void RunawayRoomScene::click(Common::Point mouse, RunawayVerb verb, byte item) {
 				approach = restored->approach;
 		}
 		approach = customizeSceneActionApproach(id, index != 0, item, approach);
+		debugC(1, kDebugPath, "Runaway room %u click: hotspot %u, action %u, approach %d, item %u, mouse (%d,%d)",
+			_room, id, _pendingAction, approach, item, mouse.x, mouse.y);
 		if (approach > 0) {
 			const Common::Point position(spot->x, spot->y);
 			const byte facing = approach > 1 ? 0xff : customizeSceneActionFacing(id, spot->facing);
-			walkTo(customizeSceneActionPosition(id, item, position), facing);
+			walkTo(customizeSceneActionPosition(id, item, position), facing, false, false, approach != 3);
 		} else {
 			const byte facing = approach < 0 ? 0xff : runawayFacingTo(_position, sceneActionLookPosition(id));
 			if (shouldUpdateActor() && shouldDrawActor()) {
@@ -1173,7 +1191,9 @@ void RunawayRoomScene::updateActor(uint elapsed, int scrollDirection, bool inven
 	if (!_headMovement.active() && _actionUsesActor && _roomAction && !_actionFrames.empty() && !walking && !speaking()) {
 		_actor.setActionFrame(_actionFrames[_actionStep]);
 	} else if (!bodyIdle) {
-		_actor.setFrame(_facing, walking ? _walkPath.frame() : 0, headFrame);
+		// Walk-through exits retain their last cel until the room changes.
+		const bool exiting = _hospitalExit.scene && !_walkPath.active() && !speaking() && !_roomAction;
+		_actor.setFrame(_facing, walking || exiting ? _walkPath.frame() : 0, headFrame);
 	}
 	if (scrollDirection) {
 		_cameraFollow.reset();
diff --git a/engines/hollywood/runaway/scene.h b/engines/hollywood/runaway/scene.h
index a7163135d07..a3d183462a6 100644
--- a/engines/hollywood/runaway/scene.h
+++ b/engines/hollywood/runaway/scene.h
@@ -220,7 +220,7 @@ protected:
 	bool rebuildBackground();
 	bool applyPatch(uint chunk);
 	void updateMaps();
-	void walkTo(Common::Point target, byte facing = 0xff, bool scripted = false, bool reserved = false);
+	void walkTo(Common::Point target, byte facing = 0xff, bool scripted = false, bool reserved = false, bool stop = true);
 	void arrive();
 	void execute(uint16 action, bool headMoved = false);
 	bool beginActionHeadMovement(uint16 action);
diff --git a/engines/hollywood/runaway/scene6090.cpp b/engines/hollywood/runaway/scene6090.cpp
index 253b4f3f213..11735fe63d7 100644
--- a/engines/hollywood/runaway/scene6090.cpp
+++ b/engines/hollywood/runaway/scene6090.cpp
@@ -88,6 +88,10 @@ void Scene6090::prepareCustomGameplayLoop() {
 }
 
 void Scene6090::runCustomEntrySequence() {
+	// Continue the walking pose from the wide view.
+	_facing = 7;
+	_walkPath.reset(_position, 5);
+	_actor.setFrame(_facing, 5);
 	if (!_town.oscarMet) {
 		walkTo(Common::Point(676, 510), 7);
 		deferTownAction(400);
diff --git a/engines/hollywood/runaway/scene6240.cpp b/engines/hollywood/runaway/scene6240.cpp
index 61cd55f2bbe..c9430307ac7 100644
--- a/engines/hollywood/runaway/scene6240.cpp
+++ b/engines/hollywood/runaway/scene6240.cpp
@@ -134,9 +134,7 @@ void Scene6240::applyCustomHotspotState() {
 
 void Scene6240::runCustomEntrySequence() {
 	if (_entryScene == 6241) {
-		_position = Common::Point(782, 408);
-		_walkPath.reset(_position);
-		walkTo(Common::Point(783, 408), 3, false, true);
+		enterFromStairs();
 	} else {
 		walkTo(Common::Point(88, 403), _town.saloonVisited ? 1 : 3);
 		if (!_town.saloonVisited) {
@@ -145,6 +143,17 @@ void Scene6240::runCustomEntrySequence() {
 	}
 }
 
+void Scene6240::enterFromStairs() {
+	// WORKAROUND: The original's one-pixel horizontal walk turns Brian
+	// sideways before stopping. Settle the entry pose at its destination.
+	_position = Common::Point(783, 408);
+	_facing = 3;
+	_walkPath.reset(_position, 5);
+	_actor.setFrame(_facing, 5);
+	updateCamera();
+	walkTo(_position, _facing, true);
+}
+
 void Scene6240::drawCustomBackgroundComposite(Graphics::ManagedSurface &viewport) {
 	_plantAnimation.draw(viewport, 0, _camera.x, -_camera.y);
 }
diff --git a/engines/hollywood/runaway/scene6240.h b/engines/hollywood/runaway/scene6240.h
index 3b54c5617ce..e6fedc93fdc 100644
--- a/engines/hollywood/runaway/scene6240.h
+++ b/engines/hollywood/runaway/scene6240.h
@@ -34,6 +34,7 @@ public:
 protected:
 	bool loadCustomResources() override;
 	void handleAnimationFrameHook() override;
+	void enterFromStairs();
 	bool removeWateringCan();
 	RunawayAnimation _plantAnimation;
 
diff --git a/engines/hollywood/runaway/scene8090.cpp b/engines/hollywood/runaway/scene8090.cpp
index 41a9de452ae..9cf6d34ff5e 100644
--- a/engines/hollywood/runaway/scene8090.cpp
+++ b/engines/hollywood/runaway/scene8090.cpp
@@ -143,6 +143,10 @@ void Scene8090::runCustomEntrySequence() {
 		deferAction(434);
 		break;
 	default:
+		// Continue the walking pose from the wide view.
+		_facing = 7;
+		_walkPath.reset(_position, 5);
+		_actor.setFrame(_facing, 5);
 		walkTo(Common::Point(837, 550), 7);
 		break;
 	}
diff --git a/engines/hollywood/runaway/scene8130.cpp b/engines/hollywood/runaway/scene8130.cpp
index 4a06e9e9aed..29e9e6c7f67 100644
--- a/engines/hollywood/runaway/scene8130.cpp
+++ b/engines/hollywood/runaway/scene8130.cpp
@@ -87,7 +87,9 @@ void Scene8130::runCustomEntrySequence() {
 	switch (_entryScene) {
 	case 8131: // Return from Mama Dorita's doorway.
 		_position = Common::Point(402, 374);
-		_walkPath.reset(_position);
+		_facing = 5;
+		_walkPath.reset(_position, 5);
+		_actor.setFrame(_facing, 5);
 		walkTo(Common::Point(401, 375), 5);
 		break;
 	case 8132: // See Oscar off on his mission to confront the gangsters.
diff --git a/engines/hollywood/runaway/scene8240.cpp b/engines/hollywood/runaway/scene8240.cpp
index 494775cf2f7..7e73e245ae3 100644
--- a/engines/hollywood/runaway/scene8240.cpp
+++ b/engines/hollywood/runaway/scene8240.cpp
@@ -136,9 +136,7 @@ void Scene8240::runExitSideEffectsAfterLoop() {
 void Scene8240::runCustomEntrySequence() {
 	switch (_entryScene) {
 	case 8241: // Return down the stairs from Saturn's workshop.
-		_position = Common::Point(782, 408);
-		_walkPath.reset(_position);
-		walkTo(Common::Point(783, 408), 3, false, true);
+		enterFromStairs();
 		break;
 	case 8242: // Return from talking to Rutger; inspect the branch if he mentioned yawaskel.
 		_position = Common::Point(395, 402);
diff --git a/engines/hollywood/runaway/scene_data.h b/engines/hollywood/runaway/scene_data.h
index 43c2f2ceed2..68cc7b5aee3 100644
--- a/engines/hollywood/runaway/scene_data.h
+++ b/engines/hollywood/runaway/scene_data.h
@@ -48,7 +48,7 @@ struct RunawayHotspot {
 	int16 x, y;
 	byte facing;
 	uint16 action[2]; // Look, use (or walk); IDs from the original room's action table.
-	int8 approach[2]; // -1: keep facing; 0: face lookPosition; 1: walk and turn; 2/3: walk without turning.
+	int8 approach[2]; // -1: keep facing; 0: face lookPosition; 1: walk and turn; 2: walk and stop; 3: walk through.
 	Common::Point lookPosition;
 	byte actionCursor; // 0: ordinary hotspot; 3: talk; 4..7: northwest, northeast, southeast, southwest.
 	bool preferLook; // Start with look even when the hotspot has a special action cursor.




More information about the Scummvm-git-logs mailing list