aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script/scene/ma01.cpp
diff options
context:
space:
mode:
authorPeter Kohaut2019-01-26 16:46:33 +0100
committerPeter Kohaut2019-01-27 11:48:59 +0100
commit8b849d282f05d5ae3264a7f5bad4cb8f865499a8 (patch)
tree4d142322cbdf2c558e85e27292edf49d677ebd22 /engines/bladerunner/script/scene/ma01.cpp
parent22a71f0b38c7d3226124fb9f97874836c206d1b5 (diff)
downloadscummvm-rg350-8b849d282f05d5ae3264a7f5bad4cb8f865499a8.tar.gz
scummvm-rg350-8b849d282f05d5ae3264a7f5bad4cb8f865499a8.tar.bz2
scummvm-rg350-8b849d282f05d5ae3264a7f5bad4cb8f865499a8.zip
BLADERUNNER: Cleanup of Gaff script for chapter 1 & 2
Diffstat (limited to 'engines/bladerunner/script/scene/ma01.cpp')
-rw-r--r--engines/bladerunner/script/scene/ma01.cpp52
1 files changed, 35 insertions, 17 deletions
diff --git a/engines/bladerunner/script/scene/ma01.cpp b/engines/bladerunner/script/scene/ma01.cpp
index 566edeb0c2..4d0ac5523e 100644
--- a/engines/bladerunner/script/scene/ma01.cpp
+++ b/engines/bladerunner/script/scene/ma01.cpp
@@ -39,23 +39,26 @@ enum kMA01Exits {
void SceneScriptMA01::InitializeScene() {
Setup_Scene_Information(381.0f, 0.0f, 54.0f, 992);
if (Game_Flag_Query(kFlagSpinnerAtMA01)) {
- Setup_Scene_Information(381.0f, 0.0f, 54.0f, 992);
+ Setup_Scene_Information( 381.0f, 0.0f, 54.0f, 992);
}
if (Game_Flag_Query(kFlagMA06toMA01)) {
Setup_Scene_Information(1446.0f, 0.0f, -725.0f, 660);
}
+
Scene_Exit_Add_2D_Exit(kMA01ExitMA06, 328, 132, 426, 190, 0);
if (Game_Flag_Query(kFlagSpinnerAtMA01)) {
Scene_Exit_Add_2D_Exit(kMA01ExitSpinner, 234, 240, 398, 328, 2);
}
- Ambient_Sounds_Add_Looping_Sound(101, 90, 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(101, 90, 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(kFlagMA06toMA01)) {
Scene_Loop_Set_Default(kMA01LoopMain);
Game_Flag_Reset(kFlagMA06toMA01);
@@ -65,9 +68,10 @@ void SceneScriptMA01::InitializeScene() {
Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kMA01LoopInshotRoof, false);
Scene_Loop_Set_Default(kMA01LoopMain);
}
- if (Game_Flag_Query(409)) {
- Actor_Set_Goal_Number(kActorGaff, 3);
- Game_Flag_Reset(409);
+
+ if (Game_Flag_Query(kFlagMA01GaffApproachMcCoy)) {
+ Actor_Set_Goal_Number(kActorGaff, kGoalGaffMA01ApproachMcCoy);
+ Game_Flag_Reset(kFlagMA01GaffApproachMcCoy);
}
}
@@ -100,13 +104,14 @@ bool SceneScriptMA01::ClickedOnExit(int exitId) {
if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenMA01AttackMcCoy) {
return true;
}
+
if (exitId == kMA01ExitMA06) {
if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenFled) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1446.0f, 0.0f, -725.0f, 72, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1446.0f, 0.0f, -725.0f, 72, true, false, 0)) {
Actor_Set_Goal_Number(kActorZuben, kGoalZubenMA01AttackMcCoy);
Scene_Exits_Disable();
}
- } else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1446.0f, 0.0f, -725.0f, 12, 1, false, 0)) {
+ } else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1446.0f, 0.0f, -725.0f, 12, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagMA01toMA06);
@@ -114,8 +119,9 @@ bool SceneScriptMA01::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == kMA01ExitSpinner) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 381.0f, 0.0f, 54.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 381.0f, 0.0f, 54.0f, 0, true, false, 0)) {
Player_Loses_Control();
Actor_Face_Heading(kActorMcCoy, 736, false);
Game_Flag_Reset(kFlagMcCoyInChinaTown);
@@ -211,34 +217,44 @@ void SceneScriptMA01::SceneFrameAdvanced(int frame) {
if (frame == 15) {
Ambient_Sounds_Play_Sound(102, 70, -100, 100, 0);
}
- if (frame == 61 || frame == 183) {
+
+ if (frame == 61
+ || frame == 183
+ ) {
Ambient_Sounds_Play_Sound(116, 100, 40, 0, 99);
}
- if (frame == 107 || frame == 227) {
+
+ if (frame == 107
+ || frame == 227
+ ) {
Ambient_Sounds_Play_Sound(119, 100, 40, 0, 99);
}
+
if (frame == 1) {
Ambient_Sounds_Play_Sound(118, 40, -60, 20, 99);
}
+
if (frame == 241) {
Ambient_Sounds_Play_Sound(117, 40, 0, 0, 99);
}
+
if (frame == 58) {
Sound_Play(122, 17, 20, 20, 50);
}
+
if ((frame == 75
|| frame == 196
)
&& Game_Flag_Query(kFlagArrivedFromSpinner2)
) {
Actor_Face_Heading(kActorMcCoy, 736, false);
- Actor_Change_Animation_Mode(kActorMcCoy, 42);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeSpinnerGetOut);
Game_Flag_Reset(kFlagArrivedFromSpinner2);
} else {
if ( frame == 196
&& !Game_Flag_Query(kFlagArrivedFromSpinner2)
) {
- Actor_Change_Animation_Mode(kActorMcCoy, 41);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeSpinnerGetIn);
//return true;
return;
}
@@ -259,7 +275,9 @@ void SceneScriptMA01::PlayerWalkedOut() {
Actor_Set_Invisible(kActorMcCoy, false);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- if (!Game_Flag_Query(kFlagMA01toMA06) && Global_Variable_Query(kVariableChapter) == 1) {
+ if (!Game_Flag_Query(kFlagMA01toMA06)
+ && Global_Variable_Query(kVariableChapter) == 1
+ ) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Outtake_Play(kOuttakeTowards2, true, -1);