[Scummvm-git-logs] scummvm master -> 1ef310db3cafd1c64673619e11fabd5c2e7df999
peterkohaut
peterkohaut at users.noreply.github.com
Sun Jan 27 20:34:07 CET 2019
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
702d8a4d37 BLADERUNNER: Holloway script cleanup
c3a2a262d9 BLADERUNNER: Cleanup of PS06 script
2fd99c5c1b BLADERUNNER: Police station script fixes
5c1b8a635a BLADERUNNER: Initial cleanup of HF05 & HF06
e3e55c2f4b BLADERUNNER: Fixed game-breaking bug with dialogue menus
1ef310db3c BLADERUNNER: Small cleanup for chapter 2 scripts
Commit: 702d8a4d370f7290389a8afb500f9aeeeb5608c8
https://github.com/scummvm/scummvm/commit/702d8a4d370f7290389a8afb500f9aeeeb5608c8
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-27T20:27:45+01:00
Commit Message:
BLADERUNNER: Holloway script cleanup
Changed paths:
engines/bladerunner/game_constants.h
engines/bladerunner/script/ai/gordo.cpp
engines/bladerunner/script/ai/hanoi.cpp
engines/bladerunner/script/ai/holloway.cpp
engines/bladerunner/script/ai/lucy.cpp
engines/bladerunner/script/scene/nr01.cpp
engines/bladerunner/script/scene/nr07.cpp
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 2096a62..73d0a9d 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -922,7 +922,7 @@ enum Flags {
kFlagTB07toTB02 = 608,
kFlagTB07RachaelTalk = 612,
kFlagHF03LucyTalk = 613,
- kFlagMcCoyCapturedByBaker = 616,
+ kFlagMcCoyCapturedByHolloway = 616,
kFlagSpinnerMissing = 617,
kFlagTB07TyrellMeeting = 625,
kFlagCT11DogWrapperTaken = 645,
@@ -1525,6 +1525,7 @@ enum GoalSteele {
kGoalSteeleLeaveRC03 = 130,
kGoalSteeleWalkAroundRestart = 190,
// chapter 3
+ kGoalSteeleNR01WaitForMcCoy = 230,
kGoalSteeleHF03ApproachLucy = 233,
kGoalSteeleHF03McCoyChasingLucy = 234,
kGoalSteeleHF02ConfrontLucy = 240,
@@ -1630,7 +1631,6 @@ enum GoalIzo {
kGoalIzoGoToHC03 = 155,
kGoalIzoDieHidden = 198,
kGoalIzoDie = 199,
-
kGoalIzoDead = 599
};
@@ -1699,6 +1699,18 @@ enum GoalDeskClerk {
kGoalDeskClerkGone = 400
};
+enum GoalHolloway {
+ kGoalHollowayDefault = 0,
+ kGoalHollowayGoToNR07 = 240,
+ kGoalHollowayGoToNR02 = 241,
+ kGoalHollowayGoToHF03 = 242,
+ kGoalHollowayApproachMcCoy = 250,
+ kGoalHollowayTalkToMcCoy = 251,
+ kGoalHollowayKnockOutMcCoy = 255,
+ kGoalHollowayPrepareCaptureMcCoy = 256,
+ kGoalHollowayCaptureMcCoy = 257
+};
+
enum GoalMoraji {
kGoalMorajiDefault = 0,
kGoalMorajiShot = 5,
diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp
index 5508512..8bc03ea 100644
--- a/engines/bladerunner/script/ai/gordo.cpp
+++ b/engines/bladerunner/script/ai/gordo.cpp
@@ -517,7 +517,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorGordo, 870, 16);
Sound_Play(576, 50, 0, 0, 50);
Sound_Play(319, 50, 0, 0, 50);
- Actor_Set_Goal_Number(33, 241);
+ Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayGoToNR02);
Actor_Says(kActorGordo, 880, 17);
Actor_Set_Goal_Number(kActorGordo, 211);
Player_Loses_Control();
diff --git a/engines/bladerunner/script/ai/hanoi.cpp b/engines/bladerunner/script/ai/hanoi.cpp
index f735694..91be365 100644
--- a/engines/bladerunner/script/ai/hanoi.cpp
+++ b/engines/bladerunner/script/ai/hanoi.cpp
@@ -46,7 +46,7 @@ void AIScriptHanoi::Initialize() {
}
bool AIScriptHanoi::Update() {
- if (Actor_Query_Goal_Number(kActorHolloway) == 240) {
+ if (Actor_Query_Goal_Number(kActorHolloway) == kGoalHollowayGoToNR07) {
AI_Countdown_Timer_Reset(kActorHanoi, 0);
}
if (Global_Variable_Query(kVariableChapter) == 3 && Actor_Query_Goal_Number(kActorHanoi) < 200) {
diff --git a/engines/bladerunner/script/ai/holloway.cpp b/engines/bladerunner/script/ai/holloway.cpp
index e9f162e..a64183b 100644
--- a/engines/bladerunner/script/ai/holloway.cpp
+++ b/engines/bladerunner/script/ai/holloway.cpp
@@ -25,7 +25,7 @@
namespace BladeRunner {
AIScriptHolloway::AIScriptHolloway(BladeRunnerEngine *vm) : AIScriptBase(vm) {
- _flag = 0;
+ _flag = false;
}
void AIScriptHolloway::Initialize() {
@@ -34,32 +34,35 @@ void AIScriptHolloway::Initialize() {
_animationStateNext = 0;
_animationNext = 0;
- _flag = 0;
+ _flag = false;
- Actor_Set_Goal_Number(kActorHolloway, 0);
+ Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayDefault);
}
bool AIScriptHolloway::Update() {
- if (Actor_Query_Goal_Number(kActorHolloway) == 256)
- Actor_Set_Goal_Number(kActorHolloway, 257);
+ if (Actor_Query_Goal_Number(kActorHolloway) == kGoalHollowayPrepareCaptureMcCoy) {
+ Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayCaptureMcCoy);
+ }
return false;
}
void AIScriptHolloway::TimerExpired(int timer) {
- if (!timer) {
+ if (timer == 0) {
AI_Countdown_Timer_Reset(kActorHolloway, 0);
if (Global_Variable_Query(kVariableBehavior) == 1) {
Player_Gains_Control();
}
- Actor_Set_Goal_Number(kActorHolloway, 251);
+ Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayTalkToMcCoy);
}
}
void AIScriptHolloway::CompletedMovementTrack() {
- if (Actor_Query_Goal_Number(kActorHolloway) < 245 && Actor_Query_Goal_Number(kActorHolloway) > 239) {
- Loop_Actor_Walk_To_Actor(kActorHolloway, 0, 24, 0, 0);
- Actor_Set_Goal_Number(kActorHolloway, 250);
+ if (Actor_Query_Goal_Number(kActorHolloway) < 245
+ && Actor_Query_Goal_Number(kActorHolloway) > 239
+ ) {
+ Loop_Actor_Walk_To_Actor(kActorHolloway, kActorMcCoy, 24, false, false);
+ Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayApproachMcCoy);
}
}
@@ -84,9 +87,11 @@ void AIScriptHolloway::OtherAgentExitedThisScene(int otherActorId) {
}
void AIScriptHolloway::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
- if (otherActorId == kActorMcCoy && Actor_Query_Goal_Number(kActorHolloway) == 250) {
+ if (otherActorId == kActorMcCoy
+ && Actor_Query_Goal_Number(kActorHolloway) == kGoalHollowayApproachMcCoy
+ ) {
AI_Countdown_Timer_Reset(kActorHolloway, 0);
- Actor_Set_Goal_Number(kActorHolloway, 255);
+ Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayKnockOutMcCoy);
}
}
@@ -108,7 +113,7 @@ int AIScriptHolloway::GetFriendlinessModifierIfGetsClue(int otherActorId, int cl
bool AIScriptHolloway::GoalChanged(int currentGoalNumber, int newGoalNumber) {
switch (newGoalNumber) {
- case 240:
+ case kGoalHollowayGoToNR07:
Actor_Put_In_Set(kActorHolloway, kSetNR07);
Actor_Set_At_XYZ(kActorHolloway, -102.0f, -73.5f, -233.0f, 0);
Player_Loses_Control();
@@ -117,7 +122,7 @@ bool AIScriptHolloway::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorHolloway);
break;
- case 241:
+ case kGoalHollowayGoToNR02:
Player_Loses_Control();
AI_Movement_Track_Flush(kActorHolloway);
AI_Movement_Track_Append(kActorHolloway, 375, 0);
@@ -125,64 +130,67 @@ bool AIScriptHolloway::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorHolloway);
break;
- case 242:
+ case kGoalHollowayGoToHF03:
Player_Loses_Control();
AI_Movement_Track_Flush(kActorHolloway);
AI_Movement_Track_Append(kActorHolloway, 372, 0);
AI_Movement_Track_Repeat(kActorHolloway);
break;
- case 250:
+ case kGoalHollowayApproachMcCoy:
Scene_Exits_Disable();
- Actor_Says(kActorHolloway, 20, 3);
- Actor_Face_Actor(kActorHolloway, 0, 1);
- if (Player_Query_Combat_Mode() == 1) {
- Actor_Set_Goal_Number(kActorHolloway, 255);
+ Actor_Says(kActorHolloway, 20, kAnimationModeTalk);
+ Actor_Face_Actor(kActorHolloway, kActorMcCoy, true);
+ if (Player_Query_Combat_Mode()) {
+ Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayKnockOutMcCoy);
} else {
- Actor_Says(kActorHolloway, 30, 3);
- Actor_Face_Actor(kActorMcCoy, kActorHolloway, 1);
+ Actor_Says(kActorHolloway, 30, kAnimationModeTalk);
+ Actor_Face_Actor(kActorMcCoy, kActorHolloway, true);
AI_Countdown_Timer_Reset(kActorHolloway, 0);
AI_Countdown_Timer_Start(kActorHolloway, 0, 1);
}
break;
- case 251:
- Actor_Face_Actor(kActorMcCoy, kActorHolloway, 1);
+ case kGoalHollowayTalkToMcCoy:
+ Actor_Face_Actor(kActorMcCoy, kActorHolloway, true);
Actor_Says(kActorMcCoy, 6130, 15);
- Actor_Says(kActorHolloway, 40, 3);
+ Actor_Says(kActorHolloway, 40, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 6135, 13);
- Actor_Says(kActorHolloway, 50, 3);
+ Actor_Says(kActorHolloway, 50, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 6140, 16);
- Actor_Says(kActorHolloway, 60, 3);
+ Actor_Says(kActorHolloway, 60, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 6145, 12);
- Actor_Says(kActorHolloway, 70, 3);
- Actor_Set_Goal_Number(kActorHolloway, 255);
+ Actor_Says(kActorHolloway, 70, kAnimationModeTalk);
+ Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayKnockOutMcCoy);
break;
- case 255:
+ case kGoalHollowayKnockOutMcCoy:
Player_Loses_Control();
- Actor_Change_Animation_Mode(kActorHolloway, 6);
+ Actor_Change_Animation_Mode(kActorHolloway, kAnimationModeCombatAttack);
break;
- case 257:
+ case kGoalHollowayCaptureMcCoy:
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Player_Gains_Control();
+
Outtake_Play(kOuttakeInterrogation, 0, 1);
+
if (Global_Variable_Query(kVariableBehavior) == 1) {
Actor_Set_Goal_Number(kActorDektora, 245);
Actor_Change_Animation_Mode(kActorDektora, kAnimationModeIdle);
}
Player_Gains_Control();
- Game_Flag_Set(kFlagMcCoyCapturedByBaker);
+ Game_Flag_Set(kFlagMcCoyCapturedByHolloway);
Scene_Exits_Enable();
- Actor_Set_Goal_Number(kActorSteele, 230);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01WaitForMcCoy);
Actor_Put_In_Set(kActorHolloway, kSetFreeSlotI);
Actor_Set_At_Waypoint(kActorHolloway, 41, 0);
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle);
if (Global_Variable_Query(kVariableBehavior) != 1) {
Player_Gains_Control();
}
+
Game_Flag_Set(kFlagUG03toUG04);
Set_Enter(kSetUG04, kSceneUG04);
break;
@@ -199,7 +207,7 @@ bool AIScriptHolloway::UpdateAnimation(int *animation, int *frame) {
case 0:
*animation = 717;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(717) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(717)) {
_animationFrame = 0;
}
break;
@@ -207,29 +215,34 @@ bool AIScriptHolloway::UpdateAnimation(int *animation, int *frame) {
case 1:
*animation = 719;
_animationFrame++;
+
if (_animationFrame == 9) {
Ambient_Sounds_Play_Sound(222, 90, 99, 0, 0);
}
+
if (_animationFrame == 10) {
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
}
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(719) - 1) {
- Actor_Change_Animation_Mode(kActorHolloway, 0);
+
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(719)) {
+ Actor_Change_Animation_Mode(kActorHolloway, kAnimationModeIdle);
_animationFrame = 0;
_animationState = 0;
*animation = 717;
- Actor_Set_Goal_Number(kActorHolloway, 256);
+ Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayPrepareCaptureMcCoy);
}
break;
case 2:
- if (!_animationFrame && _flag) {
+ if (_animationFrame == 0
+ && _flag
+ ) {
*animation = 717;
_animationState = 0;
} else {
*animation = 720;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(720) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(720)) {
_animationFrame = 0;
}
}
@@ -238,7 +251,7 @@ bool AIScriptHolloway::UpdateAnimation(int *animation, int *frame) {
case 3:
*animation = 721;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(721) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(721)) {
_animationFrame = 0;
_animationState = 2;
*animation = 720;
@@ -248,7 +261,7 @@ bool AIScriptHolloway::UpdateAnimation(int *animation, int *frame) {
case 4:
*animation = 721;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(721) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(721)) {
_animationFrame = 0;
_animationState = 2;
*animation = 720;
@@ -258,7 +271,7 @@ bool AIScriptHolloway::UpdateAnimation(int *animation, int *frame) {
case 5:
*animation = 721;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(721) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(721)) {
_animationFrame = 0;
_animationState = 2;
*animation = 720;
@@ -268,7 +281,7 @@ bool AIScriptHolloway::UpdateAnimation(int *animation, int *frame) {
case 6:
*animation = 721;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(721) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(721)) {
_animationFrame = 0;
_animationState = 2;
*animation = 720;
@@ -278,7 +291,7 @@ bool AIScriptHolloway::UpdateAnimation(int *animation, int *frame) {
case 7:
*animation = 716;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(716) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(716)) {
_animationFrame = 0;
}
break;
@@ -293,27 +306,27 @@ bool AIScriptHolloway::UpdateAnimation(int *animation, int *frame) {
bool AIScriptHolloway::ChangeAnimationMode(int mode) {
switch (mode) {
- case 0:
+ case kAnimationModeIdle:
if (_animationState > 6) {
_animationState = 0;
_animationFrame = 0;
} else {
- _flag = 1;
+ _flag = true;
}
break;
- case 1:
+ case kAnimationModeWalk:
_animationState = 7;
_animationFrame = 0;
break;
- case 3:
+ case kAnimationModeTalk:
_animationState = 2;
_animationFrame = 0;
- _flag = 0;
+ _flag = false;
break;
- case 6:
+ case kAnimationModeCombatAttack:
_animationState = 1;
_animationFrame = 0;
break;
@@ -321,25 +334,25 @@ bool AIScriptHolloway::ChangeAnimationMode(int mode) {
case 12:
_animationState = 3;
_animationFrame = 0;
- _flag = 0;
+ _flag = false;
break;
case 13:
_animationState = 4;
_animationFrame = 0;
- _flag = 0;
+ _flag = false;
break;
case 14:
_animationState = 5;
_animationFrame = 0;
- _flag = 0;
+ _flag = false;
break;
case 15:
_animationState = 6;
_animationFrame = 0;
- _flag = 0;
+ _flag = false;
break;
default:
diff --git a/engines/bladerunner/script/ai/lucy.cpp b/engines/bladerunner/script/ai/lucy.cpp
index 8b16f11..c355102 100644
--- a/engines/bladerunner/script/ai/lucy.cpp
+++ b/engines/bladerunner/script/ai/lucy.cpp
@@ -70,7 +70,7 @@ bool AIScriptLucy::Update() {
}
}
- if (Game_Flag_Query(kFlagMcCoyCapturedByBaker)
+ if (Game_Flag_Query(kFlagMcCoyCapturedByHolloway)
&& Actor_Query_Goal_Number(kActorLucy) == kGoalLucyWillReturnToHF03
) {
Actor_Put_In_Set(kActorLucy, kSetHF03);
@@ -126,7 +126,7 @@ void AIScriptLucy::TimerExpired(int timer) {
void AIScriptLucy::CompletedMovementTrack() {
switch (Actor_Query_Goal_Number(kActorLucy)) {
case kGoalLucyGoToHF03:
- if (Game_Flag_Query(kFlagMcCoyCapturedByBaker)
+ if (Game_Flag_Query(kFlagMcCoyCapturedByHolloway)
&& Global_Variable_Query(kVariableBehavior) == 3
) {
Actor_Set_Goal_Number(kActorLucy, kGoalLucyReturnToHF03);
@@ -346,7 +346,7 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case kGoalLucyRunAwayWithHelp1:
Actor_Says(kActorLucy, 320, 16);
- Actor_Set_Goal_Number(kActorHolloway, 242);
+ Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayGoToHF03);
Actor_Set_Immunity_To_Obstacles(kActorLucy, true);
AI_Movement_Track_Flush(kActorLucy);
AI_Movement_Track_Append(kActorLucy, 378, 0);
diff --git a/engines/bladerunner/script/scene/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp
index 496d277..611a18a 100644
--- a/engines/bladerunner/script/scene/nr01.cpp
+++ b/engines/bladerunner/script/scene/nr01.cpp
@@ -71,7 +71,7 @@ void SceneScriptNR01::InitializeScene() {
Ambient_Sounds_Add_Sound(377, 10, 80, 33, 33, 0, 0, -101, -101, 0, 0);
if (Game_Flag_Query(643)
- && Actor_Query_Goal_Number(kActorSteele) == 230
+ && Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01WaitForMcCoy
) {
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagSpinnerAtHF01);
@@ -326,7 +326,7 @@ void SceneScriptNR01::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagUG06toNR01)) {
Loop_Actor_Travel_Stairs(kActorMcCoy, 3, true, kAnimationModeIdle);
Game_Flag_Reset(kFlagUG06toNR01);
- if (Actor_Query_Goal_Number(kActorSteele) == 230) {
+ if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01WaitForMcCoy) {
Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
Actor_Says(kActorSteele, 1440, 13);
Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 48, false, true);
diff --git a/engines/bladerunner/script/scene/nr07.cpp b/engines/bladerunner/script/scene/nr07.cpp
index aa70aa3..1f08131 100644
--- a/engines/bladerunner/script/scene/nr07.cpp
+++ b/engines/bladerunner/script/scene/nr07.cpp
@@ -209,7 +209,7 @@ void SceneScriptNR07::sub_401A10() {
Actor_Voice_Over(1710, kActorVoiceOver);
Actor_Voice_Over(1720, kActorVoiceOver);
Actor_Voice_Over(1730, kActorVoiceOver);
- Actor_Set_Goal_Number(kActorHolloway, 240);
+ Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayGoToNR07);
}
void SceneScriptNR07::sub_401C60() {
Commit: c3a2a262d98d832f2e5433caaa21acccc97669bd
https://github.com/scummvm/scummvm/commit/c3a2a262d98d832f2e5433caaa21acccc97669bd
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-27T20:27:45+01:00
Commit Message:
BLADERUNNER: Cleanup of PS06 script
Changed paths:
engines/bladerunner/script/scene/ps06.cpp
diff --git a/engines/bladerunner/script/scene/ps06.cpp b/engines/bladerunner/script/scene/ps06.cpp
index 0869cf2..dde7c22 100644
--- a/engines/bladerunner/script/scene/ps06.cpp
+++ b/engines/bladerunner/script/scene/ps06.cpp
@@ -26,10 +26,11 @@ namespace BladeRunner {
void SceneScriptPS06::InitializeScene() {
Setup_Scene_Information(11257.26f, 707.3f, -4778.31f, 120);
+
Scene_Exit_Add_2D_Exit(0, 610, 0, 639, 479, 1);
- Ambient_Sounds_Remove_All_Non_Looping_Sounds(0);
- Ambient_Sounds_Add_Looping_Sound(388, 50, 1, 1);
+ Ambient_Sounds_Remove_All_Non_Looping_Sounds(false);
+ Ambient_Sounds_Add_Looping_Sound(388, 50, 1, 1);
}
void SceneScriptPS06::SceneLoaded() {
@@ -49,20 +50,15 @@ bool SceneScriptPS06::ClickedOn3DObject(const char *objectName, bool a2) {
ESPER_Flag_To_Activate();
return true;
}
- if (Object_Query_Click("E.SCREEN03", objectName) || Object_Query_Click("E.MONITOR3", objectName)) {
+ if (Object_Query_Click("E.SCREEN03", objectName)
+ || Object_Query_Click("E.MONITOR3", objectName)
+ ) {
Actor_Says(kActorAnsweringMachine, 330, 3);
- if (!Actor_Clue_Query(kActorMcCoy, kClueCar) || Actor_Clue_Query(kActorMcCoy, kClueCarRegistration1) || Actor_Clue_Query(kActorMcCoy, kClueCarRegistration2) || Actor_Clue_Query(kActorMcCoy, kClueCarRegistration3)) {
- Actor_Clues_Transfer_New_To_Mainframe(kActorMcCoy);
- Ambient_Sounds_Play_Sound(587, 50, 0, 0, 99);
- Delay(2000);
- Actor_Says(kActorAnsweringMachine, 340, 3);
- Actor_Clues_Transfer_New_From_Mainframe(kActorMcCoy);
- Ambient_Sounds_Play_Sound(587, 50, 0, 0, 99);
- Delay(2000);
- Ambient_Sounds_Play_Sound(588, 80, 0, 0, 99);
- Actor_Says(kActorAnsweringMachine, 350, 3);
- return true;
- } else {
+ if (Actor_Clue_Query(kActorMcCoy, kClueCar)
+ && !Actor_Clue_Query(kActorMcCoy, kClueCarRegistration1)
+ && !Actor_Clue_Query(kActorMcCoy, kClueCarRegistration2)
+ && !Actor_Clue_Query(kActorMcCoy, kClueCarRegistration3)
+ ) {
Delay(2000);
Actor_Voice_Over(3780, kActorVoiceOver);
Actor_Voice_Over(3790, kActorVoiceOver);
@@ -88,6 +84,17 @@ bool SceneScriptPS06::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Clues_Transfer_New_To_Mainframe(kActorMcCoy);
Actor_Clues_Transfer_New_From_Mainframe(kActorMcCoy);
return true;
+ } else {
+ Actor_Clues_Transfer_New_To_Mainframe(kActorMcCoy);
+ Ambient_Sounds_Play_Sound(587, 50, 0, 0, 99);
+ Delay(2000);
+ Actor_Says(kActorAnsweringMachine, 340, kAnimationModeTalk);
+ Actor_Clues_Transfer_New_From_Mainframe(kActorMcCoy);
+ Ambient_Sounds_Play_Sound(587, 50, 0, 0, 99);
+ Delay(2000);
+ Ambient_Sounds_Play_Sound(588, 80, 0, 0, 99);
+ Actor_Says(kActorAnsweringMachine, 350, kAnimationModeTalk);
+ return true;
}
}
return false;
Commit: 2fd99c5c1b3f0855ac94908ce14dfbc445f26ed6
https://github.com/scummvm/scummvm/commit/2fd99c5c1b3f0855ac94908ce14dfbc445f26ed6
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-27T20:27:45+01:00
Commit Message:
BLADERUNNER: Police station script fixes
Changed paths:
engines/bladerunner/debugger.cpp
engines/bladerunner/script/scene/ps09.cpp
engines/bladerunner/script/scene_script.h
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp
index f926ecf..db31c76 100644
--- a/engines/bladerunner/debugger.cpp
+++ b/engines/bladerunner/debugger.cpp
@@ -363,7 +363,7 @@ const struct SceneList {
{ 1, "CT05", 28, 17 }, { 1, "CT06", 29, 18 }, { 1, "CT07", 30, 19 }, { 1, "CT12", 4, 24 },
{ 1, "MA01", 49, 48 }, { 1, "MA02", 10, 49 }, { 1, "MA04", 10, 50 }, { 1, "MA04", 50, 50 },
{ 1, "MA05", 51, 51 }, { 1, "MA06", 52, 52 }, { 1, "MA07", 53, 53 }, { 1, "PS01", 61, 65 },
- { 1, "PS02", 62, 66 }, { 1, "PS03", 63, 67 }, { 1, "PS04", 64, 68 }, { 1, "PS05", 15, 59 },
+ { 1, "PS02", 62, 66 }, { 1, "PS03", 63, 67 }, { 1, "PS04", 64, 68 }, { 1, "PS05", 15, 69 },
{ 1, "PS06", 65, 70 }, { 1, "PS07", 66, 71 }, { 1, "PS09", 67, 72 }, { 1, "PS10", 14, 73 },
{ 1, "PS11", 14, 74 }, { 1, "PS12", 14, 75 }, { 1, "PS13", 14, 76 }, { 1, "PS14", 68, 77 },
{ 1, "PS15", 101, 119 }, { 1, "RC01", 69, 78 }, { 1, "RC02", 16, 79 }, { 1, "RC51", 16, 107 },
@@ -384,7 +384,7 @@ const struct SceneList {
{ 2, "NR01", 54, 54 }, { 2, "NR02", 11, 55 }, { 2, "NR03", 55, 56 }, { 2, "NR04", 12, 57 },
{ 2, "NR05", 13, 58 }, { 2, "NR06", 56, 59 }, { 2, "NR07", 57, 60 }, { 2, "NR08", 13, 61 },
{ 2, "NR09", 58, 62 }, { 2, "NR10", 59, 63 }, { 2, "NR11", 60, 64 }, { 2, "PS01", 61, 65 },
- { 2, "PS02", 62, 66 }, { 2, "PS03", 63, 67 }, { 2, "PS04", 64, 68 }, { 2, "PS05", 15, 59 },
+ { 2, "PS02", 62, 66 }, { 2, "PS03", 63, 67 }, { 2, "PS04", 64, 68 }, { 2, "PS05", 15, 69 },
{ 2, "PS06", 65, 70 }, { 2, "PS07", 66, 71 }, { 2, "PS09", 67, 72 }, { 2, "PS10", 14, 73 },
{ 2, "PS11", 14, 74 }, { 2, "PS12", 14, 75 }, { 2, "PS13", 14, 76 }, { 2, "PS14", 68, 77 },
{ 2, "PS15", 101, 119 }, { 2, "RC01", 69, 78 }, { 2, "RC03", 70, 80 }, { 2, "RC04", 71, 81 },
diff --git a/engines/bladerunner/script/scene/ps09.cpp b/engines/bladerunner/script/scene/ps09.cpp
index 46bfac5..4f586c8 100644
--- a/engines/bladerunner/script/scene/ps09.cpp
+++ b/engines/bladerunner/script/scene/ps09.cpp
@@ -97,19 +97,19 @@ bool SceneScriptPS09::ClickedOnActor(int actorId) {
return true;
}
- if ((!Game_Flag_Query(kFlagPS09GrigorianDialogue)
- && Game_Flag_Query(kFlagPS09GrigorianTalk1)
- && Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewA)
+ if (!Game_Flag_Query(kFlagPS09GrigorianDialogue)
+ && Game_Flag_Query(kFlagPS09GrigorianTalk1)
+ && (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewA)
+ || Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB1)
+ || Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB2)
+ || Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote)
)
- || Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB1)
- || Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB2)
- || Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote)
) {
Game_Flag_Set(kFlagPS09GrigorianDialogue);
Actor_Says(kActorMcCoy, 4240, 13);
Actor_Says(kActorGrigorian, 550, 15);
Actor_Says(kActorGrigorian, 480, 16);
- dialogueWithGregorian();
+ dialogueWithGrigorian();
return true;
}
@@ -127,7 +127,7 @@ bool SceneScriptPS09::ClickedOnActor(int actorId) {
|| Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote)
)
) {
- dialogueWithGregorian();
+ dialogueWithGrigorian();
return true;
}
@@ -242,7 +242,15 @@ bool SceneScriptPS09::ClickedOn2DRegion(int region) {
}
void SceneScriptPS09::SceneFrameAdvanced(int frame) {
- if (frame == 1 || frame == 15 || frame == 20 || frame == 31 || frame == 33 || frame == 35 || frame == 52 || frame == 54) {
+ if (frame == 1
+ || frame == 15
+ || frame == 20
+ || frame == 31
+ || frame == 33
+ || frame == 35
+ || frame == 52
+ || frame == 54
+ ) {
Sound_Play(97, Random_Query(50, 33), 10, 10, 50);
}
//return true;
@@ -279,7 +287,7 @@ void SceneScriptPS09::PlayerWalkedOut() {
void SceneScriptPS09::DialogueQueueFlushed(int a1) {
}
-void SceneScriptPS09::dialogueWithGregorian() {
+void SceneScriptPS09::dialogueWithGrigorian() {
Dialogue_Menu_Clear_List();
if (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewA)
|| Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB1)
@@ -289,7 +297,7 @@ void SceneScriptPS09::dialogueWithGregorian() {
DM_Add_To_List_Never_Repeat_Once_Selected(180, -1, 5, 5); // CARS
DM_Add_To_List_Never_Repeat_Once_Selected(200, -1, 3, 6); // VOIGT-KAMPFF
}
- if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote)
+ if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) // bug? there is no way how to obtain this clue
&& (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewA)
|| Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB1)
|| Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB2)
diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h
index 84f7099..0628820 100644
--- a/engines/bladerunner/script/scene_script.h
+++ b/engines/bladerunner/script/scene_script.h
@@ -381,7 +381,7 @@ END_SCRIPT
// PS08 does not exits
DECLARE_SCRIPT(PS09)
- void dialogueWithGregorian();
+ void dialogueWithGrigorian();
END_SCRIPT
DECLARE_SCRIPT(PS10)
Commit: 5c1b8a635a3c057a1a797eacc39182135e065050
https://github.com/scummvm/scummvm/commit/5c1b8a635a3c057a1a797eacc39182135e065050
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-27T20:27:45+01:00
Commit Message:
BLADERUNNER: Initial cleanup of HF05 & HF06
Changed paths:
engines/bladerunner/game_constants.h
engines/bladerunner/script/scene/hf05.cpp
engines/bladerunner/script/scene/hf06.cpp
engines/bladerunner/script/scene/ps09.cpp
engines/bladerunner/script/scene_script.h
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 73d0a9d..a955027 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -903,6 +903,8 @@ enum Flags {
kFlagCT10Entered = 525,
kFlagHF02toHF03 = 527,
kFlagHF03toHF02 = 528,
+ kFlagHF05toHF06 = 529, // is never checked
+ kFlagHF06toHF05 = 530,
kFlagCT11toDR01 = 531,
kFlagCT09Entered = 538,
kFlagCT09LeonInterrupted = 539,
@@ -912,6 +914,8 @@ enum Flags {
kFlagDR06MannequinHeadOpen = 548,
kFlagMcCoyTiedDown = 550,
kFlagDR01toCT11 = 558,
+ kFlagHF05CrazyLegsTalk1 = 562,
+ kFlagHF05CrazyLegsTalk2 = 563,
kFlagHF03toHF04 = 566, // is never checked
kFlagHF04toHF03 = 567,
kFlagHF04DoorsClosed = 584,
@@ -1113,7 +1117,7 @@ enum Scenes {
kSceneHF02 = 35, // Hysteria Hall - Hall of Mirrors - Exit
kSceneHF03 = 36, // Hysteria Hall - Hysteria Arcade
kSceneHF04 = 37, // Hysteria Hall - Hall of Mirrors
- kSceneHF05 = 38,
+ kSceneHF05 = 38, // Hysteria Hall - Crazy Legs Larry Autos
kSceneHF06 = 39,
kSceneHF07 = 40,
kSceneKP01 = 41,
@@ -1144,9 +1148,9 @@ enum Scenes {
kScenePS02 = 66, // Police Station - Elevator
kScenePS03 = 67, // Police Station - Ground floor
kScenePS04 = 68, // Police Station - Guzza's Office
- kScenePS05 = 69,
- kScenePS06 = 70,
- kScenePS07 = 71,
+ kScenePS05 = 69, // Police Station - Mainframe & Shoting range hallway
+ kScenePS06 = 70, // Police Station - ESPER room
+ kScenePS07 = 71, // Police Station - Labratory
kScenePS09 = 72, // Police Station - Lockup
kScenePS10 = 73, // Police Station - Shooting range 1
kScenePS11 = 74, // Police Station - Shooting range 2
diff --git a/engines/bladerunner/script/scene/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp
index 4838c27..13773f0 100644
--- a/engines/bladerunner/script/scene/hf05.cpp
+++ b/engines/bladerunner/script/scene/hf05.cpp
@@ -24,28 +24,37 @@
namespace BladeRunner {
+enum kHF05Loops {
+ kHF05LoopMainLoopNoSpinner = 0,
+ kHF05LoopMainLoopSpinner = 2,
+ kHF05LoopArmAnimation = 4,
+ kHF05LoopMainLoopHole = 5
+};
+
void SceneScriptHF05::InitializeScene() {
- if (Game_Flag_Query(530)) {
+ if (Game_Flag_Query(kFlagHF06toHF05)) {
Setup_Scene_Information(257.0f, 40.63f, 402.0f, 1000);
} else if (Game_Flag_Query(kFlagHF07toHF05)) {
Setup_Scene_Information(330.0f, 40.63f, -107.0f, 603);
} else {
Setup_Scene_Information(483.0f, 40.63f, -189.0f, 600);
}
+
Scene_Exit_Add_2D_Exit(0, 443, 270, 515, 350, 0);
if (Global_Variable_Query(kVariableChapter) > 3) {
Scene_Exit_Add_2D_Exit(1, 367, 298, 399, 349, 2);
}
- Scene_Exit_Add_2D_Exit(2, 589, 0, 639, 479, 1);
+ 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(5);
- sub_404474();
+ Scene_Loop_Set_Default(kHF05LoopMainLoopHole);
+ addAmbientSounds();
} else if (Game_Flag_Query(559)) {
- Scene_Loop_Set_Default(2);
- sub_404474();
+ Scene_Loop_Set_Default(kHF05LoopMainLoopSpinner);
+ addAmbientSounds();
} else {
- Scene_Loop_Set_Default(0);
+ Scene_Loop_Set_Default(kHF05LoopMainLoopNoSpinner);
}
}
@@ -66,8 +75,8 @@ bool SceneScriptHF05::MouseClick(int x, int y) {
}
bool SceneScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) {
- if (Object_Query_Click("TOP CON", objectName) == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 95.0f, 40.63f, 308.0f, 0, 1, false, 0)) {
+ if (Object_Query_Click("TOP CON", objectName)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 95.0f, 40.63f, 308.0f, 0, true, false, 0)) {
Actor_Face_Object(kActorMcCoy, "TOP CON", true);
if (Actor_Query_In_Set(kActorCrazylegs, kSetHF05)
&& Actor_Query_Goal_Number(kActorCrazylegs) != 1
@@ -75,57 +84,64 @@ bool SceneScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) {
) {
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
Actor_Says(kActorCrazylegs, 480, 13);
- } else if (!Game_Flag_Query(662)
- || Game_Flag_Query(369)
+ return true;
+ }
+
+ if (!Game_Flag_Query(662)
+ || Game_Flag_Query(369)
) {
Actor_Change_Animation_Mode(kActorMcCoy, 23);
Sound_Play(412, 100, 0, 0, 50);
- } else {
- Player_Loses_Control();
- Actor_Set_Goal_Number(kActorOfficerLeary, 425);
- Game_Flag_Set(369);
- Game_Flag_Set(368);
- Obstacle_Object("OBSTACLE_HOLE", true);
- Unobstacle_Object("MONTE CARLO DRY", true);
- if (sub_4048C0()) {
- Loop_Actor_Walk_To_XYZ(sub_4048C0(), 181.54f, 40.63f, 388.09f, 0, 0, true, 0);
- Actor_Face_Actor(kActorMcCoy, sub_4048C0(), true);
- Actor_Face_Actor(sub_4048C0(), kActorMcCoy, true);
- Actor_Says(kActorMcCoy, 1785, 3);
- Actor_Says(kActorMcCoy, 1790, 3);
- }
- Actor_Face_Heading(kActorMcCoy, 0, false);
- Actor_Change_Animation_Mode(kActorMcCoy, 23);
- Scene_Loop_Set_Default(5);
- Scene_Loop_Start_Special(kSceneLoopModeOnce, 4, true);
- if (sub_4048C0()) {
- if (sub_4048C0() == 3) {
- Actor_Face_Heading(kActorDektora, 0, false);
- Ambient_Sounds_Play_Sound(147, 50, 99, 0, 0);
- Delay(3000);
- Actor_Face_Heading(kActorDektora, 0, false);
- Actor_Change_Animation_Mode(kActorDektora, 23);
- } else {
- Actor_Face_Heading(kActorLucy, 0, false);
- Ambient_Sounds_Play_Sound(147, 50, 99, 0, 0);
- Delay(3000);
- Actor_Face_Heading(kActorLucy, 0, false);
- Actor_Change_Animation_Mode(kActorLucy, 13);
- }
- Actor_Face_Actor(kActorMcCoy, sub_4048C0(), true);
- Actor_Says(kActorMcCoy, 1805, 3);
+ return true;
+ }
+
+ Player_Loses_Control();
+ Actor_Set_Goal_Number(kActorOfficerLeary, 425);
+ Game_Flag_Set(369);
+ Game_Flag_Set(368);
+ Obstacle_Object("OBSTACLE_HOLE", true);
+ Unobstacle_Object("MONTE CARLO DRY", true);
+
+ if (sub_4048C0() != kActorMcCoy) {
+ Loop_Actor_Walk_To_XYZ(sub_4048C0(), 181.54f, 40.63f, 388.09f, 0, false, true, 0);
+ Actor_Face_Actor(kActorMcCoy, sub_4048C0(), true);
+ Actor_Face_Actor(sub_4048C0(), kActorMcCoy, true);
+ Actor_Says(kActorMcCoy, 1785, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 1790, kAnimationModeTalk);
+ }
+
+ Actor_Face_Heading(kActorMcCoy, 0, false);
+ Actor_Change_Animation_Mode(kActorMcCoy, 23);
+ Scene_Loop_Set_Default(kHF05LoopMainLoopHole);
+ Scene_Loop_Start_Special(kSceneLoopModeOnce, kHF05LoopArmAnimation, true);
+
+ if (sub_4048C0() != kActorMcCoy) {
+ if (sub_4048C0() == kActorDektora) {
+ Actor_Face_Heading(kActorDektora, 0, false);
+ Ambient_Sounds_Play_Sound(147, 50, 99, 0, 0);
+ Delay(3000);
+ Actor_Face_Heading(kActorDektora, 0, false);
+ Actor_Change_Animation_Mode(kActorDektora, 23);
} else {
- ADQ_Flush();
- ADQ_Add(kActorVoiceOver, 940, -1);
+ Actor_Face_Heading(kActorLucy, 0, false);
Ambient_Sounds_Play_Sound(147, 50, 99, 0, 0);
- Delay(1500);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 181.54f, 40.63f, 388.09f, 0, false, true, 0);
- Actor_Face_Heading(kActorMcCoy, 0, false);
- Actor_Change_Animation_Mode(kActorMcCoy, 23);
- Actor_Clue_Lose(kActorMcCoy, kClueBomb);
+ Delay(3000);
+ Actor_Face_Heading(kActorLucy, 0, false);
+ Actor_Change_Animation_Mode(kActorLucy, 13);
}
- Player_Gains_Control();
+ Actor_Face_Actor(kActorMcCoy, sub_4048C0(), true);
+ Actor_Says(kActorMcCoy, 1805, kAnimationModeTalk);
+ } else {
+ ADQ_Flush();
+ ADQ_Add(kActorVoiceOver, 940, -1);
+ Ambient_Sounds_Play_Sound(147, 50, 99, 0, 0);
+ Delay(1500);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 181.54f, 40.63f, 388.09f, 0, false, true, 0);
+ Actor_Face_Heading(kActorMcCoy, 0, false);
+ Actor_Change_Animation_Mode(kActorMcCoy, 23);
+ Actor_Clue_Lose(kActorMcCoy, kClueBomb);
}
+ Player_Gains_Control();
}
return true;
}
@@ -137,7 +153,7 @@ bool SceneScriptHF05::ClickedOnActor(int actorId) {
if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorCrazylegs, 60, true, false)) {
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
- sub_402AE4();
+ dialogueWithCrazylegs1();
}
}
return false;
@@ -157,6 +173,7 @@ bool SceneScriptHF05::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 330.0f, 40.63f, -85.0f, 0, true, false, 0)) {
if (!Game_Flag_Query(684)) {
@@ -174,10 +191,11 @@ bool SceneScriptHF05::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 277.0f, 40.63f, 410.0f, 0, true, false, 0)) {
if (!Game_Flag_Query(684)) {
- Game_Flag_Set(529);
+ Game_Flag_Set(kFlagHF05toHF06);
Set_Enter(kSetHF06, kSceneHF06);
}
}
@@ -195,40 +213,52 @@ void SceneScriptHF05::SceneFrameAdvanced(int frame) {
case 126:
Sound_Play(352, 90, -20, 70, 50);
break;
+
case 152:
Sound_Play(346, 90, 0, 0, 50);
break;
+
case 156:
Sound_Play(348, 47, 100, 100, 50);
break;
+
case 161:
Sound_Play(345, 90, 0, 0, 50);
break;
+
case 176:
Sound_Play(350, 32, 100, 100, 50);
break;
+
case 178:
Sound_Play(355, 47, 100, 100, 50);
break;
+
case 179:
Sound_Play(490, 90, 0, 0, 50);
Music_Play(1, 50, 0, 2, -1, 0, 0);
break;
+
case 186:
Sound_Play(343, 32, 100, 100, 50);
break;
+
case 209:
Sound_Play(353, 90, 100, -20, 50);
break;
+
case 243:
Sound_Play(349, 40, -20, -20, 50);
break;
+
case 261:
Sound_Play(344, 47, -20, -20, 50);
break;
+
case 268:
Sound_Play(351, 58, -20, -20, 50);
break;
+
case 269:
Sound_Play(354, 43, -20, -20, 50);
break;
@@ -237,7 +267,9 @@ void SceneScriptHF05::SceneFrameAdvanced(int frame) {
}
void SceneScriptHF05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
- if (actorId == kActorOfficerLeary && newGoal == 430) {
+ if (actorId == kActorOfficerLeary
+ && newGoal == 430
+ ) {
Game_Flag_Set(684);
sub_4042E4();
}
@@ -247,13 +279,15 @@ void SceneScriptHF05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptHF05::PlayerWalkedIn() {
if (Game_Flag_Query(662)) {
int affectionTowardsActor = getAffectionTowardsActor();
- if (Game_Flag_Query(662) && affectionTowardsActor != -1) {
+ if (Game_Flag_Query(662)
+ && affectionTowardsActor != -1
+ ) {
Actor_Put_In_Set(affectionTowardsActor, kSetHF05);
Actor_Force_Stop_Walking(affectionTowardsActor);
if (Game_Flag_Query(kFlagHF01toHF05)) {
Actor_Set_At_XYZ(affectionTowardsActor, 506.81f, 40.63f, -140.92f, 0);
Async_Actor_Walk_To_Waypoint(affectionTowardsActor, 437, 36, 0);
- } else if (Game_Flag_Query(530)) {
+ } else if (Game_Flag_Query(kFlagHF06toHF05)) {
Actor_Set_At_XYZ(affectionTowardsActor, 288.0f, 40.63f, 410.0f, 909);
} else if (Game_Flag_Query(kFlagHF07toHF05)) {
Actor_Set_At_XYZ(affectionTowardsActor, 298.0f, 40.63f, -107.0f, 512);
@@ -261,14 +295,19 @@ void SceneScriptHF05::PlayerWalkedIn() {
Actor_Set_At_XYZ(affectionTowardsActor, 284.0f, 40.63f, 286.0f, 0);
}
}
+
if (Game_Flag_Query(684)) {
sub_4042E4();
- } else if (Actor_Clue_Query(kActorMcCoy, kClueSpinnerKeys) || Game_Flag_Query(559)) {
- if (Game_Flag_Query(559) && !Game_Flag_Query(663)) {
+ } else if (Actor_Clue_Query(kActorMcCoy, kClueSpinnerKeys)
+ || Game_Flag_Query(559)
+ ) {
+ if ( Game_Flag_Query(559)
+ && !Game_Flag_Query(663)
+ ) {
Game_Flag_Set(663);
Music_Play(1, 40, 0, 2, -1, 0, 0);
- Actor_Says(kActorOfficerGrayford, 200, 3);
- Actor_Says(kActorOfficerGrayford, 210, 3);
+ Actor_Says(kActorOfficerGrayford, 200, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 210, kAnimationModeTalk);
Actor_Set_Goal_Number(kActorOfficerLeary, 420);
if (sub_4048C0() == 3) {
sub_403F0C();
@@ -280,24 +319,26 @@ void SceneScriptHF05::PlayerWalkedIn() {
sub_403A34(affectionTowardsActor);
}
} else if (Game_Flag_Query(kFlagHF01toHF05)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 399.0f, 40.63f, -85.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 399.0f, 40.63f, -85.0f, 0, false, false, 0);
} else if (Game_Flag_Query(kFlagHF07toHF05)) {
Actor_Set_At_XYZ(kActorMcCoy, 346.0f, 4.63f, -151.0f, 603);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 1, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 4, true, kAnimationModeIdle);
}
+
if (Actor_Query_In_Set(kActorCrazylegs, kSetHF05)) {
- if (Game_Flag_Query(562)) {
- if (!Game_Flag_Query(563) && Global_Variable_Query(kVariableChapter) == 3) {
- sub_402970();
- Game_Flag_Set(563);
- }
- } else {
- sub_402370();
- Game_Flag_Set(562);
+ if (!Game_Flag_Query(kFlagHF05CrazyLegsTalk1)) {
+ talkWithCrazyLegs1();
+ Game_Flag_Set(kFlagHF05CrazyLegsTalk1);
+ } else if (!Game_Flag_Query(kFlagHF05CrazyLegsTalk2)
+ && Global_Variable_Query(kVariableChapter) == 3
+ ) {
+ talkWithCrazyLegs2();
+ Game_Flag_Set(kFlagHF05CrazyLegsTalk2);
}
}
+
Game_Flag_Reset(kFlagHF01toHF05);
- Game_Flag_Reset(530);
+ Game_Flag_Reset(kFlagHF06toHF05);
Game_Flag_Reset(kFlagHF07toHF05);
//return false;
@@ -314,58 +355,72 @@ void SceneScriptHF05::PlayerWalkedOut() {
void SceneScriptHF05::DialogueQueueFlushed(int a1) {
}
-void SceneScriptHF05::sub_402970() {
- Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 72, 0, false);
+void SceneScriptHF05::talkWithCrazyLegs2() {
+ Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 72, false, false);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
- Actor_Says(kActorCrazylegs, 370, 3);
- Actor_Says(kActorMcCoy, 1855, 3);
+ Actor_Says(kActorCrazylegs, 370, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 1855, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 380, 12);
Actor_Says(kActorCrazylegs, 390, 14);
Actor_Says(kActorCrazylegs, 400, 15);
Actor_Says(kActorCrazylegs, 410, 16);
- Actor_Says(kActorMcCoy, 1860, 3);
- Actor_Says(kActorCrazylegs, 420, 3);
- Actor_Says(kActorMcCoy, 1865, 3);
+ Actor_Says(kActorMcCoy, 1860, kAnimationModeTalk);
+ Actor_Says(kActorCrazylegs, 420, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 1865, kAnimationModeTalk);
}
-void SceneScriptHF05::sub_402AE4() {
+void SceneScriptHF05::dialogueWithCrazylegs1() {
Dialogue_Menu_Clear_List();
- if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) == 1 && Global_Variable_Query(kVariableChapter) == 3) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1180, 3, 6, 7);
+ if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) // bug? there is no way how to obtain this clue
+ && Global_Variable_Query(kVariableChapter) == 3
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1180, 3, 6, 7); // ADVERTISEMENT
}
- if (Actor_Clue_Query(kActorMcCoy, kClueCrazylegsInterview1) == 1) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1190, 2, 7, 4);
+ if (Actor_Clue_Query(kActorMcCoy, kClueCrazylegsInterview1)) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1190, 2, 7, 4); // WOMAN
}
- if (Actor_Clue_Query(kActorMcCoy, kClueDektorasDressingRoom) == 1) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1200, 5, 5, 3);
+ if (Actor_Clue_Query(kActorMcCoy, kClueDektorasDressingRoom)) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1200, 5, 5, 3); // WOMAN'S PHOTO
}
- if (Actor_Clue_Query(kActorMcCoy, kClueLucy) == 1 && Actor_Query_Goal_Number(kActorLucy) != 599) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1210, 4, 6, 2);
+ if (Actor_Clue_Query(kActorMcCoy, kClueLucy)
+ && Actor_Query_Goal_Number(kActorLucy) != 599
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1210, 4, 6, 2); // LUCY'S PHOTO
}
- if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansResources) == 1 || (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) == 1 && Global_Variable_Query(kVariableChapter) == 3)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1220, -1, 2, 8);
+ if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansResources)
+ || (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote)
+ && Global_Variable_Query(kVariableChapter) == 3
+ )
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1220, -1, 2, 8); // GRIGORIAN
}
- if (Actor_Clue_Query(kActorMcCoy, kClueCarRegistration1) == 1 || Actor_Clue_Query(kActorMcCoy, kClueCarRegistration3) == 1) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1230, 4, 7, -1);
+ if (Actor_Clue_Query(kActorMcCoy, kClueCarRegistration1)
+ || Actor_Clue_Query(kActorMcCoy, kClueCarRegistration3)
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1230, 4, 7, -1); // CAR REGISTRATION
}
+
if (!Dialogue_Menu_Query_List_Size()) {
Actor_Says(kActorMcCoy, 1880, 15);
- Actor_Says(kActorCrazylegs, 490, 3);
- Actor_Says(kActorMcCoy, 1885, 3);
+ Actor_Says(kActorCrazylegs, 490, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 1885, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 500, 16);
return;
}
- Dialogue_Menu_Add_DONE_To_List(1240);
+
+ Dialogue_Menu_Add_DONE_To_List(1240); // DONE
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
+
switch (answer) {
- case 1180:
+ case 1180: // ADVERTISEMENT
Actor_Says(kActorMcCoy, 1890, 23);
- Actor_Says(kActorCrazylegs, 510, 3);
+ Actor_Says(kActorCrazylegs, 510, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 1920, 23);
- Actor_Says(kActorMcCoy, 1925, 3);
+ Actor_Says(kActorMcCoy, 1925, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 530, 12);
Actor_Says(kActorMcCoy, 1930, 18);
Actor_Says(kActorCrazylegs, 540, 14);
@@ -376,47 +431,51 @@ void SceneScriptHF05::sub_402AE4() {
Actor_Says(kActorCrazylegs, 560, 15);
Actor_Says(kActorCrazylegs, 570, 16);
Actor_Says(kActorMcCoy, 1950, 17);
- sub_403738();
+ dialogueWithCrazylegs2();
break;
- case 1190:
- Actor_Says(kActorMcCoy, 1895, 0);
- Actor_Says(kActorCrazylegs, 620, 3);
+
+ case 1190: // WOMAN
+ Actor_Says(kActorMcCoy, 1895, kAnimationModeIdle);
+ Actor_Says(kActorCrazylegs, 620, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 630, 12);
Actor_Says(kActorMcCoy, 2000, 13);
Actor_Says(kActorCrazylegs, 640, 14);
Actor_Says(kActorCrazylegs, 650, 15);
Actor_Says(kActorCrazylegs, 660, 16);
- Actor_Says(kActorMcCoy, 2005, 0);
- Actor_Says(kActorMcCoy, 2010, 3);
- Actor_Says(kActorCrazylegs, 670, 3);
+ Actor_Says(kActorMcCoy, 2005, kAnimationModeIdle);
+ Actor_Says(kActorMcCoy, 2010, kAnimationModeTalk);
+ Actor_Says(kActorCrazylegs, 670, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 680, 12);
Actor_Says(kActorCrazylegs, 690, 14);
Actor_Says(kActorMcCoy, 2015, 14);
Actor_Says(kActorCrazylegs, 700, 15);
Actor_Says(kActorMcCoy, 2020, 18);
break;
- case 1200:
+
+ case 1200: // WOMAN'S PHOTO
Actor_Says(kActorMcCoy, 1900, 23);
Actor_Says(kActorCrazylegs, 710, 16);
- Actor_Says(kActorMcCoy, 2025, 0);
- Actor_Says(kActorCrazylegs, 720, 3);
+ Actor_Says(kActorMcCoy, 2025, kAnimationModeIdle);
+ Actor_Says(kActorCrazylegs, 720, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 730, 12);
break;
- case 1210:
+
+ case 1210: // LUCY'S PHOTO
Actor_Says(kActorMcCoy, 1905, 23);
Actor_Says(kActorCrazylegs, 740, 14);
Actor_Says(kActorMcCoy, 2030, 13);
Actor_Says(kActorCrazylegs, 750, 15);
Actor_Says(kActorMcCoy, 2035, 18);
Actor_Says(kActorCrazylegs, 760, 16);
- Actor_Says(kActorCrazylegs, 770, 3);
- Actor_Says(kActorMcCoy, 2040, 0);
+ Actor_Says(kActorCrazylegs, 770, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 2040, kAnimationModeIdle);
break;
- case 1220:
- Actor_Says(kActorMcCoy, 1910, 3);
+
+ case 1220: // GRIGORIAN
+ Actor_Says(kActorMcCoy, 1910, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 780, 12);
Actor_Says(kActorMcCoy, 2045, 17);
- Actor_Says(kActorMcCoy, 2050, 3);
+ Actor_Says(kActorMcCoy, 2050, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 790, 14);
Actor_Says(kActorMcCoy, 2055, 19);
Actor_Says(kActorMcCoy, 2060, -1);
@@ -424,59 +483,62 @@ void SceneScriptHF05::sub_402AE4() {
Actor_Says(kActorMcCoy, 2065, 18);
Actor_Says(kActorMcCoy, 2070, 14);
Actor_Says(kActorCrazylegs, 810, 16);
- sub_403738();
+ dialogueWithCrazylegs2();
break;
- case 1230:
+
+ case 1230: // CAR REGISTRATION
Actor_Says(kActorMcCoy, 1915, 12);
if (Actor_Clue_Query(kActorMcCoy, kClueCarRegistration1)) {
- Actor_Says(kActorCrazylegs, 820, 3);
+ Actor_Says(kActorCrazylegs, 820, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 2075, 13);
Actor_Says(kActorCrazylegs, 830, 12);
Actor_Says(kActorCrazylegs, 840, 14);
Actor_Says(kActorCrazylegs, 850, 15);
- Actor_Says(kActorMcCoy, 2080, 3);
+ Actor_Says(kActorMcCoy, 2080, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 860, 16);
- Actor_Says(kActorCrazylegs, 870, 3);
+ Actor_Says(kActorCrazylegs, 870, kAnimationModeTalk);
} else if (Actor_Clue_Query(kActorMcCoy, kClueCarRegistration3)) {
Actor_Says(kActorCrazylegs, 880, 12);
Actor_Says(kActorCrazylegs, 890, 14);
- Actor_Says(kActorMcCoy, 2085, 3);
+ Actor_Says(kActorMcCoy, 2085, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 900, 15);
Actor_Says(kActorMcCoy, 2090, 19);
Actor_Says(kActorCrazylegs, 910, 16);
Actor_Says(kActorMcCoy, 2095, 14);
- Actor_Says(kActorCrazylegs, 920, 3);
+ Actor_Says(kActorCrazylegs, 920, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 2100, 15);
Actor_Says(kActorCrazylegs, 930, 12);
Actor_Says(kActorCrazylegs, 940, 14);
- Actor_Says(kActorMcCoy, 2105, 3);
+ Actor_Says(kActorMcCoy, 2105, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 950, 15);
- Actor_Says(kActorMcCoy, 2110, 0);
+ Actor_Says(kActorMcCoy, 2110, kAnimationModeIdle);
Actor_Says(kActorCrazylegs, 960, 16);
}
break;
}
}
-void SceneScriptHF05::sub_403738() {
+void SceneScriptHF05::dialogueWithCrazylegs2() {
Dialogue_Menu_Clear_List();
- DM_Add_To_List_Never_Repeat_Once_Selected(1250, -1, -1, 10);
- DM_Add_To_List_Never_Repeat_Once_Selected(1260, 10, 5, -1);
+ DM_Add_To_List_Never_Repeat_Once_Selected(1250, -1, -1, 10); // ARREST
+ DM_Add_To_List_Never_Repeat_Once_Selected(1260, 10, 5, -1); // WARNING
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
- if (answer == 1250) {
+
+ if (answer == 1250) { // ARREST
Actor_Says(kActorMcCoy, 1955, 17);
Actor_Says(kActorMcCoy, 1960, 23);
Item_Pickup_Spin_Effect(986, 315, 327);
Delay(2000);
Actor_Says(kActorMcCoy, 1980, 23);
- Actor_Says(kActorMcCoy, 1985, 3);
- Actor_Says(kActorCrazylegs, 580, 3);
+ Actor_Says(kActorMcCoy, 1985, kAnimationModeTalk);
+ Actor_Says(kActorCrazylegs, 580, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 590, 15);
Actor_Says(kActorMcCoy, 1990, 17);
Actor_Says(kActorCrazylegs, 600, 16);
- Actor_Says(kActorMcCoy, 1995, 3);
+ Actor_Says(kActorMcCoy, 1995, kAnimationModeTalk);
Game_Flag_Set(kFlagCrazylegsArrested);
Actor_Put_In_Set(kActorCrazylegs, kSetPS09);
Actor_Set_At_XYZ(kActorCrazylegs, -315.15f, 0.0f, 241.06f, 583);
@@ -488,10 +550,10 @@ void SceneScriptHF05::sub_403738() {
Game_Flag_Set(kFlagHF05toHF01);
Set_Enter(kSetHF01, kSceneHF01);
}
- } else if (answer == 1260) {
+ } else if (answer == 1260) { // WARNING
Actor_Says(kActorMcCoy, 1965, 12);
- Actor_Says(kActorMcCoy, 1970, 3);
- Actor_Says(kActorMcCoy, 1975, 3);
+ Actor_Says(kActorMcCoy, 1970, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 1975, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 610, 16);
}
}
@@ -527,7 +589,7 @@ void SceneScriptHF05::sub_403F0C() {
Actor_Face_Actor(kActorMcCoy, kActorDektora, true);
Actor_Face_Actor(kActorDektora, kActorMcCoy, true);
Actor_Says(kActorDektora, 2660, 12);
- Actor_Says(kActorMcCoy, 8990, 3);
+ Actor_Says(kActorMcCoy, 8990, kAnimationModeTalk);
Actor_Says(kActorDektora, 2670, 13);
Actor_Says(kActorDektora, 2680, 17);
Actor_Says(kActorMcCoy, 8995, 14);
@@ -537,8 +599,8 @@ void SceneScriptHF05::sub_403F0C() {
Actor_Says(kActorMcCoy, 1765, 17);
Actor_Says(kActorDektora, 160, 12);
Actor_Says(kActorMcCoy, 1770, 15);
- Actor_Says(kActorMcCoy, 1775, 3);
- Actor_Says(kActorDektora, 170, 3);
+ Actor_Says(kActorMcCoy, 1775, kAnimationModeTalk);
+ Actor_Says(kActorDektora, 170, kAnimationModeTalk);
Actor_Says_With_Pause(kActorMcCoy, 1780, 1.0f, 18);
}
@@ -553,64 +615,66 @@ void SceneScriptHF05::sub_40410C() {
Actor_Says(kActorLucy, 430, 18);
Actor_Says_With_Pause(kActorMcCoy, 1760, 1.0f, 15);
Actor_Says(kActorMcCoy, 1765, 17);
- Actor_Says(kActorLucy, 440, 3);
+ Actor_Says(kActorLucy, 440, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 1770, 15);
- Actor_Says(kActorMcCoy, 1775, 3);
+ Actor_Says(kActorMcCoy, 1775, kAnimationModeTalk);
Actor_Says(kActorLucy, 450, 17);
Actor_Says_With_Pause(kActorMcCoy, 1780, 1.0f, 18);
}
void SceneScriptHF05::sub_403A34(int affectionTowardsActor) {
- if (affectionTowardsActor != -1 && Actor_Query_In_Set(kActorCrazylegs, kSetHF05)) {
- Async_Actor_Walk_To_Waypoint(affectionTowardsActor, 437, 36, 0);
- Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 437, 0, 0, false);
+ if (affectionTowardsActor != -1
+ && Actor_Query_In_Set(kActorCrazylegs, kSetHF05)
+ ) {
+ Async_Actor_Walk_To_Waypoint(affectionTowardsActor, 437, 36, false);
+ Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 437, 0, false, false);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
Actor_Face_Actor(affectionTowardsActor, kActorCrazylegs, true);
- Actor_Says(kActorCrazylegs, 0, 3);
+ Actor_Says(kActorCrazylegs, 0, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 10, 12);
Actor_Says(kActorMcCoy, 1715, 19);
Actor_Says(kActorMcCoy, 1720, -1);
Actor_Says(kActorCrazylegs, 20, 14);
Actor_Says(kActorCrazylegs, 30, 15);
- Actor_Says(kActorMcCoy, 1725, 3);
+ Actor_Says(kActorMcCoy, 1725, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 40, 16);
- Actor_Says(kActorCrazylegs, 50, 3);
+ Actor_Says(kActorCrazylegs, 50, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 60, 12);
Actor_Says(kActorCrazylegs, 70, 13);
- Actor_Says(kActorMcCoy, 1730, 3);
- Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 28, 0, false);
+ Actor_Says(kActorMcCoy, 1730, kAnimationModeTalk);
+ Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 28, false, false);
Item_Pickup_Spin_Effect(986, 315, 327);
Actor_Says(kActorCrazylegs, 80, 23);
Actor_Clue_Acquire(kActorMcCoy, kClueSpinnerKeys, true, kActorCrazylegs);
Actor_Says(kActorCrazylegs, 90, 15);
Actor_Says(kActorMcCoy, 1735, 17);
Actor_Says(kActorCrazylegs, 100, 16);
- Actor_Says(kActorCrazylegs, 110, 3);
+ Actor_Says(kActorCrazylegs, 110, kAnimationModeTalk);
Actor_Face_Actor(affectionTowardsActor, kActorMcCoy, true);
if (affectionTowardsActor == kActorDektora) {
- Actor_Says(kActorDektora, 90, 3);
+ Actor_Says(kActorDektora, 90, kAnimationModeTalk);
} else {
- Actor_Says(kActorLucy, 380, 3);
+ Actor_Says(kActorLucy, 380, kAnimationModeTalk);
}
Actor_Says(kActorMcCoy, 1740, 14);
Actor_Says(kActorCrazylegs, 120, 12);
Actor_Set_Goal_Number(kActorCrazylegs, 2);
if (affectionTowardsActor == kActorDektora) {
- Actor_Says(kActorDektora, 100, 3);
+ Actor_Says(kActorDektora, 100, kAnimationModeTalk);
} else {
- Actor_Says(kActorLucy, 390, 3);
+ Actor_Says(kActorLucy, 390, kAnimationModeTalk);
}
Actor_Face_Actor(kActorMcCoy, affectionTowardsActor, true);
- Actor_Says(kActorMcCoy, 1745, 3);
+ Actor_Says(kActorMcCoy, 1745, kAnimationModeTalk);
Async_Actor_Walk_To_XYZ(affectionTowardsActor, 309.0f, 40.63f, 402.0f, 0, false);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 277.0f, 40.63f, 410.0f, 0, 0, false, 0);
- Game_Flag_Set(529);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 277.0f, 40.63f, 410.0f, 0, false, false, 0);
+ Game_Flag_Set(kFlagHF05toHF06);
Set_Enter(kSetHF06, kSceneHF06);
}
}
-void SceneScriptHF05::sub_402370() {
+void SceneScriptHF05::talkWithCrazyLegs1() {
Player_Loses_Control();
if (Global_Variable_Query(kVariableChapter) == 3) {
ADQ_Flush();
@@ -619,33 +683,33 @@ void SceneScriptHF05::sub_402370() {
ADQ_Add(kActorCrazylegs, 150, 18);
ADQ_Add(kActorCrazylegs, 160, 17);
}
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 307.0f, 40.63f, 184.0f, 0, 0, false, 0);
- Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 72, 0, false);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 307.0f, 40.63f, 184.0f, 0, false, false, 0);
+ Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 72, false, false);
Ambient_Sounds_Play_Sound(149, 99, 99, 0, 0);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
- Actor_Says(kActorCrazylegs, 170, 3);
+ Actor_Says(kActorCrazylegs, 170, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 180, 12);
Actor_Says(kActorCrazylegs, 190, 14);
Actor_Says(kActorCrazylegs, 200, 15);
Actor_Says(kActorMcCoy, 1815, 12);
Actor_Says(kActorCrazylegs, 210, 16);
Actor_Says(kActorMcCoy, 1820, -1);
- Actor_Says(kActorCrazylegs, 220, 3);
+ Actor_Says(kActorCrazylegs, 220, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 230, 12);
Actor_Says(kActorCrazylegs, 240, 14);
- Actor_Says(kActorMcCoy, 1825, 0);
+ Actor_Says(kActorMcCoy, 1825, kAnimationModeIdle);
Actor_Says(kActorCrazylegs, 250, 15);
Actor_Face_Object(kActorCrazylegs, "MONTE CARLO DRY", true);
Actor_Says(kActorCrazylegs, 260, 16);
Actor_Face_Object(kActorMcCoy, "MONTE CARLO DRY", true);
- Actor_Says(kActorMcCoy, 1830, 0);
+ Actor_Says(kActorMcCoy, 1830, kAnimationModeIdle);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
- Actor_Says(kActorCrazylegs, 270, 3);
+ Actor_Says(kActorCrazylegs, 270, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 280, 12);
Async_Actor_Walk_To_XYZ(kActorCrazylegs, 276.0f, 40.63f, 182.0f, 12, false);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 335.0f, 40.63f, 131.0f, 12, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 335.0f, 40.63f, 131.0f, 12, false, false, 0);
Actor_Face_Object(kActorCrazylegs, "MONTE CARLO DRY", true);
Actor_Face_Object(kActorMcCoy, "MONTE CARLO DRY", true);
Actor_Says(kActorCrazylegs, 290, 14);
@@ -653,19 +717,19 @@ void SceneScriptHF05::sub_402370() {
Actor_Says(kActorCrazylegs, 310, 16);
Actor_Says(kActorMcCoy, 1835, 12);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
- Actor_Says(kActorCrazylegs, 320, 3);
+ Actor_Says(kActorCrazylegs, 320, kAnimationModeTalk);
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
Actor_Says(kActorCrazylegs, 330, 12);
- Actor_Says(kActorMcCoy, 1840, 3);
+ Actor_Says(kActorMcCoy, 1840, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 340, 14);
- Actor_Says(kActorMcCoy, 1845, 3);
+ Actor_Says(kActorMcCoy, 1845, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 350, 15);
Actor_Says(kActorCrazylegs, 360, 16);
- Actor_Says(kActorMcCoy, 1850, 3);
+ Actor_Says(kActorMcCoy, 1850, kAnimationModeTalk);
Player_Gains_Control();
}
-void SceneScriptHF05::sub_404474() {
+void SceneScriptHF05::addAmbientSounds() {
Ambient_Sounds_Add_Sound(87, 20, 80, 20, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Speech_Sound(23, 250, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(23, 330, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
@@ -673,16 +737,21 @@ void SceneScriptHF05::sub_404474() {
Ambient_Sounds_Add_Speech_Sound(23, 360, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(24, 380, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(24, 510, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
- Ambient_Sounds_Add_Speech_Sound(38, 80, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
+ Ambient_Sounds_Add_Speech_Sound(38, 80, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(38, 160, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(38, 280, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
}
int SceneScriptHF05::sub_4048C0() {
- if (Actor_Query_In_Set(kActorDektora, kSetHF05) && Actor_Query_Goal_Number(kActorDektora) != 599) {
+ if (Actor_Query_In_Set(kActorDektora, kSetHF05)
+ && Actor_Query_Goal_Number(kActorDektora) != 599
+ ) {
return kActorDektora;
}
- if (Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != 599) {
+
+ if (Actor_Query_In_Set(kActorLucy, kSetHF05)
+ && Actor_Query_Goal_Number(kActorLucy) != 599
+ ) {
return kActorLucy;
}
return kActorMcCoy;
diff --git a/engines/bladerunner/script/scene/hf06.cpp b/engines/bladerunner/script/scene/hf06.cpp
index bb073bc..64ea124 100644
--- a/engines/bladerunner/script/scene/hf06.cpp
+++ b/engines/bladerunner/script/scene/hf06.cpp
@@ -26,19 +26,21 @@ namespace BladeRunner {
void SceneScriptHF06::InitializeScene() {
Setup_Scene_Information(150.0f, 349.93f, 502.0f, 229);
- Game_Flag_Reset(529);
+ Game_Flag_Reset(kFlagHF05toHF06);
Scene_Exit_Add_2D_Exit(0, 195, 197, 271, 237, 2);
- Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(99, 40, -100, 1);
- Ambient_Sounds_Add_Looping_Sound(100, 40, 100, 1);
- Ambient_Sounds_Add_Sound(68, 10, 100, 25, 50, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(69, 10, 100, 25, 50, 0, 0, -101, -101, 0, 0);
+
+ Ambient_Sounds_Add_Looping_Sound( 54, 50, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound( 99, 40, -100, 1);
+ Ambient_Sounds_Add_Looping_Sound(100, 40, 100, 1);
+ Ambient_Sounds_Add_Sound( 68, 10, 100, 25, 50, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 69, 10, 100, 25, 50, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 10, 70, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 10, 70, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 10, 70, 50, 100, 0, 0, -101, -101, 0, 0);
+
if (Game_Flag_Query(559)) {
Scene_Loop_Set_Default(3);
- sub_4023E0();
+ addAmbientSounds();
} else {
Scene_Loop_Set_Default(0);
}
@@ -61,14 +63,22 @@ bool SceneScriptHF06::MouseClick(int x, int y) {
}
bool SceneScriptHF06::ClickedOn3DObject(const char *objectName, bool a2) {
- if (Object_Query_Click("BOX28", objectName) || Object_Query_Click("BOX29", objectName) || Object_Query_Click("BOX30", objectName) || Object_Query_Click("HOOD BOX", objectName)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 14.33f, 367.93f, 399.0f, 0, 1, false, 0)) {
+ if (Object_Query_Click("BOX28", objectName)
+ || Object_Query_Click("BOX29", objectName)
+ || Object_Query_Click("BOX30", objectName)
+ || Object_Query_Click("HOOD BOX", objectName)
+ ) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 14.33f, 367.93f, 399.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 486, true);
- if (Actor_Query_In_Set(kActorDektora, kSetHF06) && Actor_Query_Goal_Number(kActorDektora) != 599) {
+ if (Actor_Query_In_Set(kActorDektora, kSetHF06)
+ && Actor_Query_Goal_Number(kActorDektora) != 599
+ ) {
Actor_Face_Actor(kActorDektora, kActorMcCoy, true);
Actor_Says(kActorDektora, 210, 12);
Actor_Says(kActorMcCoy, 2125, 12);
- } else if (Actor_Query_In_Set(kActorLucy, kSetHF06) && Actor_Query_Goal_Number(kActorLucy) != 599) {
+ } else if (Actor_Query_In_Set(kActorLucy, kSetHF06)
+ && Actor_Query_Goal_Number(kActorLucy) != 599
+ ) {
Actor_Face_Actor(kActorLucy, kActorMcCoy, true);
Actor_Says(kActorLucy, 490, 18);
Actor_Says(kActorMcCoy, 2125, 12);
@@ -78,15 +88,19 @@ bool SceneScriptHF06::ClickedOn3DObject(const char *objectName, bool a2) {
}
return false;
}
- if (Object_Query_Click("BOX19", objectName) || Object_Query_Click("BOX21", objectName)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 290.0f, 367.93f, 318.0f, 0, 1, false, 0)) {
+
+ if (Object_Query_Click("BOX19", objectName)
+ || Object_Query_Click("BOX21", objectName)
+ ) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 290.0f, 367.93f, 318.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 85, true);
Actor_Says(kActorMcCoy, 8522, 0);
}
return false;
}
+
if (Object_Query_Click("BOX13", objectName)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 63.0f, 367.93f, 120.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 63.0f, 367.93f, 120.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 568, true);
Actor_Says(kActorMcCoy, 8522, 0);
}
@@ -96,14 +110,18 @@ bool SceneScriptHF06::ClickedOn3DObject(const char *objectName, bool a2) {
}
bool SceneScriptHF06::ClickedOnActor(int actorId) {
- if (actorId == kActorLucy && Actor_Query_Goal_Number(kActorLucy) != 599) {
+ if (actorId == kActorLucy
+ && Actor_Query_Goal_Number(kActorLucy) != 599
+ ) {
Actor_Face_Actor(kActorLucy, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorLucy, true);
if (Game_Flag_Query(559)) {
Actor_Says(kActorLucy, 390, 18);
Actor_Says(kActorMcCoy, 2115, 17);
}
- } else if (actorId == kActorDektora && Actor_Query_Goal_Number(kActorDektora) != 599) {
+ } else if (actorId == kActorDektora
+ && Actor_Query_Goal_Number(kActorDektora) != 599
+ ) {
Actor_Face_Actor(kActorDektora, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorDektora, true);
if (Game_Flag_Query(559)) {
@@ -120,12 +138,12 @@ bool SceneScriptHF06::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptHF06::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 170.0f, 367.93f, 497.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 170.0f, 367.93f, 497.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 730, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 0, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 2, false, kAnimationModeIdle);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(530);
+ Game_Flag_Set(kFlagHF06toHF05);
Set_Enter(kSetHF05, kSceneHF05);
}
return true;
@@ -141,18 +159,27 @@ void SceneScriptHF06::SceneFrameAdvanced(int frame) {
}
void SceneScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
- if (actorId == kActorSteele && oldGoal != 599 && newGoal == 599) {
- Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 24, 0, false);
+ if (actorId == kActorSteele
+ && oldGoal != 599
+ && newGoal == 599
+ ) {
+ Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 24, false, false);
Actor_Says(kActorSteele, 250, -1);
- Actor_Says(kActorMcCoy, 2120, 4);
+ Actor_Says(kActorMcCoy, 2120, kAnimationModeCombatIdle);
Actor_Says(kActorSteele, 260, -1);
Actor_Says(kActorSteele, 270, -1);
+
int otherActorId = -1;
- if (Actor_Query_In_Set(kActorDektora, kSetHF06) && Actor_Query_Goal_Number(kActorDektora) == 599) {
+ if (Actor_Query_In_Set(kActorDektora, kSetHF06)
+ && Actor_Query_Goal_Number(kActorDektora) == 599
+ ) {
otherActorId = kActorDektora;
- } else if (Actor_Query_In_Set(kActorLucy, kSetHF06) && Actor_Query_Goal_Number(kActorLucy) == 599) {
+ } else if (Actor_Query_In_Set(kActorLucy, kSetHF06)
+ && Actor_Query_Goal_Number(kActorLucy) == 599
+ ) {
otherActorId = kActorLucy;
}
+
if (otherActorId != -1) {
Music_Play(21, 35, 0, 3, -1, 0, 0);
Player_Set_Combat_Mode(false);
@@ -160,7 +187,7 @@ void SceneScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
Actor_Voice_Over(990, kActorVoiceOver);
Actor_Voice_Over(1000, kActorVoiceOver);
Actor_Voice_Over(1010, kActorVoiceOver);
- Loop_Actor_Walk_To_Actor(kActorMcCoy, otherActorId, 24, 0, false);
+ Loop_Actor_Walk_To_Actor(kActorMcCoy, otherActorId, 24, false, false);
Item_Pickup_Spin_Effect(932, 355, 200);
Actor_Voice_Over(1020, kActorVoiceOver);
Actor_Voice_Over(1030, kActorVoiceOver);
@@ -168,9 +195,11 @@ void SceneScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
Actor_Voice_Over(1050, kActorVoiceOver);
Actor_Clue_Acquire(kActorMcCoy, kClueBomb, true, -1);
}
+
if (Actor_Query_In_Set(kActorDektora, kSetHF06)) {
Actor_Set_Targetable(kActorDektora, false);
}
+
if (Actor_Query_In_Set(kActorLucy, kSetHF06)) {
Actor_Set_Targetable(kActorLucy, false);
}
@@ -203,9 +232,12 @@ void SceneScriptHF06::PlayerWalkedIn() {
}
}
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 1, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 2, true, kAnimationModeIdle);
Footstep_Sound_Override_Off();
- if (Game_Flag_Query(662) && !Game_Flag_Query(559)) {
+
+ if ( Game_Flag_Query(662)
+ && !Game_Flag_Query(559)
+ ) {
sub_401EF4();
}
}
@@ -227,10 +259,11 @@ void SceneScriptHF06::sub_401EF4() {
} else {
return;
}
+
Actor_Set_Targetable(actorId, true);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 14.33f, 367.93f, 399.0f, 0, 0, true, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 14.33f, 367.93f, 399.0f, 0, false, true, 0);
Actor_Face_Heading(kActorMcCoy, 486, true);
- sub_4023E0();
+ addAmbientSounds();
Actor_Put_In_Set(kActorSteele, kSetHF06);
Actor_Set_At_XYZ(kActorSteele, 92.0f, 367.93f, 19.0f, 0);
Actor_Set_Targetable(kActorSteele, true);
@@ -246,7 +279,7 @@ void SceneScriptHF06::sub_401EF4() {
Player_Set_Combat_Mode(true);
Actor_Change_Animation_Mode(kActorMcCoy, 5);
Actor_Change_Animation_Mode(kActorSteele, 7);
- Loop_Actor_Walk_To_XYZ(kActorSteele, 92.0f, 367.93f, 107.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorSteele, 92.0f, 367.93f, 107.0f, 0, false, false, 0);
Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle);
Actor_Says(kActorSteele, 290, 58);
@@ -264,7 +297,7 @@ void SceneScriptHF06::sub_401EF4() {
Game_Flag_Set(644);
Actor_Set_Goal_Number(kActorSteele, 402);
Actor_Face_Actor(kActorSteele, actorId, true);
- Actor_Change_Animation_Mode(kActorSteele, 6);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack);
Delay(500);
Scene_Loop_Set_Default(3);
Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true);
@@ -274,7 +307,7 @@ void SceneScriptHF06::sub_401EF4() {
Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, actorId, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false);
}
-void SceneScriptHF06::sub_4023E0() {
+void SceneScriptHF06::addAmbientSounds() {
Ambient_Sounds_Add_Sound(87, 20, 80, 20, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Speech_Sound(23, 250, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(23, 330, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
@@ -282,7 +315,7 @@ void SceneScriptHF06::sub_4023E0() {
Ambient_Sounds_Add_Speech_Sound(23, 360, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(24, 380, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(24, 510, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
- Ambient_Sounds_Add_Speech_Sound(38, 80, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
+ Ambient_Sounds_Add_Speech_Sound(38, 80, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(38, 160, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(38, 280, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
}
diff --git a/engines/bladerunner/script/scene/ps09.cpp b/engines/bladerunner/script/scene/ps09.cpp
index 4f586c8..02aa88e 100644
--- a/engines/bladerunner/script/scene/ps09.cpp
+++ b/engines/bladerunner/script/scene/ps09.cpp
@@ -30,7 +30,9 @@ void SceneScriptPS09::InitializeScene() {
} else {
Setup_Scene_Information(-559.0f, 0.0f, -85.06f, 250);
}
+
Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3);
+
Ambient_Sounds_Remove_All_Non_Looping_Sounds(0);
Ambient_Sounds_Add_Looping_Sound(138, 50, 0, 0);
Ambient_Sounds_Add_Looping_Sound(137, 30, 0, 0);
@@ -38,6 +40,7 @@ void SceneScriptPS09::InitializeScene() {
Ambient_Sounds_Add_Sound(125, 15, 60, 7, 10, 100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(126, 25, 60, 7, 10, 100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(127, 25, 60, 7, 10, 100, 100, -101, -101, 0, 0);
+
if (!Game_Flag_Query(kFlagGrigorianArrested)) {
Actor_Put_In_Set(kActorGrigorian, kSetPS09);
Actor_Set_At_XYZ(kActorGrigorian, -417.88f, 0.0f, -200.74f, 512);
@@ -100,9 +103,9 @@ bool SceneScriptPS09::ClickedOnActor(int actorId) {
if (!Game_Flag_Query(kFlagPS09GrigorianDialogue)
&& Game_Flag_Query(kFlagPS09GrigorianTalk1)
&& (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewA)
- || Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB1)
- || Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB2)
- || Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote)
+ || Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB1)
+ || Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB2)
+ || Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote)
)
) {
Game_Flag_Set(kFlagPS09GrigorianDialogue);
diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h
index 0628820..498424a 100644
--- a/engines/bladerunner/script/scene_script.h
+++ b/engines/bladerunner/script/scene_script.h
@@ -213,22 +213,22 @@ DECLARE_SCRIPT(HF04)
END_SCRIPT
DECLARE_SCRIPT(HF05)
- void sub_402370();
- void sub_402970();
- void sub_402AE4();
- void sub_403738();
+ void talkWithCrazyLegs1();
+ void talkWithCrazyLegs2();
+ void dialogueWithCrazylegs1();
+ void dialogueWithCrazylegs2();
void sub_403A34(int actorId);
void sub_403F0C();
void sub_40410C();
void sub_4042E4();
- void sub_404474();
+ void addAmbientSounds();
int getAffectionTowardsActor();
int sub_4048C0();
END_SCRIPT
DECLARE_SCRIPT(HF06)
void sub_401EF4();
- void sub_4023E0();
+ void addAmbientSounds();
END_SCRIPT
DECLARE_SCRIPT(HF07)
Commit: e3e55c2f4be350b42d3a172444211d9bbe898351
https://github.com/scummvm/scummvm/commit/e3e55c2f4be350b42d3a172444211d9bbe898351
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-27T20:27:45+01:00
Commit Message:
BLADERUNNER: Fixed game-breaking bug with dialogue menus
Changed paths:
engines/bladerunner/dialogue_menu.cpp
diff --git a/engines/bladerunner/dialogue_menu.cpp b/engines/bladerunner/dialogue_menu.cpp
index 1b7c871..65d9bf8 100644
--- a/engines/bladerunner/dialogue_menu.cpp
+++ b/engines/bladerunner/dialogue_menu.cpp
@@ -135,15 +135,26 @@ bool DialogueMenu::addToList(int answer, bool done, int priorityPolite, int prio
}
bool DialogueMenu::addToListNeverRepeatOnceSelected(int answer, int priorityPolite, int priorityNormal, int prioritySurly) {
+ int foundIndex = -1;
for (int i = 0; i != _neverRepeatListSize; ++i) {
- if (answer == _neverRepeatValues[i] && _neverRepeatWasSelected[i]) {
- return true;
+ if (answer == _neverRepeatValues[i]) {
+ foundIndex = i;
+ break;
}
}
- _neverRepeatValues[_neverRepeatListSize] = answer;
- _neverRepeatWasSelected[_neverRepeatListSize] = false;
- ++_neverRepeatListSize;
+ if (foundIndex > 0 && _neverRepeatWasSelected[foundIndex]) {
+ return true;
+ }
+
+ if (foundIndex == -1) {
+ _neverRepeatValues[_neverRepeatListSize] = answer;
+ _neverRepeatWasSelected[_neverRepeatListSize] = false;
+ ++_neverRepeatListSize;
+
+ assert(_neverRepeatListSize <= 100);
+ }
+
return addToList(answer, false, priorityPolite, priorityNormal, prioritySurly);
}
@@ -412,6 +423,41 @@ void DialogueMenu::load(SaveFileReadStream &f) {
_selectedItemIndex = f.readInt();
_listSize = f.readInt();
+#if 0
+ /* fix for duplicated non-repeated entries in the save game */
+ f.readInt();
+ _neverRepeatListSize = 0;
+ int answer[100];
+ bool selected[100];
+ for (int i = 0; i < 100; ++i) {
+ _neverRepeatValues[i] = -1;
+ answer[i] = f.readInt();
+ }
+ for (int i = 0; i < 100; ++i) {
+ _neverRepeatWasSelected[i] = false;
+ selected[i] = f.readBool();
+ }
+ for (int i = 0; i < 100; ++i) {
+ int found = false;
+ bool value = false;
+
+ for (int j = 0; j < 100; ++j) {
+ if (_neverRepeatValues[j] == answer[i]) {
+ found = true;
+ }
+ if (answer[j] == answer[i]) {
+ value |= selected[j];
+ }
+ }
+
+ if (!found) {
+ _neverRepeatValues[_neverRepeatListSize] = answer[i];
+ _neverRepeatWasSelected[_neverRepeatListSize] = value;
+ ++_neverRepeatListSize;
+ debug("- %i, %i", answer[i], value);
+ }
+ }
+#else
_neverRepeatListSize = f.readInt();
for (int i = 0; i < 100; ++i) {
_neverRepeatValues[i] = f.readInt();
@@ -419,6 +465,8 @@ void DialogueMenu::load(SaveFileReadStream &f) {
for (int i = 0; i < 100; ++i) {
_neverRepeatWasSelected[i] = f.readBool();
}
+#endif
+
for (int i = 0; i < 10; ++i) {
_items[i].text = f.readStringSz(50);
_items[i].answerValue = f.readInt();
Commit: 1ef310db3cafd1c64673619e11fabd5c2e7df999
https://github.com/scummvm/scummvm/commit/1ef310db3cafd1c64673619e11fabd5c2e7df999
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-27T20:27:45+01:00
Commit Message:
BLADERUNNER: Small cleanup for chapter 2 scripts
Changed paths:
engines/bladerunner/game_constants.h
engines/bladerunner/script/scene/ar02.cpp
engines/bladerunner/script/scene/bb04.cpp
engines/bladerunner/script/scene/hc01.cpp
engines/bladerunner/script/scene/hc02.cpp
engines/bladerunner/script/scene/hc04.cpp
engines/bladerunner/script/scene/rc04.cpp
engines/bladerunner/script/vk_script.cpp
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index a955027..bc92efd 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -1159,8 +1159,8 @@ enum Scenes {
kScenePS14 = 77, // Police Station - Outside
kSceneRC01 = 78, // Runciter - Outside
kSceneRC02 = 79, // Runciter - Inside
- kSceneRC03 = 80, // Bullet Bob's runner surplus - Outside
- kSceneRC04 = 81, // Bullet Bob's runner surplus - Inside
+ kSceneRC03 = 80, // Bullet Bob's Runner Surplus - Outside
+ kSceneRC04 = 81, // Bullet Bob's Runner Surplus - Inside
kSceneTB02 = 82, // Tyrell Building - Reception
kSceneTB03 = 83,
kSceneTB05 = 84, // Tyrell Building - Grav Test Lab - Iutside
diff --git a/engines/bladerunner/script/scene/ar02.cpp b/engines/bladerunner/script/scene/ar02.cpp
index 935064f..7816a0f 100644
--- a/engines/bladerunner/script/scene/ar02.cpp
+++ b/engines/bladerunner/script/scene/ar02.cpp
@@ -244,7 +244,7 @@ void SceneScriptAR02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptAR02::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagRC03toAR02)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -465.0f, 0.0f, -799.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -465.0f, 0.0f, -799.0f, 0, false, false, 0);
Game_Flag_Reset(kFlagRC03toAR02);
}
Game_Flag_Set(kFlagAR02Entered);
diff --git a/engines/bladerunner/script/scene/bb04.cpp b/engines/bladerunner/script/scene/bb04.cpp
index 55445c1..4f7be02 100644
--- a/engines/bladerunner/script/scene/bb04.cpp
+++ b/engines/bladerunner/script/scene/bb04.cpp
@@ -24,6 +24,8 @@
namespace BladeRunner {
+// Bug in the game, item 77 (android control box) is showing up here...
+
void SceneScriptBB04::InitializeScene() {
if (Game_Flag_Query(kFlagBB03toBB04)) {
Setup_Scene_Information(-107.0f, -26.6f, 397.0f, 29);
diff --git a/engines/bladerunner/script/scene/hc01.cpp b/engines/bladerunner/script/scene/hc01.cpp
index 19345eb..ec8946b 100644
--- a/engines/bladerunner/script/scene/hc01.cpp
+++ b/engines/bladerunner/script/scene/hc01.cpp
@@ -27,17 +27,19 @@ namespace BladeRunner {
void SceneScriptHC01::InitializeScene() {
Music_Play(0, 31, 0, 2, -1, 1, 2);
if (Game_Flag_Query(kFlagHC02toHC01)) {
- Setup_Scene_Information(64.0f, 0.14f, 83.0f, 266);
+ Setup_Scene_Information( 64.0f, 0.14f, 83.0f, 266);
} else if (Game_Flag_Query(kFlagHC03toHC01)) {
- Setup_Scene_Information(607.0f, 0.14f, 9.0f, 530);
+ Setup_Scene_Information(607.0f, 0.14f, 9.0f, 530);
} else {
Setup_Scene_Information(780.0f, 0.14f, 153.0f, 815);
}
+
Scene_Exit_Add_2D_Exit(0, 0, 460, 639, 479, 2);
if (Game_Flag_Query(kFlagHC03Available)) {
Scene_Exit_Add_2D_Exit(1, 394, 229, 485, 371, 1);
}
Scene_Exit_Add_2D_Exit(2, 117, 0, 286, 319, 0);
+
Ambient_Sounds_Add_Looping_Sound(103, 50, 50, 0);
Ambient_Sounds_Add_Looping_Sound(241, 50, 50, 0);
Ambient_Sounds_Add_Sound(242, 3, 30, 16, 16, -100, 100, -101, -101, 0, 0);
@@ -156,6 +158,7 @@ bool SceneScriptHC01::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 607.0f, 0.14f, 9.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagHC01toHC03);
@@ -163,6 +166,7 @@ bool SceneScriptHC01::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 105.0f, 0.14f, 103.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagHC01toHC02);
@@ -180,21 +184,30 @@ bool SceneScriptHC01::ClickedOn2DRegion(int region) {
void SceneScriptHC01::SceneFrameAdvanced(int frame) {
Set_Fade_Color(1.0f, 1.0f, 1.0f);
- if (frame >= 61 && frame < 65) {
+ if (frame >= 61
+ && frame < 65
+ ) {
Set_Fade_Density((frame - 61) / 4.0f);
- } else if (frame >= 65 && frame < 93) {
+ } else if (frame >= 65
+ && frame < 93
+ ) {
Set_Fade_Density(1.0f);
- } else if (frame >= 93 && frame < 106) {
+ } else if (frame >= 93
+ && frame < 106
+ ) {
Set_Fade_Density((105 - frame) / 13.0f);
} else {
Set_Fade_Density(0.0f);
}
+
if (frame == 61) {
Ambient_Sounds_Play_Sound(312, 90, 0, 0, 0);
}
+
if (frame == 65) {
Ambient_Sounds_Play_Sound(315, 50, 0, 100, 0);
}
+
if (frame == 80) {
Ambient_Sounds_Play_Sound(316, 40, 100, 100, 0);
Item_Add_To_World(kItemGreenPawnLock, 931, kSetHC01_HC02_HC03_HC04, 582.0f, 27.0f, -41.0f, 0, 8, 8, true, true, false, true);
@@ -209,9 +222,11 @@ void SceneScriptHC01::PlayerWalkedIn() {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 105.0f, 0.14f, 103.0f, 0, false, false, 0);
Game_Flag_Reset(kFlagHC02toHC01);
}
+
if (Game_Flag_Query(kFlagHC03toHC01)) {
Game_Flag_Reset(kFlagHC03toHC01);
}
+
if (Game_Flag_Query(kFlagAR01toHC01)) {
Game_Flag_Reset(kFlagAR01toHC01);
}
@@ -304,7 +319,7 @@ void SceneScriptHC01::dialogueWithIzo() {
Actor_Modify_Friendliness_To_Other(kActorIzo, kActorMcCoy, -2);
}
}
- if (answer == 1010 // INSECT JEWELRY
+ if (answer == 1010 // INSECT JEWELRY
|| answer == 1020 // DRAGONFLY JEWERLY
) {
Actor_Says_With_Pause(kActorMcCoy, 1120, 0.9f, 17);
diff --git a/engines/bladerunner/script/scene/hc02.cpp b/engines/bladerunner/script/scene/hc02.cpp
index fa64162..7a8967b 100644
--- a/engines/bladerunner/script/scene/hc02.cpp
+++ b/engines/bladerunner/script/scene/hc02.cpp
@@ -29,10 +29,12 @@ void SceneScriptHC02::InitializeScene() {
if (Game_Flag_Query(kFlagHC04toHC02)) {
Setup_Scene_Information(-88.0f, 0.14f, -463.0f, 540);
} else {
- Setup_Scene_Information(-57.0f, 0.14f, 83.0f, 746);
+ Setup_Scene_Information(-57.0f, 0.14f, 83.0f, 746);
}
+
Scene_Exit_Add_2D_Exit(0, 589, 255, 639, 479, 1);
- Scene_Exit_Add_2D_Exit(1, 505, 0, 639, 170, 0);
+ Scene_Exit_Add_2D_Exit(1, 505, 0, 639, 170, 0);
+
Ambient_Sounds_Add_Looping_Sound(103, 50, 50, 0);
Ambient_Sounds_Add_Looping_Sound(280, 50, 50, 0);
Ambient_Sounds_Add_Sound(252, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0);
@@ -64,8 +66,9 @@ void SceneScriptHC02::InitializeScene() {
Ambient_Sounds_Add_Sound(249, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(238, 3, 50, 20, 20, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(240, 3, 50, 25, 25, -100, 100, -101, -101, 0, 0);
+
if (Game_Flag_Query(kFlagHC01toHC02)) {
- Scene_Loop_Start_Special(0, 0, 0);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
Scene_Loop_Set_Default(1);
Game_Flag_Reset(kFlagHC01toHC02);
} else {
@@ -179,6 +182,7 @@ bool SceneScriptHC02::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -76.0f, 0.14f, -339.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
@@ -200,10 +204,19 @@ void SceneScriptHC02::SceneFrameAdvanced(int frame) {
if (frame == 70) {
Sound_Play(73, 11, 50, -90, 50);
}
+
if (frame == 58) {
Sound_Play(73, 11, 50, -90, 50);
}
- if (frame == 69 || frame == 77 || frame == 86 || frame == 95 || frame == 104 || frame == 113 || frame == 119) {
+
+ if (frame == 69
+ || frame == 77
+ || frame == 86
+ || frame == 95
+ || frame == 104
+ || frame == 113
+ || frame == 119
+ ) {
Sound_Play(60, Random_Query(6, 7), -20, 20, 50);
}
}
diff --git a/engines/bladerunner/script/scene/hc04.cpp b/engines/bladerunner/script/scene/hc04.cpp
index 224aa11..a138d96 100644
--- a/engines/bladerunner/script/scene/hc04.cpp
+++ b/engines/bladerunner/script/scene/hc04.cpp
@@ -32,10 +32,13 @@ void SceneScriptHC04::InitializeScene() {
Setup_Scene_Information(-88.0f, 0.14f, -463.0f, 1013);
}
Music_Play(4, 14, -90, 1, -1, 1, 2);
+
Actor_Put_In_Set(kActorIsabella, kSetHC01_HC02_HC03_HC04);
Actor_Set_At_XYZ(kActorIsabella, -210.0f, 0.0f, -445.0f, 250);
+
Scene_Exit_Add_2D_Exit(0, 539, 51, 639, 309, 0);
Scene_Exit_Add_2D_Exit(1, 0, 456, 639, 479, 2);
+
Ambient_Sounds_Add_Looping_Sound(103, 50, 50, 0);
Ambient_Sounds_Add_Looping_Sound(329, 16, 16, 0);
Ambient_Sounds_Add_Looping_Sound(330, 40, 40, 0);
@@ -59,8 +62,9 @@ void SceneScriptHC04::InitializeScene() {
Ambient_Sounds_Add_Sound(260, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(261, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(262, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
+
if (Game_Flag_Query(kFlagHC02toHC04)) {
- Scene_Loop_Start_Special(0, 0, 0);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
Scene_Loop_Set_Default(1);
Game_Flag_Reset(kFlagHC02toHC04);
} else {
@@ -117,6 +121,7 @@ bool SceneScriptHC04::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -72.0f, 0.14f, -399.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagHC04toHC02);
diff --git a/engines/bladerunner/script/scene/rc04.cpp b/engines/bladerunner/script/scene/rc04.cpp
index d865cec..122ff65 100644
--- a/engines/bladerunner/script/scene/rc04.cpp
+++ b/engines/bladerunner/script/scene/rc04.cpp
@@ -27,7 +27,9 @@ namespace BladeRunner {
void SceneScriptRC04::InitializeScene() {
Setup_Scene_Information(45.0f, 0.15f, 68.0f, 1018);
Game_Flag_Reset(kFlagRC03toRC04);
+
Scene_Exit_Add_2D_Exit(0, 225, 47, 359, 248, 0);
+
if (!Game_Flag_Query(kFlagRC04McCoyShotBob)) {
Actor_Put_In_Set(kActorBulletBob, kSetRC04);
Actor_Set_At_XYZ(kActorBulletBob, -60.0f, -11.0f, 62.0f, 12);
@@ -35,6 +37,7 @@ void SceneScriptRC04::InitializeScene() {
if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
Actor_Change_Animation_Mode(kActorBulletBob, 88);
}
+
Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1);
Ambient_Sounds_Add_Sound(82, 5, 30, 10, 20, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(83, 5, 30, 10, 20, -100, 100, -101, -101, 0, 0);
diff --git a/engines/bladerunner/script/vk_script.cpp b/engines/bladerunner/script/vk_script.cpp
index 2dc2c4b..81fb67d 100644
--- a/engines/bladerunner/script/vk_script.cpp
+++ b/engines/bladerunner/script/vk_script.cpp
@@ -1812,7 +1812,7 @@ void VKScript::askBulletBob(int questionId) {
case 7465:
VK_Subject_Reacts(15, 5, 3, -5);
VK_Play_Speech_Line(kActorBulletBob, 1200, 0.5f);
- if (Actor_Query_Friendliness_To_Other(14, 0) <= 40) {
+ if (Actor_Query_Friendliness_To_Other(kActorBulletBob, kActorMcCoy) <= 40) {
VK_Eye_Animates(2);
VK_Play_Speech_Line(kActorBulletBob, 1210, 0.5f);
VK_Eye_Animates(1);
More information about the Scummvm-git-logs
mailing list