[Scummvm-git-logs] scummvm master -> 1ddb99296c31e6b486759d39075e4ba3e2b2b963

antoniou79 a.antoniou79 at gmail.com
Sun Dec 13 20:18:07 UTC 2020


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

Summary:
1ddb99296c BLADERUNNER: RESTOREDCONTENT: Restore HysteriaPatron3 dancer


Commit: 1ddb99296c31e6b486759d39075e4ba3e2b2b963
    https://github.com/scummvm/scummvm/commit/1ddb99296c31e6b486759d39075e4ba3e2b2b963
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2020-12-13T22:14:39+02:00

Commit Message:
BLADERUNNER: RESTOREDCONTENT: Restore HysteriaPatron3 dancer

For the time being both dancers will be shown in NR05

One needs to start a new (restored content) game to get the second dancer,
because her positioning code is in her Initialize() (as in HysteriaPatron2).
Maybe in the future we will allow only one dancer to appear there
choosing them with a random chance.

Changed paths:
    engines/bladerunner/game_constants.h
    engines/bladerunner/script/ai/hysteria_patron3.cpp
    engines/bladerunner/script/scene/nr05.cpp


diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 44fdd3f4e5..1dd39c4be7 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -2142,9 +2142,9 @@ enum GameModelAnimations {
 	kModelGenWalkerChild                                    = 435, // Walking  - Frame 0 (or 5) used for standing still
 	kModelGenWalkerHattedPersonWithWoodenUmbrella           = 436, // Walking  - Frame 4 used for standing still 
 	kModelGenWalkerHattedLadyWithWoodenUmbrellaStandsStill  = 437, // Standing - *Not the same model with 436* - Just single frame
-	// 438 - 439: Dancer model animations (UNUSED)
-	kModelAnimationHysteriaPatron3DanceBendBackAndForward = 438, // UNUSED
-	kModelAnimationHysteriaPatron3DanceCrouchAndRaiseUp   = 439, // UNUSED
+	// 438 - 439: Dancer model animations (UNUSED - RESTORED)
+	kModelAnimationHysteriaPatron3DanceHandsDownLeanBackForth = 438, // UNUSED - 27 frames - RESTORED
+	kModelAnimationHysteriaPatron3DanceHandsDownToHandsUp     = 439, // UNUSED - 24 frames - RESTORED (not looping, needs to be subsequently reversed to loop)
 	//       440: Tracking Gun (At Bullet Bob's shop)
 	kModelAnimationBulletBobsTrackingGun         = 440,
 	// 441 - 450: Shooting range targets
@@ -2490,9 +2490,9 @@ enum GameModelAnimations {
 	kModelAnimationHysteriaPatron2DanceHandsUpSitAndUp        = 887,
 	kModelAnimationHysteriaPatron2DanceHandsDownHipsSwirl     = 888,
 	kModelAnimationHysteriaPatron2DanceHandsDownLegSwirl      = 889,
-	kModelAnimationHysteriaPatron2DanceHandsDownLeanBackForth = 890,
+	kModelAnimationHysteriaPatron2DanceHandsDownLeanBackForth = 890, // 27 frames - same motion as 438 for Patron3Dance
 	kModelAnimationHysteriaPatron2DanceHandsUpToHandsDown     = 891,
-	kModelAnimationHysteriaPatron2DanceHandsDownToHandsUp     = 892,
+	kModelAnimationHysteriaPatron2DanceHandsDownToHandsUp     = 892, // 24 frames - same motion as 439 for Patron3Dance
 	// 893 - 900: Mutant 1 animations - Special with pipe
 	kModelAnimationMutant1Walking              = 893,
 	kModelAnimationMutant1Idle                 = 894,
diff --git a/engines/bladerunner/script/ai/hysteria_patron3.cpp b/engines/bladerunner/script/ai/hysteria_patron3.cpp
index 7de99fb8c8..7de1a6a864 100644
--- a/engines/bladerunner/script/ai/hysteria_patron3.cpp
+++ b/engines/bladerunner/script/ai/hysteria_patron3.cpp
@@ -32,6 +32,10 @@ void AIScriptHysteriaPatron3::Initialize() {
 	_animationState = 0;
 	_animationStateNext = 0;
 	_animationNext = 0;
+	if (_vm->_cutContent) {
+		Actor_Put_In_Set(kActorHysteriaPatron3, kSetNR05_NR08);
+		Actor_Set_At_XYZ(kActorHysteriaPatron3, -490.0f, 0.0f, -210.0f, 252);
+	}
 }
 
 bool AIScriptHysteriaPatron3::Update() {
@@ -51,6 +55,10 @@ void AIScriptHysteriaPatron3::ReceivedClue(int clueId, int fromActorId) {
 }
 
 void AIScriptHysteriaPatron3::ClickedByPlayer() {
+	if (_vm->_cutContent) {
+		Actor_Face_Actor(kActorMcCoy, kActorHysteriaPatron3, true);
+		Actor_Says(kActorMcCoy, 8935, kAnimationModeTalk);
+	}
 	//return false;
 }
 
@@ -90,7 +98,44 @@ bool AIScriptHysteriaPatron3::GoalChanged(int currentGoalNumber, int newGoalNumb
 	return false;
 }
 
+const int kAnimationsCount = 3;
+const int animationList[kAnimationsCount] = {
+	kModelAnimationHysteriaPatron3DanceHandsDownLeanBackForth,
+	kModelAnimationHysteriaPatron3DanceHandsDownToHandsUp,
+	kModelAnimationHysteriaPatron3DanceHandsDownToHandsUp,
+};
+
 bool AIScriptHysteriaPatron3::UpdateAnimation(int *animation, int *frame) {
+	if (_vm->_cutContent) {
+		*animation = animationList[_animationState];
+
+		if (_animationState == 2) {
+			--_animationFrame;
+			if (_animationFrame == 0) {
+				_animationState = Random_Query(0, 1); // restart the cycle from 0 or 1 state
+				_animationFrame = 0;
+				*animation = animationList[_animationState];
+			}
+		} else {
+			++_animationFrame;
+			if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
+				_animationFrame = 0;
+
+				if (_animationState == 0 && Random_Query(0, 2) == 0) {
+					_animationState = 0; // restart same 0 state, with a small random chance
+				} else {
+					++_animationState;
+					if (_animationState == 2) {
+						_animationFrame = Slice_Animation_Query_Number_Of_Frames(animationList[_animationState]) - 1;
+					} else if (_animationState >= kAnimationsCount) {
+						_animationState = Random_Query(0, 1); // restart the cycle from 0 or 1 state
+					}
+				}
+				*animation = animationList[_animationState];
+			}
+		}
+		*frame = _animationFrame;
+	}
 	return true;
 }
 
diff --git a/engines/bladerunner/script/scene/nr05.cpp b/engines/bladerunner/script/scene/nr05.cpp
index 9ff1a5b5fb..9151ae2acf 100644
--- a/engines/bladerunner/script/scene/nr05.cpp
+++ b/engines/bladerunner/script/scene/nr05.cpp
@@ -180,6 +180,9 @@ void SceneScriptNR05::SceneFrameAdvanced(int frame) {
 	}
 
 	rotateActorOnGround(kActorHysteriaPatron2);
+	if (_vm->_cutContent) {
+		rotateActorOnGround(kActorHysteriaPatron3);
+	}
 	rotateActorOnGround(kActorMcCoy);
 
 	if (Actor_Query_Goal_Number(kActorEarlyQ) == kGoalEarlyQNR05UnlockNR08) {




More information about the Scummvm-git-logs mailing list