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

bluegr noreply at scummvm.org
Tue Aug 23 18:44:10 UTC 2022


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

Summary:
6884be9b7f Revert "SCUMM: FREDDI4: workaround lipsync issues in final scene"
d0a0070d85 SCUMM: FREDDI4: fix lipsync issues


Commit: 6884be9b7fe4099ddd40baceef7fc1e15b4b5e36
    https://github.com/scummvm/scummvm/commit/6884be9b7fe4099ddd40baceef7fc1e15b4b5e36
Author: BLooperZ (blooperz at users.noreply.github.com)
Date: 2022-08-23T21:44:05+03:00

Commit Message:
Revert "SCUMM: FREDDI4: workaround lipsync issues in final scene"

This reverts commit 16955a15f16a10fddef1391cfe23bb292000af21.

Changed paths:
    engines/scumm/akos.cpp
    engines/scumm/he/script_v72he.cpp


diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp
index 81a171ee89b..87b8bb82085 100644
--- a/engines/scumm/akos.cpp
+++ b/engines/scumm/akos.cpp
@@ -1463,13 +1463,6 @@ bool ScummEngine_v6::akos_increaseAnim(Actor *a, int chan, const byte *aksq, con
 			case AKC_C0A0:
 			case AKC_C0A1:
 			case AKC_C0A2:
-				// WORKAROUND bug #3533 luther does not moves his lips on subsequent sentences (only the first one).
-				// we skip the opcode instruction until all lines are said.
-				if (_game.id == GID_FREDDI4 && _currentRoom == 43 && a->_costume == 809 && code == AKC_C0A1 && a->getAnimVar(23) > 0) {
-					a->setAnimVar(23, a->getAnimVar(23) - 1);
-					((ActorHE *)a)->_heTalking = true;
-					break;
-				}
 				curpos += 4;
 				break;
 			case AKC_ComplexChan2:
@@ -1535,15 +1528,6 @@ bool ScummEngine_v6::akos_increaseAnim(Actor *a, int chan, const byte *aksq, con
 		case AKC_JumpL:
 		case AKC_JumpNE:
 		case AKC_JumpE:
-			// WORKAROUND bug #3533 when freddi talks in multiple sentences, she moves her lips on the first sequence.
-			// then luther moves his lips on the second and the rest are disembodied.
-			// we force the comparison (loop to start of freddi's lips) until all lines are said.
-			if (_game.id == GID_FREDDI4 && _currentRoom == 43 && a->_costume == 809 && a->getAnimVar(25) > 0) {
-				a->setAnimVar(25, a->getAnimVar(25) - 1);
-				curpos = GUW(2);
-				break;
-			}
-
 			if (akos_compare(a->getAnimVar(GB(4)), GW(5), code - AKC_JumpStart) != 0) {
 				curpos = GUW(2);
 				break;
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 4cfaa11893e..b12acea0205 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -793,12 +793,6 @@ void ScummEngine_v72he::o72_actorOps() {
 		k = getStackList(args, ARRAYSIZE(args));
 		for (i = 0; i < k; ++i) {
 			a->setUserCondition(args[i] & 0x7F, args[i] & 0x80);
-			// WORKAROUND bug #3533 luther does not moves his lips on subsequent sentences (only the first one).
-			// we skip the opcode instruction until all lines are said.
-			// The animation var is set to the number of lines minus 1.
-			if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && args[i] == 130  && vm.slot[_currentScript].offs != 84203) {
-				a->setAnimVar(23, vm.slot[_currentScript].offs == 79584 ? 2 : 1);
-			}
 		}
 		break;
 	case 24: 		// SO_TALK_CONDITION (HE 80+)
@@ -837,13 +831,6 @@ void ScummEngine_v72he::o72_actorOps() {
 		break;
 	case 76:		// SO_COSTUME
 		a->setActorCostume(pop());
-		// WORKAROUND bug #3533 when freddi talks in multiple sentences, she moves her lips on the first sequence.
-		// then luther moves his lips on the second and the rest are disembodied.
-		// we force the comparison (loop to start of freddi's lips) until all lines are said.
-		// The animation var is set to the number of lines minus 1.
-		if (_game.id == GID_FREDDI4 && _currentRoom == 43 && a->_costume == 809) {
-			a->setAnimVar(25, vm.slot[_currentScript].offs == 105213 ? 3 : 1);
-		}
 		break;
 	case 77:		// SO_STEP_DIST
 		j = pop();


Commit: d0a0070d85c8e61f57c96d386ab6334ac5e575e8
    https://github.com/scummvm/scummvm/commit/d0a0070d85c8e61f57c96d386ab6334ac5e575e8
Author: BLooperZ (blooperz at users.noreply.github.com)
Date: 2022-08-23T21:44:05+03:00

Commit Message:
SCUMM: FREDDI4: fix lipsync issues

Changed paths:
    engines/scumm/actor.cpp
    engines/scumm/akos.cpp
    engines/scumm/scumm.h


diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index fdce7a09abc..ffbba935ac0 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -3064,14 +3064,20 @@ void ScummEngine::stopTalk() {
 		}
 		if (_game.version <= 7 && _game.heversion == 0)
 			setTalkingActor(0xFF);
-		if (_game.heversion != 0)
-			((ActorHE *)a)->_heTalking = false;
+		if (_game.heversion != 0) {
+			if (_game.heversion == 98 && _game.id == GID_FREDDI4) {
+				// Delay unsetting _heTalking to next sound frame. fixes bug #3533.
+				_actorShouldStopTalking = true;
+			} else {
+				((ActorHE *)a)->_heTalking = true;
+			}
+		}
 	}
 
 	if ((_game.id == GID_DIG && !(_game.features & GF_DEMO)) || _game.id == GID_CMI) {
 		setTalkingActor(0);
 		VAR(VAR_HAVE_MSG) = 0;
-	} else if (_game.heversion >= 60) {
+	} else if (_game.heversion >= 60 && !_actorShouldStopTalking) {
 		setTalkingActor(0);
 	}
 
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp
index 87b8bb82085..d4fe525a787 100644
--- a/engines/scumm/akos.cpp
+++ b/engines/scumm/akos.cpp
@@ -1813,6 +1813,13 @@ void ScummEngine_v6::akos_processQueue() {
 			error("akos_queCommand(%d,%d,%d,%d)", cmd, a->_number, param_1, param_2);
 		}
 	}
+
+	if (_game.heversion == 98 && _game.id == GID_FREDDI4 && _actorShouldStopTalking) {
+		Actor *a = derefActor(getTalkingActor(), "ScummEngine_v6::akos_processQueue()");
+		((ActorHE *)a)->_heTalking = false;
+		setTalkingActor(0);
+		_actorShouldStopTalking = false;
+	}
 }
 
 #ifdef ENABLE_SCUMM_7_8
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 3616d2580fa..deef202d45e 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -1257,6 +1257,7 @@ protected:
 	byte _charsetBuffer[512];
 
 	bool _keepText = false;
+	bool _actorShouldStopTalking = false;
 	byte _msgCount = 0;
 
 	int _nextLeft = 0, _nextTop = 0;




More information about the Scummvm-git-logs mailing list