aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script
diff options
context:
space:
mode:
Diffstat (limited to 'engines/bladerunner/script')
-rw-r--r--engines/bladerunner/script/ai/bullet_bob.cpp12
-rw-r--r--engines/bladerunner/script/ai/free_slot_a.cpp13
-rw-r--r--engines/bladerunner/script/ai/mutant1.cpp2
-rw-r--r--engines/bladerunner/script/ai/officer_leary.cpp2
-rw-r--r--engines/bladerunner/script/ai/rajif.cpp5
-rw-r--r--engines/bladerunner/script/ai/runciter.cpp281
-rw-r--r--engines/bladerunner/script/scene/ct04.cpp2
-rw-r--r--engines/bladerunner/script/scene/dr06.cpp3
-rw-r--r--engines/bladerunner/script/scene/hf05.cpp1
-rw-r--r--engines/bladerunner/script/scene/hf07.cpp21
-rw-r--r--engines/bladerunner/script/scene/ma02.cpp105
-rw-r--r--engines/bladerunner/script/scene/ma06.cpp19
-rw-r--r--engines/bladerunner/script/scene/ma07.cpp4
-rw-r--r--engines/bladerunner/script/scene/rc01.cpp2
-rw-r--r--engines/bladerunner/script/scene/rc02.cpp46
-rw-r--r--engines/bladerunner/script/scene/rc04.cpp2
-rw-r--r--engines/bladerunner/script/scene/ug02.cpp2
-rw-r--r--engines/bladerunner/script/scene/ug05.cpp6
-rw-r--r--engines/bladerunner/script/scene/ug06.cpp4
-rw-r--r--engines/bladerunner/script/scene/ug07.cpp4
-rw-r--r--engines/bladerunner/script/scene/ug08.cpp27
-rw-r--r--engines/bladerunner/script/scene/ug09.cpp2
-rw-r--r--engines/bladerunner/script/scene/ug13.cpp136
-rw-r--r--engines/bladerunner/script/scene/ug14.cpp3
-rw-r--r--engines/bladerunner/script/scene/ug15.cpp10
-rw-r--r--engines/bladerunner/script/scene_script.h8
26 files changed, 412 insertions, 310 deletions
diff --git a/engines/bladerunner/script/ai/bullet_bob.cpp b/engines/bladerunner/script/ai/bullet_bob.cpp
index 1a97a826cd..75acdfdb21 100644
--- a/engines/bladerunner/script/ai/bullet_bob.cpp
+++ b/engines/bladerunner/script/ai/bullet_bob.cpp
@@ -79,7 +79,7 @@ bool AIScriptBulletBob::Update() {
Actor_Face_Heading(kActorBulletBob, 208, false);
_animationFrame = 0;
_animationState = 2;
- Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShotMcCoy);
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobWillShotMcCoy);
Game_Flag_Set(kFlagRC04BobShootMcCoy);
return true;
}
@@ -142,7 +142,7 @@ bool AIScriptBulletBob::ShotAtAndHit() {
Global_Variable_Increment(kVariableBobShot, 1);
if (Global_Variable_Query(kVariableBobShot) > 0) {
Actor_Set_Targetable(kActorBulletBob, false);
- Actor_Set_Goal_Number(kActorBulletBob, 99);
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobGone);
_animationFrame = 0;
_animationState = 3;
Ambient_Sounds_Play_Speech_Sound(kActorGordo, 9000, 100, 0, 0, 0); // not a typo, it's really from Gordo
@@ -178,7 +178,7 @@ bool AIScriptBulletBob::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
}
- if (newGoalNumber == kGoalBulletBobDead
+ if ( newGoalNumber == kGoalBulletBobDead
&& !Actor_Clue_Query(kActorMcCoy, kClueVKBobGorskyReplicant)
) {
Delay(2000);
@@ -189,11 +189,11 @@ bool AIScriptBulletBob::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
}
- if (newGoalNumber == 6) {
+ if (newGoalNumber == kGoalBulletBobShotMcCoy) {
Scene_Exits_Disable();
Actor_Force_Stop_Walking(kActorMcCoy);
Ambient_Sounds_Play_Speech_Sound(kActorMcCoy, 9900, 100, 0, 0, 0);
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
Actor_Retired_Here(kActorMcCoy, 6, 6, 1, -1);
Scene_Exits_Enable();
return true;
@@ -268,7 +268,7 @@ bool AIScriptBulletBob::UpdateAnimation(int *animation, int *frame) {
}
if (_animationFrame == 5) {
Sound_Play(493, 90, 0, 0, 50);
- Actor_Set_Goal_Number(kActorBulletBob, 6);
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShotMcCoy);
}
break;
diff --git a/engines/bladerunner/script/ai/free_slot_a.cpp b/engines/bladerunner/script/ai/free_slot_a.cpp
index f673860119..6c3e9e2c80 100644
--- a/engines/bladerunner/script/ai/free_slot_a.cpp
+++ b/engines/bladerunner/script/ai/free_slot_a.cpp
@@ -51,9 +51,15 @@ void AIScriptFreeSlotA::Initialize() {
bool AIScriptFreeSlotA::Update() {
switch (Global_Variable_Query(kVariableChapter)) {
case 4:
- if (Actor_Query_Which_Set_In(kActorMcCoy) == kSceneUG02 && Actor_Query_Which_Set_In(kActorFreeSlotA) == kSceneUG02) {
+ if (Actor_Query_Which_Set_In(kActorMcCoy) == kSceneUG02
+ && Actor_Query_Which_Set_In(kActorFreeSlotA) == kSceneUG02
+ ) {
int goal = Actor_Query_Goal_Number(kActorFreeSlotA);
- if ((goal == 302 || goal == 303) && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotA, kActorMcCoy) <= 48) {
+ if ((goal == 302
+ || goal == 303
+ )
+ && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotA, kActorMcCoy) <= 48
+ ) {
Actor_Set_Goal_Number(kActorFreeSlotA, 304);
} else if (goal == 309) {
float x, y, z;
@@ -72,7 +78,8 @@ bool AIScriptFreeSlotA::Update() {
switch (Actor_Query_Goal_Number(kActorFreeSlotA)) {
case 306:
if (Actor_Query_Which_Set_In(kActorFreeSlotA) == Player_Query_Current_Set()
- && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotA, kActorMcCoy) <= 48) {
+ && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotA, kActorMcCoy) <= 48
+ ) {
Actor_Set_Goal_Number(kActorFreeSlotA, 308);
}
break;
diff --git a/engines/bladerunner/script/ai/mutant1.cpp b/engines/bladerunner/script/ai/mutant1.cpp
index fa9b736671..3849cfcaea 100644
--- a/engines/bladerunner/script/ai/mutant1.cpp
+++ b/engines/bladerunner/script/ai/mutant1.cpp
@@ -295,7 +295,7 @@ bool AIScriptMutant1::GoalChanged(int currentGoalNumber, int newGoalNumber) {
break;
case 8:
- if (Game_Flag_Query(623) == 1) {
+ if (Game_Flag_Query(kFlagUG07Empty)) {
AI_Movement_Track_Append(kActorMutant1, 418, 0);
AI_Movement_Track_Append(kActorMutant1, 417, 0);
AI_Movement_Track_Append(kActorMutant1, 539, 0);
diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp
index 0348806508..718a39aff7 100644
--- a/engines/bladerunner/script/ai/officer_leary.cpp
+++ b/engines/bladerunner/script/ai/officer_leary.cpp
@@ -91,7 +91,7 @@ bool AIScriptOfficerLeary::Update() {
return false;
}
- if ( Game_Flag_Query(623)
+ if ( Game_Flag_Query(kFlagUG07Empty)
&& !Game_Flag_Query(664)
) {
Game_Flag_Set(664);
diff --git a/engines/bladerunner/script/ai/rajif.cpp b/engines/bladerunner/script/ai/rajif.cpp
index 26cf41282f..3703e74b64 100644
--- a/engines/bladerunner/script/ai/rajif.cpp
+++ b/engines/bladerunner/script/ai/rajif.cpp
@@ -37,7 +37,9 @@ void AIScriptRajif::Initialize() {
}
bool AIScriptRajif::Update() {
- if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorRajif) < 400)
+ if (Global_Variable_Query(kVariableChapter) == 5
+ && Actor_Query_Goal_Number(kActorRajif) < 400
+ )
Actor_Set_Goal_Number(kActorRajif, 599);
return false;
@@ -98,6 +100,7 @@ bool AIScriptRajif::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Change_Animation_Mode(kActorRajif, 0);
return true;
}
+
if (newGoalNumber == 599) {
Actor_Put_In_Set(kActorRajif, kSetFreeSlotI);
Actor_Set_At_Waypoint(kActorRajif, 41, 0);
diff --git a/engines/bladerunner/script/ai/runciter.cpp b/engines/bladerunner/script/ai/runciter.cpp
index 8087489d49..11ad906593 100644
--- a/engines/bladerunner/script/ai/runciter.cpp
+++ b/engines/bladerunner/script/ai/runciter.cpp
@@ -57,19 +57,21 @@ bool AIScriptRunciter::Update() {
) {
Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterGoToFreeSlotGH);
}
+
if (Global_Variable_Query(kVariableChapter) == 4
- && Actor_Query_Goal_Number(kActorRunciter) < 300
+ && Actor_Query_Goal_Number(kActorRunciter) < kGoalRunciterRC02Wait
) {
- Actor_Set_Goal_Number(kActorRunciter, 300);
+ Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterRC02Wait);
}
+
return false;
}
void AIScriptRunciter::TimerExpired(int timer) {}
void AIScriptRunciter::CompletedMovementTrack() {
- if (Actor_Query_Goal_Number(kActorRunciter) == 1) {
- if (Player_Query_Current_Scene() == 79) {
+ if (Actor_Query_Goal_Number(kActorRunciter) == kGoalRunciterRC02WalkAround) {
+ if (Player_Query_Current_Scene() == kSceneRC02) {
switch (Random_Query(1, 5)) {
case 2:
case 3:
@@ -85,7 +87,7 @@ void AIScriptRunciter::CompletedMovementTrack() {
}
}
Actor_Set_Goal_Number(kActorRunciter, 99);
- Actor_Set_Goal_Number(kActorRunciter, 1);
+ Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterRC02WalkAround);
//return true;
}
//return false;
@@ -102,12 +104,15 @@ void AIScriptRunciter::OtherAgentEnteredThisScene(int otherActorId) {}
void AIScriptRunciter::OtherAgentExitedThisScene(int otherActorId) {}
void AIScriptRunciter::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
- if (Actor_Query_Goal_Number(kActorRunciter) == 300 && combatMode == 1 && !Game_Flag_Query(705)) {
+ if ( Actor_Query_Goal_Number(kActorRunciter) == kGoalRunciterRC02Wait
+ && combatMode
+ && !Game_Flag_Query(kFlagRC02RunciterTalkWithGun)
+ ) {
Actor_Set_Targetable(kActorRunciter, true);
Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
Actor_Says(kActorRunciter, 420, 12);
Actor_Face_Actor(kActorMcCoy, kActorRunciter, true);
- Actor_Change_Animation_Mode(kActorMcCoy, 5);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatAim);
if (Actor_Clue_Query(kActorMcCoy, kClueZubensMotive)) {
Actor_Says(kActorMcCoy, 4770, -1);
Actor_Says(kActorRunciter, 590, 13);
@@ -145,7 +150,7 @@ void AIScriptRunciter::OtherAgentEnteredCombatMode(int otherActorId, int combatM
Actor_Says(kActorRunciter, 530, 18);
Actor_Says(kActorRunciter, 540, 16);
}
- Game_Flag_Set(705);
+ Game_Flag_Set(kFlagRC02RunciterTalkWithGun);
}
}
@@ -180,7 +185,8 @@ bool AIScriptRunciter::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_At_Waypoint(kActorRunciter, 92, 567);
return false;
}
- if (newGoalNumber == kGoalRunciterWalkAroundRC02) {
+
+ if (newGoalNumber == kGoalRunciterRC02WalkAround) {
AI_Movement_Track_Flush(kActorRunciter);
if (Random_Query(0, 1) == 1) {
if (Random_Query(0, 1) == 0) {
@@ -198,6 +204,7 @@ bool AIScriptRunciter::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorRunciter);
return true;
}
+
if (newGoalNumber == kGoalRunciterGoToFreeSlotGH) {
AI_Movement_Track_Flush(kActorRunciter);
AI_Movement_Track_Append(kActorRunciter, 39, 120);
@@ -205,7 +212,8 @@ bool AIScriptRunciter::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorRunciter);
return false;
}
- if (newGoalNumber == kGoalRunciterAtShop) {
+
+ if (newGoalNumber == kGoalRunciterRC02Wait) {
Actor_Put_In_Set(kActorRunciter, kSetRC02_RC51);
Actor_Set_At_Waypoint(kActorRunciter, 93, 1007);
return false;
@@ -214,77 +222,95 @@ bool AIScriptRunciter::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
-
switch (_animationState) {
- case kRunciterStateDead:
- *animation = 528;
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(528) - 1;
- *frame = _animationFrame;
- break;
- case kRunciterStateDying:
- *animation = 528;
- _animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(528) - 1) {
- *animation = 528;
- _animationState = kRunciterStateDead;
- }
- *frame = _animationFrame;
- break;
- case 13:
+ case kRunciterStateIdle:
if (var_45CD78 == 0) {
- _animationFrame = 0;
- _animationState = _animationStateNext;
- *animation = _animationNext;
+ *animation = 529;
+ if (var_45CD84) {
+ var_45CD84--;
+ } else {
+ _animationFrame += var_45CD80;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(529)) {
+ _animationFrame = 0;
+ }
+ if (_animationFrame < 0) {
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(529) - 1;
+ }
+ --var_45CD7C;
+ if (var_45CD7C == 0) {
+ var_45CD80 = 2 * Random_Query(0, 1) - 1;
+ var_45CD7C = Random_Query(6, 14);
+ var_45CD84 = Random_Query(0, 4);
+ }
+ if (_animationFrame == 0) {
+ if (Random_Query(0, 1) == 1) {
+ var_45CD78 = Random_Query(1, 2);
+ var_45CD80 = 1;
+ var_45CD84 = 0;
+ }
+ }
+ }
} else if (var_45CD78 == 1) {
*animation = 530;
- _animationFrame += 3;
+ _animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(530)) {
_animationFrame = 0;
- _animationState = _animationStateNext;
- *animation = _animationNext;
+ var_45CD78 = 0;
+ *animation = 529;
+ var_45CD7C = Random_Query(6, 14);
+ var_45CD80 = 2 * Random_Query(0, 1) - 1;
}
} else if (var_45CD78 == 2) {
*animation = 531;
- _animationFrame -= 3;
- if (_animationFrame - 3 < 0) {
- _animationFrame = 0;
- _animationState = _animationStateNext;
- *animation = _animationNext;
+ if (var_45CD84) {
+ var_45CD84--;
+ } else {
+ _animationFrame += var_45CD80;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
+ var_45CD84 = Random_Query(5, 15);
+ var_45CD80 = -1;
+ }
+ if (_animationFrame <= 0) {
+ _animationFrame = 0;
+ var_45CD78 = 0;
+ *animation = 529;
+ var_45CD7C = Random_Query(6, 14);
+ var_45CD80 = 2 * Random_Query(0, 1) - 1;
+ }
}
}
*frame = _animationFrame;
break;
- case 12:
- *animation = 532;
+
+ case kRunciterStateWalking:
+ *animation = 526;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(532)) {
- *animation = 529;
- _animationState = 0;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(526)) {
_animationFrame = 0;
- var_45CD78 = 0;
- Actor_Change_Animation_Mode(kActorRunciter, kAnimationModeCombatIdle);
}
*frame = _animationFrame;
break;
- case 11:
- *animation = 541;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(541)) {
+
+ case 2:
+ *animation = 533;
+ _animationFrame++;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(533)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
_animationState = 0;
var_45CD78 = 0;
} else {
- *animation = 533;
- _animationState = 2;
+ _animationState = 4;
}
}
*frame = _animationFrame;
break;
- case 10:
- *animation = 540;
+
+ case 4:
+ *animation = 534;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(540)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(534)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
@@ -297,10 +323,11 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
- case 9:
- *animation = 539;
+
+ case 5:
+ *animation = 535;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(539)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(535)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
@@ -313,10 +340,11 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
- case 8:
- *animation = 538;
+
+ case 6:
+ *animation = 536;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(538)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(536)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
@@ -329,6 +357,7 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
+
case 7:
*animation = 537;
_animationFrame++;
@@ -345,10 +374,11 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
- case 6:
- *animation = 536;
+
+ case 8:
+ *animation = 538;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(536)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(538)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
@@ -361,10 +391,11 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
- case 5:
- *animation = 535;
+
+ case 9:
+ *animation = 539;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(535)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(539)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
@@ -377,10 +408,10 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
- case 4:
- *animation = 534;
+ case 10:
+ *animation = 540;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(534)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(540)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
@@ -393,87 +424,77 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
- case 2:
- *animation = 533;
- _animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(533)) {
+
+ case 11:
+ *animation = 541;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(541)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
_animationState = 0;
var_45CD78 = 0;
} else {
- _animationState = 4;
+ *animation = 533;
+ _animationState = 2;
}
}
*frame = _animationFrame;
break;
- case kRunciterStateWalking:
- *animation = 526;
+
+ case 12:
+ *animation = 532;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(526)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(532)) {
+ *animation = 529;
+ _animationState = 0;
_animationFrame = 0;
+ var_45CD78 = 0;
+ Actor_Change_Animation_Mode(kActorRunciter, kAnimationModeCombatIdle);
}
*frame = _animationFrame;
break;
- case kRunciterStateIdle:
+
+ case 13:
if (var_45CD78 == 0) {
- *animation = 529;
- if (var_45CD84) {
- var_45CD84--;
- } else {
- _animationFrame += var_45CD80;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(529)) {
- _animationFrame = 0;
- }
- if (_animationFrame < 0) {
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(529) - 1;
- }
- --var_45CD7C;
- if (var_45CD7C == 0) {
- var_45CD80 = 2 * Random_Query(0, 1) - 1;
- var_45CD7C = Random_Query(6, 14);
- var_45CD84 = Random_Query(0, 4);
- }
- if (_animationFrame == 0) {
- if (Random_Query(0, 1) == 1) {
- var_45CD78 = Random_Query(1, 2);
- var_45CD80 = 1;
- var_45CD84 = 0;
- }
- }
- }
+ _animationFrame = 0;
+ _animationState = _animationStateNext;
+ *animation = _animationNext;
} else if (var_45CD78 == 1) {
*animation = 530;
- _animationFrame++;
+ _animationFrame += 3;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(530)) {
_animationFrame = 0;
- var_45CD78 = 0;
- *animation = 529;
- var_45CD7C = Random_Query(6, 14);
- var_45CD80 = 2 * Random_Query(0, 1) - 1;
+ _animationState = _animationStateNext;
+ *animation = _animationNext;
}
} else if (var_45CD78 == 2) {
*animation = 531;
- if (var_45CD84) {
- var_45CD84--;
- } else {
- _animationFrame += var_45CD80;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
- var_45CD84 = Random_Query(5, 15);
- var_45CD80 = -1;
- }
- if (_animationFrame <= 0) {
- _animationFrame = 0;
- var_45CD78 = 0;
- *animation = 529;
- var_45CD7C = Random_Query(6, 14);
- var_45CD80 = 2 * Random_Query(0, 1) - 1;
- }
+ _animationFrame -= 3;
+ if (_animationFrame - 3 < 0) {
+ _animationFrame = 0;
+ _animationState = _animationStateNext;
+ *animation = _animationNext;
}
}
*frame = _animationFrame;
break;
+
+ case kRunciterStateDying:
+ *animation = 528;
+ _animationFrame++;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(528) - 1) {
+ *animation = 528;
+ _animationState = kRunciterStateDead;
+ }
+ *frame = _animationFrame;
+ break;
+
+ case kRunciterStateDead:
+ *animation = 528;
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(528) - 1;
+ *frame = _animationFrame;
+ break;
+
default:
*animation = 399;
_animationFrame = 0;
@@ -486,7 +507,9 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
bool AIScriptRunciter::ChangeAnimationMode(int mode) {
switch (mode) {
case kAnimationModeIdle:
- if (_animationState >= 2 && _animationState <= 11) {
+ if (_animationState >= 2
+ && _animationState <= 11
+ ) {
var_45CD88 = 1;
} else {
_animationState = 0;
@@ -494,6 +517,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
var_45CD78 = 0;
}
break;
+
case kAnimationModeWalk:
if (_animationState > 1) {
_animationState = 1;
@@ -504,6 +528,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
_animationNext = 526;
}
break;
+
case kAnimationModeTalk:
if (_animationState != 0) {
_animationState = 2;
@@ -515,6 +540,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 12:
if (_animationState != 0) {
_animationState = 2;
@@ -526,6 +552,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 13:
if (_animationState != 0) {
_animationState = 2;
@@ -537,6 +564,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 14:
if (_animationState != 0) {
_animationState = 2;
@@ -548,6 +576,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 15:
if (_animationState != 0) {
_animationState = 2;
@@ -559,6 +588,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 16:
if (_animationState != 0) {
_animationState = 2;
@@ -570,6 +600,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 17:
if (_animationState != 0) {
_animationState = 2;
@@ -581,6 +612,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 18:
if (_animationState != 0) {
_animationState = 2;
@@ -592,6 +624,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 19:
if (_animationState != 0) {
_animationState = 2;
@@ -603,11 +636,13 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 23:
_animationState = 12;
_animationFrame = 0;
break;
- case 48:
+
+ case kAnimationModeDie:
_animationState = 14;
_animationFrame = 0;
break;
diff --git a/engines/bladerunner/script/scene/ct04.cpp b/engines/bladerunner/script/scene/ct04.cpp
index 613fd05829..a7740b0be2 100644
--- a/engines/bladerunner/script/scene/ct04.cpp
+++ b/engines/bladerunner/script/scene/ct04.cpp
@@ -38,8 +38,10 @@ void SceneScriptCT04::InitializeScene() {
Scene_Loop_Set_Default(kCT03LoopMain);
Setup_Scene_Information(-82.86f, -621.3f, 769.03f, 1020);
}
+
Scene_Exit_Add_2D_Exit(0, 590, 0, 639, 479, 1);
Scene_Exit_Add_2D_Exit(1, 194, 84, 320, 274, 0);
+
Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1);
Ambient_Sounds_Add_Looping_Sound(56, 15, -100, 1);
Ambient_Sounds_Add_Looping_Sound(105, 34, 100, 1);
diff --git a/engines/bladerunner/script/scene/dr06.cpp b/engines/bladerunner/script/scene/dr06.cpp
index 51a3841bf2..afbdf7cfb5 100644
--- a/engines/bladerunner/script/scene/dr06.cpp
+++ b/engines/bladerunner/script/scene/dr06.cpp
@@ -152,7 +152,7 @@ bool SceneScriptDR06::ClickedOn3DObject(const char *objectName, bool a2) {
}
if (!Game_Flag_Query(kFlagDR06MannequinHeadOpen)) {
- Overlay_Play("DR06ovr2", 0, 1, 0, 0);
+ Overlay_Play("DR06ovr2", 0, true, false, 0);
Game_Flag_Set(kFlagDR06MannequinHeadOpen);
Sound_Play(160, 100, 0, 0, 50);
if (!Actor_Clue_Query(kActorMcCoy, kClueEnvelope)) {
@@ -202,6 +202,7 @@ bool SceneScriptDR06::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -707.57f, 136.6f, -1132.64f, 0, true, false, 0)) {
Game_Flag_Set(kFlagDR06toUG16);
diff --git a/engines/bladerunner/script/scene/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp
index e5afa3c98b..88f91817fa 100644
--- a/engines/bladerunner/script/scene/hf05.cpp
+++ b/engines/bladerunner/script/scene/hf05.cpp
@@ -47,6 +47,7 @@ void SceneScriptHF05::InitializeScene() {
Scene_Exit_Add_2D_Exit(2, 589, 0, 639, 479, 1);
Ambient_Sounds_Add_Looping_Sound(103, 40, 1, 1);
+
if (Game_Flag_Query(369)) {
Scene_Loop_Set_Default(kHF05LoopMainLoopHole);
addAmbientSounds();
diff --git a/engines/bladerunner/script/scene/hf07.cpp b/engines/bladerunner/script/scene/hf07.cpp
index 11593fb7d4..e35c4613bc 100644
--- a/engines/bladerunner/script/scene/hf07.cpp
+++ b/engines/bladerunner/script/scene/hf07.cpp
@@ -28,16 +28,19 @@ void SceneScriptHF07::InitializeScene() {
if (Game_Flag_Query(kFlagUG06toHF07) ) {
Setup_Scene_Information(-84.0f, 58.43f, -105.0f, 524);
} else {
- Setup_Scene_Information(298.0f, 58.43f, -71.0f, 700);
+ Setup_Scene_Information(298.0f, 58.43f, -71.0f, 700);
}
+
Scene_Exit_Add_2D_Exit(0, 289, 136, 344, 305, 0);
- Scene_Exit_Add_2D_Exit(1, 69, 264, 132, 303, 2);
+ Scene_Exit_Add_2D_Exit(1, 69, 264, 132, 303, 2);
+
Ambient_Sounds_Add_Looping_Sound(108, 100, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(112, 32, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound(112, 32, 0, 1);
Ambient_Sounds_Add_Sound(303, 5, 40, 20, 33, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(304, 5, 40, 20, 33, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(305, 5, 40, 20, 33, -100, 100, -101, -101, 0, 0);
- if (Game_Flag_Query(368) ) {
+
+ if (Game_Flag_Query(368)) {
Scene_Loop_Set_Default(2);
} else {
Scene_Loop_Set_Default(0);
@@ -73,7 +76,8 @@ bool SceneScriptHF07::ClickedOnExit(int exitId) {
} else if (Actor_Query_In_Set(kActorLucy, kSetHF07)) {
Async_Actor_Walk_To_XYZ(kActorLucy, 235.0f, 58.43f, -100.0f, 0, false);
}
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 318.0f, 71.43f, -102.0f, 0, 1, false, 0)) {
+
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 318.0f, 71.43f, -102.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagHF07toHF05);
if (!Game_Flag_Query(662)) {
Actor_Face_Heading(kActorMcCoy, 0, false);
@@ -87,12 +91,14 @@ bool SceneScriptHF07::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
if (Actor_Query_In_Set(kActorDektora, kSetHF07)) {
Async_Actor_Walk_To_XYZ(kActorDektora, -73.0f, 58.43f, -7.0f, 0, false);
} else if (Actor_Query_In_Set(kActorLucy, kSetHF07)) {
Async_Actor_Walk_To_XYZ(kActorLucy, -73.0f, 58.43f, -7.0f, 0, false);
}
+
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -84.0f, 58.43f, -105.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
@@ -117,7 +123,9 @@ void SceneScriptHF07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptHF07::PlayerWalkedIn() {
if (Game_Flag_Query(662)) {
int actorId = getAffectionTowardsActor();
- if (Game_Flag_Query(662) && actorId != -1) {
+ if (Game_Flag_Query(662)
+ && actorId != -1
+ ) {
Actor_Put_In_Set(actorId, kSetHF07);
if (Game_Flag_Query(kFlagUG06toHF07)) {
Actor_Set_At_XYZ(actorId, -73.0f, 58.43f, -7.0f, 224);
@@ -131,6 +139,7 @@ void SceneScriptHF07::PlayerWalkedIn() {
Loop_Actor_Travel_Stairs(kActorMcCoy, 30, false, kAnimationModeIdle);
Footstep_Sound_Override_Off();
}
+
Game_Flag_Reset(kFlagHF05toHF07);
Game_Flag_Reset(kFlagUG06toHF07);
}
diff --git a/engines/bladerunner/script/scene/ma02.cpp b/engines/bladerunner/script/scene/ma02.cpp
index 5fa1e669c5..74eaedbaad 100644
--- a/engines/bladerunner/script/scene/ma02.cpp
+++ b/engines/bladerunner/script/scene/ma02.cpp
@@ -31,37 +31,46 @@ enum kMA02Exits {
void SceneScriptMA02::InitializeScene() {
if (Game_Flag_Query(kFlagMA04ToMA02)) {
- Setup_Scene_Information(-172.0f, -144.13f, 6.27f, 500);
+ Setup_Scene_Information(-172.0f, -144.13f, 6.27f, 500);
} else { // From MA06
- Setup_Scene_Information(23.19f, -144.12f, 378.27f, 750);
+ Setup_Scene_Information( 23.19f, -144.12f, 378.27f, 750);
if (Global_Variable_Query(kVariableChapter) == 4) {
Actor_Set_Goal_Number(kActorRajif, 300);
}
Game_Flag_Reset(kFlagMA04WatchedTV);
}
Scene_Exit_Add_2D_Exit(kMA02ExitMA06, 538, 84, 639, 327, 1);
- Scene_Exit_Add_2D_Exit(kMA02ExitMA04, 56, 98, 150, 260, 0);
- if (Global_Variable_Query(kVariableChapter) >= 4 && Global_Variable_Query(kVariableChapter) == 5 && Game_Flag_Query(653)) {
+ Scene_Exit_Add_2D_Exit(kMA02ExitMA04, 56, 98, 150, 260, 0);
+
+ if (Global_Variable_Query(kVariableChapter) >= 4
+ && Global_Variable_Query(kVariableChapter) == 5
+ && Game_Flag_Query(653)
+ ) {
Actor_Set_Goal_Number(kActorMaggie, 599);
Actor_Change_Animation_Mode(kActorMaggie, 88);
Actor_Put_In_Set(kActorMaggie, kSetMA02_MA04);
Actor_Set_At_XYZ(kActorMaggie, -35.51f, -144.12f, 428.0f, 0);
Actor_Retired_Here(kActorMaggie, 24, 24, 1, -1);
}
+
Ambient_Sounds_Add_Looping_Sound(104, 12, 0, 1);
Ambient_Sounds_Add_Looping_Sound(71, 25, 0, 1);
- Ambient_Sounds_Add_Sound(72, 5, 30, 5, 5, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(73, 5, 30, 5, 5, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(74, 5, 30, 5, 5, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(375, 10, 60, 20, 20, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(376, 10, 60, 20, 20, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(87, 10, 60, 12, 12, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(68, 60, 180, 14, 14, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(69, 60, 180, 14, 14, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 72, 5, 30, 5, 5, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 73, 5, 30, 5, 5, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 74, 5, 30, 5, 5, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(375, 10, 60, 20, 20, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(376, 10, 60, 20, 20, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 87, 10, 60, 12, 12, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 68, 60, 180, 14, 14, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 69, 60, 180, 14, 14, 0, 0, -101, -101, 0, 0);
if (isPhoneRinging()) {
Ambient_Sounds_Add_Sound(403, 3, 3, 27, 27, -100, -100, -100, -100, 99, 0);
}
- if (Global_Variable_Query(kVariableChapter) == 5 && Game_Flag_Query(653) && !Actor_Clue_Query(kActorMcCoy, kClueCrystalsCigarette)) {
+
+ if ( Global_Variable_Query(kVariableChapter) == 5
+ && Game_Flag_Query(653)
+ && !Actor_Clue_Query(kActorMcCoy, kClueCrystalsCigarette)
+ ) {
Overlay_Play("MA02OVER", 0, 1, 0, 0);
}
}
@@ -84,30 +93,34 @@ bool SceneScriptMA02::ClickedOn3DObject(const char *objectName, bool a2) {
ESPER_Flag_To_Activate();
return true;
}
- if (Object_Query_Click("BAR-MAIN", objectName) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, -29.0f, -140.4f, 298.0f, 36, 1, false, 0)) {
- Actor_Face_Object(kActorMcCoy, "BAR-MAIN", true);
- if (Global_Variable_Query(kVariableChapter) < 4) {
- Actor_Set_Goal_Number(kActorMaggie, 3);
- } else if (Global_Variable_Query(kVariableChapter) == 5 && Game_Flag_Query(653) && !Actor_Clue_Query(kActorMcCoy, kClueCrystalsCigarette)) {
- Overlay_Remove("MA02OVER");
- Item_Pickup_Spin_Effect(985, 480, 240);
- Actor_Voice_Over(1150, kActorVoiceOver);
- Actor_Voice_Over(1160, kActorVoiceOver);
- Actor_Voice_Over(1170, kActorVoiceOver);
- Actor_Voice_Over(1180, kActorVoiceOver);
- Actor_Voice_Over(1190, kActorVoiceOver);
- Actor_Voice_Over(1200, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueCrystalsCigarette, true, -1);
- } else {
- Actor_Says(kActorMcCoy, 8526, 0);
+ if (Object_Query_Click("BAR-MAIN", objectName)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -29.0f, -140.4f, 298.0f, 36, true, false, 0)) {
+ Actor_Face_Object(kActorMcCoy, "BAR-MAIN", true);
+ if (Global_Variable_Query(kVariableChapter) < 4) {
+ Actor_Set_Goal_Number(kActorMaggie, 3);
+ } else if (Global_Variable_Query(kVariableChapter) == 5 && Game_Flag_Query(653) && !Actor_Clue_Query(kActorMcCoy, kClueCrystalsCigarette)) {
+ Overlay_Remove("MA02OVER");
+ Item_Pickup_Spin_Effect(985, 480, 240);
+ Actor_Voice_Over(1150, kActorVoiceOver);
+ Actor_Voice_Over(1160, kActorVoiceOver);
+ Actor_Voice_Over(1170, kActorVoiceOver);
+ Actor_Voice_Over(1180, kActorVoiceOver);
+ Actor_Voice_Over(1190, kActorVoiceOver);
+ Actor_Voice_Over(1200, kActorVoiceOver);
+ Actor_Clue_Acquire(kActorMcCoy, kClueCrystalsCigarette, true, -1);
+ } else {
+ Actor_Says(kActorMcCoy, 8526, 0);
+ }
+ return true;
}
- return true;
}
return false;
}
bool SceneScriptMA02::ClickedOnActor(int actorId) {
- if (actorId == kActorMaggie && Actor_Query_Goal_Number(kActorMaggie) == 599) {
+ if (actorId == kActorMaggie
+ && Actor_Query_Goal_Number(kActorMaggie) == 599
+ ) {
if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorMaggie, 30, true, false)) {
Actor_Face_Actor(kActorMcCoy, kActorMaggie, true);
Actor_Voice_Over(1140, kActorVoiceOver);
@@ -122,15 +135,16 @@ bool SceneScriptMA02::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptMA02::ClickedOnExit(int exitId) {
if (exitId == kMA02ExitMA06) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.19f, -144.12f, 378.27f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.19f, -144.12f, 378.27f, 0, true, false, 0)) {
Music_Stop(10);
Game_Flag_Set(kFlagMA02toMA06);
Set_Enter(kSetMA06, kSceneMA06);
}
return true;
}
+
if (exitId == kMA02ExitMA04) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -168.0f, -144.13f, 10.27f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -168.0f, -144.13f, 10.27f, 0, true, false, 0)) {
Game_Flag_Set(kFlagMA02ToMA04);
Set_Enter(kSetMA04, kSceneMA04);
}
@@ -153,33 +167,37 @@ void SceneScriptMA02::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagMA06ToMA02)) {
selectNextTvNews();
}
+
if (Game_Flag_Query(kFlagMA04ToMA02)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -148.12f, -144.13f, 34.27f, 0, 1, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -148.12f, -144.13f, 34.27f, 0, true, false, 0);
}
+
if ( Global_Variable_Query(kVariableChapter) == 4
- && !Game_Flag_Query(655)
+ && !Game_Flag_Query(kFlagMA02RajifTalk)
) {
- Game_Flag_Set(623);
- Game_Flag_Set(655);
- dialogueWithRajif();
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.19f, -144.12f, 378.27f, 0, 0, false, 0);
+ Game_Flag_Set(kFlagUG07Empty);
+ Game_Flag_Set(kFlagMA02RajifTalk);
+ talkWithRajif();
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.19f, -144.12f, 378.27f, 0, false, false, 0);
Game_Flag_Set(kFlagMA02toMA06);
Set_Enter(kSetMA06, kSceneMA06);
// return true;
return;
}
+
if ( Global_Variable_Query(kVariableChapter) == 5
&& !Game_Flag_Query(654)
) {
if (Game_Flag_Query(653)) {
- Actor_Says(kActorMcCoy, 2390, 0);
+ Actor_Says(kActorMcCoy, 2390, kAnimationModeIdle);
Music_Play(2, 25, 0, 3, -1, 0, 0);
} else {
- Actor_Says(kActorMcCoy, 2385, 3);
+ Actor_Says(kActorMcCoy, 2385, kAnimationModeTalk);
}
Game_Flag_Set(654);
Autosave_Game(3);
}
+
if ( Global_Variable_Query(kVariableChapter) < 4
&& !Game_Flag_Query(kFlagMA04ToMA02)
&& Actor_Query_Goal_Number(kActorMaggie) != 2
@@ -199,6 +217,7 @@ void SceneScriptMA02::PlayerWalkedIn() {
}
}
}
+
Game_Flag_Reset(kFlagMA04ToMA02);
Game_Flag_Reset(kFlagMA06ToMA02);
//return false;
@@ -213,7 +232,7 @@ void SceneScriptMA02::PlayerWalkedOut() {
void SceneScriptMA02::DialogueQueueFlushed(int a1) {
}
-void SceneScriptMA02::dialogueWithRajif() {
+void SceneScriptMA02::talkWithRajif() {
Actor_Says(kActorMcCoy, 2365, 13);
Actor_Says(kActorRajif, 0, 13);
Actor_Says(kActorMcCoy, 2370, 13);
@@ -227,7 +246,7 @@ void SceneScriptMA02::dialogueWithRajif() {
}
bool SceneScriptMA02::isPhoneRinging() {
- return Global_Variable_Query(kVariableChapter) == 5
+ return Global_Variable_Query(kVariableChapter) == 5
&& !Actor_Clue_Query(kActorMcCoy, kCluePhoneCallClovis)
&& !Actor_Clue_Query(kActorMcCoy, kCluePhoneCallCrystal)
&& !Actor_Clue_Query(kActorMcCoy, kCluePhoneCallDektora1)
diff --git a/engines/bladerunner/script/scene/ma06.cpp b/engines/bladerunner/script/scene/ma06.cpp
index b7a6da38e2..8d7bc4e504 100644
--- a/engines/bladerunner/script/scene/ma06.cpp
+++ b/engines/bladerunner/script/scene/ma06.cpp
@@ -33,10 +33,13 @@ enum kMA06Loops {
void SceneScriptMA06::InitializeScene() {
Setup_Scene_Information(40.0f, 1.0f, -20.0f, 400);
+
Ambient_Sounds_Add_Looping_Sound(210, 50, 0, 1);
Ambient_Sounds_Add_Looping_Sound(408, 33, 0, 1);
+
Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kMA06LoopDoorOpen, false);
Scene_Loop_Set_Default(kMA06LoopMain);
+
Sound_Play(209, 100, 50, 50, 100);
}
@@ -81,10 +84,12 @@ void SceneScriptMA06::PlayerWalkedIn() {
Actor_Face_Object(kActorMcCoy, "panel", true);
Delay(500);
activateElevator();
+
if (isElevatorOnDifferentFloor()) {
Sound_Play(114, 25, 0, 0, 50);
Delay(4000);
}
+
Game_Flag_Reset(kFlagMA01toMA06);
Game_Flag_Reset(kFlagMA02toMA06);
Game_Flag_Reset(kFlagMA07toMA06);
@@ -96,6 +101,7 @@ void SceneScriptMA06::PlayerWalkedIn() {
} else {
Set_Enter(kSetMA07, kSceneMA07);
}
+
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kMA06LoopDoorClose, true);
Sound_Play(208, 100, 50, 50, 50);
//return true;
@@ -130,11 +136,14 @@ void SceneScriptMA06::activateElevator() {
if (Game_Flag_Query(kFlagMA06toMA07)) {
break;
}
- Actor_Says(kActorAnsweringMachine, 80, 3);
+
+ Actor_Says(kActorAnsweringMachine, 80, kAnimationModeTalk);
Player_Gains_Control();
int floor = Elevator_Activate(kElevatorMA);
Player_Loses_Control();
+
Scene_Loop_Start_Special(kSceneLoopModeOnce, kMA06LoopMain, true);
+
if (floor > 1) {
Game_Flag_Set(kFlagMA06toMA07);
} else if (floor == 1) {
@@ -147,12 +156,14 @@ void SceneScriptMA06::activateElevator() {
}
} else { // floor == 0
Actor_Says(kActorMcCoy, 2940, 18);
- if (Global_Variable_Query(kVariableChapter) == 4 && Game_Flag_Query(655)) {
+ if (Global_Variable_Query(kVariableChapter) == 4
+ && Game_Flag_Query(kFlagMA02RajifTalk)
+ ) {
Sound_Play(412, 100, 0, 0, 50);
Delay(500);
- Actor_Says(kActorAnsweringMachine, 610, 3);
+ Actor_Says(kActorAnsweringMachine, 610, kAnimationModeTalk);
Delay(500);
- Actor_Says(kActorMcCoy, 8527, 3);
+ Actor_Says(kActorMcCoy, 8527, kAnimationModeTalk);
} else {
Game_Flag_Set(kFlagMA06ToMA02);
Actor_Says(kActorAnsweringMachine, 90, 3);
diff --git a/engines/bladerunner/script/scene/ma07.cpp b/engines/bladerunner/script/scene/ma07.cpp
index 65d2332d6c..27b489733b 100644
--- a/engines/bladerunner/script/scene/ma07.cpp
+++ b/engines/bladerunner/script/scene/ma07.cpp
@@ -131,12 +131,15 @@ void SceneScriptMA07::PlayerWalkedIn() {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -268.0f, -162.8f, 188.0f, 0, false, false, 0);
Game_Flag_Reset(kFlagPS14toMA07);
}
+
if (Actor_Query_Goal_Number(kActorRachael) == 300) {
Actor_Set_Goal_Number(kActorRachael, 305);
}
+
if (Game_Flag_Query(kFlagMA06toMA07)) {
Game_Flag_Reset(kFlagMA06toMA07);
}
+
if (!Game_Flag_Query(648)
&& Game_Flag_Query(671)
&& Global_Variable_Query(kVariableChapter) == 4
@@ -144,6 +147,7 @@ void SceneScriptMA07::PlayerWalkedIn() {
Scene_Exits_Disable();
Actor_Set_Goal_Number(kActorGaff, 300);
}
+
if (Game_Flag_Query(666)) {
Actor_Voice_Over(1360, kActorVoiceOver);
Actor_Voice_Over(1370, kActorVoiceOver);
diff --git a/engines/bladerunner/script/scene/rc01.cpp b/engines/bladerunner/script/scene/rc01.cpp
index f3b757ecf6..15c4d5e45a 100644
--- a/engines/bladerunner/script/scene/rc01.cpp
+++ b/engines/bladerunner/script/scene/rc01.cpp
@@ -405,7 +405,7 @@ void SceneScriptRC01::walkToCenter() {
bool SceneScriptRC01::ClickedOnExit(int exitId) {
if (exitId == kRC01ExitRC02) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -174.77f, 5.55f, 25.95f, 12, true, false, 0)) {
- if (Game_Flag_Query(705)) {
+ if (Game_Flag_Query(kFlagRC02RunciterTalkWithGun)) {
Actor_Says(kActorMcCoy, 8522, 14);
} else {
switch (Global_Variable_Query(kVariableChapter)) {
diff --git a/engines/bladerunner/script/scene/rc02.cpp b/engines/bladerunner/script/scene/rc02.cpp
index a84fe99bcf..93bedec479 100644
--- a/engines/bladerunner/script/scene/rc02.cpp
+++ b/engines/bladerunner/script/scene/rc02.cpp
@@ -160,7 +160,7 @@ void SceneScriptRC02::dialogueWithRunciter() {
Actor_Says(kActorRunciter, 130, 19);
Actor_Says(kActorMcCoy, 4605, 13);
Actor_Says(kActorRunciter, 140, 16);
- Game_Flag_Set(kFlagRC02TalkedToRunciter);
+ Game_Flag_Set(kFlagRC02RunciterTalk1);
break;
case 10: // LUCY
@@ -223,18 +223,12 @@ bool SceneScriptRC02::ClickedOnActor(int actorId) {
} else {
Actor_Says(kActorMcCoy, 8720, 17);
}
- } else if (Game_Flag_Query(705)
- || Game_Flag_Query(706)
+ return true;
+ }
+
+ if (!Game_Flag_Query(kFlagRC02RunciterTalkWithGun)
+ && !Game_Flag_Query(kFlagRC02RunciterTalk2)
) {
- Actor_Says(kActorMcCoy, 4805, 11);
- Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
- if (Game_Flag_Query(706)) {
- Actor_Says(kActorRunciter, 720, 15);
- } else {
- Actor_Says(kActorRunciter, 730, 14);
- }
- Actor_Face_Heading(kActorRunciter, 1007, false);
- } else {
Actor_Says(kActorMcCoy, 4690, 11);
Actor_Says(kActorMcCoy, 4695, 13);
Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
@@ -251,14 +245,25 @@ bool SceneScriptRC02::ClickedOnActor(int actorId) {
Actor_Says(kActorRunciter, 430, 16);
Actor_Face_Heading(kActorRunciter, 1007, false);
}
- Game_Flag_Set(706);
+ Game_Flag_Set(kFlagRC02RunciterTalk2);
+ return true;
}
+
+ Actor_Says(kActorMcCoy, 4805, 11);
+ Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
+ if (Game_Flag_Query(kFlagRC02RunciterTalk2)) {
+ Actor_Says(kActorRunciter, 720, 15);
+ } else {
+ Actor_Says(kActorRunciter, 730, 14);
+ }
+ Actor_Face_Heading(kActorRunciter, 1007, false);
return true;
}
AI_Movement_Track_Pause(kActorRunciter);
Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorRunciter, 48, true, false);
Actor_Face_Actor(kActorMcCoy, kActorRunciter, true);
+
if (!Game_Flag_Query(kFlagRC02RunciterInterview)) {
Actor_Says(kActorMcCoy, 4560, 13);
Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
@@ -274,7 +279,7 @@ bool SceneScriptRC02::ClickedOnActor(int actorId) {
return true;
}
- if (Game_Flag_Query(kFlagRC02TalkedToRunciter)) {
+ if (Game_Flag_Query(kFlagRC02RunciterTalk1)) {
if (Player_Query_Agenda() == kPlayerAgendaPolite) {
Game_Flag_Reset(kFlagNotUsed0);
dialogueWithRunciter();
@@ -302,7 +307,7 @@ bool SceneScriptRC02::ClickedOnActor(int actorId) {
Actor_Says(kActorRunciter, 240, 16);
Actor_Says(kActorMcCoy, 4640, 17);
}
- Game_Flag_Reset(kFlagRC02TalkedToRunciter);
+ Game_Flag_Reset(kFlagRC02RunciterTalk1);
AI_Movement_Track_Unpause(kActorRunciter);
return true;
}
@@ -346,6 +351,7 @@ bool SceneScriptRC02::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == kRC02ExitRC51) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -20.2f, -1238.73f, 108152.73f, 0, true, false, 0)) {
Async_Actor_Walk_To_XYZ(kActorMcCoy, -8.87f, -1238.89f, 108076.27f, 0, false);
@@ -382,12 +388,12 @@ void SceneScriptRC02::PlayerWalkedIn() {
Game_Flag_Set(kFlagRC02Entered);
}
if (Actor_Query_Which_Set_In(kActorRunciter) == kSetRC02_RC51
- && Actor_Query_Goal_Number(kActorRunciter) < kGoalRunciterAtShop
+ && Actor_Query_Goal_Number(kActorRunciter) < kGoalRunciterRC02Wait
) {
- Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterWalkAroundRC02);
+ Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterRC02WalkAround);
}
- if ( Actor_Query_Goal_Number(kActorRunciter) == kGoalRunciterAtShop
- && !Game_Flag_Query(704)
+ if ( Actor_Query_Goal_Number(kActorRunciter) == kGoalRunciterRC02Wait
+ && !Game_Flag_Query(kFlagRC02EnteredChapter4)
) {
Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
Actor_Says(kActorRunciter, 370, 12);
@@ -399,7 +405,7 @@ void SceneScriptRC02::PlayerWalkedIn() {
Actor_Face_Heading(kActorRunciter, 1007, false);
Actor_Says(kActorRunciter, 400, 13);
Actor_Says(kActorRunciter, 410, 12);
- Game_Flag_Set(704);
+ Game_Flag_Set(kFlagRC02EnteredChapter4);
}
} else {
Player_Loses_Control();
diff --git a/engines/bladerunner/script/scene/rc04.cpp b/engines/bladerunner/script/scene/rc04.cpp
index 122ff652c9..9287d7a098 100644
--- a/engines/bladerunner/script/scene/rc04.cpp
+++ b/engines/bladerunner/script/scene/rc04.cpp
@@ -457,7 +457,7 @@ void SceneScriptRC04::PlayerWalkedIn() {
) {
Actor_Says(kActorDispatcher, 40, 3);
Actor_Says(kActorBulletBob, 890, 37);
- Actor_Set_Goal_Number(kActorBulletBob, 2);
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShootMcCoy);
}
Game_Flag_Set(kFlagRC04Entered);
diff --git a/engines/bladerunner/script/scene/ug02.cpp b/engines/bladerunner/script/scene/ug02.cpp
index 12be0c2547..74b421fb44 100644
--- a/engines/bladerunner/script/scene/ug02.cpp
+++ b/engines/bladerunner/script/scene/ug02.cpp
@@ -30,8 +30,10 @@ void SceneScriptUG02::InitializeScene() {
} else {
Setup_Scene_Information( -95.0f, 74.78f, -503.0f, 556);
}
+
Scene_Exit_Add_2D_Exit(0, 529, 130, 607, 277, 0);
Scene_Exit_Add_2D_Exit(1, 305, 36, 335, 192, 0);
+
Ambient_Sounds_Add_Looping_Sound(332, 43, 0, 1);
Ambient_Sounds_Add_Looping_Sound(333, 43, 0, 1);
Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, 100, 100, -101, -101, 0, 0);
diff --git a/engines/bladerunner/script/scene/ug05.cpp b/engines/bladerunner/script/scene/ug05.cpp
index e02a9bd18b..cbce58e4a2 100644
--- a/engines/bladerunner/script/scene/ug05.cpp
+++ b/engines/bladerunner/script/scene/ug05.cpp
@@ -123,13 +123,15 @@ bool SceneScriptUG05::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptUG05::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (Game_Flag_Query(663) && !Game_Flag_Query(368)) {
+ if ( Game_Flag_Query(663)
+ && !Game_Flag_Query(368)
+ ) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -356.35f, 132.77f, -1092.36f, 0, false, false, 0);
Game_Flag_Set(kFlagUG06toHF07);
Set_Enter(kSetHF07, kSceneHF07);
} else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -156.72f, 3.03f, -1118.17f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 760, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 1, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 3, true, kAnimationModeIdle);
Game_Flag_Set(kFlagUG06toHF07);
Set_Enter(kSetHF07, kSceneHF07);
}
diff --git a/engines/bladerunner/script/scene/ug06.cpp b/engines/bladerunner/script/scene/ug06.cpp
index 99ebc54f3c..9ac5bcab88 100644
--- a/engines/bladerunner/script/scene/ug06.cpp
+++ b/engines/bladerunner/script/scene/ug06.cpp
@@ -140,7 +140,7 @@ void SceneScriptUG06::PlayerWalkedIn() {
}
if ( Global_Variable_Query(kVariableChapter) == 4
- && !Game_Flag_Query(524)
+ && !Game_Flag_Query(kFlagUG06Chapter4Started)
) {
Player_Loses_Control();
Actor_Voice_Over(2620, kActorVoiceOver);
@@ -153,7 +153,7 @@ void SceneScriptUG06::PlayerWalkedIn() {
Actor_Voice_Over(2690, kActorVoiceOver);
Actor_Voice_Over(2700, kActorVoiceOver);
Player_Gains_Control();
- Game_Flag_Set(524);
+ Game_Flag_Set(kFlagUG06Chapter4Started);
Autosave_Game(2);
}
//return false;
diff --git a/engines/bladerunner/script/scene/ug07.cpp b/engines/bladerunner/script/scene/ug07.cpp
index 1b0994331d..9892d16067 100644
--- a/engines/bladerunner/script/scene/ug07.cpp
+++ b/engines/bladerunner/script/scene/ug07.cpp
@@ -35,7 +35,7 @@ void SceneScriptUG07::InitializeScene() {
Game_Flag_Reset(kFlagUG10toUG07);
}
- if (Game_Flag_Query(623)) {
+ if (Game_Flag_Query(kFlagUG07Empty)) {
Scene_Exit_Add_2D_Exit(0, 0, 192, 51, 334, 0);
Scene_Exit_Add_2D_Exit(1, 226, 224, 314, 396, 1);
}
@@ -176,7 +176,7 @@ void SceneScriptUG07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptUG07::PlayerWalkedIn() {
if ( Global_Variable_Query(kVariableChapter) == 4
- && !Game_Flag_Query(623)
+ && !Game_Flag_Query(kFlagUG07Empty)
) {
Actor_Set_Goal_Number(kActorOfficerLeary, 307);
Actor_Set_Goal_Number(kActorOfficerGrayford, 307);
diff --git a/engines/bladerunner/script/scene/ug08.cpp b/engines/bladerunner/script/scene/ug08.cpp
index d3621af467..65e790b7c6 100644
--- a/engines/bladerunner/script/scene/ug08.cpp
+++ b/engines/bladerunner/script/scene/ug08.cpp
@@ -24,6 +24,13 @@
namespace BladeRunner {
+enum kUG08Loops {
+ kUG08LoopElevatorComingUp = 0,
+ kUG08LoopMainLoopElevator = 1,
+ kUG08LoopElevatorGoingDown = 3,
+ kUG08LoopMainNoElevator = 4
+};
+
void SceneScriptUG08::InitializeScene() {
if (Game_Flag_Query(kFlagUG13toUG08)) {
Setup_Scene_Information(-124.0f, 93.18f, 71.0f, 745);
@@ -50,18 +57,18 @@ void SceneScriptUG08::InitializeScene() {
Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- if (!Game_Flag_Query(610)) {
- Game_Flag_Set(431);
- Game_Flag_Set(610);
+ if (!Game_Flag_Query(kFlagUG08Entered)) {
+ Game_Flag_Set(kFlagUB08ElevatorUp);
+ Game_Flag_Set(kFlagUG08Entered);
}
if (Game_Flag_Query(kFlagUG13toUG08)) {
- Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
- Scene_Loop_Set_Default(1);
- } else if (Game_Flag_Query(431)) {
- Scene_Loop_Set_Default(1);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kUG08LoopElevatorComingUp, false);
+ Scene_Loop_Set_Default(kUG08LoopMainLoopElevator);
+ } else if (Game_Flag_Query(kFlagUB08ElevatorUp)) {
+ Scene_Loop_Set_Default(kUG08LoopMainLoopElevator);
} else {
- Scene_Loop_Set_Default(4);
+ Scene_Loop_Set_Default(kUG08LoopMainNoElevator);
}
}
@@ -108,9 +115,9 @@ bool SceneScriptUG08::ClickedOnExit(int exitId) {
Player_Loses_Control();
Actor_Set_Invisible(kActorMcCoy, true);
Game_Flag_Set(kFlagUG08toUG13);
- Game_Flag_Reset(431);
+ Game_Flag_Reset(kFlagUB08ElevatorUp);
Set_Enter(kSetUG13, kSceneUG13);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, false);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kUG08LoopElevatorGoingDown, false);
return false;
}
}
diff --git a/engines/bladerunner/script/scene/ug09.cpp b/engines/bladerunner/script/scene/ug09.cpp
index e6613c1d9b..3348272ea3 100644
--- a/engines/bladerunner/script/scene/ug09.cpp
+++ b/engines/bladerunner/script/scene/ug09.cpp
@@ -136,7 +136,7 @@ void SceneScriptUG09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptUG09::PlayerWalkedIn() {
if (Global_Variable_Query(kVariableChapter) == 4
- && Game_Flag_Query(623)
+ && Game_Flag_Query(kFlagUG07Empty)
) {
Game_Flag_Set(630);
}
diff --git a/engines/bladerunner/script/scene/ug13.cpp b/engines/bladerunner/script/scene/ug13.cpp
index d6dfbfa0fc..da212b74a7 100644
--- a/engines/bladerunner/script/scene/ug13.cpp
+++ b/engines/bladerunner/script/scene/ug13.cpp
@@ -34,7 +34,7 @@ void SceneScriptUG13::InitializeScene() {
Actor_Set_Invisible(kActorMcCoy, false);
}
- if (!Game_Flag_Query(431)) {
+ if (!Game_Flag_Query(kFlagUB08ElevatorUp)) {
Scene_Exit_Add_2D_Exit(0, 394, 205, 464, 281, 0);
}
Scene_Exit_Add_2D_Exit(1, 560, 90, 639, 368, 1);
@@ -62,7 +62,7 @@ void SceneScriptUG13::InitializeScene() {
if (Game_Flag_Query(kFlagUG08toUG13)) {
Scene_Loop_Start_Special(0, 0, 0);
Scene_Loop_Set_Default(1);
- } else if (Game_Flag_Query(431)) {
+ } else if (Game_Flag_Query(kFlagUB08ElevatorUp)) {
Scene_Loop_Set_Default(4);
} else {
Scene_Loop_Set_Default(1);
@@ -98,16 +98,16 @@ bool SceneScriptUG13::ClickedOn3DObject(const char *objectName, bool a2) {
if (Object_Query_Click("BOLLARD", objectName)) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 7.0f, 44.0f, -695.0f, 0, true, false, 0)) {
Actor_Face_Object(kActorMcCoy, "BOLLARD", true);
- if (Game_Flag_Query(431)) {
+ if (Game_Flag_Query(kFlagUB08ElevatorUp)) {
Scene_Loop_Set_Default(1);
Scene_Loop_Start_Special(kSceneLoopModeOnce, 0, false);
- Game_Flag_Reset(431);
+ Game_Flag_Reset(kFlagUB08ElevatorUp);
Game_Flag_Set(436);
return true;
} else {
Scene_Loop_Set_Default(4);
Scene_Loop_Start_Special(kSceneLoopModeOnce, 3, false);
- Game_Flag_Set(431);
+ Game_Flag_Set(kFlagUB08ElevatorUp);
Scene_Exit_Remove(0);
return true;
}
@@ -122,15 +122,24 @@ bool SceneScriptUG13::ClickedOnActor(int actorId) {
) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -248.0f, 44.0f, -390.0f, 12, true, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
- if (Actor_Query_Goal_Number(kActorTransient) != 6 && Actor_Query_Goal_Number(kActorTransient) != 599) {
+ if (Actor_Query_Goal_Number(kActorTransient) != 6
+ && Actor_Query_Goal_Number(kActorTransient) != 599
+ ) {
if (!Game_Flag_Query(554)) {
- sub_40223C();
+ Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
+ Game_Flag_Set(554);
+ Actor_Says(kActorMcCoy, 5560, 13);
+ Actor_Says_With_Pause(kActorMcCoy, 5565, 3.0f, 18);
+ Actor_Says(kActorTransient, 70, 31);
+ Actor_Says(kActorTransient, 80, 32);
+ Actor_Says(kActorMcCoy, 5570, kAnimationModeTalk);
+ Actor_Says(kActorTransient, 90, 32);
} else if (!Actor_Clue_Query(kActorMcCoy, kClueHomelessManInterview1) || !Actor_Clue_Query(kActorMcCoy, kClueHomelessManInterview2)) {
- sub_402AD4();
+ dialogueWithHomeless1();
} else {
Actor_Set_Goal_Number(kActorTransient, 391);
if (Actor_Clue_Query(kActorMcCoy, kClueFlaskOfAbsinthe)) {
- sub_402AD4();
+ dialogueWithHomeless1();
} else {
Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
Actor_Says(kActorMcCoy, 5600, 14);
@@ -170,14 +179,13 @@ bool SceneScriptUG13::ClickedOnItem(int itemId, bool a2) {
}
bool SceneScriptUG13::ClickedOnExit(int exitId) {
-
if (exitId == 0) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -32.0f, 54.63f, -883.0f, 0, true, false, 0)) {
Player_Loses_Control();
Game_Flag_Set(kFlagUG13toUG08);
- Game_Flag_Set(431);
+ Game_Flag_Set(kFlagUB08ElevatorUp);
Set_Enter(kSetUG08, kSceneUG08);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, 0);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, false);
}
return true;
}
@@ -194,7 +202,7 @@ bool SceneScriptUG13::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -267.0f, 44.0f, -795.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 830, false);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 1, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 11, true, kAnimationModeIdle);
Footstep_Sound_Override_Off();
if (!sub_402AD0()) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -477.0f, 141.9f, -870.0f, 0, false, false, 0);
@@ -270,13 +278,13 @@ void SceneScriptUG13::PlayerWalkedIn() {
if ( Actor_Query_Goal_Number(kActorTransient) >= 390
&& !Game_Flag_Query(kFlagCT04HomelessKilledByMcCoy)
) {
- if (Game_Flag_Query(553)) {
+ if (!Game_Flag_Query(kFlagUG13Entered)) {
+ Game_Flag_Set(kFlagUG13Entered);
+ Actor_Says(kActorTransient, 50, kAnimationModeTalk);
+ } else {
if (Random_Query(1, 3) == 1) {
Actor_Set_Goal_Number(kActorTransient, 395);
}
- } else {
- Game_Flag_Set(553);
- Actor_Says(kActorTransient, 50, kAnimationModeTalk);
}
}
//return false;
@@ -299,17 +307,6 @@ void SceneScriptUG13::PlayerWalkedOut() {
void SceneScriptUG13::DialogueQueueFlushed(int a1) {
}
-void SceneScriptUG13::sub_40223C() {
- Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
- Game_Flag_Set(554);
- Actor_Says(kActorMcCoy, 5560, 13);
- Actor_Says_With_Pause(kActorMcCoy, 5565, 3.0f, 18);
- Actor_Says(kActorTransient, 70, 31);
- Actor_Says(kActorTransient, 80, 32);
- Actor_Says(kActorMcCoy, 5570, kAnimationModeTalk);
- Actor_Says(kActorTransient, 90, 32);
-}
-
void SceneScriptUG13::sub_4023D8() {
Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
Actor_Clue_Acquire(kActorMcCoy, kClueHomelessManInterview1, false, kActorTransient);
@@ -343,68 +340,57 @@ void SceneScriptUG13::sub_4025E0() {
Actor_Says(kActorTransient, 260, 32);
}
-void SceneScriptUG13::sub_402960() {
- Actor_Says(kActorMcCoy, 5670, 9);
- Actor_Says(kActorTransient, 340, 31);
- Actor_Says(kActorMcCoy, 5690, 19);
- Actor_Says(kActorTransient, 350, 32);
- Actor_Says(kActorMcCoy, 5695, 14);
- Actor_Says(kActorTransient, 360, 33);
- Actor_Voice_Over(2710, kActorVoiceOver);
- Actor_Voice_Over(2730, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueHomelessManKid, false, kActorTransient);
-}
-
int SceneScriptUG13::sub_402AD0() {
return 0;
}
-void SceneScriptUG13::sub_402AD4() {
+void SceneScriptUG13::dialogueWithHomeless1() {
Dialogue_Menu_Clear_List();
- DM_Add_To_List_Never_Repeat_Once_Selected(1320, 6, 3, 1);
+ DM_Add_To_List_Never_Repeat_Once_Selected(1320, 6, 3, 1); // OTHERS
if (Actor_Clue_Query(kActorMcCoy, kClueHomelessManInterview1)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1330, 5, 8, 5);
+ DM_Add_To_List_Never_Repeat_Once_Selected(1330, 5, 8, 5); // FAT MAN
}
- DM_Add_To_List_Never_Repeat_Once_Selected(1340, 2, 4, 6);
+ DM_Add_To_List_Never_Repeat_Once_Selected(1340, 2, 4, 6); // SEWERS
if (Actor_Clue_Query(kActorMcCoy, kClueFlaskOfAbsinthe)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1350, 1, 3, 7);
+ DM_Add_To_List_Never_Repeat_Once_Selected(1350, 1, 3, 7); // GIVE FLASK
}
- Dialogue_Menu_Add_DONE_To_List(1360);
+ Dialogue_Menu_Add_DONE_To_List(1360); // DONE
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
switch (answer) {
- case 1360:
- return;
+ case 1320: // OTHERS
+ sub_4023D8();
+ break;
- case 1350:
- Actor_Clue_Acquire(kActorTransient, kClueFlaskOfAbsinthe, false, kActorMcCoy);
- Actor_Says_With_Pause(kActorMcCoy, 5595, 1.0f, 23);
- Item_Pickup_Spin_Effect(945, 193, 325);
- Actor_Says(kActorTransient, 290, 33);
- Actor_Says(kActorMcCoy, 5660, 13);
- Actor_Clue_Lose(kActorMcCoy, kClueFlaskOfAbsinthe);
- sub_402E24();
+ case 1330: // FAT MAN
+ Actor_Says(kActorMcCoy, 5585, 16);
+ sub_4025E0();
break;
- case 1340:
+ case 1340: // SEWERS
Actor_Modify_Friendliness_To_Other(kActorTransient, kActorMcCoy, -10);
Actor_Says(kActorMcCoy, 5590, 15);
Actor_Says(kActorTransient, 270, 31);
Actor_Says(kActorMcCoy, 5655, 16);
Actor_Says(kActorTransient, 280, 32);
break;
- case 1330:
- Actor_Says(kActorMcCoy, 5585, 16);
- sub_4025E0();
- break;
- case 1320:
- sub_4023D8();
+ case 1350: // GIVE FLASK
+ Actor_Clue_Acquire(kActorTransient, kClueFlaskOfAbsinthe, false, kActorMcCoy);
+ Actor_Says_With_Pause(kActorMcCoy, 5595, 1.0f, 23);
+ Item_Pickup_Spin_Effect(945, 193, 325);
+ Actor_Says(kActorTransient, 290, 33);
+ Actor_Says(kActorMcCoy, 5660, 13);
+ Actor_Clue_Lose(kActorMcCoy, kClueFlaskOfAbsinthe);
+ dialogueWithHomeless2();
break;
+ case 1360: // DONE
+ return;
+
default:
Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
Actor_Says(kActorMcCoy, 5600, 14);
@@ -416,18 +402,18 @@ void SceneScriptUG13::sub_402AD4() {
}
}
-void SceneScriptUG13::sub_402E24() {
+void SceneScriptUG13::dialogueWithHomeless2() {
Actor_Set_Friendliness_To_Other(kActorTransient, kActorMcCoy, 40);
Dialogue_Menu_Clear_List();
- DM_Add_To_List_Never_Repeat_Once_Selected(1370, 1, 1, 8);
- DM_Add_To_List_Never_Repeat_Once_Selected(1380, 1, 8, 1);
- DM_Add_To_List_Never_Repeat_Once_Selected(1390, 8, 1, 1);
+ DM_Add_To_List_Never_Repeat_Once_Selected(1370, 1, 1, 8); // DIRECTIONS
+ DM_Add_To_List_Never_Repeat_Once_Selected(1380, 1, 8, 1); // FAT MAN
+ DM_Add_To_List_Never_Repeat_Once_Selected(1390, 8, 1, 1); // REPLICANTS
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
- if (answer == 1370) {
+ if (answer == 1370) { // DIRECTIONS
Actor_Says(kActorMcCoy, 5665, 16);
Actor_Says(kActorTransient, 300, 32);
Actor_Says(kActorMcCoy, 5680, 19);
@@ -436,14 +422,22 @@ void SceneScriptUG13::sub_402E24() {
Actor_Start_Speech_Sample(kActorTransient, 110);
Actor_Set_Goal_Number(kActorTransient, 395);
Actor_Says(kActorMcCoy, 5685, 18);
- } else if (answer == 1380) {
+ } else if (answer == 1380) { // FAT MAN
if (Actor_Clue_Query(kActorMcCoy, kClueHomelessManInterview2)) {
- sub_402960();
+ Actor_Says(kActorMcCoy, 5670, 9);
+ Actor_Says(kActorTransient, 340, 31);
+ Actor_Says(kActorMcCoy, 5690, 19);
+ Actor_Says(kActorTransient, 350, 32);
+ Actor_Says(kActorMcCoy, 5695, 14);
+ Actor_Says(kActorTransient, 360, 33);
+ Actor_Voice_Over(2710, kActorVoiceOver);
+ Actor_Voice_Over(2730, kActorVoiceOver);
+ Actor_Clue_Acquire(kActorMcCoy, kClueHomelessManKid, false, kActorTransient);
} else {
Actor_Says(kActorMcCoy, 5700, 15);
sub_4025E0();
}
- } else if (answer == 1390) {
+ } else if (answer == 1390) { // REPLICANTS
Actor_Says(kActorMcCoy, 5675, 9);
Actor_Says(kActorTransient, 370, 32);
Actor_Says(kActorMcCoy, 5705, 10);
diff --git a/engines/bladerunner/script/scene/ug14.cpp b/engines/bladerunner/script/scene/ug14.cpp
index 914cf10045..d850df0eb5 100644
--- a/engines/bladerunner/script/scene/ug14.cpp
+++ b/engines/bladerunner/script/scene/ug14.cpp
@@ -83,7 +83,7 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) {
bool v1 = y > 57.0f;
- if (!exitId == 0) {
+ if (exitId == 0) {
if (v1) {
if (Loop_Actor_Walk_To_XYZ(kActorMcCoy, 141.47f, 128.92f, -150.16f, 0, true, false, 0)) {
return false;
@@ -133,6 +133,7 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) {
Loop_Actor_Travel_Stairs(kActorMcCoy, 13, true, kAnimationModeIdle);
Footstep_Sound_Override_Off();
}
+
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 157.0f, 128.92f, -108.01f, 0, true, false, 0)) {
Footstep_Sound_Override_On(3);
Loop_Actor_Travel_Stairs(kActorMcCoy, 6, true, kAnimationModeIdle);
diff --git a/engines/bladerunner/script/scene/ug15.cpp b/engines/bladerunner/script/scene/ug15.cpp
index fdd32449ff..ef1ca2f291 100644
--- a/engines/bladerunner/script/scene/ug15.cpp
+++ b/engines/bladerunner/script/scene/ug15.cpp
@@ -109,7 +109,7 @@ bool SceneScriptUG15::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptUG15::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -25.0f, 26.31f, -434.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -25.0f, 26.31f, -434.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagUG15toUG17);
@@ -119,7 +119,7 @@ bool SceneScriptUG15::ClickedOnExit(int exitId) {
}
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -17.0f, 26.31f, -346.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -17.0f, 26.31f, -346.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagUG15toUG16a);
@@ -133,8 +133,8 @@ bool SceneScriptUG15::ClickedOnExit(int exitId) {
if (v1 >= 300
&& v1 <= 303
) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -137.61f, 48.07f, 147.12f, 0, 1, false, 0);
- } else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 18.0f, 52.28f, 46.0f, 0, 1, false, 0)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -137.61f, 48.07f, 147.12f, 0, true, false, 0);
+ } else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 18.0f, 52.28f, 46.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagUG15toUG16b);
@@ -144,7 +144,7 @@ bool SceneScriptUG15::ClickedOnExit(int exitId) {
}
if (exitId == 3) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -238.0f, 52.46f, 222.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -238.0f, 52.46f, 222.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagUG15toUG13);
diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h
index f866935823..8d45053c13 100644
--- a/engines/bladerunner/script/scene_script.h
+++ b/engines/bladerunner/script/scene_script.h
@@ -261,7 +261,7 @@ DECLARE_SCRIPT(MA01)
END_SCRIPT
DECLARE_SCRIPT(MA02)
- void dialogueWithRajif();
+ void talkWithRajif();
bool isPhoneRinging();
void selectNextTvNews();
END_SCRIPT
@@ -483,13 +483,11 @@ DECLARE_SCRIPT(UG12)
END_SCRIPT
DECLARE_SCRIPT(UG13)
- void sub_40223C();
void sub_4023D8();
void sub_4025E0();
- void sub_402960();
int sub_402AD0();
- void sub_402AD4();
- void sub_402E24();
+ void dialogueWithHomeless1();
+ void dialogueWithHomeless2();
END_SCRIPT
DECLARE_SCRIPT(UG14)