[Scummvm-git-logs] scummvm master -> f0b637ff6de9aac21494f0d165df12f42c8dd35c
antoniou79
a.antoniou79 at gmail.com
Fri Dec 11 21:05:12 UTC 2020
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:
c0379f45df BLADERUNNER: Cleanup switch statements for AI scripts
f0b637ff6d BLADERUNNER: More animation descriptions and notes
Commit: c0379f45df5da73d3f0401a59d1ee6d8ccc3252c
https://github.com/scummvm/scummvm/commit/c0379f45df5da73d3f0401a59d1ee6d8ccc3252c
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2020-12-11T23:02:58+02:00
Commit Message:
BLADERUNNER: Cleanup switch statements for AI scripts
Changed paths:
engines/bladerunner/script/ai/bullet_bob.cpp
engines/bladerunner/script/ai/chew.cpp
engines/bladerunner/script/ai/clovis.cpp
engines/bladerunner/script/ai/crazylegs.cpp
engines/bladerunner/script/ai/dektora.cpp
engines/bladerunner/script/ai/desk_clerk.cpp
engines/bladerunner/script/ai/early_q.cpp
engines/bladerunner/script/ai/fish_dealer.cpp
engines/bladerunner/script/ai/free_slot_a.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
engines/bladerunner/script/ai/gordo.cpp
engines/bladerunner/script/ai/grigorian.cpp
engines/bladerunner/script/ai/guzza.cpp
engines/bladerunner/script/ai/hasan.cpp
engines/bladerunner/script/ai/howie_lee.cpp
engines/bladerunner/script/ai/insect_dealer.cpp
engines/bladerunner/script/ai/isabella.cpp
engines/bladerunner/script/ai/izo.cpp
engines/bladerunner/script/ai/klein.cpp
engines/bladerunner/script/ai/leon.cpp
engines/bladerunner/script/ai/lucy.cpp
engines/bladerunner/script/ai/maggie.cpp
engines/bladerunner/script/ai/mccoy.cpp
engines/bladerunner/script/ai/mutant1.cpp
engines/bladerunner/script/ai/mutant2.cpp
engines/bladerunner/script/ai/mutant3.cpp
engines/bladerunner/script/ai/officer_grayford.cpp
engines/bladerunner/script/ai/officer_leary.cpp
engines/bladerunner/script/ai/rachael.cpp
engines/bladerunner/script/ai/runciter.cpp
engines/bladerunner/script/ai/sadik.cpp
engines/bladerunner/script/ai/sergeant_walls.cpp
engines/bladerunner/script/ai/shoeshine_man.cpp
engines/bladerunner/script/ai/steele.cpp
engines/bladerunner/script/ai/transient.cpp
engines/bladerunner/script/ai/tyrell.cpp
engines/bladerunner/script/ai/tyrell_guard.cpp
engines/bladerunner/script/ai/zuben.cpp
diff --git a/engines/bladerunner/script/ai/bullet_bob.cpp b/engines/bladerunner/script/ai/bullet_bob.cpp
index 34d0ebbd03..b07d3ae709 100644
--- a/engines/bladerunner/script/ai/bullet_bob.cpp
+++ b/engines/bladerunner/script/ai/bullet_bob.cpp
@@ -445,7 +445,9 @@ bool AIScriptBulletBob::ChangeAnimationMode(int mode) {
break;
case kAnimationModeTalk:
+ // fall through
case 9:
+ // fall through
case 30:
if (_animationState < 6 || _animationState > 13) {
_animationState = 15;
@@ -467,6 +469,7 @@ bool AIScriptBulletBob::ChangeAnimationMode(int mode) {
break;
case 10:
+ // fall through
case 31:
if (_animationState < 6 || _animationState > 13) {
_animationState = 15;
@@ -476,6 +479,7 @@ bool AIScriptBulletBob::ChangeAnimationMode(int mode) {
break;
case 11:
+ // fall through
case 33:
if (_animationState < 6 || _animationState > 13) {
_animationState = 15;
@@ -485,6 +489,7 @@ bool AIScriptBulletBob::ChangeAnimationMode(int mode) {
break;
case kAnimationModeHit:
+ // fall through
case kAnimationModeCombatHit:
_animationState = 3;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/chew.cpp b/engines/bladerunner/script/ai/chew.cpp
index 888c4a63b3..bfaeb60092 100644
--- a/engines/bladerunner/script/ai/chew.cpp
+++ b/engines/bladerunner/script/ai/chew.cpp
@@ -315,16 +315,25 @@ bool AIScriptChew::ChangeAnimationMode(int mode) {
switch (_animationState) {
case 0:
return true;
+
case 2:
+ // fall through
case 3:
+ // fall through
case 4:
+ // fall through
case 5:
+ // fall through
case 6:
+ // fall through
case 7:
+ // fall through
case 8:
+ // fall through
case 9:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
default:
_animationState = 0;
_var2 = 0;
diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp
index e00323fc86..8104c9dc8f 100644
--- a/engines/bladerunner/script/ai/clovis.cpp
+++ b/engines/bladerunner/script/ai/clovis.cpp
@@ -215,32 +215,52 @@ int AIScriptClovis::GetFriendlinessModifierIfGetsClue(int otherActorId, int clue
switch (clueId) {
case kClueMcCoyKilledRunciter1:
+ // fall through
case kClueMcCoyKilledRunciter2:
return 6;
+
case kClueMcCoyIsABladeRunner:
+ // fall through
case kClueMcCoyIsStupid:
+ // fall through
case kClueMcCoyIsAnnoying:
return -2;
+
case kClueMcCoyLetZubenEscape:
+ // fall through
case kClueMcCoyHelpedIzoIzoIsAReplicant:
+ // fall through
case kClueMcCoyHelpedDektora:
+ // fall through
case kClueMcCoyHelpedLucy:
+ // fall through
case kClueMcCoyHelpedGordo:
+ // fall through
case kClueMcCoyShotGuzza:
+ // fall through
case kClueMcCoyIsKind:
return 4;
+
case kClueMcCoyWarnedIzo:
return 2;
+
case kClueMcCoyRetiredZuben:
return -3;
+
case kClueMcCoyRetiredLucy:
+ // fall through
case kClueMcCoyRetiredDektora:
return -10;
+
case kClueMcCoyRetiredSadik:
+ // fall through
case kClueMcCoyShotZubenInTheBack:
+ // fall through
case kClueMcCoyRetiredLutherLance:
+ // fall through
case kClueMcCoyIsInsane:
return -5;
+
default:
break;
}
@@ -1263,24 +1283,35 @@ bool AIScriptClovis::ChangeAnimationMode(int mode) {
case 2:
Actor_Change_Animation_Mode(kActorClovis, kAnimationModeSit);
break;
+
case 4:
break;
+
case 5:
+ // fall through
case 6:
+ // fall through
case 7:
+ // fall through
case 8:
+ // fall through
case 9:
+ // fall through
case 10:
+ // fall through
case 11:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
case 12:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
case 13:
_animationState = 15;
_animationFrame = 0;
break;
+
default:
_animationState = 0;
_animationFrame = 0;
@@ -1300,6 +1331,7 @@ bool AIScriptClovis::ChangeAnimationMode(int mode) {
break;
case kAnimationModeTalk:
+ // fall through
case 9:
if (Game_Flag_Query(kFlagClovisLyingDown)) {
_animationFrame = 0;
@@ -1317,15 +1349,21 @@ bool AIScriptClovis::ChangeAnimationMode(int mode) {
case kAnimationModeCombatIdle:
switch (_animationState) {
case 13:
+ // fall through
case 14:
break;
+
case 23:
+ // fall through
case 24:
+ // fall through
case 27:
+ // fall through
case 28:
_animationState = 13;
_animationFrame = 0;
break;
+
default:
_animationState = 1;
_animationStateNext = 14;
@@ -1350,6 +1388,7 @@ bool AIScriptClovis::ChangeAnimationMode(int mode) {
break;
case 10:
+ // fall through
case 12:
if (_animationState < 5 || _animationState > 11) {
_animationState = 1;
@@ -1360,6 +1399,7 @@ bool AIScriptClovis::ChangeAnimationMode(int mode) {
break;
case 11:
+ // fall through
case 14:
if (_animationState < 5 || _animationState > 11) {
_animationState = 1;
@@ -1491,6 +1531,7 @@ bool AIScriptClovis::ChangeAnimationMode(int mode) {
_animationState = 3;
_animationFrame = 0;
break;
+
default:
break;
}
@@ -1564,24 +1605,35 @@ void AIScriptClovis::someAnim() {
case 2:
Actor_Change_Animation_Mode(kActorClovis, kAnimationModeSit);
break;
+
case 4:
break;
+
case 5:
+ // fall through
case 6:
+ // fall through
case 7:
+ // fall through
case 8:
+ // fall through
case 9:
+ // fall through
case 10:
+ // fall through
case 11:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
case 12:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
case 13:
_animationState = 15;
_animationFrame = 0;
break;
+
default:
_animationState = 0;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/crazylegs.cpp b/engines/bladerunner/script/ai/crazylegs.cpp
index ae34a37eeb..aa33abf888 100644
--- a/engines/bladerunner/script/ai/crazylegs.cpp
+++ b/engines/bladerunner/script/ai/crazylegs.cpp
@@ -369,20 +369,24 @@ bool AIScriptCrazylegs::ChangeAnimationMode(int mode) {
// fall through
case 3:
return true;
+
case kCrazylegsStateHandsUp:
_animationState = 17;
_animationFrame = 0;
break;
+
case kCrazylegsStateMobileCall:
_animationState = 19;
_animationFrame = 0;
break;
+
case 4:
// fall through
case 5:
_animationState = kCrazylegsStateIdle;
_animationFrame = 0;
break;
+
case 6:
// fall through
case 7:
@@ -404,14 +408,17 @@ bool AIScriptCrazylegs::ChangeAnimationMode(int mode) {
case 15:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
default:
break;
}
break;
+
case kAnimationModeWalk:
_animationState = 4;
_animationFrame = 0;
break;
+
case kAnimationModeTalk:
if (_animationState == kCrazylegsStateMobileCall) {
_animationState = 15;
@@ -421,50 +428,60 @@ bool AIScriptCrazylegs::ChangeAnimationMode(int mode) {
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 12:
_animationState = 7;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 13:
_animationState = 8;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 14:
_animationState = 9;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 15:
_animationState = 10;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 16:
_animationState = 11;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 17:
_animationState = 12;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 18:
_animationState = 13;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 19:
_animationState = 14;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 23:
_animationState = 3;
_animationFrame = 0;
break;
+
case 43:
// picks up mobile phone call
if (_animationState != kCrazylegsStateMobileCall) {
@@ -472,6 +489,7 @@ bool AIScriptCrazylegs::ChangeAnimationMode(int mode) {
_animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationCrazylegsHangsUpMobile) - 1;
}
break;
+
default:
break;
}
diff --git a/engines/bladerunner/script/ai/dektora.cpp b/engines/bladerunner/script/ai/dektora.cpp
index 0220782121..e7b7b455e1 100644
--- a/engines/bladerunner/script/ai/dektora.cpp
+++ b/engines/bladerunner/script/ai/dektora.cpp
@@ -282,9 +282,11 @@ bool AIScriptDektora::ShotAtAndHit() {
case 1:
Sound_Play_Speech_Line(kActorDektora, 9000, 65, 0, 99);
break;
+
case 2:
Sound_Play_Speech_Line(kActorDektora, 9005, 65, 0, 99);
break;
+
default:
break;
}
@@ -1148,43 +1150,69 @@ bool AIScriptDektora::ChangeAnimationMode(int mode) {
}
switch (_animationState) {
case 2:
+ // fall through
case 3:
+ // fall through
case 4:
+ // fall through
case 5:
+ // fall through
case 6:
+ // fall through
case 7:
+ // fall through
case 8:
+ // fall through
case 27:
+ // fall through
case 28:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
case 9:
+ // fall through
case 10:
+ // fall through
case 12:
+ // fall through
case 13:
+ // fall through
case 14:
+ // fall through
case 15:
+ // fall through
case 16:
+ // fall through
case 17:
_animationState = 11;
_animationFrame = 0;
break;
+
case 11:
+ // fall through
case 18:
+ // fall through
case 19:
+ // fall through
case 20:
+ // fall through
case 26:
+ // fall through
case 29:
+ // fall through
case 30:
break;
+
case 25:
_animationState = 25;
_animationFrame = 0;
break;
+
case 31:
_animationState = 31;
_animationFrame = 0;
break;
+
default:
_animationState = 0;
_animationFrame = 0;
@@ -1220,20 +1248,28 @@ bool AIScriptDektora::ChangeAnimationMode(int mode) {
case kAnimationModeCombatIdle:
switch (_animationState) {
case 9:
+ // fall through
case 10:
+ // fall through
case 16:
+ // fall through
case 17:
break;
+
case 25:
+ // fall through
case 27:
+ // fall through
case 28:
_animationState = 29;
_animationFrame = 0;
break;
+
case 31:
_animationState = 30;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationDektoraSittingPullingGunOut) - 1;
break;
+
default:
_animationState = 10;
_animationFrame = 0;
@@ -1335,11 +1371,17 @@ bool AIScriptDektora::ChangeAnimationMode(int mode) {
}
switch (_animationState) {
case 9:
+ // fall through
case 10:
+ // fall through
case 11:
+ // fall through
case 12:
+ // fall through
case 13:
+ // fall through
case 16:
+ // fall through
case 17:
if (Random_Query(0, 1) == 1) {
_animationState = 14;
@@ -1347,7 +1389,9 @@ bool AIScriptDektora::ChangeAnimationMode(int mode) {
_animationState = 15;
}
break;
+
case 14:
+ // fall through
case 15:
if (Random_Query(0, 1) == 1) {
_animationState = 18;
@@ -1355,6 +1399,7 @@ bool AIScriptDektora::ChangeAnimationMode(int mode) {
_animationState = 19;
}
break;
+
default:
break;
}
@@ -1410,14 +1455,20 @@ bool AIScriptDektora::ChangeAnimationMode(int mode) {
case 53:
switch (_animationState) {
case 26:
+ // fall through
case 29:
+ // fall through
case 30:
+ // fall through
case 31:
break;
+
case 27:
+ // fall through
case 28:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
default:
_animationState = 25;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/desk_clerk.cpp b/engines/bladerunner/script/ai/desk_clerk.cpp
index 2f8b21af68..ed82e370a4 100644
--- a/engines/bladerunner/script/ai/desk_clerk.cpp
+++ b/engines/bladerunner/script/ai/desk_clerk.cpp
@@ -129,6 +129,7 @@ bool AIScriptDeskClerk::GoalChanged(int currentGoalNumber, int newGoalNumber) {
_animationState = 0;
#endif // BLADERUNNER_ORIGINAL_BUGS
break;
+
case kGoalDeskClerkKnockedOut:
// fall through
case kGoalDeskClerkGone:
@@ -302,9 +303,13 @@ bool AIScriptDeskClerk::ChangeAnimationMode(int mode) {
break;
case 1:
+ // fall through
case 2:
+ // fall through
case 3:
+ // fall through
case 4:
+ // fall through
case 5:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
diff --git a/engines/bladerunner/script/ai/early_q.cpp b/engines/bladerunner/script/ai/early_q.cpp
index dd10663fc3..744e169568 100644
--- a/engines/bladerunner/script/ai/early_q.cpp
+++ b/engines/bladerunner/script/ai/early_q.cpp
@@ -131,6 +131,7 @@ void AIScriptEarlyQ::CompletedMovementTrack() {
break;
case 1:
+ // fall through
case 2:
Actor_Set_Goal_Number(kActorEarlyQ, 0);
break;
@@ -860,20 +861,31 @@ bool AIScriptEarlyQ::ChangeAnimationMode(int mode) {
break;
case 10:
+ // fall through
case 20:
+ // fall through
case 21:
+ // fall through
case 22:
+ // fall through
case 23:
+ // fall through
case 24:
+ // fall through
case 25:
+ // fall through
case 26:
+ // fall through
case 27:
+ // fall through
case 28:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
case 12:
+ // fall through
case 13:
+ // fall through
case 15:
_animationState = 14;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/fish_dealer.cpp b/engines/bladerunner/script/ai/fish_dealer.cpp
index 680f09a276..f811be6c31 100644
--- a/engines/bladerunner/script/ai/fish_dealer.cpp
+++ b/engines/bladerunner/script/ai/fish_dealer.cpp
@@ -281,11 +281,17 @@ bool AIScriptFishDealer::ChangeAnimationMode(int mode) {
break;
case 3:
+ // fall through
case 14:
+ // fall through
case 15:
+ // fall through
case 16:
+ // fall through
case 17:
+ // fall through
case 18:
+ // fall through
case 19:
_animationState = Random_Query(0, 2) + 1;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/free_slot_a.cpp b/engines/bladerunner/script/ai/free_slot_a.cpp
index 968b0620c1..2cd9df1259 100644
--- a/engines/bladerunner/script/ai/free_slot_a.cpp
+++ b/engines/bladerunner/script/ai/free_slot_a.cpp
@@ -510,6 +510,7 @@ bool AIScriptFreeSlotA::UpdateAnimation(int *animation, int *frame) {
*animation = kModelAnimationRatDying;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationRatDying) - 1;
break;
+
default:
break;
}
diff --git a/engines/bladerunner/script/ai/generic_walker_a.cpp b/engines/bladerunner/script/ai/generic_walker_a.cpp
index a80bdf5062..8ad077ee51 100644
--- a/engines/bladerunner/script/ai/generic_walker_a.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_a.cpp
@@ -61,11 +61,13 @@ bool AIScriptGenericWalkerA::Update() {
return true;
}
break;
+
case kGoalGenwalkerMoving:
if (deltaX != 0.0f || deltaZ != 0.0f) {
movingUpdate();
}
break;
+
case kGoalGenwalkerABulletBobsTrackGun: // Automatic gun at Bullet Bob
Actor_Face_Actor(kActorGenwalkerA, kActorMcCoy, true);
break;
@@ -118,30 +120,39 @@ void AIScriptGenericWalkerA::ClickedByPlayer() {
case 1:
Actor_Says(kActorMcCoy, 365, 3);
break;
+
case 2:
Actor_Says(kActorMcCoy, 755, 3);
break;
+
case 3:
Actor_Says(kActorMcCoy, 940, 3);
break;
+
case 4:
Actor_Says(kActorMcCoy, 4560, 3);
break;
+
case 5:
Actor_Says(kActorMcCoy, 4870, 3);
break;
+
case 6:
Actor_Says(kActorMcCoy, 5125, 3);
break;
+
case 7:
Actor_Says(kActorMcCoy, 8450, 3);
break;
+
case 8:
Actor_Says(kActorMcCoy, 1085, 3);
break;
+
case 9:
Actor_Says(kActorMcCoy, 365, 3); // Re-used line, same as case 1
break;
+
case 10:
Actor_Says(kActorMcCoy, 7415, 3);
break;
@@ -222,9 +233,11 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) {
case 0:
*animation = 426; // Hatted Person with umbrella still
break;
+
case 1:
*animation = 430; // Hooded person with umbrella still
break;
+
case 2:
#if BLADERUNNER_ORIGINAL_BUGS
// Hatted lady with wooden umbrella still (different from 436 model!)
@@ -235,27 +248,34 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 4;
#endif // BLADERUNNER_ORIGINAL_BUGS
break;
+
case 3:
*animation = 431; // Person with glasses and beard still
break;
+
case 4:
*animation = 427; // Hatted Person without umbrella still
break;
+
case 5:
*animation = 433; // Punk person with glasses still
break;
+
case 6:
*animation = 434; // Hatted child walking // frame 11 could be used for still
_animationFrame = 11;
break;
+
case 7:
*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
_animationFrame = 1;
break;
+
case 9:
*animation = 423; // Hatted person walking lowered face // frame 6 could be used for still
_animationFrame = 6;
@@ -267,35 +287,45 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case kGenericWalkerAStatesWalk:
switch (Global_Variable_Query(kVariableGenericWalkerAModel)) {
case 0:
*animation = 424; // Hatted person with umbrella walking
break;
+
case 1:
*animation = 428; // Hooded person with umbrella walking
break;
+
case 2:
*animation = 436; // Hatted person with wooden umbrella walking
break;
+
case 3:
*animation = 429; // Person with glasses and beard walking
break;
+
case 4:
*animation = 425; // Hatted Person without umbrella - walking small steps
break;
+
case 5:
*animation = 432; // Punk person with glasses walking
break;
+
case 6:
*animation = 434; // Hatted child walking
break;
+
case 7:
*animation = 435; // Child walking
break;
+
case 8:
*animation = 422; // Hatted person walking fast
break;
+
case 9:
*animation = 423; // Hatted person walking lowered face
break;
@@ -305,6 +335,7 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case kGenericWalkerAStatesDie:
// This is an animation for Maggie (exploding) but is also used for generic death states (rats, generic walkers)
// probably for debug purposes
@@ -319,6 +350,7 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) {
deltaZ = 0.0f;
}
break;
+
case kGenericWalkerAStatesGun:
*animation = kModelAnimationBulletBobsTrackingGun;
++_animationFrame;
@@ -341,10 +373,12 @@ bool AIScriptGenericWalkerA::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
+
case kAnimationModeWalk:
_animationState = kGenericWalkerAStatesWalk;
_animationFrame = 0;
break;
+
case kAnimationModeCombatIdle:
_animationState = kGenericWalkerAStatesGun;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/generic_walker_b.cpp b/engines/bladerunner/script/ai/generic_walker_b.cpp
index 3f64d01168..cdfa8a63fa 100644
--- a/engines/bladerunner/script/ai/generic_walker_b.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_b.cpp
@@ -52,6 +52,7 @@ bool AIScriptGenericWalkerB::Update() {
return true;
}
break;
+
case kGoalGenwalkerMoving:
if (deltaX != 0.0f || deltaZ != 0.0f) {
movingUpdate();
@@ -93,30 +94,39 @@ void AIScriptGenericWalkerB::ClickedByPlayer() {
case 1:
Actor_Says(kActorMcCoy, 365, 3);
break;
+
case 2:
Actor_Says(kActorMcCoy, 755, 3);
break;
+
case 3:
Actor_Says(kActorMcCoy, 940, 3);
break;
+
case 4:
Actor_Says(kActorMcCoy, 4560, 3);
break;
+
case 5:
Actor_Says(kActorMcCoy, 4870, 3);
break;
+
case 6:
Actor_Says(kActorMcCoy, 5125, 3);
break;
+
case 7:
Actor_Says(kActorMcCoy, 8450, 3);
break;
+
case 8:
Actor_Says(kActorMcCoy, 1085, 3);
break;
+
case 9:
Actor_Says(kActorMcCoy, 365, 3); // Re-used line, same as case 1
break;
+
case 10:
Actor_Says(kActorMcCoy, 7415, 3);
break;
@@ -186,9 +196,11 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) {
case 0:
*animation = 426;
break;
+
case 1:
*animation = 430;
break;
+
case 2:
#if BLADERUNNER_ORIGINAL_BUGS
// Hatted lady with wooden umbrella still (different from 436 model!)
@@ -199,27 +211,34 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 4;
#endif // BLADERUNNER_ORIGINAL_BUGS
break;
+
case 3:
*animation = 431;
break;
+
case 4:
*animation = 427;
break;
+
case 5:
*animation = 433;
break;
+
case 6:
*animation = 434; // Hatted child walking // frame 11 could be used for still
_animationFrame = 11;
break;
+
case 7:
*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
_animationFrame = 1;
break;
+
case 9:
*animation = 423; // Hatted person walking lowered face // frame 6 could be used for still
_animationFrame = 6;
@@ -231,35 +250,45 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case kGenericWalkerBStatesWalk:
switch (Global_Variable_Query(kVariableGenericWalkerBModel)) {
case 0:
*animation = 424;
break;
+
case 1:
*animation = 428;
break;
+
case 2:
*animation = 436;
break;
+
case 3:
*animation = 429;
break;
+
case 4:
*animation = 425;
break;
+
case 5:
*animation = 432;
break;
+
case 6:
*animation = 434; // Hatted child walking
break;
+
case 7:
*animation = 435; // Child walking
break;
+
case 8:
*animation = 422; // Hatted person walking fast
break;
+
case 9:
*animation = 423; // Hatted person walking lowered face
break;
@@ -269,6 +298,7 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case kGenericWalkerBStatesDie:
// This is an animation for Maggie (exploding) but is also used for generic death states (rats, generic walkers)
// probably for debug purposes
@@ -298,6 +328,7 @@ bool AIScriptGenericWalkerB::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
+
case kAnimationModeWalk:
_animationState = kGenericWalkerBStatesWalk;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/generic_walker_c.cpp b/engines/bladerunner/script/ai/generic_walker_c.cpp
index 754088b715..ddc65a841e 100644
--- a/engines/bladerunner/script/ai/generic_walker_c.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_c.cpp
@@ -52,6 +52,7 @@ bool AIScriptGenericWalkerC::Update() {
return true;
}
break;
+
case kGoalGenwalkerMoving:
if (deltaX != 0.0f || deltaZ != 0.0f) {
movingUpdate();
@@ -93,30 +94,39 @@ void AIScriptGenericWalkerC::ClickedByPlayer() {
case 1:
Actor_Says(kActorMcCoy, 365, 3);
break;
+
case 2:
Actor_Says(kActorMcCoy, 755, 3);
break;
+
case 3:
Actor_Says(kActorMcCoy, 940, 3);
break;
+
case 4:
Actor_Says(kActorMcCoy, 4560, 3);
break;
+
case 5:
Actor_Says(kActorMcCoy, 4870, 3);
break;
+
case 6:
Actor_Says(kActorMcCoy, 5125, 3);
break;
+
case 7:
Actor_Says(kActorMcCoy, 8450, 3);
break;
+
case 8:
Actor_Says(kActorMcCoy, 1085, 3);
break;
+
case 9:
Actor_Says(kActorMcCoy, 365, 3); // Re-used line, same as case 1
break;
+
case 10:
Actor_Says(kActorMcCoy, 7415, 3);
break;
@@ -186,9 +196,11 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) {
case 0:
*animation = 426;
break;
+
case 1:
*animation = 430;
break;
+
case 2:
#if BLADERUNNER_ORIGINAL_BUGS
// Hatted lady with wooden umbrella still (different from 436 model!)
@@ -199,27 +211,34 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 4;
#endif // BLADERUNNER_ORIGINAL_BUGS
break;
+
case 3:
*animation = 431;
break;
+
case 4:
*animation = 427;
break;
+
case 5:
*animation = 433;
break;
+
case 6:
*animation = 434; // Hatted child walking // frame 11 could be used for still
_animationFrame = 11;
break;
+
case 7:
*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
_animationFrame = 1;
break;
+
case 9:
*animation = 423; // Hatted person walking lowered face // frame 6 could be used for still
_animationFrame = 6;
@@ -231,35 +250,45 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case kGenericWalkerCStatesWalk:
switch (Global_Variable_Query(kVariableGenericWalkerCModel)) {
case 0:
*animation = 424;
break;
+
case 1:
*animation = 428;
break;
+
case 2:
*animation = 436;
break;
+
case 3:
*animation = 429;
break;
+
case 4:
*animation = 425;
break;
+
case 5:
*animation = 432;
break;
+
case 6:
*animation = 434; // Hatted child walking
break;
+
case 7:
*animation = 435; // Child walking
break;
+
case 8:
*animation = 422; // Hatted person walking fast
break;
+
case 9:
*animation = 423; // Hatted person walking lowered face
break;
@@ -269,6 +298,7 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case kGenericWalkerCStatesDie:
// This is an animation for Maggie (exploding) but is also used for generic death states (rats, generic walkers)
// probably for debug purposes
@@ -298,6 +328,7 @@ bool AIScriptGenericWalkerC::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
+
case kAnimationModeWalk:
_animationState = kGenericWalkerCStatesWalk;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp
index dde5e9ecaf..320cd7c161 100644
--- a/engines/bladerunner/script/ai/gordo.cpp
+++ b/engines/bladerunner/script/ai/gordo.cpp
@@ -411,15 +411,19 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
switch (rnd) {
case 1:
+ // fall through
case 2:
Actor_Set_Goal_Number(kActorGordo, kGoalGordoGoToDNARow);
break;
+
case 3:
Actor_Set_Goal_Number(kActorGordo, kGoalGordoGoToChinaTown);
break;
+
case 4:
Actor_Set_Goal_Number(kActorGordo, kGoalGordoGoToFreeSlotHAGJ);
break;
+
case 5:
Actor_Set_Goal_Number(kActorGordo, kGoalGordoGoToFreeSlotAH);
break;
@@ -523,14 +527,17 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Global_Variable_Increment(kVariableGordosJoke, 1);
Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TellJoke1);
break;
+
case 1:
Global_Variable_Increment(kVariableGordosJoke, 1);
Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TellJoke2);
break;
+
case 2:
Global_Variable_Increment(kVariableGordosJoke, 1);
Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TellJoke3);
break;
+
case 3:
Global_Variable_Increment(kVariableGordosJoke, 1);
Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TalkAboutMcCoy);
@@ -782,6 +789,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 1:
*animation = kModelAnimationGordoBrushOffShoulder;
++_animationFrame;
@@ -791,6 +799,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_state = 0;
}
break;
+
case 2:
*animation = kModelAnimationGordoChecksHand;
++_animationFrame;
@@ -818,6 +827,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = _animationStateNext;
}
break;
+
case 1:
*animation = kModelAnimationGordoBrushOffShoulder;
_animationFrame += 2;
@@ -827,6 +837,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = _animationStateNext;
}
break;
+
case 2:
*animation = kModelAnimationGordoChecksHand;
_animationFrame += 2;
@@ -1246,23 +1257,37 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
switch (_animationState) {
case 0:
break;
+
case 2:
+ // fall through
case 13:
Actor_Change_Animation_Mode(kActorGordo, kAnimationModeSit);
break;
+
case 4:
+ // fall through
case 5:
+ // fall through
case 6:
+ // fall through
case 7:
+ // fall through
case 8:
+ // fall through
case 9:
+ // fall through
case 10:
+ // fall through
case 11:
+ // fall through
case 12:
+ // fall through
case 36:
+ // fall through
case 37:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
default:
_animationState = 0;
_animationFrame = 0;
@@ -1297,20 +1322,31 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
case kAnimationModeCombatIdle:
switch (_animationState) {
case 14:
+ // fall through
case 16:
+ // fall through
case 17:
+ // fall through
case 18:
+ // fall through
case 21:
+ // fall through
case 22:
break;
+
case 15:
+ // fall through
case 27:
+ // fall through
case 28:
+ // fall through
case 31:
+ // fall through
case 32:
_animationState = 16;
_animationFrame = 0;
break;
+
default:
_animationState = 14;
_animationFrame = 0;
@@ -1432,8 +1468,11 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
case kAnimationModeHit:
switch (_animationState) {
case 14:
+ // fall through
case 16:
+ // fall through
case 17:
+ // fall through
case 18:
if (Random_Query(0, 1)) {
_animationState = 21;
@@ -1442,11 +1481,16 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
case 19:
+ // fall through
case 20:
+ // fall through
case 21:
+ // fall through
case 22:
return true;
+
default:
if (Random_Query(0, 1)) {
_animationState = 19;
@@ -1510,16 +1554,24 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
case kAnimationModeDie:
switch (_animationState) {
case 14:
+ // fall through
case 16:
+ // fall through
case 17:
+ // fall through
case 18:
+ // fall through
case 19:
+ // fall through
case 20:
+ // fall through
case 21:
+ // fall through
case 22:
_animationState = 24;
_animationFrame = 0;
break;
+
default:
_animationState = 23;
_animationFrame = 0;
@@ -1692,12 +1744,15 @@ void AIScriptGordo::talkToMcCoyInCity() {
case 1:
Actor_Says(kActorMcCoy, 6460, 13);
break;
+
case 2:
Actor_Says(kActorMcCoy, 6550, 14);
break;
+
case 3:
Actor_Says(kActorMcCoy, 365, 12);
break;
+
case 4:
Actor_Says(kActorMcCoy, 525, 12);
break;
@@ -1883,19 +1938,26 @@ void AIScriptGordo::unknown() {
switch (_animationState) {
case 0:
break;
+
case 1:
+ // fall through
case 3:
+ // fall through
case 38:
+ // fall through
case 39:
_animationState = 0;
_animationFrame = 0;
_state = 0;
_counterTarget = 0;
break;
+
case 2:
+ // fall through
case 13:
Actor_Change_Animation_Mode(kActorGordo, 53);
break;
+
default:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
diff --git a/engines/bladerunner/script/ai/grigorian.cpp b/engines/bladerunner/script/ai/grigorian.cpp
index f563cefaba..81fbddc661 100644
--- a/engines/bladerunner/script/ai/grigorian.cpp
+++ b/engines/bladerunner/script/ai/grigorian.cpp
@@ -151,6 +151,7 @@ bool AIScriptGrigorian::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 1:
*animation = kModelAnimationGrigorianStandAnnoyedTalk;
++_animationFrame;
@@ -158,6 +159,7 @@ bool AIScriptGrigorian::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 2:
*animation = kModelAnimationGrigorianStandProtestTalk;
++_animationFrame;
@@ -165,6 +167,7 @@ bool AIScriptGrigorian::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 3:
*animation = kModelAnimationGrigorianStandProtestMoreTalk;
++_animationFrame;
@@ -174,6 +177,7 @@ bool AIScriptGrigorian::UpdateAnimation(int *animation, int *frame) {
*animation = kModelAnimationGrigorianStandProtestTalk;
}
break;
+
case 4:
*animation = kModelAnimationGrigorianStandProtestEvenMoreTalk;
++_animationFrame;
@@ -183,6 +187,7 @@ bool AIScriptGrigorian::UpdateAnimation(int *animation, int *frame) {
*animation = kModelAnimationGrigorianStandProtestTalk;
}
break;
+
case 5:
*animation = kModelAnimationGrigorianStandInsistentTalk;
++_animationFrame;
@@ -192,6 +197,7 @@ bool AIScriptGrigorian::UpdateAnimation(int *animation, int *frame) {
*animation = kModelAnimationGrigorianStandProtestTalk;
}
break;
+
case 6:
*animation = kModelAnimationGrigorianStandDismissOrAccuseTalk;
++_animationFrame;
@@ -201,6 +207,7 @@ bool AIScriptGrigorian::UpdateAnimation(int *animation, int *frame) {
*animation = kModelAnimationGrigorianStandProtestTalk;
}
break;
+
case 7:
*animation = kModelAnimationGrigorianStandBegOrMockingTalk;
++_animationFrame;
@@ -210,6 +217,7 @@ bool AIScriptGrigorian::UpdateAnimation(int *animation, int *frame) {
*animation = kModelAnimationGrigorianStandProtestTalk;
}
break;
+
default:
*animation = 399;
break;
@@ -224,6 +232,7 @@ bool AIScriptGrigorian::ChangeAnimationMode(int mode) {
_animationState = 0;
_animationFrame = 0;
break;
+
case kAnimationModeWalk:
// TODO A bug? This animation state is not for walking. It is for kModelAnimationGrigorianStandAnnoyedTalk.
if (_animationState != 1) {
@@ -231,26 +240,32 @@ bool AIScriptGrigorian::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
+
case kAnimationModeTalk:
_animationState = 2;
_animationFrame = 0;
break;
+
case 12:
_animationState = 3;
_animationFrame = 0;
break;
+
case 13:
_animationState = 4;
_animationFrame = 0;
break;
+
case 14:
_animationState = 5;
_animationFrame = 0;
break;
+
case 15:
_animationState = 6;
_animationFrame = 0;
break;
+
case 16:
_animationState = 7;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/guzza.cpp b/engines/bladerunner/script/ai/guzza.cpp
index 9ea7e5bf39..06f56e2543 100644
--- a/engines/bladerunner/script/ai/guzza.cpp
+++ b/engines/bladerunner/script/ai/guzza.cpp
@@ -175,15 +175,18 @@ void AIScriptGuzza::ClickedByPlayer() {
Actor_Says(kActorGuzza, 780, -1);
AI_Movement_Track_Unpause(kActorGuzza);
break;
+
case 2:
AI_Movement_Track_Pause(kActorGuzza);
Actor_Says(kActorMcCoy, 3970, 14);
Actor_Says(kActorGuzza, 780, -1);
AI_Movement_Track_Unpause(kActorGuzza);
break;
+
case 3:
Actor_Says(kActorMcCoy, 3970, 16);
break;
+
case 4:
// fall through
default:
@@ -308,14 +311,19 @@ bool AIScriptGuzza::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case kGoalGuzzaUG18WillGetShotBySadik:
+ // fall through
case kGoalGuzzaUG18HitByMcCoy:
+ // fall through
case kGoalGuzzaUG18MissedByMcCoy:
Actor_Set_Targetable(kActorGuzza, false);
return true;
case kGoalGuzzaUG18ShotByMcCoy:
+ // fall through
case kGoalGuzzaUG18ShootMcCoy:
+ // fall through
case kGoalGuzzaUG18FallDown:
+ // fall through
case kGoalGuzzaUG18ShotBySadik:
return true;
}
@@ -336,6 +344,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 1:
*animation = kModelAnimationGuzzaStandAndWipeNose;
++_animationFrame;
@@ -345,6 +354,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) {
_state = 0;
}
break;
+
case 2:
*animation = kModelAnimationGuzzaStandAndScratchBelly;
++_animationFrame;
@@ -386,6 +396,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 1:
*animation = kModelAnimationGuzzaSitAndEat;
++_animationFrame;
@@ -395,6 +406,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) {
_state = 0;
}
break;
+
case 2:
*animation = kModelAnimationGuzzaSitAndLookAtFood;
++_animationFrame;
@@ -438,9 +450,11 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) {
case 0:
*animation = kModelAnimationGuzzaSitAndTalkOrChew;
break;
+
case 1:
*animation = kModelAnimationGuzzaSitAndEat;
break;
+
case 2:
*animation = kModelAnimationGuzzaSitAndLookAtFood;
break;
@@ -787,35 +801,56 @@ bool AIScriptGuzza::ChangeAnimationMode(int mode) {
case kAnimationModeIdle:
switch (_animationState) {
case 0:
+ // fall through
case 30:
+ // fall through
case 32:
+ // fall through
case 33:
break;
+
case 6:
+ // fall through
case 7:
_animationState = 24;
_animationFrame = 0;
break;
+
case 11:
+ // fall through
case 12:
+ // fall through
case 13:
+ // fall through
case 14:
+ // fall through
case 15:
+ // fall through
case 16:
+ // fall through
case 17:
+ // fall through
case 18:
+ // fall through
case 19:
+ // fall through
case 20:
+ // fall through
case 21:
+ // fall through
case 22:
+ // fall through
case 23:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
case 24:
+ // fall through
case 31:
_animationState = 30;
_animationFrame = 0;
break;
+
default:
_animationState = 0;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/hasan.cpp b/engines/bladerunner/script/ai/hasan.cpp
index 28792dcb43..e7edfed75b 100644
--- a/engines/bladerunner/script/ai/hasan.cpp
+++ b/engines/bladerunner/script/ai/hasan.cpp
@@ -180,10 +180,12 @@ bool AIScriptHasan::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Put_In_Set(kActorHasan, kSetAR01_AR02);
Actor_Set_At_XYZ(kActorHasan, -214.0f, 0.0f, -1379.0f, 371);
break;
+
case kGoalHasanIsAway:
Actor_Put_In_Set(kActorHasan, kSetFreeSlotH);
Actor_Set_At_Waypoint(kActorHasan, 40, 0); // kSetFreeSlotH
break;
+
case kGoalHasanIsWalkingAroundIsAtAR02:
AI_Movement_Track_Flush(kActorHasan);
World_Waypoint_Set(554, kSetAR01_AR02, -214.0f, 0.0f, -1379.0f);
@@ -191,14 +193,17 @@ bool AIScriptHasan::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Face_Heading(kActorHasan, 371, false);
AI_Movement_Track_Repeat(kActorHasan);
break;
+
case kGoalHasanIsWalkingAroundIsAway:
AI_Movement_Track_Flush(kActorHasan);
AI_Movement_Track_Append(kActorHasan, 40, Random_Query(10, 40)); // kSetFreeSlotH
AI_Movement_Track_Repeat(kActorHasan);
break;
+
case kGoalHasanIsWalkingAroundStayAwayFromAR02:
Actor_Set_Goal_Number(kActorHasan, kGoalHasanIsWalkingAroundIsAway);
break;
+
case kGoalHasanIsWalkingAroundStaysAtAR02:
Actor_Set_Goal_Number(kActorHasan, kGoalHasanIsWalkingAroundIsAtAR02);
break;
@@ -373,9 +378,13 @@ bool AIScriptHasan::ChangeAnimationMode(int mode) {
break;
case 12:
+ // fall through
case 13:
+ // fall through
case 14:
+ // fall through
case 15:
+ // fall through
case 16:
_animationState = 6;
_var6 = 0;
diff --git a/engines/bladerunner/script/ai/howie_lee.cpp b/engines/bladerunner/script/ai/howie_lee.cpp
index 29a280fd56..66fee5c98a 100644
--- a/engines/bladerunner/script/ai/howie_lee.cpp
+++ b/engines/bladerunner/script/ai/howie_lee.cpp
@@ -275,6 +275,7 @@ bool AIScriptHowieLee::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Movement_Track_Repeat(kActorHowieLee);
return true;
+
case kGoalHowieLeeMovesInDiner02:
AI_Movement_Track_Flush(kActorHowieLee);
if (Random_Query(1, 2) == 1) {
@@ -284,6 +285,7 @@ bool AIScriptHowieLee::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Movement_Track_Repeat(kActorHowieLee);
return true;
+
case kGoalHowieLeeMovesInDiner03:
AI_Movement_Track_Flush(kActorHowieLee);
if (Random_Query(1, 2) == 1) {
@@ -293,24 +295,29 @@ bool AIScriptHowieLee::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Movement_Track_Repeat(kActorHowieLee);
return true;
+
case kGoalHowieLeeGoesToCT04GarbageBin:
AI_Movement_Track_Flush(kActorHowieLee);
AI_Movement_Track_Append(kActorHowieLee, 66, 30); // in kSetCT03_CT04
AI_Movement_Track_Repeat(kActorHowieLee);
return true;
+
case kGoalHowieLeeGoesToFreeSlotH:
AI_Movement_Track_Flush(kActorHowieLee);
AI_Movement_Track_Append(kActorHowieLee, 40, 60); // in kSetFreeSlotH
AI_Movement_Track_Repeat(kActorHowieLee);
return true;
+
case kGoalHowieLeeMovesInDiner06: // Unused goal?
AI_Movement_Track_Flush(kActorHowieLee);
AI_Movement_Track_Append(kActorHowieLee, 67, 90); // in kSetCT01_CT12
AI_Movement_Track_Repeat(kActorHowieLee);
return true;
+
case kGoalHowieLeeStopMoving:
AI_Movement_Track_Flush(kActorHowieLee);
return false;
+
case kGoalHowieLeeGoesToFreeSlotC:
AI_Movement_Track_Flush(kActorHowieLee);
Actor_Put_In_Set(kActorHowieLee, kSetFreeSlotC);
@@ -342,6 +349,7 @@ bool AIScriptHowieLee::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 1:
*animation = 674;
++_animationFrame;
@@ -357,6 +365,7 @@ bool AIScriptHowieLee::UpdateAnimation(int *animation, int *frame) {
*animation = 673;
}
break;
+
case 2:
*animation = 672;
++_animationFrame;
@@ -364,6 +373,7 @@ bool AIScriptHowieLee::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 3:
if (Game_Flag_Query(kFlagHowieLeeAnimation1)) {
Game_Flag_Reset(kFlagHowieLeeAnimation1);
@@ -379,6 +389,7 @@ bool AIScriptHowieLee::UpdateAnimation(int *animation, int *frame) {
*animation = 676;
}
break;
+
case 4:
*animation = 677;
++_animationFrame;
@@ -388,6 +399,7 @@ bool AIScriptHowieLee::UpdateAnimation(int *animation, int *frame) {
*animation = 676;
}
break;
+
case 5:
*animation = 678;
++_animationFrame;
@@ -397,6 +409,7 @@ bool AIScriptHowieLee::UpdateAnimation(int *animation, int *frame) {
*animation = 676;
}
break;
+
case 6:
*animation = 679;
++_animationFrame;
@@ -406,6 +419,7 @@ bool AIScriptHowieLee::UpdateAnimation(int *animation, int *frame) {
*animation = 676;
}
break;
+
case 7:
*animation = 680;
++_animationFrame;
@@ -415,6 +429,7 @@ bool AIScriptHowieLee::UpdateAnimation(int *animation, int *frame) {
*animation = 676;
}
break;
+
case 8:
*animation = 681;
++_animationFrame;
@@ -424,6 +439,7 @@ bool AIScriptHowieLee::UpdateAnimation(int *animation, int *frame) {
*animation = 676;
}
break;
+
default:
*animation = 399;
break;
@@ -443,36 +459,44 @@ bool AIScriptHowieLee::ChangeAnimationMode(int mode) {
Game_Flag_Set(kFlagHowieLeeAnimation1);
}
break;
+
case kAnimationModeWalk:
if (_animationState != 2) {
_animationState = 2;
_animationFrame = 0;
}
break;
+
case kAnimationModeTalk:
_animationState = 3;
_animationFrame = 0;
break;
+
case 12:
_animationState = 4;
_animationFrame = 0;
break;
+
case 13:
_animationState = 5;
_animationFrame = 0;
break;
+
case 14:
_animationState = 6;
_animationFrame = 0;
break;
+
case 15:
_animationState = 7;
_animationFrame = 0;
break;
+
case 16:
_animationState = 8;
_animationFrame = 0;
break;
+
case 43:
_animationState = 1;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/insect_dealer.cpp b/engines/bladerunner/script/ai/insect_dealer.cpp
index 9799171e05..7d4a9628cf 100644
--- a/engines/bladerunner/script/ai/insect_dealer.cpp
+++ b/engines/bladerunner/script/ai/insect_dealer.cpp
@@ -156,6 +156,7 @@ bool AIScriptInsectDealer::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 1:
*animation = 546;
++_animationFrame;
@@ -168,11 +169,13 @@ bool AIScriptInsectDealer::UpdateAnimation(int *animation, int *frame) {
_frameDelta = 2 * Random_Query(0, 1) - 1;
}
break;
+
case 2:
// TODO: test... actor will be stuck
break;
}
break;
+
case 1:
if (_animationFrame == 0 && _resumeIdleAfterFramesetCompletesFlag) {
*animation = 545;
@@ -186,6 +189,7 @@ bool AIScriptInsectDealer::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 2:
*animation = 549;
++_animationFrame;
@@ -195,6 +199,7 @@ bool AIScriptInsectDealer::UpdateAnimation(int *animation, int *frame) {
_animationState = 1;
}
break;
+
case 3:
*animation = 550;
++_animationFrame;
@@ -204,6 +209,7 @@ bool AIScriptInsectDealer::UpdateAnimation(int *animation, int *frame) {
_animationState = 1;
}
break;
+
case 4:
*animation = 551;
++_animationFrame;
@@ -213,6 +219,7 @@ bool AIScriptInsectDealer::UpdateAnimation(int *animation, int *frame) {
_animationState = 1;
}
break;
+
case 5:
*animation = 552;
++_animationFrame;
@@ -222,6 +229,7 @@ bool AIScriptInsectDealer::UpdateAnimation(int *animation, int *frame) {
_animationState = 1;
}
break;
+
case 6:
*animation = 553;
++_animationFrame;
@@ -231,6 +239,7 @@ bool AIScriptInsectDealer::UpdateAnimation(int *animation, int *frame) {
_animationState = 1;
}
break;
+
case 7:
*animation = 554;
++_animationFrame;
@@ -240,6 +249,7 @@ bool AIScriptInsectDealer::UpdateAnimation(int *animation, int *frame) {
_animationState = 1;
}
break;
+
case 8:
*animation = 547;
++_animationFrame;
@@ -265,47 +275,58 @@ bool AIScriptInsectDealer::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
+
case 3:
+ // fall through
case 18:
+ // fall through
case 19:
_animationState = 1;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 12:
_animationState = 2;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 13:
_animationState = 3;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 14:
_animationState = 4;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 15:
_animationState = 5;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 16:
_animationState = 6;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 17:
_animationState = 7;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 23:
_animationState = 8;
_animationFrame = 0;
break;
+
default:
break;
}
diff --git a/engines/bladerunner/script/ai/isabella.cpp b/engines/bladerunner/script/ai/isabella.cpp
index 4cf02fecdf..2bda01157f 100644
--- a/engines/bladerunner/script/ai/isabella.cpp
+++ b/engines/bladerunner/script/ai/isabella.cpp
@@ -369,6 +369,7 @@ bool AIScriptIsabella::ChangeAnimationMode(int mode) {
break;
case 3:
+ // fall through
case 9:
if (_animationState < 2 || _animationState > 8) {
_animationState = 9;
@@ -379,6 +380,7 @@ bool AIScriptIsabella::ChangeAnimationMode(int mode) {
break;
case 10:
+ // fall through
case 12:
if (_animationState < 2 || _animationState > 8) {
_animationState = 9;
@@ -389,6 +391,7 @@ bool AIScriptIsabella::ChangeAnimationMode(int mode) {
break;
case 11:
+ // fall through
case 14:
if (_animationState < 2 || _animationState > 8) {
_animationState = 9;
diff --git a/engines/bladerunner/script/ai/izo.cpp b/engines/bladerunner/script/ai/izo.cpp
index 99e56b118c..7cb2d3d612 100644
--- a/engines/bladerunner/script/ai/izo.cpp
+++ b/engines/bladerunner/script/ai/izo.cpp
@@ -572,10 +572,15 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
break;
case 2:
+ // fall through
case 3:
+ // fall through
case 4:
+ // fall through
case 5:
+ // fall through
case 6:
+ // fall through
case 7:
*animation = _animationState + 298;
++_animationFrame;
@@ -645,8 +650,11 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
break;
case 12:
+ // fall through
case 13:
+ // fall through
case 16:
+ // fall through
case 17:
if (_animationState == 12) {
*animation = 278;
@@ -670,6 +678,7 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
break;
case 14:
+ // fall through
case 15:
*animation = _animationFrame + 280;
++_animationFrame;
@@ -696,6 +705,7 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
break;
case 18:
+ // fall through
case 19:
if (_animationState == 18) {
*animation = 284;
@@ -711,14 +721,23 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
break;
case 20:
+ // fall through
case 21:
+ // fall through
case 22:
+ // fall through
case 23:
+ // fall through
case 24:
+ // fall through
case 25:
+ // fall through
case 26:
+ // fall through
case 27:
+ // fall through
case 28:
+ // fall through
case 29:
if (_animationState == 20) {
*animation = 290;
@@ -851,25 +870,36 @@ bool AIScriptIzo::ChangeAnimationMode(int mode) {
case 0:
switch (_animationState) {
case 1:
+ // fall through
case 2:
+ // fall through
case 3:
+ // fall through
case 4:
+ // fall through
case 5:
+ // fall through
case 6:
+ // fall through
case 7:
+ // fall through
case 33:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
case 8:
+ // fall through
case 22:
+ // fall through
case 23:
_animationState = 10;
_animationFrame = 0;
break;
case 31:
+ // fall through
case 32:
+ // fall through
case 34:
return true;
@@ -895,6 +925,7 @@ bool AIScriptIzo::ChangeAnimationMode(int mode) {
return true;
case 3:
+ // fall through
case 9:
if (_animationState != 32) {
if (Actor_Query_Goal_Number(kActorIzo) == 1) {
@@ -922,8 +953,11 @@ bool AIScriptIzo::ChangeAnimationMode(int mode) {
break;
case 5:
+ // fall through
case 18:
+ // fall through
case 19:
+ // fall through
case 20:
return true;
@@ -943,6 +977,7 @@ bool AIScriptIzo::ChangeAnimationMode(int mode) {
break;
case 10:
+ // fall through
case 12:
if (_animationState != 32) {
if (_animationState <= 0 || _animationState > 7) {
@@ -955,6 +990,7 @@ bool AIScriptIzo::ChangeAnimationMode(int mode) {
break;
case 11:
+ // fall through
case 14:
if (_animationState != 32) {
if (_animationState <= 0 || _animationState > 7) {
@@ -1013,10 +1049,15 @@ bool AIScriptIzo::ChangeAnimationMode(int mode) {
case 21:
switch (_animationState) {
case 8:
+ // fall through
case 9:
+ // fall through
case 10:
+ // fall through
case 11:
+ // fall through
case 12:
+ // fall through
case 13:
if (Random_Query(0, 1)) {
_animationState = 17;
@@ -1027,8 +1068,11 @@ bool AIScriptIzo::ChangeAnimationMode(int mode) {
break;
case 14:
+ // fall through
case 15:
+ // fall through
case 16:
+ // fall through
case 17:
return true;
diff --git a/engines/bladerunner/script/ai/klein.cpp b/engines/bladerunner/script/ai/klein.cpp
index 0c5caa68f9..159121bbac 100644
--- a/engines/bladerunner/script/ai/klein.cpp
+++ b/engines/bladerunner/script/ai/klein.cpp
@@ -295,24 +295,29 @@ bool AIScriptKlein::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorKlein, 73, Random_Query(3, 20)); // kSetPS07
AI_Movement_Track_Repeat(kActorKlein);
break;
+
case kGoalKleinMovingInLab02:
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 74, Random_Query(10, 20)); // kSetPS07
AI_Movement_Track_Repeat(kActorKlein);
break;
+
case kGoalKleinGotoLabSpeaker:
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 31, 3); // kSetPS07
AI_Movement_Track_Repeat(kActorKlein);
break;
+
case kGoalKleinIsAnnoyedByMcCoyPreInit:
// aux goal (added)
break;
+
case kGoalKleinIsAnnoyedByMcCoyInit:
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 32, 5); // kSetPS07 (hidden spot)
AI_Movement_Track_Repeat(kActorKlein);
break;
+
case kGoalKleinIsAnnoyedByMcCoy01:
AI_Movement_Track_Flush(kActorKlein);
if (_vm->_cutContent) {
@@ -323,11 +328,13 @@ bool AIScriptKlein::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Movement_Track_Repeat(kActorKlein);
break;
+
case kGoalKleinIsAnnoyedByMcCoy02:
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 32, 5); // kSetPS07 (hidden spot)
AI_Movement_Track_Repeat(kActorKlein);
break;
+
case kGoalKleinIsAnnoyedByMcCoyFinal:
// Note: Original was missing the kGoalKleinIsAnnoyedByMcCoyFinal case
// so we just "break" for the original behavior
@@ -337,6 +344,7 @@ bool AIScriptKlein::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorKlein);
}
break;
+
case kGoalKleinAwayAtEndOfActThree:
// fall-through
case kGoalKleinAwayAtEndOfActOne:
@@ -405,6 +413,7 @@ bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 1:
*animation = kModelAnimationKleinWalking;
++_animationFrame;
@@ -412,6 +421,7 @@ bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 2:
*animation = kModelAnimationKleinTalkSmallLeftHandMove;
++_animationFrame;
@@ -419,6 +429,7 @@ bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 3:
*animation = kModelAnimationKleinTalkRightHandTouchFace;
++_animationFrame;
@@ -428,6 +439,7 @@ bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
*animation = kModelAnimationKleinTalkSmallLeftHandMove;
}
break;
+
case 4:
*animation = kModelAnimationKleinTalkWideHandMotion;
++_animationFrame;
@@ -437,6 +449,7 @@ bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
*animation = kModelAnimationKleinTalkSmallLeftHandMove;
}
break;
+
case 5:
*animation = kModelAnimationKleinTalkSuggestOrAsk;
++_animationFrame;
@@ -446,6 +459,7 @@ bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
*animation = kModelAnimationKleinTalkSmallLeftHandMove;
}
break;
+
case 6:
*animation = kModelAnimationKleinTalkDismissive;
++_animationFrame;
@@ -455,6 +469,7 @@ bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
*animation = kModelAnimationKleinTalkSmallLeftHandMove;
}
break;
+
case 7:
*animation = kModelAnimationKleinTalkRaisingBothHands;
++_animationFrame;
@@ -464,11 +479,13 @@ bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
*animation = kModelAnimationKleinTalkSmallLeftHandMove;
}
break;
+
case 8:
_animationFrame = 0;
*animation = _animationNext;
_animationState = _animationStateNext;
break;
+
default:
// TODO: A bug? 399 is a Zuben animation
*animation = 399;
@@ -484,6 +501,7 @@ bool AIScriptKlein::ChangeAnimationMode(int mode) {
_animationState = 0;
_animationFrame = 0;
break;
+
case kAnimationModeWalk:
if (_animationState > 1) {
_animationState = 1;
@@ -494,6 +512,7 @@ bool AIScriptKlein::ChangeAnimationMode(int mode) {
_animationNext = kModelAnimationKleinWalking;
}
break;
+
case kAnimationModeTalk:
if (_animationState > 0) {
_animationState = 2;
@@ -504,6 +523,7 @@ bool AIScriptKlein::ChangeAnimationMode(int mode) {
_animationNext = kModelAnimationKleinTalkSmallLeftHandMove;
}
break;
+
case 12:
if (_animationState > 0) {
_animationState = 2;
@@ -514,6 +534,7 @@ bool AIScriptKlein::ChangeAnimationMode(int mode) {
_animationNext = kModelAnimationKleinTalkRightHandTouchFace;
}
break;
+
case 13:
if (_animationState > 0) {
_animationState = 2;
@@ -524,6 +545,7 @@ bool AIScriptKlein::ChangeAnimationMode(int mode) {
_animationNext = kModelAnimationKleinTalkWideHandMotion;
}
break;
+
case 14:
if (_animationState > 0) {
_animationState = 2;
@@ -534,6 +556,7 @@ bool AIScriptKlein::ChangeAnimationMode(int mode) {
_animationNext = kModelAnimationKleinTalkSuggestOrAsk;
}
break;
+
case 15:
if (_animationState > 0) {
_animationState = 2;
@@ -544,6 +567,7 @@ bool AIScriptKlein::ChangeAnimationMode(int mode) {
_animationNext = kModelAnimationKleinTalkDismissive;
}
break;
+
case 16:
if (_animationState > 0) {
_animationState = 2;
diff --git a/engines/bladerunner/script/ai/leon.cpp b/engines/bladerunner/script/ai/leon.cpp
index a3edee1c43..bb0ac8ed6e 100644
--- a/engines/bladerunner/script/ai/leon.cpp
+++ b/engines/bladerunner/script/ai/leon.cpp
@@ -398,16 +398,23 @@ bool AIScriptLeon::ChangeAnimationMode(int mode) {
case kAnimationModeIdle:
switch (_animationState) {
case 2:
+ // fall through
case 3:
+ // fall through
case 4:
+ // fall through
case 5:
+ // fall through
case 6:
+ // fall through
case 7:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
case 8:
Actor_Change_Animation_Mode(kActorLeon, 72);
break;
+
default:
_animationState = 0;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/lucy.cpp b/engines/bladerunner/script/ai/lucy.cpp
index bed94429c9..dda41cbc20 100644
--- a/engines/bladerunner/script/ai/lucy.cpp
+++ b/engines/bladerunner/script/ai/lucy.cpp
@@ -181,6 +181,7 @@ void AIScriptLucy::CompletedMovementTrack() {
break;
case kGoalLucyGoToFreeSlotGAG:
+ // fall through
case kGoalLucyGoToFreeSlotGAHJ:
Actor_Set_Goal_Number(kActorLucy, kGoalLucyMoveAround);
break;
@@ -638,7 +639,7 @@ bool AIScriptLucy::UpdateAnimation(int *animation, int *frame) {
case 14:
// fall through
case 15:
-
+ // fall through
case 16:
if (_animationState == 9) {
*animation = kModelAnimationLucyComplainingTalk;
diff --git a/engines/bladerunner/script/ai/maggie.cpp b/engines/bladerunner/script/ai/maggie.cpp
index cc087de9bf..847c86a63b 100644
--- a/engines/bladerunner/script/ai/maggie.cpp
+++ b/engines/bladerunner/script/ai/maggie.cpp
@@ -604,21 +604,28 @@ bool AIScriptMaggie::ChangeAnimationMode(int mode) {
} else {
switch (_animationState) {
case kMaggieStateGoingToSleep:
+ // fall through
case kMaggieStateSleeping:
_animationState = kMaggieStateWakingUp;
break;
+
case kMaggieStateIdle:
_animationState = kMaggieStateStandingUp;
_animationFrame = 0;
break;
+
case kMaggieStateLayingDown:
_animationState = kMaggieStateStandingUp;
_animationFrame = 0;
break;
+
case kMaggieStateJumping:
+ // fall through
case kMaggieStateStandingUp:
+ // fall through
case kMaggieStateWakingUp:
break;
+
default:
_animationState = kMaggieStateIdle;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp
index b014fcba58..d3983e3d73 100644
--- a/engines/bladerunner/script/ai/mccoy.cpp
+++ b/engines/bladerunner/script/ai/mccoy.cpp
@@ -645,6 +645,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
break;
case 3:
+ // fall through
case 4:
if (_animationFrame == 0 && !Game_Flag_Query(kFlagMcCoyAnimation1)) {
_animationFrame = 1;
@@ -1075,9 +1076,11 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
case 9:
Sound_Left_Footstep_Walk(kActorMcCoy);
break;
+
case 4:
Sound_Right_Footstep_Walk(kActorMcCoy);
break;
+
case 1:
Sound_Right_Footstep_Walk(kActorMcCoy);
break;
@@ -1094,9 +1097,11 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
case 1:
Sound_Right_Footstep_Walk(kActorMcCoy);
break;
+
case 4:
Sound_Right_Footstep_Walk(kActorMcCoy);
break;
+
case 9:
Sound_Left_Footstep_Walk(kActorMcCoy);
break;
@@ -1432,14 +1437,23 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
}
switch (_animationState) {
case 3:
+ // fall through
case 4:
+ // fall through
case 5:
+ // fall through
case 6:
+ // fall through
case 7:
+ // fall through
case 8:
+ // fall through
case 9:
+ // fall through
case 10:
+ // fall through
case 11:
+ // fall through
case 12:
Game_Flag_Set(kFlagMcCoyAnimation1);
_animationLoopCounter = 0;
@@ -1448,26 +1462,38 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationLoopDirection = 1;
_animationLoopFrameMax = 3;
return true;
+
case 14:
+ // fall through
case 17:
+ // fall through
case 20:
+ // fall through
case 21:
+ // fall through
case 36:
_animationState = 16;
_animationFrame = 0;
return true;
+
case 15:
_animationState = 16;
_animationFrame = 16 - ((16 * _animationFrame) / 12);
return true;
+
case 16:
+ // fall through
case 25:
+ // fall through
case 26:
+ // fall through
case 55:
return true;
+
case 60:
_animationState = 61;
return true;
+
default:
_animationState = 0;
_animationFrame = 0;
@@ -1519,35 +1545,49 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
case kAnimationModeCombatIdle:
switch (_animationState) {
case 14:
+ // fall through
case 15:
+ // fall through
case 19:
+ // fall through
case 21:
break;
+
case 16:
_animationState = 15;
_animationFrame = 12 - ((12 * _animationFrame) / 16);
break;
+
case 17:
+ // fall through
case 20:
_animationState = 19;
_animationFrame = 0;
break;
+
case 18:
_animationState = 19;
_animationFrame = 13 * ((8 - _animationFrame) / 8);
break;
+
case 22:
_animationState = 19;
_animationFrame = 41;
break;
+
case 36:
+ // fall through
case 37:
+ // fall through
case 40:
+ // fall through
case 41:
+ // fall through
case 51:
_animationState = 14;
_animationFrame = 0;
break;
+
default:
_animationState = 15;
_animationFrame = 0;
@@ -1558,17 +1598,22 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
case kAnimationModeCombatAim:
switch (_animationState) {
case 17:
+ // fall through
case 18:
+ // fall through
case 21:
break;
+
case 19:
_animationState = 18;
_animationFrame = 8 * (13 - _animationFrame) / 13;
break;
+
case 22:
_animationState = 22;
_animationFrame = 0;
break;
+
default:
_animationState = 18;
_animationFrame = 0;
@@ -1704,12 +1749,19 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
case kAnimationModeHit:
switch (_animationState) {
case 14:
+ // fall through
case 15:
+ // fall through
case 17:
+ // fall through
case 18:
+ // fall through
case 19:
+ // fall through
case 20:
+ // fall through
case 21:
+ // fall through
case 22:
if (Random_Query(0, 1) == 1) {
_animationState = 24;
@@ -1718,6 +1770,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
default:
if (Random_Query(0, 1) == 1) {
_animationState = 26;
@@ -1801,38 +1854,53 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
case kAnimationModeDie:
switch (_animationState) {
case 14:
+ // fall through
case 15:
+ // fall through
case 17:
+ // fall through
case 18:
+ // fall through
case 19:
+ // fall through
case 20:
+ // fall through
case 21:
+ // fall through
case 22:
_animationState = 28;
_animationFrame = 0;
break;
+
case 27:
+ // fall through
case 28:
+ // fall through
case 50:
break;
+
default:
_animationState = 27;
_animationFrame = 0;
break;
}
break;
+
case kAnimationModeCombatDie:
_animationState = 28;
_animationFrame = 0;
break;
+
case 51:
_animationState = 27;
_animationFrame = 0;
break;
+
case kAnimationModeFeeding:
_animationState = 55;
_animationFrame = 0;
break;
+
case kAnimationModeSit:
if (_animationState != 60 && (Player_Query_Current_Set() == kSetNR03 || Player_Query_Current_Set() == kSetNR05_NR08)) {
_animationState = 60;
@@ -1842,27 +1910,32 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationState = 70;
}
break;
+
case kAnimationModeClimbUp:
// fall through
case kAnimationModeCombatClimbUp:
_animationState = 42;
_animationFrame = 0;
break;
+
case kAnimationModeClimbDown:
// fall through
case kAnimationModeCombatClimbDown:
_animationState = 43;
_animationFrame = 0;
break;
+
case 68:
_animationState = 29;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(18) - 1;
_animationLoopDirection = -1;
break;
+
case 75:
_animationState = 67;
_animationFrame = 0;
break;
+
case 85:
_animationFrame = 0;
_animationState = 69;
diff --git a/engines/bladerunner/script/ai/mutant1.cpp b/engines/bladerunner/script/ai/mutant1.cpp
index 4ca1164e19..017550cb34 100644
--- a/engines/bladerunner/script/ai/mutant1.cpp
+++ b/engines/bladerunner/script/ai/mutant1.cpp
@@ -338,7 +338,9 @@ bool AIScriptMutant1::GoalChanged(int currentGoalNumber, int newGoalNumber) {
break;
case kSetUG04:
+ // fall through
case kSetUG05:
+ // fall through
case kSetUG06:
Non_Player_Actor_Combat_Mode_On(kActorMutant1, kActorCombatStateIdle, false, kActorMcCoy, 10, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
break;
@@ -348,7 +350,9 @@ bool AIScriptMutant1::GoalChanged(int currentGoalNumber, int newGoalNumber) {
break;
case kSetUG10:
+ // fall through
case kSetUG12:
+ // fall through
case kSetUG14:
Non_Player_Actor_Combat_Mode_On(kActorMutant1, kActorCombatStateIdle, false, kActorMcCoy, 14, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
break;
@@ -408,6 +412,7 @@ bool AIScriptMutant1::UpdateAnimation(int *animation, int *frame) {
break;
case 1:
+ // fall through
case 2:
*animation = 893;
++_animationFrame;
@@ -528,6 +533,7 @@ bool AIScriptMutant1::ChangeAnimationMode(int mode) {
break;
case 1:
+ // fall through
case 7:
_animationState = 1;
_animationFrame = 0;
@@ -574,7 +580,9 @@ bool AIScriptMutant1::ChangeAnimationMode(int mode) {
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 21:
+ // fall through
case 22:
_animationState = 10;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/mutant2.cpp b/engines/bladerunner/script/ai/mutant2.cpp
index 54633ae3ef..fd94430da3 100644
--- a/engines/bladerunner/script/ai/mutant2.cpp
+++ b/engines/bladerunner/script/ai/mutant2.cpp
@@ -320,13 +320,17 @@ bool AIScriptMutant2::GoalChanged(int currentGoalNumber, int newGoalNumber) {
break;
case kSetUG04:
+ // fall through
case kSetUG05:
+ // fall through
case kSetUG06:
Non_Player_Actor_Combat_Mode_On(kActorMutant2, kActorCombatStateIdle, false, kActorMcCoy, 10, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
break;
case kSetUG10:
+ // fall through
case kSetUG12:
+ // fall through
case kSetUG14:
Non_Player_Actor_Combat_Mode_On(kActorMutant2, kActorCombatStateIdle, false, kActorMcCoy, 14, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
break;
@@ -481,12 +485,14 @@ bool AIScriptMutant2::ChangeAnimationMode(int mode) {
break;
case 1:
+ // fall through
case 7:
_animationState = 1;
_animationFrame = 0;
break;
case 2:
+ // fall through
case 8:
_animationState = 2;
_animationFrame = 0;
@@ -519,6 +525,7 @@ bool AIScriptMutant2::ChangeAnimationMode(int mode) {
break;
case 21:
+ // fall through
case 22:
_animationState = 8;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/mutant3.cpp b/engines/bladerunner/script/ai/mutant3.cpp
index aceddf728d..f5e3059607 100644
--- a/engines/bladerunner/script/ai/mutant3.cpp
+++ b/engines/bladerunner/script/ai/mutant3.cpp
@@ -331,13 +331,17 @@ bool AIScriptMutant3::GoalChanged(int currentGoalNumber, int newGoalNumber) {
break;
case kSetUG04:
+ // fall through
case kSetUG05:
+ // fall through
case kSetUG06:
Non_Player_Actor_Combat_Mode_On(kActorMutant3, kActorCombatStateIdle, false, kActorMcCoy, 10, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
break;
case kSetUG10:
+ // fall through
case kSetUG12:
+ // fall through
case kSetUG14:
Non_Player_Actor_Combat_Mode_On(kActorMutant3, kActorCombatStateIdle, false, kActorMcCoy, 14, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
break;
@@ -514,6 +518,7 @@ bool AIScriptMutant3::ChangeAnimationMode(int mode) {
case 0:
switch (_animationState) {
case 3:
+ // fall through
case 4:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
@@ -521,7 +526,6 @@ bool AIScriptMutant3::ChangeAnimationMode(int mode) {
case 8:
_animationState = 10;
_animationFrame = 0;
-
break;
case 10:
@@ -535,18 +539,21 @@ bool AIScriptMutant3::ChangeAnimationMode(int mode) {
break;
case 1:
+ // fall through
case 7:
_animationState = 1;
_animationFrame = 0;
break;
case 2:
+ // fall through
case 8:
_animationState = 2;
_animationFrame = 0;
break;
case 3:
+ // fall through
case 12:
_animationState = 3;
_animationFrame = 0;
@@ -568,6 +575,7 @@ bool AIScriptMutant3::ChangeAnimationMode(int mode) {
break;
case 21:
+ // fall through
case 22:
_animationState = 11;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/officer_grayford.cpp b/engines/bladerunner/script/ai/officer_grayford.cpp
index 723e6c6639..fcbe3e2cd0 100644
--- a/engines/bladerunner/script/ai/officer_grayford.cpp
+++ b/engines/bladerunner/script/ai/officer_grayford.cpp
@@ -135,13 +135,16 @@ bool AIScriptOfficerGrayford::Update() {
Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 10, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
// TODO missing UG07 case - would be a type 10 combat, 12 flee?
+
case kSetUG08:
if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) {
Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4);
Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 13, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
// TODO missing UG09 case - would be a type ?? //
case kSetUG10:
@@ -358,7 +361,9 @@ void AIScriptOfficerGrayford::ClickedByPlayer() {
Actor_Says(kActorOfficerGrayford, 330, 13);
Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordWalksInPS09b);
break;
+
// TODO goals 6 and 9?
+
case kGoalOfficerGrayfordWalksInPS09c:
AI_Movement_Track_Flush(kActorOfficerGrayford);
Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopAndTalk1);
@@ -1067,6 +1072,7 @@ bool AIScriptOfficerGrayford::UpdateAnimation(int *animation, int *frame) {
break;
case 18:
+ // fall through
case 19:
*animation = 605;
++_animationFrame;
@@ -1290,13 +1296,21 @@ bool AIScriptOfficerGrayford::ChangeAnimationMode(int mode) {
case kAnimationModeIdle:
switch (_animationState) {
case 9:
+ // fall through
case 10:
+ // fall through
case 11:
+ // fall through
case 12:
+ // fall through
case 13:
+ // fall through
case 14:
+ // fall through
case 15:
+ // fall through
case 16:
+ // fall through
case 17:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
@@ -1316,10 +1330,15 @@ bool AIScriptOfficerGrayford::ChangeAnimationMode(int mode) {
break;
case 20:
+ // fall through
case 21:
+ // fall through
case 34:
+ // fall through
case 35:
+ // fall through
case 36:
+ // fall through
case 37:
return true;
@@ -1361,16 +1380,22 @@ bool AIScriptOfficerGrayford::ChangeAnimationMode(int mode) {
case kAnimationModeCombatIdle:
switch (_animationState) {
case 5:
+ // fall through
case 6:
+ // fall through
case 7:
+ // fall through
case 8:
_animationState = 19;
_animationFrame = 0;
break;
case 19:
+ // fall through
case 20:
+ // fall through
case 22:
+ // fall through
case 24:
return true;
@@ -1456,11 +1481,17 @@ bool AIScriptOfficerGrayford::ChangeAnimationMode(int mode) {
case kAnimationModeHit:
switch (_animationState) {
case 19:
+ // fall through
case 20:
+ // fall through
case 22:
+ // fall through
case 23:
+ // fall through
case 24:
+ // fall through
case 25:
+ // fall through
case 26:
if (Random_Query(0, 1)) {
_animationState = 27;
@@ -1518,16 +1549,22 @@ bool AIScriptOfficerGrayford::ChangeAnimationMode(int mode) {
case kAnimationModeDie:
switch (_animationState) {
case 0:
+ // fall through
case 1:
+ // fall through
case 2:
+ // fall through
case 3:
+ // fall through
case 4:
+ // fall through
case 7:
_animationState = 20;
_animationFrame = 0;
break;
case 5:
+ // fall through
case 6:
return true;
diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp
index a4d55b0d73..8fd57e84dc 100644
--- a/engines/bladerunner/script/ai/officer_leary.cpp
+++ b/engines/bladerunner/script/ai/officer_leary.cpp
@@ -126,42 +126,49 @@ bool AIScriptOfficerLeary::Update() {
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 0, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
case kSetBB01:
if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4);
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 1, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
case kSetCT11:
if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4);
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 5, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
case kSetMA07:
if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4);
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 7, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
case kSetNR01:
if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4);
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 3, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
case kSetRC03:
if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4);
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 18, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
case kSetUG01:
if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4);
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 11, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
case kSetUG04:
// fall through
case kSetUG05:
@@ -172,26 +179,32 @@ bool AIScriptOfficerLeary::Update() {
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 10, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
// TODO Missing UG07 case - would be a type 10 combat, 12 flee?
+
case kSetUG08:
if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4);
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 13, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
// TODO Missing UG09 case - would be a type ?? //
+
case kSetUG10:
if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4);
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 14, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
case kSetUG12:
if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4);
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 16, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false);
}
break;
+
case kSetUG14:
if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4);
@@ -295,24 +308,34 @@ int AIScriptOfficerLeary::GetFriendlinessModifierIfGetsClue(int otherActorId, in
switch (clueId) {
case kClueMcCoyIsInsane:
return -6;
+
case kClueMcCoyIsAnnoying:
return -2;
+
case kClueMcCoyIsStupid:
return -5;
+
case kClueMcCoyRetiredLutherLance:
return 2;
+
case kClueMcCoyShotZubenInTheBack:
return 4;
+
case kClueMcCoyRetiredSadik:
return 4;
+
case kClueMcCoyRetiredGordo:
return 3;
+
case kClueMcCoyRetiredDektora:
return 3;
+
case kClueMcCoyRetiredLucy:
return 2;
+
case kClueMcCoyRetiredZuben:
return 3;
+
case kClueMcCoyLetZubenEscape:
return -5;
}
@@ -333,6 +356,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
}
AI_Movement_Track_Repeat(kActorOfficerLeary);
return true;
+
case kGoalOfficerLearyRC01CrowdInterrogation:
if (Random_Query(1, 3) == 1) {
if ( Random_Query(1, 2) == 1
@@ -355,6 +379,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDefault);
}
return true;
+
case kGoalOfficerLearyPoliceDoneFromRC01:
// kSetFreeSlotG -> kSetFreeSlotC
AI_Movement_Track_Flush(kActorOfficerLeary);
@@ -362,6 +387,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 35, 0); // kSetFreeSlotC
AI_Movement_Track_Repeat(kActorOfficerLeary);
return true;
+
#if BLADERUNNER_ORIGINAL_BUGS
#else
case kGoalOfficerLearyRC01ResumeWalkToCrowd:
@@ -369,9 +395,11 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Countdown_Timer_Start(kActorOfficerLeary, kActorTimerAIScriptCustomTask0, 4); // wait a few seconds before starting taking notes again
return true;
#endif // BLADERUNNER_ORIGINAL_BUGS
+
case kGoalOfficerLearyEndOfAct1:
AI_Movement_Track_Flush(kActorOfficerLeary);
return false;
+
case kGoalOfficerLearyVisitsBulletBob:
// kSetRC04
// Leary visits Bullet Bob shop - un-triggered
@@ -380,9 +408,11 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 108, 0);
AI_Movement_Track_Repeat(kActorOfficerLeary);
return true;
+
case kGoalOfficerLearyStartOfAct4:
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyHuntingAroundAct4);
return true;
+
case kGoalOfficerLearyHuntingAroundAct4:
// debug("Flushing Leary movement track");
AI_Movement_Track_Flush(kActorOfficerLeary);
@@ -399,6 +429,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 404, 15);
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
+
case 2:
// kSetCT11
// debug("leary 2 kSetCT11");
@@ -408,6 +439,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 387, 15);
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
+
case 3:
// kSetDR01_DR02_DR04
// debug("leary 3 kSetDR01_DR02_DR04");
@@ -418,6 +450,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 393, 15);
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
+
case 4:
// kSetRC03 -> kSetFreeSlotC
// debug("leary 4 kSetRC03 -> kSetFreeSlotC");
@@ -429,6 +462,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
+
case 5:
// kSetBB01 -> kSetFreeSlotC
// debug("leary 5 kSetBB01 -> kSetFreeSlotC");
@@ -437,6 +471,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
+
case 6:
// kSetCT11 - identical to case 2
// debug("leary 6 kSetCT11 - identical to case 2");
@@ -446,6 +481,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 387, 15);
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
+
#if BLADERUNNER_ORIGINAL_BUGS
// Gaff is waiting at MA07 and he will trigger a non-interactive dialogue with McCoy.
// When the police officer is there as well he will kill McCoy because player cannot control him.
@@ -471,6 +507,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
#endif // BLADERUNNER_ORIGINAL_BUGS
+
case 8:
switch (Random_Query(1, 7)) {
case 1:
@@ -482,6 +519,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
+
case 2:
// kSetUG14
// debug("leary 8-2 kSetUG14");
@@ -492,6 +530,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 536, 0);
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
+
case 3:
// kSetUG04 -> kSetFreeSlotC
// debug("leary 8-3 kSetUG04 -> kSetFreeSlotC");
@@ -501,6 +540,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
+
case 4:
// kSetUG05 -> kSetFreeSlotC
// debug("leary 8-4 kSetUG05 -> kSetFreeSlotC");
@@ -510,6 +550,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
+
case 5:
#if BLADERUNNER_ORIGINAL_BUGS
// kSetUG06 -> kSetFreeSlotC
@@ -537,7 +578,6 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
}
#endif // BLADERUNNER_ORIGINAL_BUGS
// fall through
-
case 6:
// kSetUG07 -> kSetFreeSlotC
#if BLADERUNNER_ORIGINAL_BUGS
@@ -573,6 +613,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC
AI_Movement_Track_Repeat(kActorOfficerLeary);
return false;
+
default:
return false;
}
@@ -630,6 +671,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
// debug("Setting Leary goal to kGoalOfficerLearyHuntingAroundAct4");
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyHuntingAroundAct4);
return true;
+
case kGoalOfficerLearyBlockingUG07:
// kSetUG07
AI_Movement_Track_Flush(kActorOfficerLeary);
@@ -637,6 +679,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
Actor_Change_Animation_Mode(kActorOfficerLeary, kAnimationModeCombatIdle);
AI_Movement_Track_Repeat(kActorOfficerLeary);
return true;
+
case 308:
// kSetCT01_CT12
// never triggered - TODO a bug? Could be related to cut McCoy's arrest from Grayford
@@ -645,6 +688,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append_Run_With_Facing(kActorOfficerLeary, 441, 0, 825);
AI_Movement_Track_Repeat(kActorOfficerLeary);
return true;
+
case kGoalOfficerLearyStartOfAct5:
// kSetFreeSlotC
AI_Movement_Track_Flush(kActorOfficerLeary);
@@ -652,20 +696,24 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Repeat(kActorOfficerLeary);
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDummyGoalAct5);
return true;
+
case kGoalOfficerLearyPoliceWait120SecondsToAttackHF05:
AI_Countdown_Timer_Reset(kActorOfficerLeary, kActorTimerAIScriptCustomTask1);
AI_Countdown_Timer_Start(kActorOfficerLeary, kActorTimerAIScriptCustomTask1, 120);
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDummyGoalAct5);
return true;
+
case kGoalOfficerLearyPoliceWait60SecondsToAttackHF05:
AI_Countdown_Timer_Reset(kActorOfficerLeary, kActorTimerAIScriptCustomTask1);
AI_Countdown_Timer_Start(kActorOfficerLeary, kActorTimerAIScriptCustomTask1, 60);
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDummyGoalAct5);
return true;
+
case kGoalOfficerLearyPoliceAboutToAttackHF05:
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDummyGoalAct5);
Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordDummyGoalAct5);
return false;
+
default:
return false;
}
@@ -684,6 +732,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 31:
*animation = 604;
++_animationFrame;
@@ -694,6 +743,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 30:
*animation = 587;
++_animationFrame;
@@ -705,6 +755,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 29:
*animation = 586;
++_animationFrame;
@@ -716,6 +767,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 28:
*animation = 576;
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(576) - 1) {
@@ -723,6 +775,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 27:
*animation = 588;
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(588) - 1) {
@@ -730,6 +783,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 26:
*animation = 573;
++_animationFrame;
@@ -741,6 +795,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 25:
*animation = 572;
++_animationFrame;
@@ -752,6 +807,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 24:
*animation = 581;
++_animationFrame;
@@ -773,6 +829,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 23:
*animation = 580;
++_animationFrame;
@@ -783,6 +840,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 22:
*animation = 579;
++_animationFrame;
@@ -793,6 +851,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 21:
*animation = 571;
++_animationFrame;
@@ -801,6 +860,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 20:
*animation = 571;
++_animationFrame;
@@ -809,6 +869,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 19:
*animation = 600;
++_animationFrame;
@@ -819,6 +880,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 18:
*animation = 599;
++_animationFrame;
@@ -829,6 +891,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 17:
*animation = 598;
++_animationFrame;
@@ -839,6 +902,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 16:
*animation = 597;
++_animationFrame;
@@ -849,6 +913,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 15:
*animation = 596;
++_animationFrame;
@@ -859,6 +924,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 14:
*animation = 595;
++_animationFrame;
@@ -869,6 +935,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 13:
*animation = 594;
++_animationFrame;
@@ -879,6 +946,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 12:
*animation = 593;
++_animationFrame;
@@ -889,6 +957,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 11:
if (_animationFrame <= 2) {
var_45D5BC = 0;
@@ -917,6 +986,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 10:
*animation = 578;
++_animationFrame;
@@ -925,6 +995,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 9:
*animation = 577;
++_animationFrame;
@@ -933,6 +1004,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 8:
*animation = 575;
++_animationFrame;
@@ -941,6 +1013,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 7:
*animation = 574;
++_animationFrame;
@@ -949,6 +1022,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 6:
*animation = 585;
++_animationFrame;
@@ -957,6 +1031,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 5:
*animation = 584;
++_animationFrame;
@@ -965,6 +1040,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 4:
*animation = 583;
++_animationFrame;
@@ -973,6 +1049,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 3:
*animation = 582;
++_animationFrame;
@@ -981,6 +1058,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 2:
if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
*animation = 603;
@@ -1019,6 +1097,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 1:
*animation = 601;
++_animationFrame;
@@ -1032,6 +1111,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
return true;
+
case 0:
if ( Game_Flag_Query(kFlagOfficerLearyTakingNotes)
&& !Game_Flag_Query(kFlagRC01McCoyAndOfficerLearyTalking)) {
@@ -1077,30 +1157,44 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
case kAnimationModeIdle:
switch (_animationState) {
case 21:
+ // fall through
case 24:
_animationState = 23;
_animationFrame = 0;
break;
+
case 20:
v1 = _animationFrame;
Actor_Change_Animation_Mode(kActorOfficerLeary, kAnimationModeCombatIdle);
_animationFrame = v1;
_animationState = 21;
break;
+
case 11:
+ // fall through
case 12:
+ // fall through
case 13:
+ // fall through
case 14:
+ // fall through
case 15:
+ // fall through
case 16:
+ // fall through
case 17:
+ // fall through
case 18:
+ // fall through
case 19:
var_45D5BC = 1;
break;
+
case 0:
+ // fall through
case 23:
break;
+
default:
_animationState = 0;
_animationFrame = 0;
@@ -1108,14 +1202,17 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
}
break;
+
case kAnimationModeWalk:
_animationState = 3;
_animationFrame = 0;
break;
+
case kAnimationModeRun:
_animationState = 4;
_animationFrame = 0;
break;
+
case kAnimationModeTalk:
if (_animationState == 1) {
_animationState = 2;
@@ -1131,41 +1228,54 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
var_45D5BC = 0;
}
break;
+
case kAnimationModeCombatIdle:
switch (_animationState) {
case 21:
+ // fall through
case 22:
+ // fall through
case 24:
break;
+
case 7:
+ // fall through
case 8:
+ // fall through
case 9:
+ // fall through
case 10:
_animationState = 21;
_animationFrame = 0;
break;
+
case 0:
_animationState = 22;
_animationFrame = 0;
break;
+
default:
_animationState = 21;
_animationFrame = 0;
break;
}
break;
+
case kAnimationModeCombatAttack:
_animationState = 24;
_animationFrame = 0;
break;
+
case kAnimationModeCombatWalk:
_animationState = 7;
_animationFrame = 0;
break;
+
case kAnimationModeCombatRun:
_animationState = 8;
_animationFrame = 0;
break;
+
case 12:
if (_animationState == 1) {
_animationState = 2;
@@ -1180,6 +1290,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
var_45D5BC = 0;
}
break;
+
case 13:
if (_animationState == 1) {
_animationState = 2;
@@ -1194,6 +1305,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
var_45D5BC = 0;
}
break;
+
case 14:
if (_animationState == 1) {
_animationState = 2;
@@ -1208,6 +1320,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
var_45D5BC = 0;
}
break;
+
case 15:
if (_animationState == 1) {
_animationState = 2;
@@ -1222,6 +1335,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
var_45D5BC = 0;
}
break;
+
case 16:
if (_animationState == 1) {
_animationState = 2;
@@ -1236,6 +1350,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
var_45D5BC = 0;
}
break;
+
case 17:
if (_animationState == 1) {
_animationState = 2;
@@ -1250,6 +1365,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
var_45D5BC = 0;
}
break;
+
case 18:
if (_animationState == 1) {
_animationState = 2;
@@ -1264,6 +1380,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
var_45D5BC = 0;
}
break;
+
case 19:
if (_animationState == 1) {
_animationState = 2;
@@ -1278,6 +1395,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
var_45D5BC = 0;
}
break;
+
case 21:
if (_animationState == 24) {
if (Random_Query(0, 1)) {
@@ -1295,6 +1413,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
+
case 22:
if (Random_Query(0, 1)) {
_animationState = 25;
@@ -1303,28 +1422,35 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
case 27:
Game_Flag_Reset(kFlagOfficerLearyTakingNotes);
break;
+
case 28:
Game_Flag_Set(kFlagOfficerLearyTakingNotes);
break;
+
case kAnimationModeWalkUp:
_animationState = 5;
_animationFrame = 0;
break;
+
case kAnimationModeWalkDown:
_animationState = 6;
_animationFrame = 0;
break;
+
case kAnimationModeCombatWalkUp:
_animationState = 9;
_animationFrame = 0;
break;
+
case kAnimationModeCombatWalkDown:
_animationState = 10;
_animationFrame = 0;
break;
+
case kAnimationModeDie:
if (_animationState == 24) {
_animationState = 28;
@@ -1334,6 +1460,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
+
case 58:
_animationState = 20;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/rachael.cpp b/engines/bladerunner/script/ai/rachael.cpp
index fc3ff66d5c..e8c3d611fc 100644
--- a/engines/bladerunner/script/ai/rachael.cpp
+++ b/engines/bladerunner/script/ai/rachael.cpp
@@ -322,50 +322,60 @@ bool AIScriptRachael::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
+
case kAnimationModeWalk:
_animationState = 1;
_animationFrame = 0;
break;
+
case kAnimationModeTalk:
_animationState = 2;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 12:
_animationState = 3;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 13:
_animationState = 4;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 14:
_animationState = 5;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 15:
_animationState = 6;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 16:
_animationState = 7;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 17:
_animationState = 8;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 18:
_animationState = 9;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
default:
break;
}
diff --git a/engines/bladerunner/script/ai/runciter.cpp b/engines/bladerunner/script/ai/runciter.cpp
index d83b4c27ba..cbe190c125 100644
--- a/engines/bladerunner/script/ai/runciter.cpp
+++ b/engines/bladerunner/script/ai/runciter.cpp
@@ -74,13 +74,17 @@ void AIScriptRunciter::CompletedMovementTrack() {
if (Player_Query_Current_Scene() == kSceneRC02) {
switch (Random_Query(1, 5)) {
case 2:
+ // fall through
case 3:
ADQ_Add(kActorRunciter, 530, -1);
break;
+
case 1:
+ // fall through
case 5:
ADQ_Add(kActorRunciter, 80, -1);
break;
+
case 4:
ADQ_Add(kActorRunciter, 930, -1);
break;
@@ -410,6 +414,7 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
+
case 10:
*animation = 540;
++_animationFrame;
@@ -672,15 +677,19 @@ bool AIScriptRunciter::ReachedMovementTrackWaypoint(int waypointId) {
case 89:
Actor_Face_Heading(kActorRunciter, 567, true);
break;
+
case 90:
Actor_Face_Heading(kActorRunciter, 170, true);
break;
+
case 91:
Actor_Face_Heading(kActorRunciter, 120, true);
break;
+
case 92:
Actor_Face_Heading(kActorRunciter, 664, true);
break;
+
case 93:
Actor_Face_Heading(kActorRunciter, 1002, true);
break;
diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp
index 16669263f7..49e02779bc 100644
--- a/engines/bladerunner/script/ai/sadik.cpp
+++ b/engines/bladerunner/script/ai/sadik.cpp
@@ -353,7 +353,9 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case 305:
+ // fall through
case kGoalSadikUG18WillShootMcCoy:
+ // fall through
case kGoalSadikUG18Leave:
return true;
@@ -484,6 +486,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case 420:
+ // fall through
case 450:
return true;
}
@@ -534,27 +537,37 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
break;
case 1:
+ // fall through
case 2:
+ // fall through
case 3:
+ // fall through
case 4:
+ // fall through
case 5:
+ // fall through
case 6:
switch (_animationState) {
case 1:
*animation = 323;
break;
+
case 2:
*animation = 324;
break;
+
case 3:
*animation = 317;
break;
+
case 4:
*animation = 318;
break;
+
case 6:
*animation = 340;
break;
+
case 5:
*animation = 339;
break;
@@ -711,31 +724,43 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
break;
case 20:
+ // fall through
case 21:
+ // fall through
case 22:
+ // fall through
case 23:
+ // fall through
case 24:
+ // fall through
case 25:
+ // fall through
case 26:
switch (_animationState) {
case 20:
*animation = 332;
break;
+
case 21:
*animation = 333;
break;
+
case 22:
*animation = 334;
break;
+
case 23:
*animation = 335;
break;
+
case 24:
*animation = 336;
break;
+
case 25:
*animation = 337;
break;
+
default:
*animation = 338;
break;
@@ -886,18 +911,28 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
case kAnimationModeIdle:
switch (_animationState) {
case 19:
+ // fall through
case 20:
+ // fall through
case 21:
+ // fall through
case 22:
+ // fall through
case 23:
+ // fall through
case 24:
+ // fall through
case 25:
+ // fall through
case 26:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
case 30:
+ // fall through
case 31:
return 1;
+
default:
_animationState = 0;
_animationFrame = 0;
@@ -927,15 +962,21 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
_animationFrame = 0;
_animationState = 16;
break;
+
case 3:
+ // fall through
case 4:
_animationState = 7;
_animationFrame = 0;
break;
+
case 7:
+ // fall through
case 16:
+ // fall through
case 18:
return true;
+
case 17:
_animationFrame = 0;
_animationState = 7;
@@ -948,10 +989,15 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
break;
case 5:
+ // fall through
case 9:
+ // fall through
case 10:
+ // fall through
case 11:
+ // fall through
case 19:
+ // fall through
case 20:
return true;
@@ -1008,10 +1054,15 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
case kAnimationModeHit:
switch (_animationState) {
case 7:
+ // fall through
case 8:
+ // fall through
case 9:
+ // fall through
case 16:
+ // fall through
case 17:
+ // fall through
case 18:
if (Random_Query(0, 1)) {
_animationState = 13;
@@ -1019,11 +1070,17 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
_animationState = 12;
}
break;
+
case 10:
+ // fall through
case 11:
+ // fall through
case 12:
+ // fall through
case 13:
+ // fall through
case 14:
+ // fall through
case 15:
if (Random_Query(0, 1)) {
_animationState = 11;
diff --git a/engines/bladerunner/script/ai/sergeant_walls.cpp b/engines/bladerunner/script/ai/sergeant_walls.cpp
index 68cbd5440a..0c987b7faf 100644
--- a/engines/bladerunner/script/ai/sergeant_walls.cpp
+++ b/engines/bladerunner/script/ai/sergeant_walls.cpp
@@ -114,6 +114,7 @@ bool AIScriptSergeantWalls::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 1:
*animation = 725;
++_animationFrame;
@@ -121,6 +122,7 @@ bool AIScriptSergeantWalls::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 3:
*animation = 726;
++_animationFrame;
@@ -130,6 +132,7 @@ bool AIScriptSergeantWalls::UpdateAnimation(int *animation, int *frame) {
*animation = 725;
}
break;
+
case 4:
*animation = 727;
++_animationFrame;
@@ -139,6 +142,7 @@ bool AIScriptSergeantWalls::UpdateAnimation(int *animation, int *frame) {
*animation = 725;
}
break;
+
case 5:
*animation = 728;
++_animationFrame;
@@ -148,6 +152,7 @@ bool AIScriptSergeantWalls::UpdateAnimation(int *animation, int *frame) {
*animation = 725;
}
break;
+
case 6:
*animation = 729;
++_animationFrame;
@@ -157,6 +162,7 @@ bool AIScriptSergeantWalls::UpdateAnimation(int *animation, int *frame) {
*animation = 725;
}
break;
+
case 7:
*animation = 730;
++_animationFrame;
@@ -166,6 +172,7 @@ bool AIScriptSergeantWalls::UpdateAnimation(int *animation, int *frame) {
*animation = 725;
}
break;
+
case 8:
*animation = 731;
++_animationFrame;
@@ -175,6 +182,7 @@ bool AIScriptSergeantWalls::UpdateAnimation(int *animation, int *frame) {
*animation = 725;
}
break;
+
case 9:
*animation = 724;
++_animationFrame;
@@ -184,6 +192,7 @@ bool AIScriptSergeantWalls::UpdateAnimation(int *animation, int *frame) {
*animation = 724;
}
break;
+
default:
// TODO: A bug? 399 is a Zuben animation
*animation = 399;
@@ -199,34 +208,42 @@ bool AIScriptSergeantWalls::ChangeAnimationMode(int mode) {
_animationState = 0;
_animationFrame = 0;
break;
+
case kAnimationModeTalk:
_animationState = 1;
_animationFrame = 0;
break;
+
case 12:
_animationState = 3;
_animationFrame = 0;
break;
+
case 13:
_animationState = 4;
_animationFrame = 0;
break;
+
case 14:
_animationState = 5;
_animationFrame = 0;
break;
+
case 15:
_animationState = 6;
_animationFrame = 0;
break;
+
case 16:
_animationState = 7;
_animationFrame = 0;
break;
+
case 17:
_animationState = 8;
_animationFrame = 0;
break;
+
case 23:
_animationState = 9;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/shoeshine_man.cpp b/engines/bladerunner/script/ai/shoeshine_man.cpp
index 31d736b9d8..c6d6d30d15 100644
--- a/engines/bladerunner/script/ai/shoeshine_man.cpp
+++ b/engines/bladerunner/script/ai/shoeshine_man.cpp
@@ -108,6 +108,7 @@ bool AIScriptShoeshineMan::GoalChanged(int currentGoalNumber, int newGoalNumber)
Actor_Put_In_Set(kActorShoeshineMan, kSetDR01_DR02_DR04);
Actor_Set_At_XYZ(kActorShoeshineMan, -1160.0f, -0.04f, -235.0f, 524);
break;
+
case 101:
AI_Movement_Track_Flush(kActorShoeshineMan);
AI_Movement_Track_Append(kActorShoeshineMan, 281, 0);
@@ -132,33 +133,40 @@ bool AIScriptShoeshineMan::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
+
case 1:
_animationState = 1;
_animationFrame = 0;
break;
+
case 3:
_animationState = 2;
_animationFrame = 0;
_state = false;
break;
+
case 12:
_animationState = 3;
_animationFrame = 0;
_state = false;
break;
+
case 13:
_animationState = 4;
_animationFrame = 0;
_state = false;
break;
+
case 23:
_animationState = 5;
_animationFrame = 0;
break;
+
case 29:
_animationState = 6;
_animationFrame = 0;
break;
+
default:
break;
}
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index 603bbbbddc..7cec5bf4c3 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -912,7 +912,9 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case kGoalSteeleNR11Entered:
+ // fall through
case 216:
+ // fall through
case kGoalSteeleNR01PrepareShotByMcCoy:
return true;
@@ -1359,7 +1361,9 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case kGoalSteeleStartChapter5:
+ // fall through
case 401:
+ // fall through
case kGoalSteeleKP01Left:
return true;
@@ -2019,36 +2023,54 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
switch (_animationState) {
case 0:
+ // fall through
case 24:
+ // fall through
case 34:
+ // fall through
case 35:
+ // fall through
case 41:
return true;
+
case 4:
_animationState = 23;
_animationFrame = 0;
break;
+
case 14:
+ // fall through
case 15:
+ // fall through
case 16:
+ // fall through
case 17:
+ // fall through
case 18:
+ // fall through
case 19:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
case 20:
+ // fall through
case 21:
+ // fall through
case 22:
+ // fall through
case 37:
_resumeIdleAfterFramesetCompletesFlag = true;
_animationState = 23;
_animationFrame = 0;
break;
+
case 23:
+ // fall through
case 26:
_animationState = 24;
_animationFrame = 0;
break;
+
default:
_animationFrame = 0;
if (Game_Flag_Query(kFlagSteeleSmoking)) {
diff --git a/engines/bladerunner/script/ai/transient.cpp b/engines/bladerunner/script/ai/transient.cpp
index 9ac76a2c76..d756ff0627 100644
--- a/engines/bladerunner/script/ai/transient.cpp
+++ b/engines/bladerunner/script/ai/transient.cpp
@@ -91,9 +91,11 @@ void AIScriptTransient::TimerExpired(int timer) {
case 1:
Sound_Play(kSfxBUMSNOR1, 50, 0, 0, 50);
break;
+
case 2:
Sound_Play(kSfxBUMSNOR2, 50, 0, 0, 50);
break;
+
case 3:
Sound_Play(kSfxBUMSNOR3, 50, 0, 0, 50);
break;
@@ -189,15 +191,18 @@ bool AIScriptTransient::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorTransient, 42, 1);
AI_Movement_Track_Repeat(kActorTransient);
return true;
+
case 6:
AI_Movement_Track_Flush(kActorTransient);
AI_Movement_Track_Append(kActorTransient, 41, 10);
AI_Movement_Track_Repeat(kActorTransient);
return true;
+
case 200:
Actor_Put_In_Set(kActorTransient, kSetFreeSlotH);
Actor_Set_At_Waypoint(kActorTransient, 40, 0);
return true;
+
case 390:
// laying on the couch - not sleeping
Actor_Put_In_Set(kActorTransient, kSetUG13);
@@ -206,15 +211,18 @@ bool AIScriptTransient::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Targetable(kActorTransient, true);
Game_Flag_Set(kFlagUG13HomelessLayingdown);
return true;
+
case 391:
// laying on the couch - sleeping - dialogue exhausted pre-flask - awaiting flask
Actor_Change_Animation_Mode(kActorTransient, 53);
return true;
+
case 395:
// laying on the couch - sleeping - post flask
Actor_Change_Animation_Mode(kActorTransient, 55);
AI_Countdown_Timer_Start(kActorTransient, kActorTimerAIScriptCustomTask0, Random_Query(30, 40));
return true;
+
case 599:
AI_Countdown_Timer_Reset(kActorTransient, kActorTimerAIScriptCustomTask0);
return true;
@@ -236,6 +244,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 1:
*animation = kModelAnimationTransientWalking;
++_animationFrame;
@@ -243,6 +252,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 2:
*animation = kModelAnimationTransientGestureGive;
++_animationFrame;
@@ -250,6 +260,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 3:
*animation = kModelAnimationTransientScratchBackOfHeadTalk;
++_animationFrame;
@@ -259,6 +270,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 4:
*animation = kModelAnimationTransientDescriptiveTalk;
++_animationFrame;
@@ -268,6 +280,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 5:
*animation = kModelAnimationTransientPointingAtTalk;
++_animationFrame;
@@ -277,6 +290,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 6:
*animation = kModelAnimationTransientLayingIdle;
++_animationFrame;
@@ -284,6 +298,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 7:
*animation = kModelAnimationTransientLayingCalmTalk;
++_animationFrame;
@@ -292,6 +307,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 8:
*animation = kModelAnimationTransientLayingMoreCalmTalk;
++_animationFrame;
@@ -300,6 +316,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 9:
*animation = kModelAnimationTransientLayingThisAndThatTalk;
++_animationFrame;
@@ -308,6 +325,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 10:
*animation = kModelAnimationTransientLayingGestureGiveOrTake;
++_animationFrame;
@@ -316,6 +334,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 11:
*animation = kModelAnimationTransientLayingShotDead;
++_animationFrame;
@@ -325,10 +344,12 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationTransientLayingShotDead) - 1;
}
break;
+
case 12:
*animation = kModelAnimationTransientLayingShotDead;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationTransientLayingShotDead) - 1;
break;
+
case 14:
*animation = kModelAnimationTransientShotDeadCollapseInPlace;
++_animationFrame;
@@ -340,10 +361,12 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
Actor_Retired_Here(kActorTransient, 120, 24, 1, -1);
}
break;
+
case 15:
*animation = kModelAnimationTransientShotDeadCollapseInPlace;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationTransientShotDeadCollapseInPlace) - 1;
break;
+
case 16:
*animation = kModelAnimationTransientSearchingTrash;
++_animationFrame;
@@ -351,6 +374,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 17:
*animation = kModelAnimationTransientSearchingTrashToIdle;
++_animationFrame;
@@ -365,6 +389,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 18:
*animation = kModelAnimationTransientLayingIdle;
++_animationFrame;
@@ -372,6 +397,7 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
_animationState = 19;
}
break;
+
case 19:
*animation = kModelAnimationTransientLayingIdle;
--_animationFrame;
@@ -398,33 +424,45 @@ bool AIScriptTransient::ChangeAnimationMode(int mode) {
switch (_animationState) {
case 0:
break;
+
case 6:
+ // fall through
case 7:
+ // fall through
case 8:
+ // fall through
case 9:
+ // fall through
case 10:
+ // fall through
case 18:
+ // fall through
case 19:
_animationState = 6;
_animationFrame = 0;
break;
+
case 16:
_animationState = 17;
_animationFrame = 0;
break;
+
default:
_animationState = 0;
_animationFrame = 0;
break;
}
break;
+
case 1:
if (_animationState != 1) {
_animationState = 1;
_animationFrame = 0;
}
break;
+
case 3:
+ // fall through
case 30:
if (_animationState - 6 > 4) {
_animationState = 2;
@@ -433,7 +471,9 @@ bool AIScriptTransient::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
case 12:
+ // fall through
case 31:
if (_animationState == 6) {
_animationState = 8;
@@ -442,7 +482,9 @@ bool AIScriptTransient::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
case 13:
+ // fall through
case 32:
if (_animationState == 6) {
_animationState = 9;
@@ -451,11 +493,17 @@ bool AIScriptTransient::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
case 14:
+ // fall through
case 33:
+ // fall through
case 34:
+ // fall through
case 35:
+ // fall through
case 36:
+ // fall through
case 37:
if (_animationState == 6) {
_animationState = 10;
@@ -464,6 +512,7 @@ bool AIScriptTransient::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
case 21:
if (Game_Flag_Query(kFlagUG13HomelessLayingdown)) {
_animationState = 11;
@@ -472,15 +521,19 @@ bool AIScriptTransient::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
case 38:
_animationState = 16;
_animationFrame = 0;
break;
+
case 53:
+ // fall through
case 54:
_animationState = 6;
_animationFrame = 0;
break;
+
case 55:
if (_animationState == 6) {
Actor_Set_Frame_Rate_FPS(kActorTransient, 4);
@@ -488,6 +541,7 @@ bool AIScriptTransient::ChangeAnimationMode(int mode) {
_animationFrame = 3;
}
break;
+
case 89:
_animationState = 12;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationTransientLayingShotDead) - 1;
diff --git a/engines/bladerunner/script/ai/tyrell.cpp b/engines/bladerunner/script/ai/tyrell.cpp
index 6434625ee7..55687977e5 100644
--- a/engines/bladerunner/script/ai/tyrell.cpp
+++ b/engines/bladerunner/script/ai/tyrell.cpp
@@ -207,35 +207,42 @@ bool AIScriptTyrell::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
+
case kAnimationModeWalk:
_animationState = 1;
_animationFrame = 0;
break;
+
case kAnimationModeTalk:
_animationState = 2;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 12:
_animationState = 3;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 13:
_animationState = 4;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 14:
_animationState = 5;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
case 15:
_animationState = 6;
_animationFrame = 0;
_resumeIdleAfterFramesetCompletesFlag = false;
break;
+
default:
break;
}
diff --git a/engines/bladerunner/script/ai/tyrell_guard.cpp b/engines/bladerunner/script/ai/tyrell_guard.cpp
index 4647c4fa81..62c8cfb216 100644
--- a/engines/bladerunner/script/ai/tyrell_guard.cpp
+++ b/engines/bladerunner/script/ai/tyrell_guard.cpp
@@ -226,6 +226,7 @@ bool AIScriptTyrellGuard::UpdateAnimation(int *animation, int *frame) {
_animationState = 3;
}
break;
+
case 8:
*animation = 557;
++_animationFrame;
@@ -235,6 +236,7 @@ bool AIScriptTyrellGuard::UpdateAnimation(int *animation, int *frame) {
_animationState = 0;
}
break;
+
case 9:
*animation = 563;
++_animationFrame;
@@ -278,18 +280,26 @@ bool AIScriptTyrellGuard::ChangeAnimationMode(int mode) {
_animationState = 8;
_animationFrame = 0;
break;
+
case 1:
_animationState = 2;
break;
+
case 3:
+ // fall through
case 4:
+ // fall through
case 5:
+ // fall through
case 6:
+ // fall through
case 7:
_resumeIdleAfterFramesetCompletesFlag = true;
break;
+
case 8:
break;
+
default:
_animationState = 0;
_animationFrame = 0;
@@ -358,6 +368,7 @@ bool AIScriptTyrellGuard::ChangeAnimationMode(int mode) {
break;
case 43:
+ // fall through
case 55:
if (_animationState != 1) {
_animationState = 1;
diff --git a/engines/bladerunner/script/ai/zuben.cpp b/engines/bladerunner/script/ai/zuben.cpp
index 02acc04394..800b65012a 100644
--- a/engines/bladerunner/script/ai/zuben.cpp
+++ b/engines/bladerunner/script/ai/zuben.cpp
@@ -540,6 +540,7 @@ bool AIScriptZuben::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
return false;
}
+
case 106:
Actor_Set_Goal_Number(kActorZuben, 105);
return true;
@@ -564,6 +565,7 @@ bool AIScriptZuben::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorZuben, 39, 10); // kSetFreeSlotG
AI_Movement_Track_Repeat(kActorZuben);
break;
+
case 2:
AI_Movement_Track_Flush(kActorZuben);
AI_Movement_Track_Append(kActorZuben, 495, 0); // kSetNR02
@@ -571,6 +573,7 @@ bool AIScriptZuben::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorZuben, 33, Random_Query(15, 45));
AI_Movement_Track_Repeat(kActorZuben);
break;
+
case 3:
AI_Movement_Track_Append(kActorZuben, 498, 0); // kSetNR03
AI_Movement_Track_Append(kActorZuben, 497, 0);
@@ -579,6 +582,7 @@ bool AIScriptZuben::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorZuben, 39, 10);
AI_Movement_Track_Repeat(kActorZuben);
break;
+
case 4:
AI_Movement_Track_Flush(kActorZuben);
AI_Movement_Track_Append(kActorZuben, 499, 2); // kSetNR05_NR08
@@ -589,6 +593,7 @@ bool AIScriptZuben::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorZuben, 39, 10);
AI_Movement_Track_Repeat(kActorZuben);
break;
+
case 5:
AI_Movement_Track_Flush(kActorZuben);
AI_Movement_Track_Append(kActorZuben, 503, 0); // kSetNR05_NR08
@@ -599,6 +604,7 @@ bool AIScriptZuben::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorZuben, 39, 10);
AI_Movement_Track_Repeat(kActorZuben);
break;
+
case 6:
AI_Movement_Track_Flush(kActorZuben);
AI_Movement_Track_Append(kActorZuben, 508, 0); // kSetHF01
@@ -608,6 +614,7 @@ bool AIScriptZuben::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorZuben, 39, 10);
AI_Movement_Track_Repeat(kActorZuben);
break;
+
case 7:
AI_Movement_Track_Flush(kActorZuben);
AI_Movement_Track_Append(kActorZuben, 514, 0); // kSetHF03
@@ -617,6 +624,7 @@ bool AIScriptZuben::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorZuben, 39, 10);
AI_Movement_Track_Repeat(kActorZuben);
break;
+
case 8:
AI_Movement_Track_Flush(kActorZuben);
AI_Movement_Track_Append(kActorZuben, 510, 0); // kSetHF01
@@ -1062,84 +1070,108 @@ bool AIScriptZuben::ChangeAnimationMode(int mode) {
_animationState = 0;
_animationFrame = 0;
break;
+
case kAnimationModeWalk:
_animationState = 1;
_animationFrame = 0;
break;
+
case kAnimationModeRun:
_animationState = 3;
_animationFrame = 0;
break;
+
case kAnimationModeTalk:
_animationState = 17;
_animationFrame = 0;
break;
+
case kAnimationModeCombatIdle:
switch (_animationState) {
case 2:
+ // fall through
case 4:
_animationState = 7;
_animationFrame = 0;
break;
+
case 5:
+ // fall through
case 7:
break;
+
default:
_animationState = 5;
_animationFrame = 0;
break;
}
break;
+
case kAnimationModeCombatAttack:
_animationState = 8;
_animationFrame = 0;
break;
+
case kAnimationModeCombatWalk:
_animationState = 2;
_animationFrame = 0;
break;
+
case kAnimationModeCombatRun:
_animationState = 4;
_animationFrame = 0;
break;
+
case 12:
_animationState = 18;
_animationFrame = 0;
break;
+
case 13:
_animationState = 19;
_animationFrame = 0;
break;
+
case 14:
_animationState = 20;
_animationFrame = 0;
break;
+
case 15:
_animationState = 21;
_animationFrame = 0;
break;
+
case 16:
_animationState = 22;
_animationFrame = 0;
break;
+
case 17:
_animationState = 23;
_animationFrame = 0;
break;
+
case 18:
_animationState = 24;
_animationFrame = 0;
break;
+
case 19:
_animationState = 25;
_animationFrame = 0;
break;
+
case kAnimationModeHit:
switch (_animationState) {
case 2:
+ // fall through
case 4:
+ // fall through
case 5:
+ // fall through
case 7:
+ // fall through
case 8:
if (Random_Query(0, 1)) {
_animationState = 11;
@@ -1148,6 +1180,7 @@ bool AIScriptZuben::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
default:
if (Random_Query(0, 1)) {
_animationState = 9;
@@ -1158,6 +1191,7 @@ bool AIScriptZuben::ChangeAnimationMode(int mode) {
break;
}
break;
+
case kAnimationModeCombatHit:
if (Random_Query(0, 1)) {
_animationState = 11;
@@ -1166,18 +1200,22 @@ bool AIScriptZuben::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
case 24:
_animationState = 26;
_animationFrame = 0;
break;
+
case 25:
_animationState = 27;
_animationFrame = 0;
break;
+
case 26:
_animationState = 28;
_animationFrame = 0;
break;
+
case kAnimationModeDie:
Actor_Set_Targetable(kActorZuben, false);
if (_vm->_cutContent) {
@@ -1186,21 +1224,29 @@ bool AIScriptZuben::ChangeAnimationMode(int mode) {
}
switch (_animationState) {
case 2:
+ // fall through
case 4:
+ // fall through
case 5:
+ // fall through
case 7:
+ // fall through
case 8:
+ // fall through
case 11:
+ // fall through
case 12:
_animationState = 14;
_animationFrame = 0;
break;
+
default:
_animationState = 13;
_animationFrame = 0;
break;
}
break;
+
case kAnimationModeCombatDie:
Actor_Set_Targetable(kActorZuben, false);
_animationState = 14;
Commit: f0b637ff6de9aac21494f0d165df12f42c8dd35c
https://github.com/scummvm/scummvm/commit/f0b637ff6de9aac21494f0d165df12f42c8dd35c
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2020-12-11T23:02:58+02:00
Commit Message:
BLADERUNNER: More animation descriptions and notes
Zuben, (Removed) dancer (taffy patron 3), Walkers, Mutants, Bear Doll, General Doll
Changed paths:
engines/bladerunner/game_constants.h
engines/bladerunner/script/ai/bryant.cpp
engines/bladerunner/script/ai/dektora.cpp
engines/bladerunner/script/ai/general_doll.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
engines/bladerunner/script/ai/guzza.cpp
engines/bladerunner/script/ai/izo.cpp
engines/bladerunner/script/ai/klein.cpp
engines/bladerunner/script/ai/mutant1.cpp
engines/bladerunner/script/ai/mutant2.cpp
engines/bladerunner/script/ai/mutant3.cpp
engines/bladerunner/script/ai/runciter.cpp
engines/bladerunner/script/ai/sadik.cpp
engines/bladerunner/script/ai/sergeant_walls.cpp
engines/bladerunner/script/ai/steele.cpp
engines/bladerunner/script/ai/taffy_patron.cpp
engines/bladerunner/script/ai/transient.cpp
engines/bladerunner/script/ai/zuben.cpp
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 1f62239931..02fdd2096c 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -1920,7 +1920,7 @@ enum GameModelAnimations {
kModelAnimationClovisWalking = 220,
kModelAnimationClovisRunning = 221,
kModelAnimationClovisClimbStairsUp = 222, // Untriggered
- kModelAnimationClovisClimbStairsDown = 223, // Untrigered
+ kModelAnimationClovisClimbStairsDown = 223, // Untriggered
kModelAnimationClovisGotHitRight = 224,
kModelAnimationClovisGotHitLeft = 225,
kModelAnimationClovisShotDead = 226,
@@ -1976,13 +1976,71 @@ enum GameModelAnimations {
kModelAnimationLucyCombatDropsDead = 275, // Untriggered. Somewhat faster than kModelAnimationLucyShotDead (259)
kModelAnimationLucyRemovesNeckletDiesFromExplosion = 276, // Untriggered
// 277 - 311: Izo animations
+ // TODO
// 312 - 345: Sadik animations
+ // TODO
// 316 - 359: Twins/Luther animations
+ // TODO
// 360 - 387: EarlyQ animations
+ // TODO
// 388 - 421: Zuben animations
+ kModelAnimationZubenCombatIdle = 388,
+ kModelAnimationZubenCombatHitFront = 389,
+ kModelAnimationZubenCombatHitBack = 390,
+ kModelAnimationZubenCombatWalking = 391,
+ kModelAnimationZubenCombatRunning = 392,
+ kModelAnimationZubenCombatShotDead = 393,
+ kModelAnimationZubenCombatClimbStairsUp = 394, // UNUSED
+ kModelAnimationZubenCombatClimbStairsDown = 395, // UNUSED
+ kModelAnimationZubenCombatUnholsterCleaver = 396,
+ kModelAnimationZubenCombatHolsterCleaver = 397, // TODO check if properly triggered
+ kModelAnimationZubenCleaverAttack = 398,
+ kModelAnimationZubenWalking = 399,
+ kModelAnimationZubenRunning = 400,
+ kModelAnimationZubenClimbStairsUp = 401, // UNUSED
+ kModelAnimationZubenClimbStairsDown = 402, // UNUSED
+ kModelAnimationZubenClimbShotFront = 403,
+ kModelAnimationZubenClimbShotBack = 404,
+ kModelAnimationZubenShotDead = 405,
+ kModelAnimationZubenIdle = 406,
+ kModelAnimationZubenQuickLookLeftRight = 407, // UNUSED
+ kModelAnimationZubenLooksAtSomeone = 408,
+ kModelAnimationZubenCalmTalk = 409,
+ kModelAnimationZubenProtestTalk = 410,
+ kModelAnimationZubenQuestionTalk = 411,
+ kModelAnimationZubenMoreQuestionTalk = 412,
+ kModelAnimationZubenPointingTalk = 413,
+ kModelAnimationZubenYetMoreQuestiongTalk = 414,
+ kModelAnimationZubenScratchEarTalk = 415,
+ kModelAnimationZubenDontKnowTalk = 416,
+ kModelAnimationZubenThreatenTalk = 417,
+ kModelAnimationZubenPlayWithHands = 418, // TODO partially used?
+ kModelAnimationZubenToppleSoupCauldron = 419,
+ kModelAnimationZubenBashOnDoor = 420,
+ kModelAnimationZubenJumpDownFromCeiling = 421,
// 422 - 437: Generic walker A/B/C animations (with/without umbrella, walking/still)
- // 438 - 439: Dancer model animations (unused?)
+ kModelGenWalkerHattedPersonFastPace = 422, // Walking - Frame 1 used for standing still
+ kModelGenWalkerHattedPersonLoweredFace = 423, // Walking - Frame 6 used for standing still
+ kModelGenWalkerHattedPersonWithUmbrella = 424, // Walking - Same model as 426
+ kModelGenWalkerHattedPersonNoUmbrellaSmallSteps = 425, // Walking - Same model as 427
+ kModelGenWalkerHattedPersonWithUmbrellaStandsStill = 426, // Standing - Same model as 424
+ kModelGenWalkerHattedPersonNoUmbrellaStandsStill = 427, // Standing - Same model as 425
+ kModelGenWalkerHoodedPersonWithUmbrella = 428, // Walking - Same model as 430
+ kModelGenWalkerPunkPersonWithGlassesAndBeard = 429, // Walking - Same model as 431
+ kModelGenWalkerHoodedPersonWithUmbrellaStandsStill = 430, // Standing - Same model as 428
+ kModelGenWalkerPunkPersonWithGlassesAndBeardStandsStill = 431, // Standing - Same model as 429
+ kModelGenWalkerPunkPersonWithGlasses = 432, // Walking - Same model as 433
+ kModelGenWalkerPunkPersonWithGlassesStandsStill = 433, // Standing - Same model as 432
+ kModelGenWalkerHattedChild = 434, // Walking - Frame 11 used for standing still
+ 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
+ // 440: Tracking Gun (At Bullet Bob's shop)
kModelAnimationBulletBobsTrackingGun = 440,
+ // 441 - 450: Shooting range targets
kModelAnimationMaleTargetEmptyHandsActive = 441,
kModelAnimationMaleTargetEmptyHandsDead = 442, // 441+1
kModelAnimationMaleTargetWithGunActive = 443,
@@ -2053,16 +2111,27 @@ enum GameModelAnimations {
kModelAnimationTransientSearchingTrash = 504,
kModelAnimationTransientSearchingTrashToIdle = 505,
// 506 - 525: Bullet Bob animations
+ // TODO
// 526 - 544: Runciter animations
+ // TODO
// 545 - 554: Insect Dealer animations
+ // TODO
// 555 - 565: Tyrell Guard animations
+ // TODO
// 566 - 570: Mia animations
+ // TODO
// 571 - 604: Officer Leary animations
+ // TODO
// 605 - 641: Officer Grayford animations
+ // TODO
// 642 - 660: Hanoi animations
+ // TODO
// 661 - 670: Desk Clerk (Yukon) animations
+ // TODO
// 671 - 681: Howie Lee animations
+ // TODO
// 682 - 687: Fish Dealer animations
+ // TODO
// 688 - 697: Dino Klein animations
kModelAnimationKleinWalking = 688,
kModelAnimationKleinStandingIdle = 689,
@@ -2075,19 +2144,36 @@ enum GameModelAnimations {
kModelAnimationKleinTalkDismissive = 696,
kModelAnimationKleinTalkRaisingBothHands = 697,
// 698 - 704: Murray animations
+ // TODO
// 705 - 715: Hawker's Barkeep animations
+ // TODO
// 716 - 721: Holloway animations
+ // TODO
// 722 - 731: Sergeant Walls animations
+ // TODO
// 732 - 743: Moraji animations
+ // TODO
// 744 - 750: Photographer animations
+ // TODO
// 751: Rajif animations
+ // TODO
// 752 - 757: EarlyQ Bartender animations
+ // TODO
// 758 - 764: Shoeshine Man animations (UNUSED)
+ // TODO
// 765 - 772: Tyrell animations
+ // TODO
// 773 - 787: Chew animations
+ // TODO
// 788 - 804: Gaff animations
+ // TODO
// 805 - 808: Bear "Bryant" (Sebastian's toy) animations
+ kModelAnimationBearToyWalking = 805,
+ kModelAnimationBearToyOscillatingIdle = 806, // untriggered?
+ kModelAnimationBearToyGotHit = 807, // UNUSED
+ kModelAnimationBearToyShotDead = 808, // untriggered
// 809 - 821: Sebastian animations
+ // TODO
// 822 - 832: Rachael animations
kModelAnimationRachaelWalking = 822,
kModelAnimationRachaelIdle = 823,
@@ -2101,8 +2187,15 @@ enum GameModelAnimations {
kModelAnimationRachaelTalkHandOnChest = 831,
kModelAnimationRachaelTalkHandWaveToRight = 832,
// 833 - 837: "General" (Sebastian's toy) animations
+ kModelGeneralDollWalking = 833,
+ kModelGeneralDollIdle = 834,
+ kModelGeneralDollHaltSalute = 835,
+ kModelGeneralDollShotDead = 836, // untriggered
+ kModelGeneralDollGotHit = 837, // untriggered
// 838 - 845: Mama Isabella animations
+ // TODO
// 846 - 856: Leon animations
+ // TODO
// 857 - 862: Rat (Free Slot A/B) animations
kModelAnimationRatJumpAttack = 857,
kModelAnimationRatRunning = 858,
@@ -2128,7 +2221,7 @@ enum GameModelAnimations {
// 877 - 884: Hysteria Patron1 (dancer) animations
kModelAnimationHysteriaPatron1DanceStandingUpSemiSitAndUp = 877,
kModelAnimationHysteriaPatron1DanceStandingUpLeftMotion = 878,
- kModelAnimationHysteriaPatron1DanceStandingUpStowingMoney = 879, // original UNUSED
+ kModelAnimationHysteriaPatron1DanceStandingUpStowingMoney = 879, // original UNUSED (restored)
kModelAnimationHysteriaPatron1DanceSplitsDuckAndDown = 880,
kModelAnimationHysteriaPatron1DanceSplitsSemiUpAndDown = 881,
kModelAnimationHysteriaPatron1DanceSplitsBackAndForth = 882,
@@ -2143,10 +2236,37 @@ enum GameModelAnimations {
kModelAnimationHysteriaPatron2DanceHandsDownLeanBackForth = 890,
kModelAnimationHysteriaPatron2DanceHandsUpToHandsDown = 891,
kModelAnimationHysteriaPatron2DanceHandsDownToHandsUp = 892,
- // 893 - 900: Mutant 1 animations
- // 901 - 907: Mutant 2 animations
- // 908 - 917: Mutant 3 animations
+ // 893 - 900: Mutant 1 animations - Special with pipe
+ kModelAnimationMutant1Walking = 893,
+ kModelAnimationMutant1Idle = 894,
+ kModelAnimationMutant1CalmTalk = 895, // UNUSED
+ kModelAnimationMutant1MoreCalmTalk = 896, // untriggered?
+ kModelAnimationMutant1YellOrHurt = 897, // untriggered
+ kModelAnimationMutant1MeleeAttack = 898,
+ kModelAnimationMutant1Jump = 899, // untriggered?
+ kModelAnimationMutant1ShotDead = 900,
+ // 901 - 907: Mutant 2 animations - Special with tiny hand, no weapon
+ kModelAnimationMutant2Walking = 901,
+ kModelAnimationMutant2Running = 902,
+ kModelAnimationMutant2Idle = 903,
+ kModelAnimationMutant2CalmTalk = 904, // untriggered?
+ kModelAnimationMutant2YellOrHurt = 905, // untriggered
+ kModelAnimationMutant2MeleeAttack = 906,
+ kModelAnimationMutant2ShotDead = 907,
+ // 908 - 917: Mutant 3 animations - Throws rocks, ranged attack
+ kModelAnimationMutant3Walking = 908,
+ kModelAnimationMutant3Running = 909,
+ kModelAnimationMutant3Idle = 910,
+ kModelAnimationMutant3CalmTalk = 911, // untriggered
+ kModelAnimationMutant3YellOrHurt = 912, // untriggered?
+ kModelAnimationMutant3PicksUpAndThrowsRock = 913,
+ kModelAnimationMutant3CrouchedWaiting = 914, // untriggered?
+ kModelAnimationMutant3CrouchedToStanding = 915, // untriggered?
+ kModelAnimationMutant3CrouchedFromStanding = 916, // untriggered?
+ kModelAnimationMutant3ShotDead = 917,
// 918 - 919: Taffy Patron (Gordo's hostage) animations
+ kModelAnimationTaffyPatronRunning = 918,
+ kModelAnimationTaffyPatronShotDead = 919,
// 920 - 930: Hasan animations
kModelAnimationHasanTalkWipeFaceLeftHand01 = 920, // UNUSED
kModelAnimationHasanIdleSlightMovement = 921,
diff --git a/engines/bladerunner/script/ai/bryant.cpp b/engines/bladerunner/script/ai/bryant.cpp
index 23e2c1b40e..61cc25ee7d 100644
--- a/engines/bladerunner/script/ai/bryant.cpp
+++ b/engines/bladerunner/script/ai/bryant.cpp
@@ -145,6 +145,7 @@ bool AIScriptBryant::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorBryant, 139, 0);
AI_Movement_Track_Repeat(kActorBryant);
break;
+
case 1:
AI_Movement_Track_Append(kActorBryant, 139, 0);
AI_Movement_Track_Append(kActorBryant, 138, 0);
@@ -154,54 +155,63 @@ bool AIScriptBryant::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorBryant, 134, 0);
AI_Movement_Track_Repeat(kActorBryant);
break;
+
case 2:
AI_Movement_Track_Append(kActorBryant, 196, 0);
AI_Movement_Track_Append(kActorBryant, 197, 0);
AI_Movement_Track_Append(kActorBryant, 198, 0);
AI_Movement_Track_Repeat(kActorBryant);
break;
+
case 3:
AI_Movement_Track_Append(kActorBryant, 198, 0);
AI_Movement_Track_Append(kActorBryant, 197, 0);
AI_Movement_Track_Append(kActorBryant, 196, 0);
AI_Movement_Track_Repeat(kActorBryant);
break;
+
case 4:
AI_Movement_Track_Append(kActorBryant, 326, 0);
AI_Movement_Track_Append(kActorBryant, 332, 0);
AI_Movement_Track_Append(kActorBryant, 327, 0);
AI_Movement_Track_Repeat(kActorBryant);
break;
+
case 5:
AI_Movement_Track_Append(kActorBryant, 327, 0);
AI_Movement_Track_Append(kActorBryant, 332, 0);
AI_Movement_Track_Append(kActorBryant, 326, 0);
AI_Movement_Track_Repeat(kActorBryant);
break;
+
case 6:
AI_Movement_Track_Append(kActorBryant, 329, 0);
AI_Movement_Track_Append(kActorBryant, 328, 0);
AI_Movement_Track_Append(kActorBryant, 330, 0);
AI_Movement_Track_Repeat(kActorBryant);
break;
+
case 7:
AI_Movement_Track_Append(kActorBryant, 330, 0);
AI_Movement_Track_Append(kActorBryant, 328, 0);
AI_Movement_Track_Append(kActorBryant, 329, 0);
AI_Movement_Track_Repeat(kActorBryant);
break;
+
case 8:
AI_Movement_Track_Append(kActorBryant, 331, 0);
AI_Movement_Track_Append(kActorBryant, 333, 0);
AI_Movement_Track_Append(kActorBryant, 335, 0);
AI_Movement_Track_Repeat(kActorBryant);
break;
+
case 9:
AI_Movement_Track_Append(kActorBryant, 335, 0);
AI_Movement_Track_Append(kActorBryant, 333, 0);
AI_Movement_Track_Append(kActorBryant, 331, 0);
AI_Movement_Track_Repeat(kActorBryant);
break;
+
default:
break;
}
@@ -221,33 +231,37 @@ bool AIScriptBryant::GoalChanged(int currentGoalNumber, int newGoalNumber) {
bool AIScriptBryant::UpdateAnimation(int *animation, int *frame) {
switch (_animationState) {
case 0:
- *animation = 806;
+ *animation = kModelAnimationBearToyOscillatingIdle;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(806)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationBearToyOscillatingIdle)) {
_animationFrame = 0;
}
break;
+
case 1:
- *animation = 805;
+ *animation = kModelAnimationBearToyWalking;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(805)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationBearToyWalking)) {
_animationFrame = 0;
}
break;
+
case 2:
- *animation = 808;
+ *animation = kModelAnimationBearToyShotDead;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(808) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationBearToyShotDead) - 1) {
_animationState = 3;
}
break;
+
case 3:
- *animation = 808;
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(808) - 1;
+ *animation = kModelAnimationBearToyShotDead;
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationBearToyShotDead) - 1;
break;
+
default:
break;
}
@@ -262,15 +276,18 @@ bool AIScriptBryant::ChangeAnimationMode(int mode) {
_animationState = 0;
_animationFrame = 0;
break;
+
case kAnimationModeWalk:
_animationState = 1;
_animationFrame = 0;
break;
+
case kAnimationModeDie:
_animationState = 2;
_animationFrame = 0;
Actor_Set_Goal_Number(kActorBryant, 0);
break;
+
default:
break;
}
diff --git a/engines/bladerunner/script/ai/dektora.cpp b/engines/bladerunner/script/ai/dektora.cpp
index e7b7b455e1..74e4138f68 100644
--- a/engines/bladerunner/script/ai/dektora.cpp
+++ b/engines/bladerunner/script/ai/dektora.cpp
@@ -608,7 +608,8 @@ bool AIScriptDektora::UpdateAnimation(int *animation, int *frame) {
break;
case 1:
- *animation = 19;
+ // Dummy placeholder, kModelAnimationMcCoyIdle (19) is a McCoy animation
+ *animation = kModelAnimationMcCoyIdle;
_animationFrame = 0;
break;
diff --git a/engines/bladerunner/script/ai/general_doll.cpp b/engines/bladerunner/script/ai/general_doll.cpp
index ba2919ca52..5ad83eae2c 100644
--- a/engines/bladerunner/script/ai/general_doll.cpp
+++ b/engines/bladerunner/script/ai/general_doll.cpp
@@ -78,18 +78,23 @@ void AIScriptGeneralDoll::CompletedMovementTrack() {
case 0:
Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 0, 80, 0, 0, 0);
break;
+
case 1:
Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 10, 80, 0, 0, 0);
break;
+
case 2:
Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 20, 80, 0, 0, 0);
break;
+
case 3:
Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 30, 80, 0, 0, 0);
break;
+
case 4:
Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 40, 80, 0, 0, 0);
break;
+
case 5:
Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 50, 80, 0, 0, 0);
break;
@@ -286,48 +291,48 @@ bool AIScriptGeneralDoll::GoalChanged(int currentGoalNumber, int newGoalNumber)
bool AIScriptGeneralDoll::UpdateAnimation(int *animation, int *frame) {
switch (_animationState) {
case 0:
- *animation = 834;
+ *animation = kModelGeneralDollIdle;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(834)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelGeneralDollIdle)) {
_animationFrame = 0;
}
break;
case 1:
- *animation = 835;
+ *animation = kModelGeneralDollHaltSalute;
if (_animationFrame == 0 && _resumeIdleAfterFramesetCompletesFlag) {
- *animation = 834;
+ *animation = kModelGeneralDollIdle;
_animationFrame = 0;
_animationState = 0;
} else {
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(835)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelGeneralDollHaltSalute)) {
_animationFrame = 0;
}
}
break;
case 2:
- *animation = 833;
+ *animation = kModelGeneralDollWalking;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(833)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelGeneralDollWalking)) {
_animationFrame = 0;
}
break;
case 3:
- *animation = 837;
+ *animation = kModelGeneralDollGotHit;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(837)) {
- *animation = 834;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelGeneralDollGotHit)) {
+ *animation = kModelGeneralDollIdle;
_animationFrame = 0;
_animationState = 0;
}
break;
case 4:
- *animation = 836;
- if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(836) - 1) {
+ *animation = kModelGeneralDollShotDead;
+ if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(kModelGeneralDollShotDead) - 1) {
++_animationFrame;
}
break;
@@ -350,6 +355,7 @@ bool AIScriptGeneralDoll::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
+
case 1:
_animationState = 2;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/generic_walker_a.cpp b/engines/bladerunner/script/ai/generic_walker_a.cpp
index 8ad077ee51..14623c3ed4 100644
--- a/engines/bladerunner/script/ai/generic_walker_a.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_a.cpp
@@ -231,54 +231,54 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) {
case kGenericWalkerAStatesIdle:
switch (Global_Variable_Query(kVariableGenericWalkerAModel)) {
case 0:
- *animation = 426; // Hatted Person with umbrella still
+ *animation = kModelGenWalkerHattedPersonWithUmbrellaStandsStill; // Hatted Person with umbrella still
break;
case 1:
- *animation = 430; // Hooded person with umbrella still
+ *animation = kModelGenWalkerHoodedPersonWithUmbrellaStandsStill; // Hooded person with umbrella still
break;
case 2:
#if BLADERUNNER_ORIGINAL_BUGS
// Hatted lady with wooden umbrella still (different from 436 model!)
- *animation = 437;
+ *animation = kModelGenWalkerHattedLadyWithWoodenUmbrellaStandsStill;
#else
// use model 436 and animation frame 4
- *animation = 436;
- _animationFrame = 4;
+ *animation = kModelGenWalkerHattedPersonWithWoodenUmbrella;
+ _animationFrame = 4; // frame 4 is used for still
#endif // BLADERUNNER_ORIGINAL_BUGS
break;
case 3:
- *animation = 431; // Person with glasses and beard still
+ *animation = kModelGenWalkerPunkPersonWithGlassesAndBeardStandsStill; // Person with glasses and beard still
break;
case 4:
- *animation = 427; // Hatted Person without umbrella still
+ *animation = kModelGenWalkerHattedPersonNoUmbrellaStandsStill; // Hatted Person without umbrella still
break;
case 5:
- *animation = 433; // Punk person with glasses still
+ *animation = kModelGenWalkerPunkPersonWithGlassesStandsStill; // Punk person with glasses still
break;
case 6:
- *animation = 434; // Hatted child walking // frame 11 could be used for still
- _animationFrame = 11;
+ *animation = kModelGenWalkerHattedChild; // Hatted child walking
+ _animationFrame = 11; // frame 11 used for still
break;
case 7:
- *animation = 435; // Child walking // frame 5 or 0 could be used for still
- _animationFrame = 0;
+ *animation = kModelGenWalkerChild; // Child walking
+ _animationFrame = 0; // frame 0 used for still (could also use frame 5)
break;
case 8:
- *animation = 422; // Hatted person walking fast // frame 1 could be used for still
- _animationFrame = 1;
+ *animation = kModelGenWalkerHattedPersonFastPace; // Hatted person walking fast
+ _animationFrame = 1; // frame 1 used for still
break;
case 9:
- *animation = 423; // Hatted person walking lowered face // frame 6 could be used for still
- _animationFrame = 6;
+ *animation = kModelGenWalkerHattedPersonLoweredFace; // Hatted person walking lowered face
+ _animationFrame = 6; // frame 6 used for still
break;
}
if (!_vm->_cutContent
@@ -291,43 +291,43 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) {
case kGenericWalkerAStatesWalk:
switch (Global_Variable_Query(kVariableGenericWalkerAModel)) {
case 0:
- *animation = 424; // Hatted person with umbrella walking
+ *animation = kModelGenWalkerHattedPersonWithUmbrella; // Hatted person with umbrella walking
break;
case 1:
- *animation = 428; // Hooded person with umbrella walking
+ *animation = kModelGenWalkerHoodedPersonWithUmbrella; // Hooded person with umbrella walking
break;
case 2:
- *animation = 436; // Hatted person with wooden umbrella walking
+ *animation = kModelGenWalkerHattedPersonWithWoodenUmbrella; // Hatted person with wooden umbrella walking
break;
case 3:
- *animation = 429; // Person with glasses and beard walking
+ *animation = kModelGenWalkerPunkPersonWithGlassesAndBeard; // Person with glasses and beard walking
break;
case 4:
- *animation = 425; // Hatted Person without umbrella - walking small steps
+ *animation = kModelGenWalkerHattedPersonNoUmbrellaSmallSteps; // Hatted Person without umbrella - walking small steps
break;
case 5:
- *animation = 432; // Punk person with glasses walking
+ *animation = kModelGenWalkerPunkPersonWithGlasses; // Punk person with glasses walking
break;
case 6:
- *animation = 434; // Hatted child walking
+ *animation = kModelGenWalkerHattedChild; // Hatted child walking
break;
case 7:
- *animation = 435; // Child walking
+ *animation = kModelGenWalkerChild; // Child walking
break;
case 8:
- *animation = 422; // Hatted person walking fast
+ *animation = kModelGenWalkerHattedPersonFastPace; // Hatted person walking fast
break;
case 9:
- *animation = 423; // Hatted person walking lowered face
+ *animation = kModelGenWalkerHattedPersonLoweredFace; // Hatted person walking lowered face
break;
}
++_animationFrame;
diff --git a/engines/bladerunner/script/ai/generic_walker_b.cpp b/engines/bladerunner/script/ai/generic_walker_b.cpp
index cdfa8a63fa..65e0f95d81 100644
--- a/engines/bladerunner/script/ai/generic_walker_b.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_b.cpp
@@ -194,54 +194,54 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) {
case kGenericWalkerBStatesIdle:
switch (Global_Variable_Query(kVariableGenericWalkerBModel)) {
case 0:
- *animation = 426;
+ *animation = kModelGenWalkerHattedPersonWithUmbrellaStandsStill; // Hatted Person with umbrella still
break;
case 1:
- *animation = 430;
+ *animation = kModelGenWalkerHoodedPersonWithUmbrellaStandsStill; // Hooded person with umbrella still
break;
case 2:
#if BLADERUNNER_ORIGINAL_BUGS
// Hatted lady with wooden umbrella still (different from 436 model!)
- *animation = 437;
+ *animation = kModelGenWalkerHattedLadyWithWoodenUmbrellaStandsStill;
#else
// use model 436 and animation frame 4
- *animation = 436;
- _animationFrame = 4;
+ *animation = kModelGenWalkerHattedPersonWithWoodenUmbrella;
+ _animationFrame = 4; // frame 4 is used for still
#endif // BLADERUNNER_ORIGINAL_BUGS
break;
case 3:
- *animation = 431;
+ *animation = kModelGenWalkerPunkPersonWithGlassesAndBeardStandsStill;
break;
case 4:
- *animation = 427;
+ *animation = kModelGenWalkerHattedPersonNoUmbrellaStandsStill;
break;
case 5:
- *animation = 433;
+ *animation = kModelGenWalkerPunkPersonWithGlassesStandsStill;
break;
case 6:
- *animation = 434; // Hatted child walking // frame 11 could be used for still
- _animationFrame = 11;
+ *animation = kModelGenWalkerHattedChild; // Hatted child walking
+ _animationFrame = 11; // frame 11 used for still
break;
case 7:
- *animation = 435; // Child walking // frame 5 or 0 could be used for still
- _animationFrame = 0;
+ *animation = kModelGenWalkerChild; // Child walking
+ _animationFrame = 0; // frame 0 used for still (could also use frame 5)
break;
case 8:
- *animation = 422; // Hatted person walking fast // frame 1 could be used for still
- _animationFrame = 1;
+ *animation = kModelGenWalkerHattedPersonFastPace; // Hatted person walking fast
+ _animationFrame = 1; // frame 1 used for still
break;
case 9:
- *animation = 423; // Hatted person walking lowered face // frame 6 could be used for still
- _animationFrame = 6;
+ *animation = kModelGenWalkerHattedPersonLoweredFace; // Hatted person walking lowered face
+ _animationFrame = 6; // frame 6 used for still
break;
}
if (!_vm->_cutContent
@@ -254,43 +254,43 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) {
case kGenericWalkerBStatesWalk:
switch (Global_Variable_Query(kVariableGenericWalkerBModel)) {
case 0:
- *animation = 424;
+ *animation = kModelGenWalkerHattedPersonWithUmbrella;
break;
case 1:
- *animation = 428;
+ *animation = kModelGenWalkerHoodedPersonWithUmbrella;
break;
case 2:
- *animation = 436;
+ *animation = kModelGenWalkerHattedPersonWithWoodenUmbrella;
break;
case 3:
- *animation = 429;
+ *animation = kModelGenWalkerPunkPersonWithGlassesAndBeard;
break;
case 4:
- *animation = 425;
+ *animation = kModelGenWalkerHattedPersonNoUmbrellaSmallSteps;
break;
case 5:
- *animation = 432;
+ *animation = kModelGenWalkerPunkPersonWithGlasses;
break;
case 6:
- *animation = 434; // Hatted child walking
+ *animation = kModelGenWalkerHattedChild; // Hatted child walking
break;
case 7:
- *animation = 435; // Child walking
+ *animation = kModelGenWalkerChild; // Child walking
break;
case 8:
- *animation = 422; // Hatted person walking fast
+ *animation = kModelGenWalkerHattedPersonFastPace; // Hatted person walking fast
break;
case 9:
- *animation = 423; // Hatted person walking lowered face
+ *animation = kModelGenWalkerHattedPersonLoweredFace; // Hatted person walking lowered face
break;
}
++_animationFrame;
diff --git a/engines/bladerunner/script/ai/generic_walker_c.cpp b/engines/bladerunner/script/ai/generic_walker_c.cpp
index ddc65a841e..84f8c09e5b 100644
--- a/engines/bladerunner/script/ai/generic_walker_c.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_c.cpp
@@ -194,54 +194,54 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) {
case kGenericWalkerCStatesIdle:
switch (Global_Variable_Query(kVariableGenericWalkerCModel)) {
case 0:
- *animation = 426;
+ *animation = kModelGenWalkerHattedPersonWithUmbrellaStandsStill; // Hatted Person with umbrella still
break;
case 1:
- *animation = 430;
+ *animation = kModelGenWalkerHoodedPersonWithUmbrellaStandsStill; // Hooded person with umbrella still
break;
case 2:
#if BLADERUNNER_ORIGINAL_BUGS
// Hatted lady with wooden umbrella still (different from 436 model!)
- *animation = 437;
+ *animation = kModelGenWalkerHattedLadyWithWoodenUmbrellaStandsStill;
#else
// use model 436 and animation frame 4
- *animation = 436;
- _animationFrame = 4;
+ *animation = kModelGenWalkerHattedPersonWithWoodenUmbrella;
+ _animationFrame = 4; // frame 4 is used for still
#endif // BLADERUNNER_ORIGINAL_BUGS
break;
case 3:
- *animation = 431;
+ *animation = kModelGenWalkerPunkPersonWithGlassesAndBeardStandsStill;
break;
case 4:
- *animation = 427;
+ *animation = kModelGenWalkerHattedPersonNoUmbrellaStandsStill;
break;
case 5:
- *animation = 433;
+ *animation = kModelGenWalkerPunkPersonWithGlassesStandsStill;
break;
case 6:
- *animation = 434; // Hatted child walking // frame 11 could be used for still
- _animationFrame = 11;
+ *animation = kModelGenWalkerHattedChild; // Hatted child walking
+ _animationFrame = 11; // frame 11 used for still
break;
case 7:
- *animation = 435; // Child walking // frame 5 or 0 could be used for still
- _animationFrame = 0;
+ *animation = kModelGenWalkerChild; // Child walking
+ _animationFrame = 0; // frame 0 used for still (could also use frame 5)
break;
case 8:
- *animation = 422; // Hatted person walking fast // frame 1 could be used for still
- _animationFrame = 1;
+ *animation = kModelGenWalkerHattedPersonFastPace; // Hatted person walking fast
+ _animationFrame = 1; // frame 1 used for still
break;
case 9:
- *animation = 423; // Hatted person walking lowered face // frame 6 could be used for still
- _animationFrame = 6;
+ *animation = kModelGenWalkerHattedPersonLoweredFace; // Hatted person walking lowered face
+ _animationFrame = 6; // frame 6 used for still
break;
}
if (!_vm->_cutContent
@@ -254,43 +254,43 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) {
case kGenericWalkerCStatesWalk:
switch (Global_Variable_Query(kVariableGenericWalkerCModel)) {
case 0:
- *animation = 424;
+ *animation = kModelGenWalkerHattedPersonWithUmbrella;
break;
case 1:
- *animation = 428;
+ *animation = kModelGenWalkerHoodedPersonWithUmbrella;
break;
case 2:
- *animation = 436;
+ *animation = kModelGenWalkerHattedPersonWithWoodenUmbrella;
break;
case 3:
- *animation = 429;
+ *animation = kModelGenWalkerPunkPersonWithGlassesAndBeard;
break;
case 4:
- *animation = 425;
+ *animation = kModelGenWalkerHattedPersonNoUmbrellaSmallSteps;
break;
case 5:
- *animation = 432;
+ *animation = kModelGenWalkerPunkPersonWithGlasses;
break;
case 6:
- *animation = 434; // Hatted child walking
+ *animation = kModelGenWalkerHattedChild; // Hatted child walking
break;
case 7:
- *animation = 435; // Child walking
+ *animation = kModelGenWalkerChild; // Child walking
break;
case 8:
- *animation = 422; // Hatted person walking fast
+ *animation = kModelGenWalkerHattedPersonFastPace; // Hatted person walking fast
break;
case 9:
- *animation = 423; // Hatted person walking lowered face
+ *animation = kModelGenWalkerHattedPersonLoweredFace; // Hatted person walking lowered face
break;
}
++_animationFrame;
diff --git a/engines/bladerunner/script/ai/guzza.cpp b/engines/bladerunner/script/ai/guzza.cpp
index 06f56e2543..c2525603f9 100644
--- a/engines/bladerunner/script/ai/guzza.cpp
+++ b/engines/bladerunner/script/ai/guzza.cpp
@@ -788,8 +788,8 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) {
break;
default:
- // TODO a bug? 399 is a Zuben animation
- *animation = 399;
+ // Dummy placeholder, kModelAnimationZubenWalking (399) is a Zuben animation
+ *animation = kModelAnimationZubenWalking;
break;
}
*frame = _animationFrame;
diff --git a/engines/bladerunner/script/ai/izo.cpp b/engines/bladerunner/script/ai/izo.cpp
index 7cb2d3d612..0bd5ec8a8b 100644
--- a/engines/bladerunner/script/ai/izo.cpp
+++ b/engines/bladerunner/script/ai/izo.cpp
@@ -680,6 +680,7 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
case 14:
// fall through
case 15:
+ // TODO A bug? Shouldn't this be _animationState + 280?
*animation = _animationFrame + 280;
++_animationFrame;
if (_animationFrame >= 2
@@ -855,7 +856,8 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
break;
default:
- *animation = 406;
+ // Dummy placeholder, kModelAnimationZubenIdle (406) is a Zuben animation
+ *animation = kModelAnimationZubenIdle;
_animationFrame = 0;
break;
}
diff --git a/engines/bladerunner/script/ai/klein.cpp b/engines/bladerunner/script/ai/klein.cpp
index 159121bbac..c2022a9900 100644
--- a/engines/bladerunner/script/ai/klein.cpp
+++ b/engines/bladerunner/script/ai/klein.cpp
@@ -487,8 +487,8 @@ bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
break;
default:
- // TODO: A bug? 399 is a Zuben animation
- *animation = 399;
+ // Dummy placeholder, kModelAnimationZubenWalking (399) is a Zuben animation
+ *animation = kModelAnimationZubenWalking;
break;
}
*frame = _animationFrame;
diff --git a/engines/bladerunner/script/ai/mutant1.cpp b/engines/bladerunner/script/ai/mutant1.cpp
index 017550cb34..f88f741275 100644
--- a/engines/bladerunner/script/ai/mutant1.cpp
+++ b/engines/bladerunner/script/ai/mutant1.cpp
@@ -404,9 +404,9 @@ bool AIScriptMutant1::GoalChanged(int currentGoalNumber, int newGoalNumber) {
bool AIScriptMutant1::UpdateAnimation(int *animation, int *frame) {
switch (_animationState) {
case 0:
- *animation = 894;
+ *animation = kModelAnimationMutant1Idle;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(894)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant1Idle)) {
_animationFrame = 0;
}
break;
@@ -414,48 +414,48 @@ bool AIScriptMutant1::UpdateAnimation(int *animation, int *frame) {
case 1:
// fall through
case 2:
- *animation = 893;
+ *animation = kModelAnimationMutant1Walking;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(893)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant1Walking)) {
_animationFrame = 0;
}
break;
case 3:
if (_animationFrame == 0 && _resumeIdleAfterFramesetCompletesFlag) {
- *animation = 894;
+ *animation = kModelAnimationMutant1Idle;
_animationState = 0;
} else {
- *animation = 896;
+ *animation = kModelAnimationMutant1MoreCalmTalk;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(896)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant1MoreCalmTalk)) {
_animationFrame = 0;
}
}
break;
case 4:
- *animation = 896;
+ *animation = kModelAnimationMutant1MoreCalmTalk;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(896)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant1MoreCalmTalk)) {
_animationFrame = 0;
_animationState = 3;
- *animation = 896;
+ *animation = kModelAnimationMutant1MoreCalmTalk;
}
break;
case 5:
- *animation = 897;
+ *animation = kModelAnimationMutant1YellOrHurt;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(897)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant1YellOrHurt)) {
_animationFrame = 0;
_animationState = 3;
- *animation = 896;
+ *animation = kModelAnimationMutant1MoreCalmTalk;
}
break;
case 6:
- *animation = 898;
+ *animation = kModelAnimationMutant1MeleeAttack;
++_animationFrame;
if (_animationFrame == 5) {
int snd;
@@ -470,45 +470,45 @@ bool AIScriptMutant1::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame == 9) {
Actor_Combat_AI_Hit_Attempt(kActorMutant1);
}
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(898)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant1MeleeAttack)) {
Actor_Change_Animation_Mode(kActorMutant1, kAnimationModeIdle);
}
break;
case 7:
- *animation = 899;
+ *animation = kModelAnimationMutant1Jump;
++_animationFrame;
if (_animationFrame == 1) {
Ambient_Sounds_Play_Sound(kSfxHURT1M1, 99, 0, 0, 25);
}
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(899)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant1Jump)) {
Actor_Change_Animation_Mode(kActorMutant1, kAnimationModeIdle);
}
break;
case 8:
- *animation = 900;
+ *animation = kModelAnimationMutant1ShotDead;
++_animationFrame;
if (_animationFrame == 1) {
Sound_Play(kSfxYELL1M1, 100, 0, 0, 50);
}
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(900)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant1ShotDead)) {
Actor_Change_Animation_Mode(kActorMutant1, 88);
}
break;
case 9:
- *animation = 900;
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(900) - 1;
+ *animation = kModelAnimationMutant1ShotDead;
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant1ShotDead) - 1;
break;
case 10:
- *animation = 899;
+ *animation = kModelAnimationMutant1Jump;
++_animationFrame;
if (_animationFrame == 9) {
Sound_Play(kSfxHURT1M1, 100, 0, 0, 50);
}
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(899)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant1Jump)) {
Actor_Change_Animation_Mode(kActorMutant1, kAnimationModeIdle);
}
break;
@@ -595,7 +595,7 @@ bool AIScriptMutant1::ChangeAnimationMode(int mode) {
case 88:
_animationState = 9;
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(900) - 1;
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant1ShotDead) - 1;
break;
}
diff --git a/engines/bladerunner/script/ai/mutant2.cpp b/engines/bladerunner/script/ai/mutant2.cpp
index fd94430da3..0a6e85f293 100644
--- a/engines/bladerunner/script/ai/mutant2.cpp
+++ b/engines/bladerunner/script/ai/mutant2.cpp
@@ -370,54 +370,54 @@ bool AIScriptMutant2::GoalChanged(int currentGoalNumber, int newGoalNumber) {
bool AIScriptMutant2::UpdateAnimation(int *animation, int *frame) {
switch (_animationState) {
case 0:
- *animation = 903;
+ *animation = kModelAnimationMutant2Idle;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(903)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant2Idle)) {
_animationFrame = 0;
}
break;
case 1:
- *animation = 901;
+ *animation = kModelAnimationMutant2Walking;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(901)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant2Walking)) {
_animationFrame = 0;
}
break;
case 2:
- *animation = 902;
+ *animation = kModelAnimationMutant2Running;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(902)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant2Running)) {
_animationFrame = 0;
}
break;
case 3:
if (_animationFrame == 0 && _resumeIdleAfterFramesetCompletesFlag) {
- *animation = 903;
+ *animation = kModelAnimationMutant2Idle;
_animationState = 0;
} else {
- *animation = 905;
+ *animation = kModelAnimationMutant2YellOrHurt;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(905)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant2YellOrHurt)) {
_animationFrame = 0;
}
}
break;
case 4:
- *animation = 905;
+ *animation = kModelAnimationMutant2YellOrHurt;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(905)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant2YellOrHurt)) {
_animationFrame = 0;
_animationState = 3;
- *animation = 904;
+ *animation = kModelAnimationMutant2CalmTalk;
}
break;
case 5:
- *animation = 906;
+ *animation = kModelAnimationMutant2MeleeAttack;
++_animationFrame;
if (_animationFrame == 7) {
int snd;
@@ -431,13 +431,13 @@ bool AIScriptMutant2::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame == 9) {
Actor_Combat_AI_Hit_Attempt(kActorMutant2);
}
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(906)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant2MeleeAttack)) {
Actor_Change_Animation_Mode(kActorMutant2, kAnimationModeIdle);
}
break;
case 6:
- *animation = 907;
+ *animation = kModelAnimationMutant2ShotDead;
++_animationFrame;
if (_animationFrame == 1) {
Sound_Play(kSfxYELL1M2, 100, 0, 0, 50);
@@ -448,12 +448,13 @@ bool AIScriptMutant2::UpdateAnimation(int *animation, int *frame) {
break;
case 7:
- *animation = 907;
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(907) - 2;
+ *animation = kModelAnimationMutant2ShotDead;
+ // TODO why "- 2" here?
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant2ShotDead) - 2;
break;
case 8:
- *animation = 907;
+ *animation = kModelAnimationMutant2ShotDead;
_animationFrame += _var1;
if (_animationFrame == 4) {
_var1 = -1;
@@ -539,7 +540,7 @@ bool AIScriptMutant2::ChangeAnimationMode(int mode) {
case 88:
_animationState = 7;
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(907) - 1;
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant2ShotDead) - 1;
break;
}
diff --git a/engines/bladerunner/script/ai/mutant3.cpp b/engines/bladerunner/script/ai/mutant3.cpp
index f5e3059607..b7aca072ee 100644
--- a/engines/bladerunner/script/ai/mutant3.cpp
+++ b/engines/bladerunner/script/ai/mutant3.cpp
@@ -384,54 +384,54 @@ bool AIScriptMutant3::GoalChanged(int currentGoalNumber, int newGoalNumber) {
bool AIScriptMutant3::UpdateAnimation(int *animation, int *frame) {
switch (_animationState) {
case 0:
- *animation = 910;
+ *animation = kModelAnimationMutant3Idle;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(910)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant3Idle)) {
_animationFrame = 0;
}
break;
case 1:
- *animation = 908;
+ *animation = kModelAnimationMutant3Walking;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(908)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant3Walking)) {
_animationFrame = 0;
}
break;
case 2:
- *animation = 909;
+ *animation = kModelAnimationMutant3Running;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(909)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant3Running)) {
_animationFrame = 0;
}
break;
case 3:
if (_animationFrame == 0 && _resumeIdleAfterFramesetCompletesFlag) {
- *animation = 910;
+ *animation = kModelAnimationMutant3Idle;
_animationState = 0;
} else {
- *animation = 912;
+ *animation = kModelAnimationMutant3YellOrHurt;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(912)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant3YellOrHurt)) {
_animationFrame = 0;
}
}
break;
case 4:
- *animation = 912;
+ *animation = kModelAnimationMutant3YellOrHurt;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(912)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant3YellOrHurt)) {
_animationFrame = 0;
_animationState = 3;
- *animation = 911;
+ *animation = kModelAnimationMutant3CalmTalk;
}
break;
case 5:
- *animation = 913;
+ *animation = kModelAnimationMutant3PicksUpAndThrowsRock;
++_animationFrame;
if (_animationFrame == 9) {
int snd;
@@ -451,48 +451,48 @@ bool AIScriptMutant3::UpdateAnimation(int *animation, int *frame) {
break;
case 6:
- *animation = 917;
+ *animation = kModelAnimationMutant3ShotDead;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(917)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant3ShotDead)) {
Actor_Change_Animation_Mode(kActorMutant3, 88);
}
break;
case 7:
- *animation = 917;
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(917) - 1;
+ *animation = kModelAnimationMutant3ShotDead;
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant3ShotDead) - 1;
break;
case 8:
- *animation = 914;
+ *animation = kModelAnimationMutant3CrouchedWaiting;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(914)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant3CrouchedWaiting)) {
_animationFrame = 0;
}
break;
case 9:
- *animation = 916;
+ *animation = kModelAnimationMutant3CrouchedFromStanding;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(916)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant3CrouchedFromStanding)) {
_animationFrame = 0;
_animationState = 8;
- *animation = 914;
+ *animation = kModelAnimationMutant3CrouchedWaiting;
}
break;
case 10:
- *animation = 915;
+ *animation = kModelAnimationMutant3CrouchedToStanding;
++_animationFrame;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(915)) {
- *animation = 910;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant3CrouchedToStanding)) {
+ *animation = kModelAnimationMutant3Idle;
_animationFrame = 0;
_animationState = 0;
}
break;
case 11:
- *animation = 917;
+ *animation = kModelAnimationMutant3ShotDead;
_animationFrame += _var1;
if (_animationFrame == 3) {
Sound_Play(kSfxHURT1M3, 100, 0, 0, 50);
@@ -505,7 +505,8 @@ bool AIScriptMutant3::UpdateAnimation(int *animation, int *frame) {
break;
default:
- *animation = 406;
+ // Dummy placeholder, kModelAnimationZubenIdle (406) is a Zuben animation
+ *animation = kModelAnimationZubenIdle;
break;
}
*frame = _animationFrame;
@@ -584,7 +585,7 @@ bool AIScriptMutant3::ChangeAnimationMode(int mode) {
case 88:
_animationState = 7;
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(917) - 1;
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(kModelAnimationMutant3ShotDead) - 1;
break;
case 43:
diff --git a/engines/bladerunner/script/ai/runciter.cpp b/engines/bladerunner/script/ai/runciter.cpp
index cbe190c125..d6e58fa897 100644
--- a/engines/bladerunner/script/ai/runciter.cpp
+++ b/engines/bladerunner/script/ai/runciter.cpp
@@ -503,8 +503,8 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
break;
default:
- // TODO: A bug? 399 is a Zuben animation
- *animation = 399;
+ // Dummy placeholder, kModelAnimationZubenWalking (399) is a Zuben animation
+ *animation = kModelAnimationZubenWalking;
_animationFrame = 0;
*frame = _animationFrame;
break;
diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp
index 49e02779bc..62d95ff3a2 100644
--- a/engines/bladerunner/script/ai/sadik.cpp
+++ b/engines/bladerunner/script/ai/sadik.cpp
@@ -894,7 +894,8 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
break;
default:
- *animation = 406;
+ // Dummy placeholder, kModelAnimationZubenIdle (406) is a Zuben animation
+ *animation = kModelAnimationZubenIdle;
_animationFrame = 0;
break;
}
diff --git a/engines/bladerunner/script/ai/sergeant_walls.cpp b/engines/bladerunner/script/ai/sergeant_walls.cpp
index 0c987b7faf..04cad7d961 100644
--- a/engines/bladerunner/script/ai/sergeant_walls.cpp
+++ b/engines/bladerunner/script/ai/sergeant_walls.cpp
@@ -194,8 +194,8 @@ bool AIScriptSergeantWalls::UpdateAnimation(int *animation, int *frame) {
break;
default:
- // TODO: A bug? 399 is a Zuben animation
- *animation = 399;
+ // Dummy placeholder, kModelAnimationZubenWalking (399) is a Zuben animation
+ *animation = kModelAnimationZubenWalking;
break;
}
*frame = _animationFrame;
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index 7cec5bf4c3..f96a64133b 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -2002,8 +2002,8 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
break;
default:
- // TODO A bug? 406 is a Zuben animation
- *animation = 406;
+ // Dummy placeholder, kModelAnimationZubenIdle (406) is a Zuben animation
+ *animation = kModelAnimationZubenIdle;
_animationFrame = 0;
break;
}
diff --git a/engines/bladerunner/script/ai/taffy_patron.cpp b/engines/bladerunner/script/ai/taffy_patron.cpp
index 64f2c6c5b6..5c49e52dd4 100644
--- a/engines/bladerunner/script/ai/taffy_patron.cpp
+++ b/engines/bladerunner/script/ai/taffy_patron.cpp
@@ -115,21 +115,22 @@ bool AIScriptTaffyPatron::GoalChanged(int currentGoalNumber, int newGoalNumber)
bool AIScriptTaffyPatron::UpdateAnimation(int *animation, int *frame) {
switch (_animationState) {
case 0:
- *animation = 406;
+ // Dummy placeholder, kModelAnimationZubenIdle (406) is a Zuben animation
+ *animation = kModelAnimationZubenIdle;
_animationFrame = 0;
break;
case 1:
- *animation = 918;
+ *animation = kModelAnimationTaffyPatronRunning;
++_animationFrame;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(918) - 1) {
+ if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(kModelAnimationTaffyPatronRunning) - 1) {
_animationFrame = 0;
}
break;
case 2:
- *animation = 919;
- if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(919) - 1) {
+ *animation = kModelAnimationTaffyPatronShotDead;
+ if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(kModelAnimationTaffyPatronShotDead) - 1) {
++_animationFrame;
}
break;
diff --git a/engines/bladerunner/script/ai/transient.cpp b/engines/bladerunner/script/ai/transient.cpp
index d756ff0627..b31cf0477d 100644
--- a/engines/bladerunner/script/ai/transient.cpp
+++ b/engines/bladerunner/script/ai/transient.cpp
@@ -406,8 +406,8 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
}
break;
default:
- // TODO: A bug? 399 is a Zuben animation
- *animation = 399;
+ // Dummy placeholder, kModelAnimationZubenWalking (399) is a Zuben animation
+ *animation = kModelAnimationZubenWalking;
break;
}
*frame = _animationFrame;
diff --git a/engines/bladerunner/script/ai/zuben.cpp b/engines/bladerunner/script/ai/zuben.cpp
index 800b65012a..ab71d66407 100644
--- a/engines/bladerunner/script/ai/zuben.cpp
+++ b/engines/bladerunner/script/ai/zuben.cpp
@@ -654,7 +654,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
switch (_animationState) {
case 0:
if (Actor_Query_Goal_Number(kActorZuben) != kGoalZubenDefault) {
- *animation = 408;
+ *animation = kModelAnimationZubenLooksAtSomeone;
if (_animationLoopCounter < _animationLoopLength) {
_animationFrame += _animationLoopDirection;
if (_animationFrame > _animationLoopFrameMax) {
@@ -702,7 +702,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
}
}
} else {
- *animation = 418;
+ *animation = kModelAnimationZubenPlayWithHands;
++_animationFrame;
if (_animationFrame >= 24) {
_animationFrame = 5;
@@ -712,7 +712,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 1:
- *animation = 399;
+ *animation = kModelAnimationZubenWalking;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
@@ -720,7 +720,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 2:
- *animation = 391;
+ *animation = kModelAnimationZubenCombatWalking;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
@@ -728,7 +728,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 3:
- *animation = 400;
+ *animation = kModelAnimationZubenRunning;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
@@ -736,7 +736,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 4:
- *animation = 392;
+ *animation = kModelAnimationZubenCombatRunning;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
@@ -744,7 +744,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 5:
- *animation = 396;
+ *animation = kModelAnimationZubenCombatUnholsterCleaver;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
@@ -757,7 +757,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 6:
- *animation = 397;
+ *animation = kModelAnimationZubenCombatHolsterCleaver;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
@@ -766,7 +766,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 7:
- *animation = 388;
+ *animation = kModelAnimationZubenCombatIdle;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
@@ -774,7 +774,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 8:
- *animation = 398;
+ *animation = kModelAnimationZubenCleaverAttack;
++_animationFrame;
if (_animationFrame == 8) {
int sentenceId;
@@ -798,86 +798,86 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
} else {
_animationFrame = 0;
_animationState = 7;
- *animation = 388;
+ *animation = kModelAnimationZubenCombatIdle;
Actor_Change_Animation_Mode(kActorZuben, kAnimationModeCombatIdle);
}
}
break;
case 9:
- *animation = 403;
+ *animation = kModelAnimationZubenClimbShotFront;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
if (Actor_Query_Goal_Number(kActorZuben) == 99) {
_animationFrame = 0;
_animationState = 13;
- *animation = 405;
+ *animation = kModelAnimationZubenShotDead;
Actor_Change_Animation_Mode(kActorZuben, kAnimationModeDie);
} else {
_animationFrame = 0;
_animationState = 0;
- *animation = 406;
+ *animation = kModelAnimationZubenIdle;
Actor_Change_Animation_Mode(kActorZuben, kAnimationModeIdle);
}
}
break;
case 10:
- *animation = 404;
+ *animation = kModelAnimationZubenClimbShotBack;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
if (Actor_Query_Goal_Number(kActorZuben) == 99) {
_animationFrame = 0;
_animationState = 13;
- *animation = 405;
+ *animation = kModelAnimationZubenShotDead;
Actor_Change_Animation_Mode(kActorZuben, kAnimationModeDie);
} else {
_animationFrame = 0;
_animationState = 0;
- *animation = 406;
+ *animation = kModelAnimationZubenIdle;
Actor_Change_Animation_Mode(kActorZuben, kAnimationModeIdle);
}
}
break;
case 11:
- *animation = 389;
+ *animation = kModelAnimationZubenCombatHitFront;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
if (Actor_Query_Goal_Number(kActorZuben) == 99) {
_animationFrame = 0;
_animationState = 14;
- *animation = 393;
+ *animation = kModelAnimationZubenCombatShotDead;
Actor_Change_Animation_Mode(kActorZuben, kAnimationModeDie);
} else {
_animationFrame = 0;
_animationState = 7;
- *animation = 388;
+ *animation = kModelAnimationZubenCombatIdle;
Actor_Change_Animation_Mode(kActorZuben, kAnimationModeCombatIdle);
}
}
break;
case 12:
- *animation = 390;
+ *animation = kModelAnimationZubenCombatHitBack;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
if (Actor_Query_Goal_Number(kActorZuben) == 99) {
_animationFrame = 0;
_animationState = 14;
- *animation = 393;
+ *animation = kModelAnimationZubenCombatShotDead;
Actor_Change_Animation_Mode(kActorZuben, kAnimationModeDie);
} else {
_animationFrame = 0;
_animationState = 7;
- *animation = 388;
+ *animation = kModelAnimationZubenCombatIdle;
Actor_Change_Animation_Mode(kActorZuben, kAnimationModeCombatIdle);
}
}
break;
case 13:
- *animation = 405;
+ *animation = kModelAnimationZubenShotDead;
++_animationFrame;
if (_animationFrame == 7) {
Sound_Play(kSfxZUBDEAD1, 30, 0, 0, 50);
@@ -893,7 +893,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 14:
- *animation = 393;
+ *animation = kModelAnimationZubenCombatShotDead;
++_animationFrame;
if (_animationFrame == 7) {
Sound_Play(kSfxZUBDEAD1, 30, 0, 0, 50);
@@ -909,7 +909,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 15:
- *animation = 405;
+ *animation = kModelAnimationZubenShotDead;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(*animation) - 1;
#if BLADERUNNER_ORIGINAL_BUGS
// This enables exits when it should not at the moonbus massacre
@@ -919,12 +919,12 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 16:
- *animation = 393;
+ *animation = kModelAnimationZubenCombatShotDead;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(*animation) - 1;
break;
case 17:
- *animation = 409;
+ *animation = kModelAnimationZubenCalmTalk;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
@@ -932,88 +932,88 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 18:
- *animation = 410;
+ *animation = kModelAnimationZubenProtestTalk;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 17;
- *animation = 409;
+ *animation = kModelAnimationZubenCalmTalk;
}
break;
case 19:
- *animation = 411;
+ *animation = kModelAnimationZubenQuestionTalk;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 17;
- *animation = 409;
+ *animation = kModelAnimationZubenCalmTalk;
}
break;
case 20:
- *animation = 412;
+ *animation = kModelAnimationZubenMoreQuestionTalk;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 17;
- *animation = 409;
+ *animation = kModelAnimationZubenCalmTalk;
}
break;
case 21:
- *animation = 413;
+ *animation = kModelAnimationZubenPointingTalk;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 17;
- *animation = 409;
+ *animation = kModelAnimationZubenCalmTalk;
}
break;
case 22:
- *animation = 414;
+ *animation = kModelAnimationZubenYetMoreQuestiongTalk;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 17;
- *animation = 409;
+ *animation = kModelAnimationZubenCalmTalk;
}
break;
case 23:
- *animation = 415;
+ *animation = kModelAnimationZubenScratchEarTalk;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 17;
- *animation = 409;
+ *animation = kModelAnimationZubenCalmTalk;
}
break;
case 24:
- *animation = 416;
+ *animation = kModelAnimationZubenDontKnowTalk;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 17;
- *animation = 409;
+ *animation = kModelAnimationZubenCalmTalk;
}
break;
case 25:
- *animation = 417;
+ *animation = kModelAnimationZubenThreatenTalk;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 17;
- *animation = 409;
+ *animation = kModelAnimationZubenCalmTalk;
}
break;
case 26:
Actor_Set_Frame_Rate_FPS(kActorZuben, -1);
- *animation = 419;
+ *animation = kModelAnimationZubenToppleSoupCauldron;
++_animationFrame;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
// Time for McCoy to react and avoid tipping pot
@@ -1026,7 +1026,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
case 27: // Opening the door
Actor_Set_Frame_Rate_FPS(kActorZuben, -1);
- *animation = 420;
+ *animation = kModelAnimationZubenBashOnDoor;
++_animationFrame;
if (_animationFrame == 5) {
Overlay_Play("ct02over", 1, false, true, 0);
@@ -1043,7 +1043,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
break;
case 28:
- *animation = 421;
+ *animation = kModelAnimationZubenJumpDownFromCeiling;
++_animationFrame;
if (_animationFrame == 1) {
Sound_Play(kSfxZUBLAND1, 80, 0, 0, 50);
@@ -1051,13 +1051,13 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 5;
- *animation = 396;
+ *animation = kModelAnimationZubenCombatUnholsterCleaver;
Actor_Set_Goal_Number(kActorZuben, kGoalZubenCT06AttackMcCoy);
}
break;
default:
- *animation = 399;
+ *animation = kModelAnimationZubenWalking;
break;
}
*frame = _animationFrame;
More information about the Scummvm-git-logs
mailing list