[Scummvm-git-logs] scummvm master -> 749480f2e0a0f43d4c5c5d9f2847705aa4593d22

antoniou79 antoniou at cti.gr
Wed Aug 28 20:37:19 CEST 2019


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

Summary:
0486b301e4 BLADERUNNER: Restored - KIA object type for snake, slug, fish
ac3ed34610 BLADERUNNER: Fix restored walkers idle behavior and AI_Movement_Track_Append_With_Facing
749480f2e0 BLADERUNNER: Comment correction after fix for AI_Movement_Track_Append_With_Facing


Commit: 0486b301e43cb63df32ceccc8b65350534f15883
    https://github.com/scummvm/scummvm/commit/0486b301e43cb63df32ceccc8b65350534f15883
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2019-08-28T21:28:02+03:00

Commit Message:
BLADERUNNER: Restored - KIA object type for snake, slug, fish

Changed paths:
    engines/bladerunner/script/init_script.cpp


diff --git a/engines/bladerunner/script/init_script.cpp b/engines/bladerunner/script/init_script.cpp
index 0b8afe1..d13251d 100644
--- a/engines/bladerunner/script/init_script.cpp
+++ b/engines/bladerunner/script/init_script.cpp
@@ -2600,6 +2600,11 @@ void InitScript::Init_CDB() {
 	CDB_Set_Clue_Asset_Type(kClueChessTable, kClueTypeAudioRecording);
 	CDB_Set_Clue_Asset_Type(kClueStaggeredbyPunches, kClueTypeAudioRecording);
 	CDB_Set_Clue_Asset_Type(kClueMaggieBracelet, kClueTypeObject);
+	if (_vm->_cutContent) {
+		CDB_Set_Clue_Asset_Type(kClueGarterSnake, kClueTypeObject);
+		CDB_Set_Clue_Asset_Type(kClueGoldfish, kClueTypeObject);
+		CDB_Set_Clue_Asset_Type(kClueSlug, kClueTypeObject);
+	}
 	CDB_Set_Clue_Asset_Type(kClueEnvelope, kClueTypeObject);
 	CDB_Set_Clue_Asset_Type(kClueIzosFriend, kClueTypePhotograph);
 	CDB_Set_Clue_Asset_Type(kClueChinaBarSecurityPhoto, kClueTypePhotograph);


Commit: ac3ed34610c89911127d1335012583f7e92bccb7
    https://github.com/scummvm/scummvm/commit/ac3ed34610c89911127d1335012583f7e92bccb7
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2019-08-28T21:32:12+03:00

Commit Message:
BLADERUNNER: Fix restored walkers idle behavior and AI_Movement_Track_Append_With_Facing

Changed paths:
    engines/bladerunner/actor.cpp
    engines/bladerunner/script/ai/generic_walker_a.cpp
    engines/bladerunner/script/ai/generic_walker_b.cpp
    engines/bladerunner/script/ai/generic_walker_c.cpp


diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp
index 4f91218..e5933f6 100644
--- a/engines/bladerunner/actor.cpp
+++ b/engines/bladerunner/actor.cpp
@@ -384,6 +384,12 @@ void Actor::movementTrackWaypointReached() {
 			if (!_movementTrackDelayOnNextWaypoint) {
 				_movementTrackDelayOnNextWaypoint = 1;
 			}
+#if !BLADERUNNER_ORIGINAL_BUGS
+			// Honor the heading defined by the AI_Movement_Track_Append_With_Facing method
+			if (_movementTrackNextAngle >= 0) {
+				faceHeading(_movementTrackNextAngle, true);
+			}
+#endif
 			if (_vm->_aiScripts->reachedMovementTrackWaypoint(_id, _movementTrackWalkingToWaypointId)) {
 				int32 delay = _movementTrackDelayOnNextWaypoint;
 				if (delay > 1) {
@@ -657,14 +663,12 @@ bool Actor::tick(bool forceDraw, Common::Rect *screenRect) {
 			_targetFacing = -1;
 
 			bool walkInterrupted = _walkInfo->tick(_id, -positionChange.y, _mustReachWalkDestination);
-
 			Vector3 pos;
 			int facing;
 			_walkInfo->getCurrentPosition(_id, &pos, &facing);
 			setAtXYZ(pos, facing, false, _isMoving, false);
 			if (walkInterrupted) {
 				_vm->_actors[_id]->changeAnimationMode(kAnimationModeIdle);
-
 				movementTrackWaypointReached();
 				if (inCombat()) {
 					changeAnimationMode(_animationModeCombatIdle, false);
@@ -673,6 +677,7 @@ bool Actor::tick(bool forceDraw, Common::Rect *screenRect) {
 				}
 			}
 		} else {
+			// actor is not walking / is idle
 			if (angleChange != 0.0f) {
 				int facingChange = angleChange * (512.0f / M_PI);
 				if (facingChange != 0) {
@@ -687,6 +692,20 @@ bool Actor::tick(bool forceDraw, Common::Rect *screenRect) {
 				}
 			}
 
+			if (_vm->_cutContent) {
+				// the following Generic Walker models don't have an animation Id that is idle
+				// so we use a frame of their walking animation to show them as stopped
+				// However, we also need to override the positionChange vector for their walking animation too
+				if ( (_id == kActorGenwalkerA || _id == kActorGenwalkerB || _id == kActorGenwalkerC)
+				     &&
+				     (_animationId == 436 || _animationId == 434 || _animationId == 435 || _animationId == 422 || _animationId == 423)
+				) {
+					positionChange.x = 0.0f;
+					positionChange.y = 0.0f;
+					positionChange.z = 0.0f;
+				}
+			}
+
 			if (0.0f != positionChange.x || 0.0f != positionChange.y || 0.0f != positionChange.z) {
 				if (_actorSpeed.x != 0.0f) {
 					positionChange.x = positionChange.x * _actorSpeed.x;
diff --git a/engines/bladerunner/script/ai/generic_walker_a.cpp b/engines/bladerunner/script/ai/generic_walker_a.cpp
index d1e0d04..131e7be 100644
--- a/engines/bladerunner/script/ai/generic_walker_a.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_a.cpp
@@ -226,7 +226,14 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) {
 			*animation = 430; // Hooded person with umbrella still
 			break;
 		case 2:
-			*animation = 437; // Hatted lady with wooden umbrella still (different from 436 model!)
+#if BLADERUNNER_ORIGINAL_BUGS
+			// Hatted lady with wooden umbrella still (different from 436 model!)
+			*animation = 437;
+#else
+			// use model 436 and animation frame 4
+			*animation = 436;
+			_animationFrame = 4;
+#endif // BLADERUNNER_ORIGINAL_BUGS
 			break;
 		case 3:
 			*animation = 431; // Person with glasses and beard still
@@ -242,8 +249,8 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) {
 			_animationFrame = 11;
 			break;
 		case 7:
-			*animation = 435; // Child walking // frame 5 could be used for still
-			_animationFrame = 5;
+			*animation = 435; // Child walking // frame 5 or 0 could be used for still
+			_animationFrame = 0;
 			break;
 		case 8:
 			*animation = 422; // Hatted person walking fast // frame 1 could be used for still
@@ -255,7 +262,7 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) {
 			break;
 		}
 		if (!_vm->_cutContent
-		    || Global_Variable_Query(kVariableGenericWalkerAModel) < 6
+		    || (Global_Variable_Query(kVariableGenericWalkerAModel) < 6 && Global_Variable_Query(kVariableGenericWalkerAModel) != 2)
 		) {
 			_animationFrame = 0;
 		}
@@ -328,7 +335,11 @@ bool AIScriptGenericWalkerA::ChangeAnimationMode(int mode) {
 	switch (mode) {
 	case kAnimationModeIdle:
 		_animationState = kGenericWalkerAStatesIdle;
-		_animationFrame = 0;
+		if (!_vm->_cutContent
+		    || (Global_Variable_Query(kVariableGenericWalkerAModel) < 6 && Global_Variable_Query(kVariableGenericWalkerAModel) != 2)
+		) {
+			_animationFrame = 0;
+		}
 		break;
 	case kAnimationModeWalk:
 		_animationState = kGenericWalkerAStatesWalk;
diff --git a/engines/bladerunner/script/ai/generic_walker_b.cpp b/engines/bladerunner/script/ai/generic_walker_b.cpp
index 4f8d4d3..748748b 100644
--- a/engines/bladerunner/script/ai/generic_walker_b.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_b.cpp
@@ -190,7 +190,14 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) {
 			*animation = 430;
 			break;
 		case 2:
+#if BLADERUNNER_ORIGINAL_BUGS
+			// Hatted lady with wooden umbrella still (different from 436 model!)
 			*animation = 437;
+#else
+			// use model 436 and animation frame 4
+			*animation = 436;
+			_animationFrame = 4;
+#endif // BLADERUNNER_ORIGINAL_BUGS
 			break;
 		case 3:
 			*animation = 431;
@@ -206,8 +213,8 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) {
 			_animationFrame = 11;
 			break;
 		case 7:
-			*animation = 435; // Child walking // frame 5 could be used for still
-			_animationFrame = 5;
+			*animation = 435; // Child walking // frame 5 or 0 could be used for still
+			_animationFrame = 0;
 			break;
 		case 8:
 			*animation = 422; // Hatted person walking fast // frame 1 could be used for still
@@ -219,7 +226,7 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) {
 			break;
 		}
 		if (!_vm->_cutContent
-		    || Global_Variable_Query(kVariableGenericWalkerAModel) < 6
+		    || (Global_Variable_Query(kVariableGenericWalkerBModel) < 6 && Global_Variable_Query(kVariableGenericWalkerBModel) != 2)
 		) {
 			_animationFrame = 0;
 		}
@@ -285,7 +292,11 @@ bool AIScriptGenericWalkerB::ChangeAnimationMode(int mode) {
 	switch (mode) {
 	case kAnimationModeIdle:
 		_animationState = kGenericWalkerBStatesIdle;
-		_animationFrame = 0;
+		if (!_vm->_cutContent
+		    || (Global_Variable_Query(kVariableGenericWalkerBModel) < 6 && Global_Variable_Query(kVariableGenericWalkerBModel) != 2)
+		) {
+			_animationFrame = 0;
+		}
 		break;
 	case kAnimationModeWalk:
 		_animationState = kGenericWalkerBStatesWalk;
diff --git a/engines/bladerunner/script/ai/generic_walker_c.cpp b/engines/bladerunner/script/ai/generic_walker_c.cpp
index b92cf71..9a07aff 100644
--- a/engines/bladerunner/script/ai/generic_walker_c.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_c.cpp
@@ -191,7 +191,14 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) {
 			*animation = 430;
 			break;
 		case 2:
+#if BLADERUNNER_ORIGINAL_BUGS
+			// Hatted lady with wooden umbrella still (different from 436 model!)
 			*animation = 437;
+#else
+			// use model 436 and animation frame 4
+			*animation = 436;
+			_animationFrame = 4;
+#endif // BLADERUNNER_ORIGINAL_BUGS
 			break;
 		case 3:
 			*animation = 431;
@@ -207,8 +214,8 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) {
 			_animationFrame = 11;
 			break;
 		case 7:
-			*animation = 435; // Child walking // frame 5 could be used for still
-			_animationFrame = 5;
+			*animation = 435; // Child walking // frame 5 or 0 could be used for still
+			_animationFrame = 0;
 			break;
 		case 8:
 			*animation = 422; // Hatted person walking fast // frame 1 could be used for still
@@ -220,7 +227,7 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) {
 			break;
 		}
 		if (!_vm->_cutContent
-		    || Global_Variable_Query(kVariableGenericWalkerAModel) < 6
+		    || (Global_Variable_Query(kVariableGenericWalkerCModel) < 6 && Global_Variable_Query(kVariableGenericWalkerCModel) != 2)
 		) {
 			_animationFrame = 0;
 		}
@@ -286,7 +293,11 @@ bool AIScriptGenericWalkerC::ChangeAnimationMode(int mode) {
 	switch (mode) {
 	case kAnimationModeIdle:
 		_animationState = kGenericWalkerCStatesIdle;
-		_animationFrame = 0;
+		if (!_vm->_cutContent
+		    || (Global_Variable_Query(kVariableGenericWalkerCModel) < 6 && Global_Variable_Query(kVariableGenericWalkerCModel) != 2)
+		) {
+			_animationFrame = 0;
+		}
 		break;
 	case kAnimationModeWalk:
 		_animationState = kGenericWalkerCStatesWalk;


Commit: 749480f2e0a0f43d4c5c5d9f2847705aa4593d22
    https://github.com/scummvm/scummvm/commit/749480f2e0a0f43d4c5c5d9f2847705aa4593d22
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2019-08-28T21:35:09+03:00

Commit Message:
BLADERUNNER: Comment correction after fix for AI_Movement_Track_Append_With_Facing

Changed paths:
    engines/bladerunner/actor.h


diff --git a/engines/bladerunner/actor.h b/engines/bladerunner/actor.h
index 01f2638..a73d863 100644
--- a/engines/bladerunner/actor.h
+++ b/engines/bladerunner/actor.h
@@ -89,7 +89,7 @@ private:
 	bool   _movementTrackPaused;
 	int    _movementTrackNextWaypointId;
 	int32  _movementTrackNextDelay;  // probably not used
-	int    _movementTrackNextAngle;  // probably not used
+	int    _movementTrackNextAngle;  // fixed: used for AI_Movement_Track_Append_With_Facing - original: probably not used
 	bool   _movementTrackNextRunning;
 
 	int    _movementTrackWalkingToWaypointId;





More information about the Scummvm-git-logs mailing list