aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script/ai
diff options
context:
space:
mode:
authorThanasis Antoniou2019-05-04 17:24:20 +0300
committerThanasis Antoniou2019-05-04 17:25:34 +0300
commitd666eb154a027b34302a34d090abbda2cf69ce58 (patch)
tree0db83225c2be71eed8bead048aa81e20367f0b9f /engines/bladerunner/script/ai
parent7d2777e1d7f1abef54272ffb4287e26738a8a554 (diff)
downloadscummvm-rg350-d666eb154a027b34302a34d090abbda2cf69ce58.tar.gz
scummvm-rg350-d666eb154a027b34302a34d090abbda2cf69ce58.tar.bz2
scummvm-rg350-d666eb154a027b34302a34d090abbda2cf69ce58.zip
BLADERUNNER: Fix rats re-spawn and UG09, UG13 bad paths
UG09 bad path allowed McCoy to teleport to the pipe top left. UG13, when elevator was up McCoy could walk in the empty chute
Diffstat (limited to 'engines/bladerunner/script/ai')
-rw-r--r--engines/bladerunner/script/ai/bullet_bob.cpp2
-rw-r--r--engines/bladerunner/script/ai/chew.cpp2
-rw-r--r--engines/bladerunner/script/ai/crazylegs.cpp2
-rw-r--r--engines/bladerunner/script/ai/free_slot_a.cpp91
-rw-r--r--engines/bladerunner/script/ai/free_slot_b.cpp91
-rw-r--r--engines/bladerunner/script/ai/general_doll.cpp2
-rw-r--r--engines/bladerunner/script/ai/guzza.cpp2
-rw-r--r--engines/bladerunner/script/ai/izo.cpp28
-rw-r--r--engines/bladerunner/script/ai/lucy.cpp2
-rw-r--r--engines/bladerunner/script/ai/luther.cpp2
-rw-r--r--engines/bladerunner/script/ai/mccoy.cpp4
-rw-r--r--engines/bladerunner/script/ai/mutant1.cpp2
-rw-r--r--engines/bladerunner/script/ai/mutant2.cpp2
-rw-r--r--engines/bladerunner/script/ai/mutant3.cpp2
-rw-r--r--engines/bladerunner/script/ai/sadik.cpp2
-rw-r--r--engines/bladerunner/script/ai/taffy_patron.cpp2
16 files changed, 134 insertions, 104 deletions
diff --git a/engines/bladerunner/script/ai/bullet_bob.cpp b/engines/bladerunner/script/ai/bullet_bob.cpp
index f49462492a..ee5410a263 100644
--- a/engines/bladerunner/script/ai/bullet_bob.cpp
+++ b/engines/bladerunner/script/ai/bullet_bob.cpp
@@ -531,7 +531,7 @@ bool AIScriptBulletBob::ChangeAnimationMode(int mode) {
}
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 4;
_animationFrame = 0;
break;
diff --git a/engines/bladerunner/script/ai/chew.cpp b/engines/bladerunner/script/ai/chew.cpp
index 65403920b7..fb60c3607c 100644
--- a/engines/bladerunner/script/ai/chew.cpp
+++ b/engines/bladerunner/script/ai/chew.cpp
@@ -457,7 +457,7 @@ bool AIScriptChew::ChangeAnimationMode(int mode) {
}
break;
- case 48:
+ case kAnimationModeDie:
_animationFrame = 0;
_animationState = 11;
break;
diff --git a/engines/bladerunner/script/ai/crazylegs.cpp b/engines/bladerunner/script/ai/crazylegs.cpp
index c2031fc0ab..b4ed739844 100644
--- a/engines/bladerunner/script/ai/crazylegs.cpp
+++ b/engines/bladerunner/script/ai/crazylegs.cpp
@@ -36,7 +36,7 @@ void AIScriptCrazylegs::Initialize() {
_flag = false;
- World_Waypoint_Set(360, 41, -103.0f, 40.63f, -53.0f);
+ World_Waypoint_Set(360, kSetHF05, -103.0f, 40.63f, -53.0f);
Actor_Put_In_Set(kActorCrazylegs, kSetHF05);
Actor_Set_At_XYZ(kActorCrazylegs, -33.0f, 40.63f, 16.0f, 845);
}
diff --git a/engines/bladerunner/script/ai/free_slot_a.cpp b/engines/bladerunner/script/ai/free_slot_a.cpp
index 5491f2eef7..9281e3a32e 100644
--- a/engines/bladerunner/script/ai/free_slot_a.cpp
+++ b/engines/bladerunner/script/ai/free_slot_a.cpp
@@ -44,8 +44,8 @@ void AIScriptFreeSlotA::Initialize() {
_fallHeightCurrent = 0.0f; // not initialized in original
_fallHeightTarget = 0.0f; // not initialized in original
- World_Waypoint_Set(525, 45, -780.0f, -615.49f, 2611.0f);
- World_Waypoint_Set(526, 45, -780.0f, -615.49f, 2759.0f);
+ World_Waypoint_Set(525, kSetKP02, -780.0f, -615.49f, 2611.0f);
+ World_Waypoint_Set(526, kSetKP02, -780.0f, -615.49f, 2759.0f);
}
bool AIScriptFreeSlotA::Update() {
@@ -97,7 +97,7 @@ bool AIScriptFreeSlotA::Update() {
if (Actor_Query_Which_Set_In(kActorFreeSlotA) != Player_Query_Current_Set()) {
Game_Flag_Reset(kFlagRatWalkingAround);
Game_Flag_Reset(kFlagUG15BridgeWillBreak);
- Actor_Set_Goal_Number(kActorFreeSlotA, false);
+ Actor_Set_Goal_Number(kActorFreeSlotA, 0);
}
break;
@@ -118,7 +118,7 @@ bool AIScriptFreeSlotA::Update() {
} else if (Actor_Query_Goal_Number(kActorFreeSlotA) == 405
&& Actor_Query_Which_Set_In(kActorMcCoy) == kSceneKP05
) {
- Actor_Set_Targetable(kActorFreeSlotA, 1);
+ Actor_Set_Targetable(kActorFreeSlotA, true);
Actor_Set_Goal_Number(kActorFreeSlotA, 406);
}
return true;
@@ -213,7 +213,6 @@ bool AIScriptFreeSlotA::ShotAtAndHit() {
Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAUG15Die);
return true;
}
-
return false;
}
@@ -236,14 +235,14 @@ bool AIScriptFreeSlotA::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case kGoalFreeSlotAUG15WalkOut:
Actor_Force_Stop_Walking(kActorMcCoy);
AI_Movement_Track_Flush(kActorFreeSlotA);
- World_Waypoint_Set(444, 87, -48.75f, 44.66f, 87.57f);
+ World_Waypoint_Set(444, kSetUG15, -48.75f, 44.66f, 87.57f);
AI_Movement_Track_Append(kActorFreeSlotA, 444, 1);
AI_Movement_Track_Repeat(kActorFreeSlotA);
break;
case kGoalFreeSlotAUG15RunToOtherSide:
AI_Movement_Track_Flush(kActorFreeSlotA);
- World_Waypoint_Set(444, 87, -237.0f, 48.07f, 208.0f);
+ World_Waypoint_Set(444, kSetUG15, -237.0f, 48.07f, 208.0f);
AI_Movement_Track_Append(kActorFreeSlotA, 444, 1);
AI_Movement_Track_Repeat(kActorFreeSlotA);
Actor_Set_Targetable(kActorFreeSlotA, true);
@@ -251,7 +250,7 @@ bool AIScriptFreeSlotA::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case kGoalFreeSlotAUG15RunBack:
AI_Movement_Track_Flush(kActorFreeSlotA);
- World_Waypoint_Set(444, 87, 3.52f, 52.28f, 90.68f);
+ World_Waypoint_Set(444, kSetUG15, 3.52f, 52.28f, 90.68f);
AI_Movement_Track_Append(kActorFreeSlotA, 444, 0);
AI_Movement_Track_Repeat(kActorFreeSlotA);
break;
@@ -407,9 +406,10 @@ bool AIScriptFreeSlotA::UpdateAnimation(int *animation, int *frame) {
break;
case 5:
+ // a bug? This is an animation for Maggie (exploding)
*animation = 874;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(874) - 1) { // bug? shuld not be '-1'
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(874) - 1) {
Actor_Change_Animation_Mode(kActorFreeSlotA, kAnimationModeIdle);
}
break;
@@ -430,10 +430,11 @@ bool AIScriptFreeSlotA::UpdateAnimation(int *animation, int *frame) {
case 7:
*animation = 859;
_animationFrame++;
- if (_animationFrame == 0) {
+ if (_animationFrame == 1) {
Ambient_Sounds_Play_Sound(kSfxRATTY5, 99, 0, 0, 25);
}
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(859) - 1) { // bug? shuld not be '-1'
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(859) - 1) {
+ // -1 in the clause is ok here since the next _animationState is 8 which will maintain the last frame (Slice_Animation_Query_Number_Of_Frames(859) - 1)
_animationFrame = Slice_Animation_Query_Number_Of_Frames(859) - 1;
_animationState = 8;
Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAGone);
@@ -444,7 +445,6 @@ bool AIScriptFreeSlotA::UpdateAnimation(int *animation, int *frame) {
*animation = 859;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(859) - 1;
break;
-
default:
break;
}
@@ -502,7 +502,7 @@ bool AIScriptFreeSlotA::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 7;
_animationFrame = 0;
break;
@@ -558,9 +558,9 @@ void AIScriptFreeSlotA::goToRandomUGxx() {
break;
case 2:
- World_Waypoint_Set(463, 74, 144.98f, -50.13f, -175.75f);
- World_Waypoint_Set(464, 74, 105.6f, -50.13f, -578.46f);
- World_Waypoint_Set(465, 74, 62.0f, -50.13f, -574.0f);
+ World_Waypoint_Set(463, kSetUG01, 144.98f, -50.13f, -175.75f);
+ World_Waypoint_Set(464, kSetUG01, 105.6f, -50.13f, -578.46f);
+ World_Waypoint_Set(465, kSetUG01, 62.0f, -50.13f, -574.0f);
AI_Movement_Track_Append(kActorFreeSlotA, 463, 1);
AI_Movement_Track_Append(kActorFreeSlotA, 464, 1);
AI_Movement_Track_Append(kActorFreeSlotA, 465, 5);
@@ -576,9 +576,9 @@ void AIScriptFreeSlotA::goToRandomUGxx() {
break;
case 4:
- World_Waypoint_Set(463, 77, -22.7f, 6.39f, 33.12f);
- World_Waypoint_Set(464, 77, -6.70f, -1.74f, -362.88f);
- World_Waypoint_Set(465, 77, 164.0f, 11.87f, -1013.0f);
+ World_Waypoint_Set(463, kSetUG04, -22.7f, 6.39f, 33.12f);
+ World_Waypoint_Set(464, kSetUG04, -6.70f, -1.74f, -362.88f);
+ World_Waypoint_Set(465, kSetUG04, 164.0f, 11.87f, -1013.0f);
AI_Movement_Track_Append(kActorFreeSlotA, 463, 2);
AI_Movement_Track_Append(kActorFreeSlotA, 464, 0);
AI_Movement_Track_Append(kActorFreeSlotA, 465, 0);
@@ -600,64 +600,75 @@ void AIScriptFreeSlotA::goToRandomUGxx() {
if (Actor_Query_In_Set(kActorClovis, kSetUG07)) {
AI_Movement_Track_Append(kActorFreeSlotA, 39, 10);
} else {
- World_Waypoint_Set(463, 80, -88.78f, -12.21f, -184.08f);
- World_Waypoint_Set(464, 80, 250.0f, -12.21f, -342.0f);
- World_Waypoint_Set(465, 80, -164.78f, -12.21f, -832.08f);
+ World_Waypoint_Set(463, kSetUG07, -88.78f, -12.21f, -184.08f);
+ World_Waypoint_Set(464, kSetUG07, 250.0f, -12.21f, -342.0f);
+ World_Waypoint_Set(465, kSetUG07, -164.78f, -12.21f, -832.08f);
AI_Movement_Track_Append(kActorFreeSlotA, 463, 5);
AI_Movement_Track_Append(kActorFreeSlotA, 464, 1);
}
break;
case 8:
- World_Waypoint_Set(463, 80, -88.78f, -12.21f, -184.08f);
- World_Waypoint_Set(464, 80, 250.0f, -12.21f, -342.0f);
- World_Waypoint_Set(465, 80, -164.78f, -12.21f, -832.08f);
+ World_Waypoint_Set(463, kSetUG07, -88.78f, -12.21f, -184.08f);
+ World_Waypoint_Set(464, kSetUG07, 250.0f, -12.21f, -342.0f);
+ World_Waypoint_Set(465, kSetUG07, -164.78f, -12.21f, -832.08f);
AI_Movement_Track_Append(kActorFreeSlotA, 464, 5);
AI_Movement_Track_Append(kActorFreeSlotA, 463, 1);
break;
case 9:
- World_Waypoint_Set(463, 80, -88.78f, -12.21f, -184.08f);
- World_Waypoint_Set(464, 80, 250.0f, -12.21f, -342.0f);
- World_Waypoint_Set(465, 80, -164.78f, -12.21f, -832.08f);
+ World_Waypoint_Set(463, kSetUG07, -88.78f, -12.21f, -184.08f);
+ World_Waypoint_Set(464, kSetUG07, 250.0f, -12.21f, -342.0f);
+ World_Waypoint_Set(465, kSetUG07, -164.78f, -12.21f, -832.08f);
AI_Movement_Track_Append(kActorFreeSlotA, 464, 5);
AI_Movement_Track_Append(kActorFreeSlotA, 465, 1);
break;
case 10:
- World_Waypoint_Set(463, 80, -88.78f, -12.21f, -184.08f);
- World_Waypoint_Set(464, 80, 250.0f, -12.21f, -342.0f);
- World_Waypoint_Set(465, 80, -164.78f, -12.21f, -832.08f);
+ World_Waypoint_Set(463, kSetUG07, -88.78f, -12.21f, -184.08f);
+ World_Waypoint_Set(464, kSetUG07, 250.0f, -12.21f, -342.0f);
+ World_Waypoint_Set(465, kSetUG07, -164.78f, -12.21f, -832.08f);
AI_Movement_Track_Append(kActorFreeSlotA, 465, 5);
AI_Movement_Track_Append(kActorFreeSlotA, 464, 1);
break;
case 11:
- World_Waypoint_Set(463, 82, 91.0f, 156.94f, -498.0f);
- World_Waypoint_Set(464, 82, -149.0f, 156.94f, -498.0f);
+ World_Waypoint_Set(463, kSetUG09, 91.0f, 156.94f, -498.0f);
+ World_Waypoint_Set(464, kSetUG09, -149.0f, 156.94f, -498.0f);
AI_Movement_Track_Append(kActorFreeSlotA, 463, 5);
AI_Movement_Track_Append(kActorFreeSlotA, 464, 1);
break;
case 12:
- World_Waypoint_Set(463, 82, 91.0f, 156.94f, -498.0f);
- World_Waypoint_Set(464, 82, -149.0f, 156.94f, -498.0f);
+ World_Waypoint_Set(463, kSetUG09, 91.0f, 156.94f, -498.0f);
+ World_Waypoint_Set(464, kSetUG09, -149.0f, 156.94f, -498.0f);
AI_Movement_Track_Append(kActorFreeSlotA, 464, 5);
AI_Movement_Track_Append(kActorFreeSlotA, 463, 1);
break;
case 13:
- World_Waypoint_Set(463, 82, -152.51f, 277.31f, 311.98f);
- World_Waypoint_Set(464, 82, -124.51f, 275.08f, 319.98f);
+#if BLADERUNNER_ORIGINAL_BUGS
+ // this makes the rat appear on the pipe (top left) but this is buggy
+ // since it appears floating there
+ World_Waypoint_Set(463, kSetUG09, -152.51f, 277.31f, 311.98f);
+ World_Waypoint_Set(464, kSetUG09, -124.51f, 275.08f, 319.98f);
AI_Movement_Track_Append(kActorFreeSlotA, 463, 1);
AI_Movement_Track_Append(kActorFreeSlotA, 464, 8);
AI_Movement_Track_Append(kActorFreeSlotA, 463, 1);
+#else
+ // replacing with something more normal
+ World_Waypoint_Set(463, kSetUG09, 91.0f, 156.94f, -498.0f);
+ World_Waypoint_Set(464, kSetUG09, -29.60f, 156.94f, -498.0f);
+ AI_Movement_Track_Append(kActorFreeSlotA, 463, 4);
+ AI_Movement_Track_Append(kActorFreeSlotA, 464, 1);
+ AI_Movement_Track_Append(kActorFreeSlotA, 463, 1);
+#endif
break;
case 14:
- World_Waypoint_Set(463, 84, -360.67f, 21.39f, 517.55f);
- World_Waypoint_Set(464, 84, -250.67f, 21.39f, 477.55f);
- World_Waypoint_Set(465, 84, -248.67f, 21.39f, -1454.45f);
+ World_Waypoint_Set(463, kSetUG12, -360.67f, 21.39f, 517.55f);
+ World_Waypoint_Set(464, kSetUG12, -250.67f, 21.39f, 477.55f);
+ World_Waypoint_Set(465, kSetUG12, -248.67f, 21.39f, -1454.45f);
AI_Movement_Track_Append(kActorFreeSlotA, 463, 1);
AI_Movement_Track_Append(kActorFreeSlotA, 464, 8);
AI_Movement_Track_Append(kActorFreeSlotA, 465, 1);
diff --git a/engines/bladerunner/script/ai/free_slot_b.cpp b/engines/bladerunner/script/ai/free_slot_b.cpp
index e7bdfc7f11..cbaecb0ac3 100644
--- a/engines/bladerunner/script/ai/free_slot_b.cpp
+++ b/engines/bladerunner/script/ai/free_slot_b.cpp
@@ -38,9 +38,9 @@ void AIScriptFreeSlotB::Initialize() {
_var1 = 0;
_var2 = 1;
- World_Waypoint_Set(527, 45, -468.46f, -616.58f, 2840.60f);
- World_Waypoint_Set(528, 45, -1024.46f, -615.49f, 2928.60f);
- World_Waypoint_Set(529, 45, -1024.46f, -615.49f, 2788.60f);
+ World_Waypoint_Set(527, kSetKP02, -468.46f, -616.58f, 2840.60f);
+ World_Waypoint_Set(528, kSetKP02, -1024.46f, -615.49f, 2928.60f);
+ World_Waypoint_Set(529, kSetKP02, -1024.46f, -615.49f, 2788.60f);
}
bool AIScriptFreeSlotB::Update() {
@@ -52,7 +52,7 @@ bool AIScriptFreeSlotB::Update() {
switch (Actor_Query_Goal_Number(kActorFreeSlotB)) {
case 300:
Actor_Set_Goal_Number(kActorFreeSlotB, 301);
- Actor_Set_Targetable(kActorFreeSlotB, 1);
+ Actor_Set_Targetable(kActorFreeSlotB, true);
break;
case 301:
@@ -97,7 +97,7 @@ bool AIScriptFreeSlotB::Update() {
return false;
}
Actor_Set_Goal_Number(kActorFreeSlotB, 406);
- Actor_Set_Targetable(kActorFreeSlotB, 1);
+ Actor_Set_Targetable(kActorFreeSlotB, true);
return true;
}
}
@@ -194,7 +194,7 @@ bool AIScriptFreeSlotB::GoalChanged(int currentGoalNumber, int newGoalNumber) {
break;
case 302:
- Actor_Set_Targetable(kActorFreeSlotB, 1);
+ Actor_Set_Targetable(kActorFreeSlotB, true);
Non_Player_Actor_Combat_Mode_On(kActorFreeSlotB, 0, 0, 0, 8, 4, 7, 8, 25, 0, 75, 5, 300, 0);
break;
@@ -292,6 +292,7 @@ bool AIScriptFreeSlotB::UpdateAnimation(int *animation, int *frame) {
break;
case 5:
+ // a bug? This is an animation for Maggie (exploding)
*animation = 874;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(874) - 1) {
@@ -319,10 +320,17 @@ bool AIScriptFreeSlotB::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame == 1) {
Ambient_Sounds_Play_Sound(kSfxRATTY5, 99, 0, 0, 25);
}
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(859)) {
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(859);
+#if BLADERUNNER_ORIGINAL_BUGS
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(859) - 1) {
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(859) - 1;
}
_animationState = 8;
+#else
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(859) - 1) {
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(859) - 1;
+ _animationState = 8;
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
break;
case 8:
@@ -387,7 +395,7 @@ bool AIScriptFreeSlotB::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 7;
_animationFrame = 0;
break;
@@ -427,9 +435,9 @@ void AIScriptFreeSlotB::processGoal301() {
break;
case 2:
- World_Waypoint_Set(466, 74, 144.98f, -50.13f, -175.75f);
- World_Waypoint_Set(547, 74, 105.6f, -50.13f, -578.46f);
- World_Waypoint_Set(548, 74, 62.0f, -50.13f, -574.0f);
+ World_Waypoint_Set(466, kSetUG01, 144.98f, -50.13f, -175.75f);
+ World_Waypoint_Set(547, kSetUG01, 105.6f, -50.13f, -578.46f);
+ World_Waypoint_Set(548, kSetUG01, 62.0f, -50.13f, -574.0f);
AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
AI_Movement_Track_Append(kActorFreeSlotB, 548, 5);
@@ -445,9 +453,9 @@ void AIScriptFreeSlotB::processGoal301() {
break;
case 4:
- World_Waypoint_Set(466, 77, -22.70f, 6.39f, 33.12f);
- World_Waypoint_Set(547, 77, -6.70f, -1.74f, -362.88f);
- World_Waypoint_Set(548, 77, 164.0f, 11.87f, -1013.0f);
+ World_Waypoint_Set(466, kSetUG04, -22.70f, 6.39f, 33.12f);
+ World_Waypoint_Set(547, kSetUG04, -6.70f, -1.74f, -362.88f);
+ World_Waypoint_Set(548, kSetUG04, 164.0f, 11.87f, -1013.0f);
AI_Movement_Track_Append(kActorFreeSlotB, 466, 2);
AI_Movement_Track_Append(kActorFreeSlotB, 547, 0);
AI_Movement_Track_Append(kActorFreeSlotB, 548, 0);
@@ -469,64 +477,75 @@ void AIScriptFreeSlotB::processGoal301() {
if (Actor_Query_In_Set(kActorClovis, kSetUG07)) {
AI_Movement_Track_Append(kActorFreeSlotB, 39, 10);
} else {
- World_Waypoint_Set(466, 80, -88.78f, -12.21f, -184.08f);
- World_Waypoint_Set(547, 80, 250.0f, -12.21f, -342.0f);
- World_Waypoint_Set(548, 80, -164.78f, -12.21f, -832.08f);
+ World_Waypoint_Set(466, kSetUG07, -88.78f, -12.21f, -184.08f);
+ World_Waypoint_Set(547, kSetUG07, 250.0f, -12.21f, -342.0f);
+ World_Waypoint_Set(548, kSetUG07, -164.78f, -12.21f, -832.08f);
AI_Movement_Track_Append(kActorFreeSlotB, 466, 5);
AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
}
break;
case 8:
- World_Waypoint_Set(466, 80, -88.78f, -12.21f, -184.08f);
- World_Waypoint_Set(547, 80, 250.0f, -12.21f, -342.0f);
- World_Waypoint_Set(548, 80, -164.78f, -12.21f, -832.08f);
+ World_Waypoint_Set(466, kSetUG07, -88.78f, -12.21f, -184.08f);
+ World_Waypoint_Set(547, kSetUG07, 250.0f, -12.21f, -342.0f);
+ World_Waypoint_Set(548, kSetUG07, -164.78f, -12.21f, -832.08f);
AI_Movement_Track_Append(kActorFreeSlotB, 547, 5);
AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
break;
case 9:
- World_Waypoint_Set(466, 80, -88.78f, -12.21f, -184.08f);
- World_Waypoint_Set(547, 80, 250.0f, -12.21f, -342.0f);
- World_Waypoint_Set(548, 80, -164.78f, -12.21f, -832.08f);
+ World_Waypoint_Set(466, kSetUG07, -88.78f, -12.21f, -184.08f);
+ World_Waypoint_Set(547, kSetUG07, 250.0f, -12.21f, -342.0f);
+ World_Waypoint_Set(548, kSetUG07, -164.78f, -12.21f, -832.08f);
AI_Movement_Track_Append(kActorFreeSlotB, 547, 5);
AI_Movement_Track_Append(kActorFreeSlotB, 548, 1);
break;
case 10:
- World_Waypoint_Set(466, 80, -88.78f, -12.21f, -184.08f);
- World_Waypoint_Set(547, 80, 250.0f, -12.21f, -342.0f);
- World_Waypoint_Set(548, 80, -164.78f, -12.21f, -832.08f);
+ World_Waypoint_Set(466, kSetUG07, -88.78f, -12.21f, -184.08f);
+ World_Waypoint_Set(547, kSetUG07, 250.0f, -12.21f, -342.0f);
+ World_Waypoint_Set(548, kSetUG07, -164.78f, -12.21f, -832.08f);
AI_Movement_Track_Append(kActorFreeSlotB, 548, 5);
AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
break;
case 11:
- World_Waypoint_Set(466, 82, 91.0f, 156.94f, -498.0f);
- World_Waypoint_Set(547, 82, -149.0f, 156.94f, -498.0f);
+ World_Waypoint_Set(466, kSetUG09, 91.0f, 156.94f, -498.0f);
+ World_Waypoint_Set(547, kSetUG09, -149.0f, 156.94f, -498.0f);
AI_Movement_Track_Append(kActorFreeSlotB, 466, 5);
AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
break;
case 12:
- World_Waypoint_Set(466, 82, 91.0f, 156.94f, -498.0f);
- World_Waypoint_Set(547, 82, -149.0f, 156.94f, -498.0f);
+ World_Waypoint_Set(466, kSetUG09, 91.0f, 156.94f, -498.0f);
+ World_Waypoint_Set(547, kSetUG09, -149.0f, 156.94f, -498.0f);
AI_Movement_Track_Append(kActorFreeSlotB, 547, 5);
AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
break;
case 13:
- World_Waypoint_Set(466, 82, -152.51f, 277.31f, 311.98f);
- World_Waypoint_Set(547, 82, -124.51f, 275.08f, 319.98f);
+#if BLADERUNNER_ORIGINAL_BUGS
+ // this makes the rat appear on the pipe (top left)
+ // but this is buggy since it will appear floating there
+ World_Waypoint_Set(466, kSetUG09, -152.51f, 277.31f, 311.98f);
+ World_Waypoint_Set(547, kSetUG09, -124.51f, 275.08f, 319.98f);
AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
AI_Movement_Track_Append(kActorFreeSlotB, 547, 8);
AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
+#else
+ // replacing with something more normal
+ World_Waypoint_Set(466, kSetUG09, -152.51f, 156.94f, -498.0f);
+ World_Waypoint_Set(547, kSetUG09, -32.60f, 156.94f, -498.0f);
+ AI_Movement_Track_Append(kActorFreeSlotB, 466, 4);
+ AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
+ AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
+#endif // BLADERUNNER_ORIGINAL_BUGS
break;
case 14:
- World_Waypoint_Set(466, 84, -360.67f, 21.39f, 517.55f);
- World_Waypoint_Set(547, 84, -250.67f, 21.39f, 477.55f);
- World_Waypoint_Set(548, 84, -248.67f, 21.39f, -1454.45f);
+ World_Waypoint_Set(466, kSetUG12, -360.67f, 21.39f, 517.55f);
+ World_Waypoint_Set(547, kSetUG12, -250.67f, 21.39f, 477.55f);
+ World_Waypoint_Set(548, kSetUG12, -248.67f, 21.39f, -1454.45f);
AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
AI_Movement_Track_Append(kActorFreeSlotB, 547, 8);
AI_Movement_Track_Append(kActorFreeSlotB, 548, 1);
diff --git a/engines/bladerunner/script/ai/general_doll.cpp b/engines/bladerunner/script/ai/general_doll.cpp
index eb82c54ba2..f5739fee89 100644
--- a/engines/bladerunner/script/ai/general_doll.cpp
+++ b/engines/bladerunner/script/ai/general_doll.cpp
@@ -366,7 +366,7 @@ bool AIScriptGeneralDoll::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 4;
_animationFrame = 0;
break;
diff --git a/engines/bladerunner/script/ai/guzza.cpp b/engines/bladerunner/script/ai/guzza.cpp
index d76ee3ee73..5c36beea1b 100644
--- a/engines/bladerunner/script/ai/guzza.cpp
+++ b/engines/bladerunner/script/ai/guzza.cpp
@@ -953,7 +953,7 @@ bool AIScriptGuzza::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 28;
_animationFrame = 0;
break;
diff --git a/engines/bladerunner/script/ai/izo.cpp b/engines/bladerunner/script/ai/izo.cpp
index 13615d62e5..2fed274f50 100644
--- a/engines/bladerunner/script/ai/izo.cpp
+++ b/engines/bladerunner/script/ai/izo.cpp
@@ -47,7 +47,7 @@ void AIScriptIzo::Initialize() {
Actor_Set_Goal_Number(kActorIzo, 0);
Actor_Put_In_Set(kActorIzo, kSetHC01_HC02_HC03_HC04);
Actor_Set_At_XYZ(kActorIzo, 591.0f, 0.14f, 25.0f, 540);
- World_Waypoint_Set(349, 70, -14.7f, -4.01f, 224.5f);
+ World_Waypoint_Set(349, kSetRC03, -14.7f, -4.01f, 224.5f);
}
bool AIScriptIzo::Update() {
@@ -984,7 +984,7 @@ bool AIScriptIzo::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 19;
_animationFrame = 0;
break;
@@ -1080,10 +1080,10 @@ void AIScriptIzo::dialogueWithIzo() {
void AIScriptIzo::modifyWaypoints() {
switch (Random_Query(1, 10) - 1) {
case 0:
- World_Waypoint_Set(484, 54, -212.58f, 23.38f, -1859.45f);
- World_Waypoint_Set(485, 54, 355.49f, 31.66f, -859.81f);
- World_Waypoint_Set(486, 11, -323.89f, -24.0f, 35.58f);
- World_Waypoint_Set(487, 11, -211.89f, -24.0f, 35.58f);
+ World_Waypoint_Set(484, kSetNR01, -212.58f, 23.38f, -1859.45f);
+ World_Waypoint_Set(485, kSetNR01, 355.49f, 31.66f, -859.81f);
+ World_Waypoint_Set(486, kSetNR02, -323.89f, -24.0f, 35.58f);
+ World_Waypoint_Set(487, kSetNR02, -211.89f, -24.0f, 35.58f);
AI_Movement_Track_Append(kActorIzo, 484, 1);
AI_Movement_Track_Append(kActorIzo, 485, 10);
AI_Movement_Track_Append(kActorIzo, 486, 1);
@@ -1094,25 +1094,25 @@ void AIScriptIzo::modifyWaypoints() {
break;
case 1:
- World_Waypoint_Set(484, 13, -1335.0f, 0.0f, -542.0f);
- World_Waypoint_Set(485, 13, -1027.0f, 0.0f, -542.0f);
+ World_Waypoint_Set(484, kSetNR05_NR08, -1335.0f, 0.0f, -542.0f);
+ World_Waypoint_Set(485, kSetNR05_NR08, -1027.0f, 0.0f, -542.0f);
AI_Movement_Track_Append(kActorIzo, 484, 1);
AI_Movement_Track_Append(kActorIzo, 485, 20);
AI_Movement_Track_Append(kActorIzo, 484, 1);
break;
case 2:
- World_Waypoint_Set(484, 37, -352.16f, 8.0f, -379.24f);
- World_Waypoint_Set(485, 37, 108.2f, 8.0f, -934.80f);
+ World_Waypoint_Set(484, kSetHF01, -352.16f, 8.0f, -379.24f);
+ World_Waypoint_Set(485, kSetHF01, 108.2f, 8.0f, -934.80f);
AI_Movement_Track_Append(kActorIzo, 484, 1);
AI_Movement_Track_Append(kActorIzo, 485, 1);
break;
case 3:
- World_Waypoint_Set(484, 39, 589.59f, 47.76f, -1153.76f);
- World_Waypoint_Set(485, 39, 481.59f, 47.76f, -429.76f);
- World_Waypoint_Set(486, 38, 524.0f, 47.76f, -562.0f);
- World_Waypoint_Set(487, 38, -10.0f, 47.76f, -327.0f);
+ World_Waypoint_Set(484, kSetHF03, 589.59f, 47.76f, -1153.76f);
+ World_Waypoint_Set(485, kSetHF03, 481.59f, 47.76f, -429.76f);
+ World_Waypoint_Set(486, kSetHF02, 524.0f, 47.76f, -562.0f);
+ World_Waypoint_Set(487, kSetHF02, -10.0f, 47.76f, -327.0f);
AI_Movement_Track_Append(kActorIzo, 484, 1);
AI_Movement_Track_Append(kActorIzo, 485, 1);
AI_Movement_Track_Append(kActorIzo, 486, 1);
diff --git a/engines/bladerunner/script/ai/lucy.cpp b/engines/bladerunner/script/ai/lucy.cpp
index e4b92ab4a9..c6b26a533e 100644
--- a/engines/bladerunner/script/ai/lucy.cpp
+++ b/engines/bladerunner/script/ai/lucy.cpp
@@ -817,7 +817,7 @@ bool AIScriptLucy::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 7;
_animationFrame = 0;
break;
diff --git a/engines/bladerunner/script/ai/luther.cpp b/engines/bladerunner/script/ai/luther.cpp
index 4ad0e5639d..2298f40b02 100644
--- a/engines/bladerunner/script/ai/luther.cpp
+++ b/engines/bladerunner/script/ai/luther.cpp
@@ -447,7 +447,7 @@ bool AIScriptLuther::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 12;
_animationFrame = 0;
break;
diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp
index cafca8a1a7..432c75f7d9 100644
--- a/engines/bladerunner/script/ai/mccoy.cpp
+++ b/engines/bladerunner/script/ai/mccoy.cpp
@@ -1092,7 +1092,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
}
break;
- case 48:
+ case kAnimationModeDie:
*animation = 33;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
@@ -1102,7 +1102,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
}
break;
- case 49:
+ case kAnimationModeCombatDie:
*animation = 34;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
diff --git a/engines/bladerunner/script/ai/mutant1.cpp b/engines/bladerunner/script/ai/mutant1.cpp
index 51c9c705cd..fcc46cdbc2 100644
--- a/engines/bladerunner/script/ai/mutant1.cpp
+++ b/engines/bladerunner/script/ai/mutant1.cpp
@@ -580,7 +580,7 @@ bool AIScriptMutant1::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 8;
_animationFrame = 0;
break;
diff --git a/engines/bladerunner/script/ai/mutant2.cpp b/engines/bladerunner/script/ai/mutant2.cpp
index e1e851a381..6f7f4924a4 100644
--- a/engines/bladerunner/script/ai/mutant2.cpp
+++ b/engines/bladerunner/script/ai/mutant2.cpp
@@ -525,7 +525,7 @@ bool AIScriptMutant2::ChangeAnimationMode(int mode) {
_var1 = 1;
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 6;
_animationFrame = 0;
break;
diff --git a/engines/bladerunner/script/ai/mutant3.cpp b/engines/bladerunner/script/ai/mutant3.cpp
index b612cba7bd..393cf01a2c 100644
--- a/engines/bladerunner/script/ai/mutant3.cpp
+++ b/engines/bladerunner/script/ai/mutant3.cpp
@@ -586,7 +586,7 @@ bool AIScriptMutant3::ChangeAnimationMode(int mode) {
}
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 6;
_animationFrame = 0;
break;
diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp
index c4a2b99fa8..4dc36f85b9 100644
--- a/engines/bladerunner/script/ai/sadik.cpp
+++ b/engines/bladerunner/script/ai/sadik.cpp
@@ -330,7 +330,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case kGoalSadikUG18Move:
Actor_Set_Targetable(kActorSadik, true);
- World_Waypoint_Set(436, 89, -356.11f, 0.0f, 652.42f);
+ World_Waypoint_Set(436, kSetUG18, -356.11f, 0.0f, 652.42f);
AI_Movement_Track_Flush(kActorSadik);
AI_Movement_Track_Append_Run(kActorSadik, 436, 0);
AI_Movement_Track_Repeat(kActorSadik);
diff --git a/engines/bladerunner/script/ai/taffy_patron.cpp b/engines/bladerunner/script/ai/taffy_patron.cpp
index 0bf6861d12..975aa1df91 100644
--- a/engines/bladerunner/script/ai/taffy_patron.cpp
+++ b/engines/bladerunner/script/ai/taffy_patron.cpp
@@ -154,7 +154,7 @@ bool AIScriptTaffyPatron::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 2;
_animationFrame = 0;
break;