aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/game_constants.h1
-rw-r--r--engines/bladerunner/script/ai/bryant.cpp266
-rw-r--r--engines/bladerunner/script/ai/gaff.cpp8
-rw-r--r--engines/bladerunner/script/ai/generic_walker_a.cpp1
-rw-r--r--engines/bladerunner/script/ai/generic_walker_c.cpp1
-rw-r--r--engines/bladerunner/script/ai/howie_lee.cpp17
-rw-r--r--engines/bladerunner/script/ai/klein.cpp33
-rw-r--r--engines/bladerunner/script/ai/shoeshine_man.cpp32
-rw-r--r--engines/bladerunner/script/scene/dr04.cpp2
9 files changed, 182 insertions, 179 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 3ab3c13314..fbd212cf1a 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -604,6 +604,7 @@ enum AnimationModes {
kAnimationModeWalkDown = 45,
kAnimationModeCombatWalkUp = 46,
kAnimationModeCombatWalkDown = 47,
+ kAnimationModeDie = 48, // or fall down?
kAnimationModeFeeding = 52,
kAnimationModeClimbUp = 64,
kAnimationModeClimbDown = 65,
diff --git a/engines/bladerunner/script/ai/bryant.cpp b/engines/bladerunner/script/ai/bryant.cpp
index 174a9d09fe..74e5e2005e 100644
--- a/engines/bladerunner/script/ai/bryant.cpp
+++ b/engines/bladerunner/script/ai/bryant.cpp
@@ -33,19 +33,19 @@ void AIScriptBryant::Initialize() {
_animationStateNext = 0;
_animationNext = 0;
- World_Waypoint_Set(324, 22, 267.0, -60.30, 203.0);
- World_Waypoint_Set(325, 22, 84.0, -60.30, 337.0);
- World_Waypoint_Set(326, 2, -36.0, 0.0, 185.0);
- World_Waypoint_Set(327, 2, -166.0, 0.0, -103.0);
- World_Waypoint_Set(328, 3, -556.0, 252.59, -1018.11);
- World_Waypoint_Set(329, 3, -655.0, 252.60, -1012.0);
- World_Waypoint_Set(330, 3, -657.0, 253.0, -1127.0);
- World_Waypoint_Set(331, 102, 163.8, 0.0, 67.0);
- World_Waypoint_Set(332, 2, -39.0, 0.0, 11.5);
- World_Waypoint_Set(333, 102, -34.0, 0.0, 33.0);
- World_Waypoint_Set(334, 22, 3.0, -60.30, -144.0);
- World_Waypoint_Set(335, 102, -50.0, 0.0, 212.0);
- Actor_Put_In_Set(kActorBryant, 22);
+ World_Waypoint_Set(324, kSetBB05, 267.0f, -60.3f, 203.0f);
+ World_Waypoint_Set(325, kSetBB05, 84.0f, -60.3f, 337.0f);
+ World_Waypoint_Set(326, kSetBB06_BB07, -36.0f, 0.0f, 185.0f);
+ World_Waypoint_Set(327, kSetBB06_BB07, -166.0f, 0.0f, -103.0f);
+ World_Waypoint_Set(328, kSetBB07, -556.0f, 252.59f, -1018.11f);
+ World_Waypoint_Set(329, kSetBB07, -655.0f, 252.6f, -1012.0f);
+ World_Waypoint_Set(330, kSetBB07, -657.0f, 253.0f, -1127.0f);
+ World_Waypoint_Set(331, kSetBB12, 163.8f, 0.0f, 67.0f);
+ World_Waypoint_Set(332, kSetBB06_BB07, -39.0f, 0.0f, 11.5f);
+ World_Waypoint_Set(333, kSetBB12, -34.0f, 0.0f, 33.0f);
+ World_Waypoint_Set(334, kSetBB05, 3.0f, -60.30f, -144.0f);
+ World_Waypoint_Set(335, kSetBB12, -50.0f, 0.0f, 212.0f);
+ Actor_Put_In_Set(kActorBryant, kSetBB05);
Actor_Set_Goal_Number(kActorBryant, 100);
}
@@ -53,12 +53,12 @@ bool AIScriptBryant::Update() {
if (Global_Variable_Query(kVariableChapter) == 2 && Actor_Query_Goal_Number(kActorBryant) <= 101 && Player_Query_Current_Scene() == kSceneBB05) {
Actor_Set_Goal_Number(kActorBryant, 101);
return true;
- } else if (Global_Variable_Query(kVariableChapter) != 3 || Game_Flag_Query(686) || Player_Query_Current_Scene() != kSceneBB05) {
- return false;
- } else {
+ }
+ if (Global_Variable_Query(kVariableChapter) == 3 && Player_Query_Current_Scene() == kSceneBB05 && !Game_Flag_Query(686)) {
Game_Flag_Set(686);
return true;
}
+ return false;
}
void AIScriptBryant::TimerExpired(int timer) {
@@ -68,13 +68,12 @@ void AIScriptBryant::TimerExpired(int timer) {
void AIScriptBryant::CompletedMovementTrack() {
if (Actor_Query_Goal_Number(kActorBryant) == 101) {
Actor_Set_Goal_Number(kActorBryant, 102);
- //result = true;
+ // return true;
} else if (Actor_Query_Goal_Number(kActorBryant) == 102) {
Actor_Set_Goal_Number(kActorBryant, 101);
- //result = true;
- } else {
- //result = false;
+ // return true;
}
+ // return false;
}
void AIScriptBryant::ReceivedClue(int clueId, int fromActorId) {
@@ -123,137 +122,140 @@ int AIScriptBryant::GetFriendlinessModifierIfGetsClue(int otherActorId, int clue
}
bool AIScriptBryant::GoalChanged(int currentGoalNumber, int newGoalNumber) {
- if ((newGoalNumber - 101) <= 1) {
- if (newGoalNumber == 101) {
- AI_Movement_Track_Flush(kActorBryant);
-
- switch (Random_Query(0, 9)) {
- case 0:
- AI_Movement_Track_Append(kActorBryant, 134, 0);
- AI_Movement_Track_Append(kActorBryant, 135, 0);
- AI_Movement_Track_Append(kActorBryant, 136, 0);
- AI_Movement_Track_Append(kActorBryant, 137, 0);
- AI_Movement_Track_Append(kActorBryant, 138, 0);
- 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);
- AI_Movement_Track_Append(kActorBryant, 137, 0);
- AI_Movement_Track_Append(kActorBryant, 136, 0);
- AI_Movement_Track_Append(kActorBryant, 135, 0);
- 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;
- }
+ switch (newGoalNumber) {
+ case 101:
+ AI_Movement_Track_Flush(kActorBryant);
+
+ switch (Random_Query(0, 9)) {
+ case 0:
+ AI_Movement_Track_Append(kActorBryant, 134, 0);
+ AI_Movement_Track_Append(kActorBryant, 135, 0);
+ AI_Movement_Track_Append(kActorBryant, 136, 0);
+ AI_Movement_Track_Append(kActorBryant, 137, 0);
+ AI_Movement_Track_Append(kActorBryant, 138, 0);
+ 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);
+ AI_Movement_Track_Append(kActorBryant, 137, 0);
+ AI_Movement_Track_Append(kActorBryant, 136, 0);
+ AI_Movement_Track_Append(kActorBryant, 135, 0);
+ 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;
}
-
+ // fallthrough
+ case 102:
AI_Movement_Track_Append(kActorBryant, 39, 0);
AI_Movement_Track_Repeat(kActorBryant);
+ break;
}
return false;
}
bool AIScriptBryant::UpdateAnimation(int *animation, int *frame) {
- if (_animationState <= 3) {
- if (_animationState) {
- if (_animationState == 1) {
- *animation = 805;
- _animationFrame++;
-
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(805)) {
- _animationFrame = 0;
- }
- } else if (_animationState == 2) {
- *animation = 808;
- _animationFrame++;
-
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(808) - 1) {
- _animationState = 3;
- }
- } else {
- *animation = 808;
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(808) - 1;
- }
- } else {
- *animation = 806;
- _animationFrame++;
-
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(806)) {
- _animationFrame = 0;
- }
+ switch (_animationState) {
+ case 0:
+ *animation = 806;
+ _animationFrame++;
+
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(806)) {
+ _animationFrame = 0;
+ }
+ break;
+ case 1:
+ *animation = 805;
+ _animationFrame++;
+
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(805)) {
+ _animationFrame = 0;
}
+ break;
+ case 2:
+ *animation = 808;
+ _animationFrame++;
+
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(808) - 1) {
+ _animationState = 3;
+ }
+ break;
+ case 3:
+ *animation = 808;
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(808) - 1;
+ break;
}
*frame = _animationFrame;
-
return true;
}
bool AIScriptBryant::ChangeAnimationMode(int mode) {
- if (mode > 1) {
- if (mode == 48) {
- _animationState = 2;
- _animationFrame = 0;
- Actor_Set_Goal_Number(kActorBryant, 0);
- }
- } else {
- _animationState = (mode != 0);
+ switch (mode) {
+ case kAnimationModeIdle:
+ _animationState = 0;
+ _animationFrame = 0;
+ break;
+ case kAnimationModeWalk:
+ _animationState = 1;
_animationFrame = 0;
+ break;
+ case 48:
+ _animationState = 2;
+ _animationFrame = 0;
+ Actor_Set_Goal_Number(kActorBryant, 0);
+ break;
}
-
return true;
}
diff --git a/engines/bladerunner/script/ai/gaff.cpp b/engines/bladerunner/script/ai/gaff.cpp
index cc51360db1..64a208d26c 100644
--- a/engines/bladerunner/script/ai/gaff.cpp
+++ b/engines/bladerunner/script/ai/gaff.cpp
@@ -267,14 +267,14 @@ bool AIScriptGaff::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorGaff, 130, 13);
Actor_Says(kActorMcCoy, 2950, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 2955, 16);
- Actor_Says_With_Pause(kActorGaff, 140, 1.0, 14);
+ Actor_Says_With_Pause(kActorGaff, 140, 1.0f, 14);
Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorGaff, 36, false, false);
Actor_Says(kActorGaff, 150, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 2960, 12);
- Actor_Says_With_Pause(kActorGaff, 160, 1.0, 16);
+ Actor_Says_With_Pause(kActorGaff, 160, 1.0f, 16);
Actor_Says(kActorMcCoy, 2965, 13);
- Actor_Says_With_Pause(kActorGaff, 170, 1.0, kAnimationModeTalk);
- Actor_Says_With_Pause(kActorGaff, 180, 1.0, 12);
+ Actor_Says_With_Pause(kActorGaff, 170, 1.0f, kAnimationModeTalk);
+ Actor_Says_With_Pause(kActorGaff, 180, 1.0f, 12);
Actor_Says(kActorGaff, 190, 14);
Actor_Says(kActorGaff, 200, 15);
Async_Actor_Walk_To_XYZ(kActorGaff, -388.44f, -162.8f, 165.08f, false, false);
diff --git a/engines/bladerunner/script/ai/generic_walker_a.cpp b/engines/bladerunner/script/ai/generic_walker_a.cpp
index 4bb5b14b47..7acea89c25 100644
--- a/engines/bladerunner/script/ai/generic_walker_a.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_a.cpp
@@ -340,7 +340,6 @@ void AIScriptGenericWalkerA::movingUpdate() {
deltaZ = deltaZ * 0.97f;
Actor_Set_At_XYZ(kActorGenwalkerA, walkerX, walkerY, walkerZ, facing);
-
}
bool AIScriptGenericWalkerA::prepareWalker() {
diff --git a/engines/bladerunner/script/ai/generic_walker_c.cpp b/engines/bladerunner/script/ai/generic_walker_c.cpp
index 0f86c239ad..f317d5ad49 100644
--- a/engines/bladerunner/script/ai/generic_walker_c.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_c.cpp
@@ -317,7 +317,6 @@ void AIScriptGenericWalkerC::movingUpdate() {
deltaZ = deltaZ * 0.97f;
Actor_Set_At_XYZ(kActorGenwalkerC, walkerX, walkerY, walkerZ, facing);
-
}
bool AIScriptGenericWalkerC::prepareWalker() {
diff --git a/engines/bladerunner/script/ai/howie_lee.cpp b/engines/bladerunner/script/ai/howie_lee.cpp
index fac33acc93..f6d4d2cf48 100644
--- a/engines/bladerunner/script/ai/howie_lee.cpp
+++ b/engines/bladerunner/script/ai/howie_lee.cpp
@@ -141,7 +141,8 @@ int AIScriptHowieLee::GetFriendlinessModifierIfGetsClue(int otherActorId, int cl
}
bool AIScriptHowieLee::GoalChanged(int currentGoalNumber, int newGoalNumber) {
- if (newGoalNumber == 1) {
+ switch (newGoalNumber) {
+ case 1:
AI_Movement_Track_Flush(kActorHowieLee);
if (Random_Query(1, 2) == 1) {
AI_Movement_Track_Append_With_Facing(kActorHowieLee, 67, Random_Query(3, 10), 720);
@@ -150,7 +151,7 @@ bool AIScriptHowieLee::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Movement_Track_Repeat(kActorHowieLee);
return true;
- } else if (newGoalNumber == 2) {
+ case 2:
AI_Movement_Track_Flush(kActorHowieLee);
if (Random_Query(1, 2) == 1) {
AI_Movement_Track_Append_With_Facing(kActorHowieLee, 68, Random_Query(3, 10), 641);
@@ -159,7 +160,7 @@ bool AIScriptHowieLee::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Movement_Track_Repeat(kActorHowieLee);
return true;
- } else if (newGoalNumber == 3) {
+ case 3:
AI_Movement_Track_Flush(kActorHowieLee);
if (Random_Query(1, 2) == 1) {
AI_Movement_Track_Append_With_Facing(kActorHowieLee, 69, Random_Query(3, 10), 640);
@@ -168,25 +169,25 @@ bool AIScriptHowieLee::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Movement_Track_Repeat(kActorHowieLee);
return true;
- } else if (newGoalNumber == 4) {
+ case 4:
AI_Movement_Track_Flush(kActorHowieLee);
AI_Movement_Track_Append(kActorHowieLee, 66, 30);
AI_Movement_Track_Repeat(kActorHowieLee);
return true;
- } else if (newGoalNumber == 5) {
+ case 5:
AI_Movement_Track_Flush(kActorHowieLee);
AI_Movement_Track_Append(kActorHowieLee, 40, 60);
AI_Movement_Track_Repeat(kActorHowieLee);
return true;
- } else if (newGoalNumber == 6) {
+ case 6:
AI_Movement_Track_Flush(kActorHowieLee);
AI_Movement_Track_Append(kActorHowieLee, 67, 90);
AI_Movement_Track_Repeat(kActorHowieLee);
return true;
- } else if (newGoalNumber == 50) {
+ case 50:
AI_Movement_Track_Flush(kActorHowieLee);
return false;
- } else if (newGoalNumber == 100) {
+ case 100:
AI_Movement_Track_Flush(kActorHowieLee);
Actor_Put_In_Set(kActorHowieLee, kSetFreeSlotC);
Actor_Set_At_Waypoint(kActorHowieLee, 35, 0);
diff --git a/engines/bladerunner/script/ai/klein.cpp b/engines/bladerunner/script/ai/klein.cpp
index dee4ddc611..897b3122f4 100644
--- a/engines/bladerunner/script/ai/klein.cpp
+++ b/engines/bladerunner/script/ai/klein.cpp
@@ -165,40 +165,42 @@ int AIScriptKlein::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueI
}
bool AIScriptKlein::GoalChanged(int currentGoalNumber, int newGoalNumber) {
- if (newGoalNumber == 1) {
+ switch (newGoalNumber) {
+ case 1:
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 73, Random_Query(3, 20));
AI_Movement_Track_Repeat(kActorKlein);
- }
- if (newGoalNumber == 2) {
+ break;
+ case 2:
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 74, Random_Query(10, 20));
AI_Movement_Track_Repeat(kActorKlein);
- }
- if (newGoalNumber == 3) {
+ break;
+ case 3:
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 31, 3);
AI_Movement_Track_Repeat(kActorKlein);
- }
- if (newGoalNumber == 4) {
+ break;
+ case 4:
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 32, 5);
AI_Movement_Track_Repeat(kActorKlein);
- }
- if (newGoalNumber == 5) {
+ break;
+ case 5:
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 35, 60);
AI_Movement_Track_Repeat(kActorKlein);
- }
- if (newGoalNumber == 6) {
+ break;
+ case 6:
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 32, 5);
AI_Movement_Track_Repeat(kActorKlein);
- }
- if (newGoalNumber == 100) {
+ break;
+ case 100:
AI_Movement_Track_Flush(kActorKlein);
Actor_Put_In_Set(kActorKlein, kSetFreeSlotC);
Actor_Set_At_Waypoint(kActorKlein, 35, 0);
+ break;
}
return false;
}
@@ -327,8 +329,7 @@ bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
}
bool AIScriptKlein::ChangeAnimationMode(int mode) {
- switch (mode)
- {
+ switch (mode) {
case kAnimationModeIdle:
_animationState = 0;
_animationFrame = 0;
@@ -403,8 +404,6 @@ bool AIScriptKlein::ChangeAnimationMode(int mode) {
_animationNext = 697;
}
break;
- default:
- break;
}
return true;
}
diff --git a/engines/bladerunner/script/ai/shoeshine_man.cpp b/engines/bladerunner/script/ai/shoeshine_man.cpp
index 2b8eb04fc8..2f31c7f543 100644
--- a/engines/bladerunner/script/ai/shoeshine_man.cpp
+++ b/engines/bladerunner/script/ai/shoeshine_man.cpp
@@ -25,6 +25,7 @@
namespace BladeRunner {
AIScriptShoeshineMan::AIScriptShoeshineMan(BladeRunnerEngine *vm) : AIScriptBase(vm) {
+ _state = false;
}
void AIScriptShoeshineMan::Initialize() {
@@ -53,17 +54,18 @@ void AIScriptShoeshineMan::ReceivedClue(int clueId, int fromActorId) {
}
void AIScriptShoeshineMan::ClickedByPlayer() {
- if (Actor_Query_Goal_Number(kActorShoeshineMan) != 100)
+ if (Actor_Query_Goal_Number(kActorShoeshineMan) != 100) {
return;
+ }
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1098.15, -0.04, -201.53, 0, true, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1098.15f, -0.04f, -201.53f, 0, true, false, 0)) {
Actor_Set_Goal_Number(kActorShoeshineMan, 102);
Actor_Face_Actor(kActorMcCoy, kActorShoeshineMan, true);
- Actor_Says_With_Pause(kActorShoeshineMan, 0, 1.2, 13);
+ Actor_Says_With_Pause(kActorShoeshineMan, 0, 1.2f, 13);
Actor_Says(kActorMcCoy, 730, 17);
Actor_Says(kActorShoeshineMan, 10, 13);
Actor_Says(kActorShoeshineMan, 20, 12);
- Actor_Says_With_Pause(kActorMcCoy, 735, 1.0, 14);
+ Actor_Says_With_Pause(kActorMcCoy, 735, 1.0f, 14);
Actor_Change_Animation_Mode(kActorShoeshineMan, 29);
}
}
@@ -101,18 +103,18 @@ int AIScriptShoeshineMan::GetFriendlinessModifierIfGetsClue(int otherActorId, in
}
bool AIScriptShoeshineMan::GoalChanged(int currentGoalNumber, int newGoalNumber) {
- if (newGoalNumber - 100 <= 1) {
- if (newGoalNumber == 100) {
- Actor_Put_In_Set(kActorShoeshineMan, kSetDR01_DR02_DR04);
- Actor_Set_At_XYZ(kActorShoeshineMan, -1160.0, -0.04, -235.0, 524);
- } else {
- AI_Movement_Track_Flush(kActorShoeshineMan);
- AI_Movement_Track_Append(kActorShoeshineMan, 281, 0);
- AI_Movement_Track_Append(kActorShoeshineMan, 40, 0);
- AI_Movement_Track_Repeat(kActorShoeshineMan);
- }
+ switch (newGoalNumber) {
+ case 100:
+ 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);
+ AI_Movement_Track_Append(kActorShoeshineMan, 40, 0);
+ AI_Movement_Track_Repeat(kActorShoeshineMan);
+ break;
}
-
return false;
}
diff --git a/engines/bladerunner/script/scene/dr04.cpp b/engines/bladerunner/script/scene/dr04.cpp
index 937fd105b2..21933aaae7 100644
--- a/engines/bladerunner/script/scene/dr04.cpp
+++ b/engines/bladerunner/script/scene/dr04.cpp
@@ -111,7 +111,7 @@ bool SceneScriptDR04::ClickedOnActor(int actorId) {
Actor_Says(kActorMoraji, 20, 3);
Actor_Says(kActorMoraji, 30, 3);
Actor_Says(kActorMcCoy, 955, 13);
- Actor_Says_With_Pause(kActorMoraji, 40, 0, 3);
+ Actor_Says_With_Pause(kActorMoraji, 40, 0.0f, 3);
Actor_Says(kActorMoraji, 50, 3);
Actor_Clue_Acquire(kActorMcCoy, kClueMorajiInterview, 1, kActorMoraji);
Actor_Set_Goal_Number(kActorMoraji, 22);