[Scummvm-git-logs] scummvm master -> cd37d510f93a7e9ba35a442d2a3d15de9f4846da
peterkohaut
peterkohaut at users.noreply.github.com
Fri Jan 25 23:21:13 CET 2019
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f5aa8d7134 BLADERUNNER: Fixed fly-away animation in RC01 for later chapters
a1f608cebb BLADERUNNER: Improved debugger's scene command
474e4e2f09 BLADERUNNER: Cleanup of BBxx scripts
cd37d510f9 BLADERUNNER: Cleanup of actor scripts for a fight in BB11
Commit: f5aa8d713476dfe54e7ff9f62b4b0a5d5fcc0dc2
https://github.com/scummvm/scummvm/commit/f5aa8d713476dfe54e7ff9f62b4b0a5d5fcc0dc2
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-25T21:32:33+01:00
Commit Message:
BLADERUNNER: Fixed fly-away animation in RC01 for later chapters
Changed paths:
engines/bladerunner/script/scene/rc01.cpp
diff --git a/engines/bladerunner/script/scene/rc01.cpp b/engines/bladerunner/script/scene/rc01.cpp
index 9467f16..f3b757e 100644
--- a/engines/bladerunner/script/scene/rc01.cpp
+++ b/engines/bladerunner/script/scene/rc01.cpp
@@ -663,7 +663,10 @@ void SceneScriptRC01::PlayerWalkedIn() {
void SceneScriptRC01::PlayerWalkedOut() {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- if (!Game_Flag_Query(kFlagRC01toRC02) && !Game_Flag_Query(kFlagRC01toRC03) && Global_Variable_Query(kVariableChapter) > 0) {
+ if (!Game_Flag_Query(kFlagRC01toRC02)
+ && !Game_Flag_Query(kFlagRC01toRC03)
+ && Global_Variable_Query(kVariableChapter) == 1
+ ) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Outtake_Play(kOuttakeAway2, true, -1);
Commit: a1f608cebb41beba2df85ca4dfc87da27d794651
https://github.com/scummvm/scummvm/commit/a1f608cebb41beba2df85ca4dfc87da27d794651
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-25T23:16:05+01:00
Commit Message:
BLADERUNNER: Improved debugger's scene command
Added missing CT09 scene name
Show scene names for chapter 3 and 5
Changed paths:
engines/bladerunner/debugger.cpp
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp
index 996873b..f926ecf 100644
--- a/engines/bladerunner/debugger.cpp
+++ b/engines/bladerunner/debugger.cpp
@@ -371,26 +371,26 @@ const struct SceneList {
{ 2, "AR01", 0, 0 }, { 2, "AR02", 0, 1 }, { 2, "BB01", 20, 2 }, { 2, "BB02", 1, 3 },
{ 2, "BB03", 21, 4 }, { 2, "BB04", 1, 5 }, { 2, "BB05", 22, 6 }, { 2, "BB06", 1, 7 },
{ 2, "BB06", 2, 7 }, { 2, "BB07", 2, 8 }, { 2, "BB07", 3, 8 }, { 2, "BB08", 23, 9 },
- { 2, "BB10", 25, 11 }, { 2, "BB11", 26, 12 }, { 2, "BB12", 102, 120 }, { 2, "BB51", 1, 104 },
- { 2, "CT01", 4, 13 }, { 2, "CT02", 27, 14 }, { 2, "CT03", 5, 15 }, { 2, "CT04", 5, 16 },
- { 2, "CT05", 28, 17 }, { 2, "CT06", 29, 18 }, { 2, "CT08", 6, 20 }, { 2, "CT09", 31, 21 },
- { 2, "CT10", 32, 22 }, { 2, "CT11", 33, 23 }, { 2, "CT12", 4, 24 }, { 2, "CT51", 6, 105 },
- { 2, "DR01", 7, 25 }, { 2, "DR02", 7, 26 }, { 2, "DR03", 34, 27 }, { 2, "DR04", 7, 28 },
- { 2, "DR05", 35, 29 }, { 2, "DR06", 36, 30 }, { 2, "HC01", 8, 31 }, { 2, "HC02", 8, 32 },
- { 2, "HC03", 8, 33 }, { 2, "HC04", 8, 106 }, { 2, "HF01", 37, 34 }, { 2, "HF02", 38, 35 },
- { 2, "HF03", 39, 36 }, { 2, "HF04", 40, 37 }, { 2, "HF05", 41, 38 }, { 2, "HF06", 42, 39 },
- { 2, "MA01", 49, 48 }, { 2, "MA02", 10, 49 }, { 2, "MA04", 10, 50 }, { 2, "MA04", 50, 50 },
- { 2, "MA05", 51, 51 }, { 2, "MA06", 52, 52 }, { 2, "MA07", 53, 53 }, { 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, "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 }, { 2, "TB02", 17, 82 },
- { 2, "TB05", 72, 84 }, { 2, "TB06", 73, 85 }, { 2, "TB07", 18, 108 }, { 2, "UG01", 74, 86 },
- { 2, "UG02", 75, 87 }, { 2, "UG03", 76, 88 }, { 2, "UG04", 77, 89 }, { 2, "UG06", 79, 91 },
- { 2, "UG10", 83, 95 },
+ { 2, "BB09", 24, 10 }, { 2, "BB10", 25, 11 }, { 2, "BB11", 26, 12 }, { 2, "BB12", 102, 120 },
+ { 2, "BB51", 1, 104 }, { 2, "CT01", 4, 13 }, { 2, "CT02", 27, 14 }, { 2, "CT03", 5, 15 },
+ { 2, "CT04", 5, 16 }, { 2, "CT05", 28, 17 }, { 2, "CT06", 29, 18 }, { 2, "CT08", 6, 20 },
+ { 2, "CT09", 31, 21 }, { 2, "CT10", 32, 22 }, { 2, "CT11", 33, 23 }, { 2, "CT12", 4, 24 },
+ { 2, "CT51", 6, 105 }, { 2, "DR01", 7, 25 }, { 2, "DR02", 7, 26 }, { 2, "DR03", 34, 27 },
+ { 2, "DR04", 7, 28 }, { 2, "DR05", 35, 29 }, { 2, "DR06", 36, 30 }, { 2, "HC01", 8, 31 },
+ { 2, "HC02", 8, 32 }, { 2, "HC03", 8, 33 }, { 2, "HC04", 8, 106 }, { 2, "HF01", 37, 34 },
+ { 2, "HF02", 38, 35 }, { 2, "HF03", 39, 36 }, { 2, "HF04", 40, 37 }, { 2, "HF05", 41, 38 },
+ { 2, "HF06", 42, 39 }, { 2, "MA01", 49, 48 }, { 2, "MA02", 10, 49 }, { 2, "MA04", 10, 50 },
+ { 2, "MA04", 50, 50 }, { 2, "MA05", 51, 51 }, { 2, "MA06", 52, 52 }, { 2, "MA07", 53, 53 },
+ { 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, "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 },
+ { 2, "TB02", 17, 82 }, { 2, "TB05", 72, 84 }, { 2, "TB06", 73, 85 }, { 2, "TB07", 18, 108 },
+ { 2, "UG01", 74, 86 }, { 2, "UG02", 75, 87 }, { 2, "UG03", 76, 88 }, { 2, "UG04", 77, 89 },
+ { 2, "UG06", 79, 91 }, { 2, "UG10", 83, 95 },
{ 4, "AR01", 0, 0 }, { 4, "AR02", 0, 1 }, { 4, "BB01", 20, 2 }, { 4, "BB02", 1, 3 },
{ 4, "BB03", 21, 4 }, { 4, "BB04", 1, 5 }, { 4, "BB51", 1, 104 }, { 4, "CT01", 4, 13 },
@@ -506,9 +506,16 @@ bool Debugger::cmdScene(int argc, const char **argv) {
return false;
}
+ int chapterId = _vm->_settings->getChapter();
+ int chapterIdNormalized = chapterId;
+
+ if (chapterId == 3 || chapterId == 5) {
+ chapterIdNormalized = chapterId - 1;
+ }
+
uint i;
for (i = 0; sceneList[i].chapter != 0; i++) {
- if (sceneList[i].chapter == _vm->_settings->getChapter() && sceneList[i].set == _vm->_scene->getSetId()
+ if (sceneList[i].chapter == chapterIdNormalized && sceneList[i].set == _vm->_scene->getSetId()
&& sceneList[i].scene == _vm->_scene->getSceneId())
break;
}
Commit: 474e4e2f0914a106e02dac2779d58f990e119bf9
https://github.com/scummvm/scummvm/commit/474e4e2f0914a106e02dac2779d58f990e119bf9
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-25T23:16:24+01:00
Commit Message:
BLADERUNNER: Cleanup of BBxx scripts
Removed issue where McCoy went to jail for no reason at start of 3rd act
Changed paths:
engines/bladerunner/game_constants.h
engines/bladerunner/script/ai/bryant.cpp
engines/bladerunner/script/ai/bullet_bob.cpp
engines/bladerunner/script/ai/clovis.cpp
engines/bladerunner/script/ai/general_doll.cpp
engines/bladerunner/script/ai/mccoy.cpp
engines/bladerunner/script/ai/sadik.cpp
engines/bladerunner/script/ai/sebastian.cpp
engines/bladerunner/script/ai/steele.cpp
engines/bladerunner/script/scene/bb01.cpp
engines/bladerunner/script/scene/bb02.cpp
engines/bladerunner/script/scene/bb03.cpp
engines/bladerunner/script/scene/bb04.cpp
engines/bladerunner/script/scene/bb05.cpp
engines/bladerunner/script/scene/bb06.cpp
engines/bladerunner/script/scene/bb07.cpp
engines/bladerunner/script/scene/bb08.cpp
engines/bladerunner/script/scene/bb09.cpp
engines/bladerunner/script/scene/bb10.cpp
engines/bladerunner/script/scene/bb11.cpp
engines/bladerunner/script/scene/bb12.cpp
engines/bladerunner/script/scene/bb51.cpp
engines/bladerunner/script/scene/ct08.cpp
engines/bladerunner/script/scene/ct10.cpp
engines/bladerunner/script/scene/ct51.cpp
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index b14b720..12d4eaa 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -813,7 +813,10 @@ enum Flags {
kFlagAR02DektoraBoughtScorpions = 374,
kFlagDirectorsCut = 378,
+ kFlagCT08toCT51 = 379, // is never checked
+ kFlagCT51toCT08 = 380,
+ kFlagNotUsed383 = 383,
kFlagHC01toHC02 = 384,
kFlagHC02toHC01 = 385,
kFlagHC01toHC03 = 386, // is never checked
@@ -821,14 +824,15 @@ enum Flags {
kFlagHC03TrapDoorOpen = 388,
// 389 is never used
// 390 is never used
-
+ kFlagBB09SadikRun = 391,
kFlagRC01McCoyAndOfficerLearyTalking = 392,
kFlagBB06toBB51 = 393, // is never checked
kFlagBB51toBB06a = 394,
kFlagBB51toBB06b = 395,
-
+ kFlagBB07ElectricityOn = 396,
kFlagRC01McCoyAndOfficerLearyArtMetaphor = 397,
-
+ kFlagBB07PrinterChecked = 398,
+ kFlagGeneralDollShot = 399,
kFlagHC01IzoTalk1 = 400,
kFlagHC01IzoTalk2 = 401,
kFlagHC03Available = 402,
@@ -838,6 +842,8 @@ enum Flags {
kFlagUnused406 = 406, // is never checked
kFlagUnused407 = 407, // is never checked
+ kFlagBB06AndroidDestroyed = 410,
+
kFlagUG09toCT12 = 432,
kFlagCT12ToUG09 = 433,
kFlagGenericWalkerWaiting = 443,
@@ -854,6 +860,11 @@ enum Flags {
kFlagMaggieIsHurt = 461,
kFlagPS04GuzzaLeft = 462,
kFlagMcCoyArrested = 465,
+ kFlagBB10Shelf1Available = 466,
+ kFlagBB10Shelf2Available = 467,
+ kFlagBB10Shelf3Available = 468,
+ kFlagBB10Shelf4Available = 469,
+ kFlagBB10Shelf5Available = 470,
kFlagUG10GateOpen = 474,
kFlagMcCoyAtPS03 = 478, // has no use
kFlagMcCoyInHawkersCircle = 479,
@@ -865,10 +876,16 @@ enum Flags {
kFlagCT04HomelessTrashFinish = 492,
kFlagBB02ElevatorDown = 493,
kFlagBB02Entered = 494,
+ kFlagBB05Entered = 495,
+ kFlagBB08Entered = 496,
+ kFlagBB12Entered = 497,
kFlagUG02FromUG01 = 498,
kFlagUG02Interactive = 499,
kFlagAR02DektoraWillBuyScorpions = 504,
kFlagDR03ChewTalkExplosion = 505,
+ kFlagBB08toBB12 = 506,
+ kFlagBB12toBB08 = 507, // is never checked
+ kFlagBB11SadikFight = 509,
kFlagDR05ExplodedEntered = 511,
kFlagDR05ViewExplosion = 515,
kFlagCT07ZubenAttack = 516,
@@ -878,6 +895,7 @@ enum Flags {
kFlagGordoTalk1 = 543,
kFlagGordoTalk2 = 544,
kFlagDR06MannequinHeadOpen = 548,
+ kFlagMcCoyTiedDown = 550,
kFlagDR01toCT11 = 558,
kFlagKIAPrivacyAddonIntro = 599,
kFlagTB07toTB02 = 608,
@@ -886,13 +904,13 @@ enum Flags {
kFlagMA04PhoneMessageFromClovis = 649,
kFlagMA04PhoneMessageFromLucy = 650,
kFlagUG02RagiationGooglesTaken = 656,
-
kFlagDNARowAvailableTalk = 660,
kFlagTB07ShadeDown = 661, // is never set
kFlagMA07toPS14 = 672,
kFlagPS14toMA07 = 673,
kFlagChapter2Intro = 678,
-
+ kFlagChapter3Intro = 679,
+ kFlagNotUsed686 = 686,
kFlagPS05TV0 = 688,
kFlagPS05TV1 = 689,
kFlagPS05TV2 = 690,
@@ -927,9 +945,12 @@ enum Variables {
kVariableMcCoyEvidenceMissed = 14,
kVariableIzoShot = 19, // has no use
kVariableBobShot = 24, // has no use
+ kVariableGeneralDollShot = 25, // has no use
kVariableGenericWalkerAModel = 32,
kVariableGenericWalkerBModel = 33,
kVariableGenericWalkerCModel = 34,
+
+ kVariableBB10ShelvesAvailable = 36,
kVariableWalkLoopActor = 37,
kVariableWalkLoopRun = 38,
kVariableDR06MannequinHeadOpened = 39,
@@ -1027,17 +1048,17 @@ enum Scenes {
kSceneAR01 = 0, // Animoid Row - Fish dealer
kSceneAR02 = 1, // Animoid Row - Insect dealer
kSceneBB01 = 2, // Bradbury building - Outside
- kSceneBB02 = 3, // Bradbury building - elevator down
+ kSceneBB02 = 3, // Bradbury building - Inside
kSceneBB03 = 4, // Bradbury building - Entrance
- kSceneBB04 = 5, // Bradbury building - elevator up
+ kSceneBB04 = 5, // Bradbury building - Elevator
kSceneBB05 = 6, // Bradbury building - Entry hall
kSceneBB06 = 7, // Bradbury building - Billiard room - front
- kSceneBB07 = 8,
- kSceneBB08 = 9, // Bradbury building - Bathroom
- kSceneBB09 = 10, // Bradbury building - Above bathroom
- kSceneBB10 = 11, // Bradbury building - Cupboard
- kSceneBB11 = 12, // Bradbury building - Roof
- kSceneCT01 = 13, // Chinatown - Howie Lee Restaurant
+ kSceneBB07 = 8, // Bradbury building - Sebastian's office
+ kSceneBB08 = 9, // Bradbury Building - Bathroom
+ kSceneBB09 = 10, // Bradbury Building - Above bathroom
+ kSceneBB10 = 11, // Bradbury Building - Bookcase
+ kSceneBB11 = 12, // Bradbury Building - Roof
+ kSceneCT01 = 13, // Chinatown - Howie Lee's Restaurant
kSceneCT02 = 14, // Chinatown - Restaurant - Kitchen
kSceneCT03 = 15, // Chinatown - Back alley - Restaurant
kSceneCT04 = 16, // Chinatown - Back alley - Dumpster
@@ -1050,14 +1071,14 @@ enum Scenes {
kSceneCT11 = 23, // Chinatown - Yukon Hotel - Outside
kSceneCT12 = 24, // Chinatown - Warehouse - Outside
kSceneDR01 = 25, // DNA Row - Street
- kSceneDR02 = 26, // DNA Row - Eye world - Outside
- kSceneDR03 = 27, // DNA Row - Eye world - Inside
+ kSceneDR02 = 26, // DNA Row - Eyeworld - Outside
+ kSceneDR03 = 27, // DNA Row - Eyeworld - Inside
kSceneDR04 = 28, // DNA Row - Dermo design - Outside
kSceneDR05 = 29, // DNA Row - Dermo design - Inside
kSceneDR06 = 30, // DNA Row - Twin's office
- kSceneHC01 = 31, // Hawker's circle - Green pawn - Outside
- kSceneHC02 = 32, // Hawker's circle - China bar
- kSceneHC03 = 33, // Hawker's circle - Green pawn - Inside
+ kSceneHC01 = 31, // Hawker's Circle - Green pawn - Outside
+ kSceneHC02 = 32, // Hawker's Circle - China bar
+ kSceneHC03 = 33, // Hawker's Circle - Green pawn - Inside
kSceneHF01 = 34,
kSceneHF02 = 35,
kSceneHF03 = 36,
@@ -1104,8 +1125,8 @@ enum Scenes {
kScenePS14 = 77, // Police Station - Outside
kSceneRC01 = 78, // Runciter - Outside
kSceneRC02 = 79, // Runciter - Inside
- kSceneRC03 = 80, // Bullet Bob - Outside
- kSceneRC04 = 81, // Bullet Bob - 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
@@ -1128,13 +1149,13 @@ enum Scenes {
kSceneUG17 = 101,
kSceneUG18 = 102,
kSceneUG19 = 103,
- kSceneBB51 = 104, // Bradbury building - Billiard room - Back
- kSceneCT51 = 105,
- kSceneHC04 = 106, // Hawker's circle - Kingston kitchen
+ kSceneBB51 = 104, // Bradbury Building - Billiard room - Back
+ kSceneCT51 = 105, // Chinatown - Yukon Hotel - Backroom - back
+ kSceneHC04 = 106, // Hawker's Circle - Kingston kitchen
kSceneRC51 = 107, // Runciter - Lucy's desk
kSceneTB07 = 108,
kScenePS15 = 119, // Police Station - Armory
- kSceneBB12 = 120
+ kSceneBB12 = 120 // Bradbury Building - Monkey room
};
enum Sets
@@ -1323,10 +1344,13 @@ enum GameItems {
// 75 is never used
// 76 is never used
kItemDragonflyEarring = 76,
+ kItemBB06ControlBox = 77,
kItemBomb = 78,
kItemCandy = 79,
+ kItemCheese = 81,
kItemChopstickWrapper = 82,
kItemDogCollar = 84,
+ kItemRagDoll = 85,
kItemRadiationGoogles = 88,
kItemToyDog = 98,
kItemShellCasingA = 100,
@@ -1338,9 +1362,11 @@ enum GameItems {
kItemScrorpions = 106,
kItemCamera = 107,
kItemKitchenBox = 108,
+ kItemChair = 109,
kItemWeaponsCrate = 110,
kItemWeaponsOrderForm = 111,
kItemTyrellSalesPamphlet = 119,
+ kItemMoonbusPhoto = 120,
kItemGreenPawnLock = 121,
kItemChain = 122
};
diff --git a/engines/bladerunner/script/ai/bryant.cpp b/engines/bladerunner/script/ai/bryant.cpp
index 74e5e20..bedb19d 100644
--- a/engines/bladerunner/script/ai/bryant.cpp
+++ b/engines/bladerunner/script/ai/bryant.cpp
@@ -45,17 +45,26 @@ void AIScriptBryant::Initialize() {
World_Waypoint_Set(333, kSetBB12, -34.0f, 0.0f, 33.0f);
World_Waypoint_Set(334, kSetBB05, 3.0f, -60.30f, -144.0f);
World_Waypoint_Set(335, kSetBB12, -50.0f, 0.0f, 212.0f);
+
Actor_Put_In_Set(kActorBryant, kSetBB05);
+
Actor_Set_Goal_Number(kActorBryant, 100);
}
bool AIScriptBryant::Update() {
- if (Global_Variable_Query(kVariableChapter) == 2 && Actor_Query_Goal_Number(kActorBryant) <= 101 && Player_Query_Current_Scene() == kSceneBB05) {
+ if (Global_Variable_Query(kVariableChapter) == 2
+ && Actor_Query_Goal_Number(kActorBryant) <= 101
+ && Player_Query_Current_Scene() == kSceneBB05
+ ) {
Actor_Set_Goal_Number(kActorBryant, 101);
return true;
}
- if (Global_Variable_Query(kVariableChapter) == 3 && Player_Query_Current_Scene() == kSceneBB05 && !Game_Flag_Query(686)) {
- Game_Flag_Set(686);
+
+ if ( Global_Variable_Query(kVariableChapter) == 3
+ && Player_Query_Current_Scene() == kSceneBB05
+ && !Game_Flag_Query(kFlagNotUsed686)
+ ) {
+ Game_Flag_Set(kFlagNotUsed686);
return true;
}
return false;
@@ -250,7 +259,7 @@ bool AIScriptBryant::ChangeAnimationMode(int mode) {
_animationState = 1;
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 2;
_animationFrame = 0;
Actor_Set_Goal_Number(kActorBryant, 0);
diff --git a/engines/bladerunner/script/ai/bullet_bob.cpp b/engines/bladerunner/script/ai/bullet_bob.cpp
index 439431d..1c1730c 100644
--- a/engines/bladerunner/script/ai/bullet_bob.cpp
+++ b/engines/bladerunner/script/ai/bullet_bob.cpp
@@ -145,7 +145,7 @@ bool AIScriptBulletBob::ShotAtAndHit() {
Actor_Set_Goal_Number(kActorBulletBob, 99);
_animationFrame = 0;
_animationState = 3;
- Ambient_Sounds_Play_Speech_Sound(2, 9000, 100, 0, 0, 0);
+ Ambient_Sounds_Play_Speech_Sound(kActorGordo, 9000, 100, 0, 0, 0); // not a typo, it's really from Gordo
Actor_Face_Heading(kActorBulletBob, 281, false);
}
diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp
index 6f4d0bf..d95c0e5 100644
--- a/engines/bladerunner/script/ai/clovis.cpp
+++ b/engines/bladerunner/script/ai/clovis.cpp
@@ -272,19 +272,19 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Face_Current_Camera(5, true);
Actor_Says(kActorClovis, 100, 17);
Delay(1000);
- if (!Game_Flag_Query(48)) {
+ if (!Game_Flag_Query(kFlagSadikIsReplicant)) {
Actor_Clue_Acquire(kActorMcCoy, kClueStaggeredbyPunches, true, kActorSadik);
}
- Game_Flag_Set(383);
- Game_Flag_Reset(509);
+ Game_Flag_Set(kFlagNotUsed383);
+ Game_Flag_Reset(kFlagBB11SadikFight);
Global_Variable_Set(kVariableChapter, 3);
Actor_Set_Goal_Number(kActorClovis, 200);
Actor_Set_Goal_Number(kActorSadik, 200);
Actor_Clue_Acquire(kActorMcCoy, kClueAct2Ended, true, -1);
Player_Gains_Control();
Chapter_Enter(3, kSetCT08_CT51_UG12, kSceneCT08);
- Game_Flag_Set(550);
- Game_Flag_Set(679);
+ Game_Flag_Set(kFlagMcCoyTiedDown);
+ Game_Flag_Set(kFlagChapter3Intro);
return true;
case 300:
diff --git a/engines/bladerunner/script/ai/general_doll.cpp b/engines/bladerunner/script/ai/general_doll.cpp
index 7fdc9b0..729bac2 100644
--- a/engines/bladerunner/script/ai/general_doll.cpp
+++ b/engines/bladerunner/script/ai/general_doll.cpp
@@ -38,62 +38,60 @@ void AIScriptGeneralDoll::Initialize() {
Actor_Put_In_Set(kActorGeneralDoll, kSetFreeSlotG);
Actor_Set_At_Waypoint(kActorGeneralDoll, 39, 0);
+
Actor_Set_Goal_Number(kActorGeneralDoll, 100);
}
bool AIScriptGeneralDoll::Update() {
if (Global_Variable_Query(kVariableChapter) == 2
- && Actor_Query_Goal_Number(kActorGeneralDoll) <= 101
- && Player_Query_Current_Scene() == kSceneBB05) {
+ && Actor_Query_Goal_Number(kActorGeneralDoll) <= 101
+ && Player_Query_Current_Scene() == kSceneBB05
+ ) {
Actor_Set_Goal_Number(kActorGeneralDoll, 101);
- } else if (Global_Variable_Query(kVariableChapter) != 3 || Actor_Query_Goal_Number(kActorGeneralDoll) >= 200) {
- return false;
+ return true;
}
- return true;
+ if (Global_Variable_Query(kVariableChapter) == 3
+ && Actor_Query_Goal_Number(kActorGeneralDoll) < 200
+ ) {
+ return true;
+ }
+
+ return false;
}
void AIScriptGeneralDoll::TimerExpired(int timer) {
- if (timer != 2)
- return; //false;
-
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
- Actor_Change_Animation_Mode(kActorGeneralDoll, 48);
- AI_Countdown_Timer_Reset(kActorGeneralDoll, 2);
-
- return; //true;
+ if (timer == 2) {
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
+ Actor_Change_Animation_Mode(kActorGeneralDoll, kAnimationModeDie);
+ AI_Countdown_Timer_Reset(kActorGeneralDoll, 2);
+ return; //true;
+ }
+ return; //false;
}
void AIScriptGeneralDoll::CompletedMovementTrack() {
switch (Actor_Query_Goal_Number(kActorGeneralDoll)) {
- case 200:
- Actor_Set_Goal_Number(kActorGeneralDoll, 201);
- return; //true;
-
- case 201:
- Actor_Set_Goal_Number(kActorGeneralDoll, 200);
- return; //true;
-
case 101:
if (Player_Query_Current_Scene() == 6) {
switch (Random_Query(0, 5)) {
case 0:
- Ambient_Sounds_Play_Speech_Sound(58, 0, 80, 0, 0, 0);
+ Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 0, 80, 0, 0, 0);
break;
case 1:
- Ambient_Sounds_Play_Speech_Sound(58, 10, 80, 0, 0, 0);
+ Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 10, 80, 0, 0, 0);
break;
case 2:
- Ambient_Sounds_Play_Speech_Sound(58, 20, 80, 0, 0, 0);
+ Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 20, 80, 0, 0, 0);
break;
case 3:
- Ambient_Sounds_Play_Speech_Sound(58, 30, 80, 0, 0, 0);
+ Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 30, 80, 0, 0, 0);
break;
case 4:
- Ambient_Sounds_Play_Speech_Sound(58, 40, 80, 0, 0, 0);
+ Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 40, 80, 0, 0, 0);
break;
case 5:
- Ambient_Sounds_Play_Speech_Sound(58, 50, 80, 0, 0, 0);
+ Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 50, 80, 0, 0, 0);
break;
}
Actor_Set_Goal_Number(kActorGeneralDoll, 102);
@@ -110,6 +108,13 @@ void AIScriptGeneralDoll::CompletedMovementTrack() {
Actor_Set_Goal_Number(kActorGeneralDoll, 101);
return; //true;
+ case 200:
+ Actor_Set_Goal_Number(kActorGeneralDoll, 201);
+ return; //true;
+
+ case 201:
+ Actor_Set_Goal_Number(kActorGeneralDoll, 200);
+ return; //true;
}
return; //false
@@ -120,7 +125,7 @@ void AIScriptGeneralDoll::ReceivedClue(int clueId, int fromActorId) {
}
void AIScriptGeneralDoll::ClickedByPlayer() {
- Actor_Face_Actor(kActorMcCoy, kActorGeneralDoll, 1);
+ Actor_Face_Actor(kActorMcCoy, kActorGeneralDoll, true);
Actor_Voice_Over(30, kActorVoiceOver);
Actor_Voice_Over(40, kActorVoiceOver);
}
@@ -147,13 +152,15 @@ void AIScriptGeneralDoll::ShotAtAndMissed() {
bool AIScriptGeneralDoll::ShotAtAndHit() {
AI_Movement_Track_Flush(kActorGeneralDoll);
- Global_Variable_Increment(25, 1);
- if (!Game_Flag_Query(399) && Global_Variable_Query(25) == 1) {
+ Global_Variable_Increment(kVariableGeneralDollShot, 1);
+ if (!Game_Flag_Query(kFlagGeneralDollShot)
+ && Global_Variable_Query(kVariableGeneralDollShot) == 1
+ ) {
Sound_Play(121, 100, 0, 0, 50);
- Game_Flag_Set(399);
+ Game_Flag_Set(kFlagGeneralDollShot);
Actor_Set_Goal_Number(kActorGeneralDoll, 104);
- ChangeAnimationMode(48);
- Actor_Set_Targetable(kActorGeneralDoll, 0);
+ ChangeAnimationMode(kAnimationModeDie);
+ Actor_Set_Targetable(kActorGeneralDoll, false);
}
return false;
diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp
index 0f8843a..12e58b8 100644
--- a/engines/bladerunner/script/ai/mccoy.cpp
+++ b/engines/bladerunner/script/ai/mccoy.cpp
@@ -599,7 +599,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
dword_45A0DC = 0;
_animationState = 0;
Player_Gains_Control();
- Item_Add_To_World(109, 982, kSetCT08_CT51_UG12, -110.0, 0.0, -192.0, 0, 48, 32, false, true, false, false);
+ Item_Add_To_World(kItemChair, 982, kSetCT08_CT51_UG12, -110.0, 0.0, -192.0, 0, 48, 32, false, true, false, false);
}
break;
case 58:
@@ -627,7 +627,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(46)) {
_animationFrame = 0;
}
- if (!Game_Flag_Query(550)) {
+ if (!Game_Flag_Query(kFlagMcCoyTiedDown)) {
_animationFrame = 0;
_animationState = 59;
*animation = 48;
@@ -1230,52 +1230,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
switch (mode) {
case kAnimationModeIdle:
- if (!Game_Flag_Query(550)) {
- switch (_animationState) {
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- Game_Flag_Set(kFlagMcCoyAnimation1);
- dword_45A0D8 = 0;
- dword_45A0DC = 30;
- dword_45A0E4 = 0;
- _animationFrameDelta = 1;
- dword_45A0E8 = 3;
- return true;
- case 14:
- case 17:
- case 20:
- case 21:
- case 36:
- _animationState = 16;
- _animationFrame = 0;
- return true;
- case 15:
- _animationState = 16;
- _animationFrame = 16 - ((16 * _animationFrame) / 12);
- return true;
- case 16:
- case 25:
- case 26:
- case 55:
- return true;
- case 60:
- _animationState = 61;
- return true;
- default:
- _animationState = 0;
- _animationFrame = 0;
- dword_45A0DC = 0;
- return true;
- }
- } else {
+ if (Game_Flag_Query(kFlagMcCoyTiedDown)) {
if (_animationFrame <= 6) {
int random = Random_Query(0, 2);
int soundId = 0;
@@ -1292,25 +1247,74 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationFrame = 0;
return true;
}
+ switch (_animationState) {
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ Game_Flag_Set(kFlagMcCoyAnimation1);
+ dword_45A0D8 = 0;
+ dword_45A0DC = 30;
+ dword_45A0E4 = 0;
+ _animationFrameDelta = 1;
+ dword_45A0E8 = 3;
+ return true;
+ case 14:
+ case 17:
+ case 20:
+ case 21:
+ case 36:
+ _animationState = 16;
+ _animationFrame = 0;
+ return true;
+ case 15:
+ _animationState = 16;
+ _animationFrame = 16 - ((16 * _animationFrame) / 12);
+ return true;
+ case 16:
+ case 25:
+ case 26:
+ case 55:
+ return true;
+ case 60:
+ _animationState = 61;
+ return true;
+ default:
+ _animationState = 0;
+ _animationFrame = 0;
+ dword_45A0DC = 0;
+ return true;
+ }
+ break;
case kAnimationModeWalk:
- if (_animationState != 27 && _animationState != 50) {
- if (!Game_Flag_Query(550)) {
- _animationState = 32;
+ if (_animationState != 27
+ && _animationState != 50
+ ) {
+ if (Game_Flag_Query(kFlagMcCoyTiedDown)) {
+ _animationState = 58;
_animationFrame = 0;
} else {
- _animationState = 58;
+ _animationState = 32;
_animationFrame = 0;
}
}
break;
case kAnimationModeRun:
- if (_animationState != 27 && _animationState != 50) {
- if (!Game_Flag_Query(550)) {
- _animationState = 31;
- _animationFrame = 0;
- } else {
+ if (_animationState != 27
+ && _animationState != 50
+ ) {
+ if (Game_Flag_Query(kFlagMcCoyTiedDown)) {
_animationState = 58;
_animationFrame = 4;
+ } else {
+ _animationState = 31;
+ _animationFrame = 0;
}
}
break;
@@ -1702,7 +1706,7 @@ void AIScriptMcCoy::sub_4054F0() {
}
void AIScriptMcCoy::sub_405660() {
- if (Game_Flag_Query(550)) {
+ if (Game_Flag_Query(kFlagMcCoyTiedDown)) {
if (_animationFrame <= 6) {
int v1 = Random_Query(0, 2);
int v2 = 0;
diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp
index 353a926..be81315 100644
--- a/engines/bladerunner/script/ai/sadik.cpp
+++ b/engines/bladerunner/script/ai/sadik.cpp
@@ -50,13 +50,13 @@ void AIScriptSadik::Initialize() {
}
bool AIScriptSadik::Update() {
- if (Global_Variable_Query(kVariableChapter) == 2
- && Player_Query_Current_Scene() == kSceneBB09
- && !Game_Flag_Query(391)
+ if ( Global_Variable_Query(kVariableChapter) == 2
+ && Player_Query_Current_Scene() == kSceneBB09
+ && !Game_Flag_Query(kFlagBB09SadikRun)
) {
Actor_Set_Goal_Number(kActorSadik, 101);
Actor_Set_Targetable(kActorSadik, true);
- Game_Flag_Set(391);
+ Game_Flag_Set(kFlagBB09SadikRun);
Game_Flag_Set(kFlagUnused406);
return true;
}
@@ -65,12 +65,19 @@ bool AIScriptSadik::Update() {
Sound_Play(_var1, 100, 0, 0, 50);
_var1 = 0;
}
- if (Global_Variable_Query(kVariableChapter) == 3 && Actor_Query_Goal_Number(kActorSadik) < 200) {
+
+ if (Global_Variable_Query(kVariableChapter) == 3
+ && Actor_Query_Goal_Number(kActorSadik) < 200
+ ) {
Actor_Set_Goal_Number(kActorSadik, 200);
}
- if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorSadik) < 400) {
+
+ if (Global_Variable_Query(kVariableChapter) == 5
+ && Actor_Query_Goal_Number(kActorSadik) < 400
+ ) {
Actor_Set_Goal_Number(kActorSadik, 400);
}
+
if (Actor_Query_Goal_Number(kActorSadik) == 411) {
if (Game_Flag_Query(657)) {
Actor_Set_Goal_Number(kActorSadik, 412);
@@ -80,7 +87,7 @@ bool AIScriptSadik::Update() {
}
void AIScriptSadik::TimerExpired(int timer) {
- if (!timer) {
+ if (timer == 0) {
AI_Countdown_Timer_Reset(kActorSadik, 0);
switch (Actor_Query_Goal_Number(kActorSadik)) {
@@ -101,10 +108,6 @@ void AIScriptSadik::TimerExpired(int timer) {
void AIScriptSadik::CompletedMovementTrack() {
switch (Actor_Query_Goal_Number(kActorSadik)) {
- case 301:
- Actor_Set_Goal_Number(kActorSadik, 302);
- break;
-
case 101:
Actor_Set_Goal_Number(kActorSadik, 102);
break;
@@ -117,6 +120,10 @@ void AIScriptSadik::CompletedMovementTrack() {
Actor_Set_Goal_Number(kActorSadik, 106);
break;
+ case 301:
+ Actor_Set_Goal_Number(kActorSadik, 302);
+ break;
+
default:
return; //false;
}
@@ -130,7 +137,7 @@ void AIScriptSadik::ReceivedClue(int clueId, int fromActorId) {
void AIScriptSadik::ClickedByPlayer() {
if (Actor_Query_Goal_Number(kActorSadik) == 599) {
- Actor_Face_Actor(kActorMcCoy, kActorSadik, 1);
+ Actor_Face_Actor(kActorMcCoy, kActorSadik, true);
Actor_Says(kActorMcCoy, 8580, 16);
}
}
@@ -152,9 +159,11 @@ void AIScriptSadik::OtherAgentEnteredCombatMode(int otherActorId, int combatMode
}
void AIScriptSadik::ShotAtAndMissed() {
- if (Actor_Query_Goal_Number(kActorSadik) == 414 || Actor_Query_Goal_Number(kActorSadik) == 416) {
+ if (Actor_Query_Goal_Number(kActorSadik) == 414
+ || Actor_Query_Goal_Number(kActorSadik) == 416
+ ) {
Game_Flag_Set(714);
- if (Actor_Query_Which_Set_In(kActorSadik) != 48) {
+ if (Actor_Query_Which_Set_In(kActorSadik) != kSetKP07) {
Actor_Set_Goal_Number(kActorSadik, 418);
Scene_Exits_Disable();
}
@@ -162,30 +171,37 @@ void AIScriptSadik::ShotAtAndMissed() {
}
bool AIScriptSadik::ShotAtAndHit() {
+
if (Actor_Query_Goal_Number(kActorSadik) == 301) {
- if (Game_Flag_Query(48)) {
+ if (Game_Flag_Query(kFlagSadikIsReplicant)) {
Actor_Set_Health(kActorSadik, 60, 60);
} else {
Actor_Set_Health(kActorSadik, 40, 40);
}
return true;
- } else {
- if (Actor_Query_Goal_Number(kActorSadik) == 414 || Actor_Query_Goal_Number(kActorSadik) == 416) {
- Game_Flag_Set(714);
- if (Actor_Query_Which_Set_In(kActorSadik) != 48) {
- Actor_Set_Goal_Number(kActorSadik, 418);
- Scene_Exits_Disable();
- }
+ }
+
+ if (Actor_Query_Goal_Number(kActorSadik) == 414
+ || Actor_Query_Goal_Number(kActorSadik) == 416
+ ) {
+ Game_Flag_Set(714);
+ if (Actor_Query_Which_Set_In(kActorSadik) != kSetKP07) {
+ Actor_Set_Goal_Number(kActorSadik, 418);
+ Scene_Exits_Disable();
}
- return false;
}
+ return false;
}
void AIScriptSadik::Retired(int byActorId) {
- if ((Actor_Query_Goal_Number(kActorSadik) == 418 || Actor_Query_Goal_Number(kActorSadik) == 450)
- && Actor_Query_Which_Set_In(kActorSadik) != 48) {
+ if ((Actor_Query_Goal_Number(kActorSadik) == 418
+ || Actor_Query_Goal_Number(kActorSadik) == 450
+ )
+ && Actor_Query_Which_Set_In(kActorSadik) != kSetKP07
+ ) {
Scene_Exits_Enable();
}
+
if (Actor_Query_In_Set(kActorSadik, kSetKP07)) {
Global_Variable_Decrement(kVariableReplicants, 1);
Actor_Set_Goal_Number(kActorSadik, 599);
@@ -193,8 +209,8 @@ void AIScriptSadik::Retired(int byActorId) {
if (Global_Variable_Query(kVariableReplicants) == 0) {
Player_Loses_Control();
Delay(2000);
- Player_Set_Combat_Mode(0);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, 1, 0, 0);
+ Player_Set_Combat_Mode(false);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(579);
@@ -233,7 +249,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Flush(kActorSadik);
AI_Movement_Track_Append(kActorSadik, 313, 0);
AI_Movement_Track_Repeat(kActorSadik);
- Game_Flag_Set(509);
+ Game_Flag_Set(kFlagBB11SadikFight);
return true;
case 103:
@@ -241,7 +257,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Face_Heading(kActorSadik, kActorMcCoy, kActorMcCoy);
_animationState = 32;
_animationFrame = -1;
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
return true;
case 104:
@@ -280,7 +296,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case 301:
- Actor_Set_Targetable(kActorSadik, 1);
+ Actor_Set_Targetable(kActorSadik, true);
World_Waypoint_Set(436, 89, -356.11f, 0.0f, 652.42f);
AI_Movement_Track_Flush(kActorSadik);
AI_Movement_Track_Append_Run(kActorSadik, 436, 0);
@@ -288,7 +304,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case 302:
- Actor_Set_Targetable(kActorSadik, 0);
+ Actor_Set_Targetable(kActorSadik, false);
return true;
case 303:
@@ -297,7 +313,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case 304:
- Actor_Set_Targetable(kActorSadik, 0);
+ Actor_Set_Targetable(kActorSadik, false);
AI_Countdown_Timer_Reset(kActorSadik, 0);
return true;
@@ -314,10 +330,10 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case 308:
if (Player_Query_Current_Scene() == 102) {
Actor_Force_Stop_Walking(kActorMcCoy);
- Actor_Change_Animation_Mode(kActorSadik, 6);
+ Actor_Change_Animation_Mode(kActorSadik, kAnimationModeCombatAttack);
Sound_Play(12, 100, 0, 0, 50);
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
- Actor_Retired_Here(kActorMcCoy, 6, 6, 1, -1);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
+ Actor_Retired_Here(kActorMcCoy, 6, 6, true, -1);
}
return true;
@@ -357,8 +373,8 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case 413:
- Loop_Actor_Walk_To_XYZ(kActorSadik, -1062.0f, 0.0f, 219.0f, 0, 0, 1, 0);
- Actor_Set_Targetable(kActorSadik, 1);
+ Loop_Actor_Walk_To_XYZ(kActorSadik, -1062.0f, 0.0f, 219.0f, 0, false, true, 0);
+ Actor_Set_Targetable(kActorSadik, true);
Non_Player_Actor_Combat_Mode_On(kActorSadik, kActorCombatStateIdle, true, kActorMcCoy, 9, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, false);
Actor_Set_Goal_Number(kActorSadik, 450);
return true;
@@ -366,49 +382,49 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case 414:
Actor_Put_In_Set(kActorSadik, kSetKP05_KP06);
Actor_Set_At_XYZ(kActorSadik, -961.0f, 0.0f, -778.0f, 150);
- Actor_Set_Targetable(kActorSadik, 1);
+ Actor_Set_Targetable(kActorSadik, true);
return true;
case 415:
- Actor_Says(kActorSadik, 110, 3);
- Actor_Says(kActorMcCoy, 2290, 3);
- Actor_Says(kActorSadik, 310, 3);
- Actor_Says(kActorMcCoy, 2300, 3);
- if (Game_Flag_Query(48)) {
- Actor_Says(kActorSadik, 180, 3);
- Actor_Says(kActorSadik, 190, 3);
- Actor_Says(kActorMcCoy, 2310, 3);
- Actor_Says(kActorSadik, 200, 3);
+ Actor_Says(kActorSadik, 110, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 2290, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 310, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 2300, kAnimationModeTalk);
+ if (Game_Flag_Query(kFlagSadikIsReplicant)) {
+ Actor_Says(kActorSadik, 180, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 190, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 2310, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 200, kAnimationModeTalk);
} else {
- Actor_Says(kActorSadik, 140, 3);
- Actor_Says(kActorSadik, 150, 3);
- Actor_Says(kActorMcCoy, 2305, 3);
- Actor_Says(kActorSadik, 160, 3);
- Actor_Says(kActorSadik, 170, 3);
+ Actor_Says(kActorSadik, 140, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 150, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 2305, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 160, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 170, kAnimationModeTalk);
}
- Actor_Says(kActorMcCoy, 2315, 3);
- Actor_Says(kActorSadik, 210, 3);
- Actor_Says(kActorSadik, 220, 3);
- Actor_Says(kActorSadik, 230, 3);
- Actor_Says(kActorSadik, 240, 3);
- Actor_Says(kActorSadik, 250, 3);
- Actor_Says(kActorSadik, 260, 3);
+ Actor_Says(kActorMcCoy, 2315, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 210, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 220, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 230, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 240, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 250, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 260, kAnimationModeTalk);
Actor_Set_Goal_Number(kActorSadik, 416);
return true;
case 416:
- Loop_Actor_Walk_To_XYZ(kActorSadik, -961.0f, 0.0f, -778.0f, 0, 0, 0, 0);
- Actor_Face_Heading(kActorSadik, 150, 0);
+ Loop_Actor_Walk_To_XYZ(kActorSadik, -961.0f, 0.0f, -778.0f, 0, false, false, 0);
+ Actor_Face_Heading(kActorSadik, 150, false);
return true;
case 417:
- Actor_Face_Actor(kActorSadik, kActorMcCoy, 1);
- Actor_Says(kActorSadik, 320, 3);
- Loop_Actor_Walk_To_XYZ(kActorSadik, -857.0f, 0.0f, -703.0f, 0, 0, 1, 0);
- Actor_Says(kActorMcCoy, 2330, 3);
- Actor_Says(kActorSadik, 330, 3);
- Actor_Says(kActorMcCoy, 2335, 3);
- Actor_Says(kActorSadik, 340, 3);
+ Actor_Face_Actor(kActorSadik, kActorMcCoy, true);
+ Actor_Says(kActorSadik, 320, kAnimationModeTalk);
+ Loop_Actor_Walk_To_XYZ(kActorSadik, -857.0f, 0.0f, -703.0f, 0, false, true, 0);
+ Actor_Says(kActorMcCoy, 2330, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 330, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 2335, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 340, kAnimationModeTalk);
Actor_Set_Goal_Number(kActorSadik, 416);
return true;
@@ -553,7 +569,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
*animation = 328;
_animationFrame = 0;
_animationState = 0;
- Actor_Change_Animation_Mode(kActorSadik, 0);
+ Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle);
}
break;
@@ -564,7 +580,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 7;
*animation = 312;
- Actor_Change_Animation_Mode(kActorSadik, 4);
+ Actor_Change_Animation_Mode(kActorSadik, kAnimationModeCombatIdle);
}
break;
@@ -575,7 +591,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 7;
*animation = 312;
- Actor_Change_Animation_Mode(kActorSadik, 4);
+ Actor_Change_Animation_Mode(kActorSadik, kAnimationModeCombatIdle);
}
break;
@@ -632,7 +648,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 7;
*animation = 312;
- Actor_Change_Animation_Mode(kActorSadik, 4);
+ Actor_Change_Animation_Mode(kActorSadik, kAnimationModeCombatIdle);
}
break;
@@ -695,7 +711,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
*animation = 328;
_animationFrame = 0;
_animationState = 0;
- Actor_Change_Animation_Mode(kActorSadik, 0);
+ Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle);
}
break;
@@ -726,7 +742,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
*animation = 328;
_animationFrame = 0;
_animationState = 0;
- Actor_Change_Animation_Mode(kActorSadik, 0);
+ Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle);
}
break;
@@ -737,7 +753,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
*animation = 328;
_animationFrame = 0;
_animationState = 0;
- Actor_Change_Animation_Mode(kActorSadik, 0);
+ Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle);
}
break;
@@ -763,7 +779,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
_var1 = 221;
}
if (_animationFrame == 6) {
- Actor_Change_Animation_Mode(0, 21);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeHit);
}
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
@@ -771,7 +787,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 0;
- Actor_Change_Animation_Mode(kActorSadik, 0);
+ Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle);
if (Actor_Query_Goal_Number(kActorSadik) == 105) {
Actor_Change_Animation_Mode(kActorSadik, 63);
}
@@ -783,10 +799,10 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
_animationFrame++;
if (_animationFrame == 4) {
if (Actor_Query_Goal_Number(kActorSadik) == 105) {
- Actor_Change_Animation_Mode(0, 48);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
_var1 = 222;
} else {
- Actor_Change_Animation_Mode(0, 68);
+ Actor_Change_Animation_Mode(kActorMcCoy, 68);
_var1 = 223;
}
}
@@ -795,7 +811,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
*animation = 328;
_animationFrame = 0;
_animationState = 0;
- Actor_Change_Animation_Mode(kActorSadik, 0);
+ Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle);
if (Actor_Query_Goal_Number(kActorSadik) == 105) {
AI_Movement_Track_Flush(kActorSadik);
AI_Movement_Track_Append(kActorSadik, 318, 0);
@@ -995,7 +1011,9 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
break;
case 62:
- if (Actor_Query_Goal_Number(kActorSadik) != 105 && Actor_Query_Goal_Number(kActorSadik) != 106) {
+ if (Actor_Query_Goal_Number(kActorSadik) != 105
+ && Actor_Query_Goal_Number(kActorSadik) != 106
+ ) {
_animationState = 31;
_animationFrame = 0;
} else {
@@ -1005,7 +1023,9 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
break;
case 63:
- if (Actor_Query_Goal_Number(kActorSadik) != 105 && Actor_Query_Goal_Number(kActorSadik) != 106) {
+ if (Actor_Query_Goal_Number(kActorSadik) != 105
+ && Actor_Query_Goal_Number(kActorSadik) != 106
+ ) {
_animationState = 30;
_animationFrame = 2;
} else {
diff --git a/engines/bladerunner/script/ai/sebastian.cpp b/engines/bladerunner/script/ai/sebastian.cpp
index b6a9b50..2d8bec2 100644
--- a/engines/bladerunner/script/ai/sebastian.cpp
+++ b/engines/bladerunner/script/ai/sebastian.cpp
@@ -40,8 +40,11 @@ void AIScriptSebastian::Initialize() {
}
bool AIScriptSebastian::Update() {
- if (Actor_Query_Goal_Number(kActorSebastian) < 200 && Global_Variable_Query(kVariableChapter) == 3)
+ if (Actor_Query_Goal_Number(kActorSebastian) < 200
+ && Global_Variable_Query(kVariableChapter) == 3
+ ) {
Actor_Set_Goal_Number(kActorSebastian, 200);
+ }
return false;
}
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index 637d3b0..9c7d51f 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -150,8 +150,9 @@ bool AIScriptSteele::Update() {
return true;
}
- if (Actor_Query_Goal_Number(kActorSteele) != 271) {
+ if (Actor_Query_Goal_Number(kActorSteele) == 271) {
Actor_Set_Goal_Number(kActorSteele, 270);
+ return true;
}
break;
diff --git a/engines/bladerunner/script/scene/bb01.cpp b/engines/bladerunner/script/scene/bb01.cpp
index 47734a4..f78cd72 100644
--- a/engines/bladerunner/script/scene/bb01.cpp
+++ b/engines/bladerunner/script/scene/bb01.cpp
@@ -26,11 +26,11 @@ namespace BladeRunner {
void SceneScriptBB01::InitializeScene() {
if (Game_Flag_Query(kFlagDR02toBB01)) {
- Setup_Scene_Information(-253.0f, 9.0f, 715.0f, 266);
+ Setup_Scene_Information(-253.0f, 9.0f, 715.0f, 266);
} else if (Game_Flag_Query(kFlagBB02toBB01)) {
- Setup_Scene_Information(-128.0f, 9.0f, 342.0f, 266);
+ Setup_Scene_Information(-128.0f, 9.0f, 342.0f, 266);
} else {
- Setup_Scene_Information(43.0f, 0.0f, 1058.0f, 0);
+ Setup_Scene_Information( 43.0f, 0.0f, 1058.0f, 0);
}
Scene_Exit_Add_2D_Exit(0, 0, 0, 72, 299, 3);
diff --git a/engines/bladerunner/script/scene/bb02.cpp b/engines/bladerunner/script/scene/bb02.cpp
index 8ebecee..f07a37a 100644
--- a/engines/bladerunner/script/scene/bb02.cpp
+++ b/engines/bladerunner/script/scene/bb02.cpp
@@ -141,6 +141,7 @@ void SceneScriptBB02::SceneFrameAdvanced(int frame) {
if (frame == 1) {
Ambient_Sounds_Play_Sound(434, 40, -50, -50, 0);
}
+
if (frame == 124) {
Ambient_Sounds_Play_Sound(434, 40, -50, -50, 0);
}
@@ -151,10 +152,10 @@ void SceneScriptBB02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptBB02::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagBB03toBB02)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 86.0f, -415.06f, 174.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 86.0f, -415.06f, 174.0f, 0, false, false, 0);
Game_Flag_Reset(kFlagBB03toBB02);
} else if (Game_Flag_Query(kFlagBB04toBB02)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 35.0f, -415.06f, -27.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 35.0f, -415.06f, -27.0f, 0, false, false, 0);
Player_Gains_Control();
Game_Flag_Reset(kFlagBB04toBB02);
}
diff --git a/engines/bladerunner/script/scene/bb03.cpp b/engines/bladerunner/script/scene/bb03.cpp
index b21fcd3..de7c368 100644
--- a/engines/bladerunner/script/scene/bb03.cpp
+++ b/engines/bladerunner/script/scene/bb03.cpp
@@ -28,7 +28,7 @@ void SceneScriptBB03::InitializeScene() {
Setup_Scene_Information(20.0f, 60.16f, 0.0f, 0);
Game_Flag_Reset(kFlagBB02toBB03);
if (Game_Flag_Query(kFlagBB04toBB03)) {
- Setup_Scene_Information(176.0f, 60.16f, 0.0f, 900);
+ Setup_Scene_Information(176.0f, 60.16f, 0.0f, 900);
}
if (Game_Flag_Query(kFlagBB05toBB03)) {
Setup_Scene_Information(204.0f, 60.16f, -164.0f, 740);
diff --git a/engines/bladerunner/script/scene/bb04.cpp b/engines/bladerunner/script/scene/bb04.cpp
index ab935ad..6ac7a7e 100644
--- a/engines/bladerunner/script/scene/bb04.cpp
+++ b/engines/bladerunner/script/scene/bb04.cpp
@@ -26,10 +26,10 @@ namespace BladeRunner {
void SceneScriptBB04::InitializeScene() {
if (Game_Flag_Query(kFlagBB03toBB04)) {
- Setup_Scene_Information(-107.0f, -26.6f, 397.0f, 29);
+ Setup_Scene_Information(-107.0f, -26.6f, 397.0f, 29);
Game_Flag_Reset(kFlagBB03toBB04);
} else {
- Setup_Scene_Information(-15.0f, -25.17f, 45.0f, 691);
+ Setup_Scene_Information( -15.0f, -25.17f, 45.0f, 691);
}
Scene_Exit_Add_2D_Exit(0, 218, 102, 360, 254, 1);
diff --git a/engines/bladerunner/script/scene/bb05.cpp b/engines/bladerunner/script/scene/bb05.cpp
index cf78829..ef3e5ba 100644
--- a/engines/bladerunner/script/scene/bb05.cpp
+++ b/engines/bladerunner/script/scene/bb05.cpp
@@ -60,9 +60,9 @@ void SceneScriptBB05::InitializeScene() {
Ambient_Sounds_Add_Sound( 73, 5, 80, 14, 14, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound( 74, 5, 80, 14, 14, -100, 100, -101, -101, 0, 0);
- if (!Game_Flag_Query(495)) {
- Overlay_Play("BB05OVER", 0, false, false, 0);
- Game_Flag_Set(495);
+ if (!Game_Flag_Query(kFlagBB05Entered)) {
+ Overlay_Play("BB05OVER", 0, false, false, 0); // Sadik's shadow in lower left corner
+ Game_Flag_Set(kFlagBB05Entered);
}
}
@@ -180,7 +180,7 @@ void SceneScriptBB05::PlayerWalkedIn() {
Actor_Says(kActorMcCoy, 7040, 14);
Actor_Says(kActorSebastian, 180, 16);
Actor_Says(kActorMcCoy, 7045, 14);
- if (Game_Flag_Query(399)) {
+ if (Game_Flag_Query(kFlagGeneralDollShot)) {
Actor_Says(kActorSebastian, 190, 15);
Actor_Says(kActorMcCoy, 7050, 17);
Actor_Says(kActorSebastian, 200, 16);
diff --git a/engines/bladerunner/script/scene/bb06.cpp b/engines/bladerunner/script/scene/bb06.cpp
index 51fc0db..8dca747 100644
--- a/engines/bladerunner/script/scene/bb06.cpp
+++ b/engines/bladerunner/script/scene/bb06.cpp
@@ -33,7 +33,7 @@ void SceneScriptBB06::InitializeScene() {
Setup_Scene_Information(-115.0f, 0.0f, -103.0f, 375);
Game_Flag_Reset(kFlagBB07toBB06);
} else {
- Setup_Scene_Information(-37.0f, 0.0f, 178.0f, 0);
+ Setup_Scene_Information( -37.0f, 0.0f, 178.0f, 0);
}
Scene_Exit_Add_2D_Exit(0, 0, 43, 14, 478, 3);
@@ -64,15 +64,16 @@ void SceneScriptBB06::InitializeScene() {
} else {
Scene_Loop_Set_Default(1);
}
- if (Game_Flag_Query(410)) {
- Overlay_Play("BB06OVER", 1, true, false, 0);
+
+ if (Game_Flag_Query(kFlagBB06AndroidDestroyed)) {
+ Overlay_Play("BB06OVER", 1, true, false, 0); // TODO: check, it's is playing while the background is still panning so it looks pretty weird
}
}
void SceneScriptBB06::SceneLoaded() {
Obstacle_Object("V2CHESSTBL01", true);
Clickable_Object("BOX31");
- Item_Add_To_World(77, 931, kSetBB02_BB04_BB06_BB51, -127.0f, 68.42f, 57.0f, 0, 8, 8, true, true, false, true);
+ Item_Add_To_World(kItemBB06ControlBox, 931, kSetBB02_BB04_BB06_BB51, -127.0f, 68.42f, 57.0f, 0, 8, 8, true, true, false, true);
}
bool SceneScriptBB06::MouseClick(int x, int y) {
@@ -83,7 +84,7 @@ bool SceneScriptBB06::ClickedOn3DObject(const char *objectName, bool a2) {
if (Object_Query_Click("BOX31", objectName)) {
if (!Loop_Actor_Walk_To_Scene_Object(kActorMcCoy, "BOX31", 24, true, false)) {
Actor_Face_Object(kActorMcCoy, "BOX31", true);
- if (Game_Flag_Query(410)) {
+ if (Game_Flag_Query(kFlagBB06AndroidDestroyed)) {
Actor_Voice_Over(60, kActorVoiceOver);
Actor_Voice_Over(70, kActorVoiceOver);
} else {
@@ -99,11 +100,11 @@ bool SceneScriptBB06::ClickedOnActor(int actorId) {
}
bool SceneScriptBB06::ClickedOnItem(int itemId, bool a2) {
- if (itemId == 77) {
+ if (itemId == kItemBB06ControlBox) {
if (Player_Query_Combat_Mode()) {
Overlay_Play("BB06OVER", 1, true, true, 0);
- Game_Flag_Set(410);
- Item_Remove_From_World(77);
+ Game_Flag_Set(kFlagBB06AndroidDestroyed);
+ Item_Remove_From_World(kItemBB06ControlBox);
return true;
}
}
diff --git a/engines/bladerunner/script/scene/bb07.cpp b/engines/bladerunner/script/scene/bb07.cpp
index 37bf9b5..060ae28 100644
--- a/engines/bladerunner/script/scene/bb07.cpp
+++ b/engines/bladerunner/script/scene/bb07.cpp
@@ -28,7 +28,7 @@ void SceneScriptBB07::InitializeScene() {
if (Game_Flag_Query(kFlagBB12toBB07)) {
Setup_Scene_Information(-655.0f, 252.59f, -1136.0f, 323);
} else if (Game_Flag_Query(kFlagBB06toBB07)) {
- Setup_Scene_Information(-551.0f, 252.59f, -1004.0f, 29);
+ Setup_Scene_Information(-551.0f, 252.59f, -1004.0f, 29);
Game_Flag_Reset(kFlagBB06toBB07);
} else {
Setup_Scene_Information(-652.0f, 252.59f, -1018.0f, 268);
@@ -37,6 +37,7 @@ void SceneScriptBB07::InitializeScene() {
Scene_Exit_Add_2D_Exit(0, 0, 16, 51, 426, 3);
Scene_Exit_Add_2D_Exit(1, 124, 101, 172, 305, 3);
Scene_Exit_Add_2D_Exit(2, 282, 408, 476, 479, 2);
+
Scene_2D_Region_Add(0, 308, 283, 354, 308);
Ambient_Sounds_Add_Looping_Sound(332, 44, 0, 1);
@@ -69,15 +70,19 @@ bool SceneScriptBB07::MouseClick(int x, int y) {
bool SceneScriptBB07::ClickedOn3DObject(const char *objectName, bool a2) {
if (Object_Query_Click("PRINTER", objectName)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -472.63f, 252.59f, -1086.81f, 0, 0, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -472.63f, 252.59f, -1086.81f, 0, false, false, 0)) {
Actor_Face_Object(kActorMcCoy, "PRINTER", true);
- if (Game_Flag_Query(396) && !Game_Flag_Query(398)) {
+ if ( Game_Flag_Query(kFlagBB07ElectricityOn)
+ && !Game_Flag_Query(kFlagBB07PrinterChecked)
+ ) {
Actor_Voice_Over(130, kActorVoiceOver);
Item_Pickup_Spin_Effect(941, 439, 242);
Actor_Voice_Over(140, kActorVoiceOver);
- Game_Flag_Set(398);
+ Game_Flag_Set(kFlagBB07PrinterChecked);
Actor_Clue_Acquire(kActorMcCoy, kClueDNASebastian, true, -1);
- } else if (Game_Flag_Query(396) && Game_Flag_Query(398)) {
+ } else if (Game_Flag_Query(kFlagBB07ElectricityOn)
+ && Game_Flag_Query(kFlagBB07PrinterChecked)
+ ) {
Actor_Face_Object(kActorMcCoy, "PRINTER", true);
Actor_Says(kActorMcCoy, 8570, 13);
} else {
@@ -94,10 +99,10 @@ bool SceneScriptBB07::ClickedOnActor(int actorId) {
}
bool SceneScriptBB07::ClickedOnItem(int itemId, bool a2) {
- if (itemId == 83) {
- if (!Loop_Actor_Walk_To_Item(kActorMcCoy, 83, 36, 1, false)) {
+ if (itemId == 83) { // this item is never added to this set/scene
+ if (!Loop_Actor_Walk_To_Item(kActorMcCoy, 83, 36, true, false)) {
Actor_Face_Item(kActorMcCoy, 83, true);
- if (Game_Flag_Query(396) == 1) {
+ if (Game_Flag_Query(kFlagBB07ElectricityOn)) {
Actor_Voice_Over(150, kActorVoiceOver);
Actor_Voice_Over(160, kActorVoiceOver);
Actor_Voice_Over(170, kActorVoiceOver);
@@ -109,7 +114,7 @@ bool SceneScriptBB07::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptBB07::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -615.0f, 252.59f, -1018.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -615.0f, 252.59f, -1018.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Overlay_Remove("BB07OVER");
@@ -118,8 +123,9 @@ bool SceneScriptBB07::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -619.0f, 252.59f, -1136.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -619.0f, 252.59f, -1136.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Overlay_Remove("BB07OVER");
@@ -128,8 +134,9 @@ bool SceneScriptBB07::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -551.0f, 252.59f, -1004.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -551.0f, 252.59f, -1004.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Overlay_Remove("BB07OVER");
@@ -143,18 +150,18 @@ bool SceneScriptBB07::ClickedOnExit(int exitId) {
bool SceneScriptBB07::ClickedOn2DRegion(int region) {
if (region == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -568.63f, 252.59f, -1114.81f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -568.63f, 252.59f, -1114.81f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 229, false);
- if (Game_Flag_Query(396)) {
- Actor_Says(kActorMcCoy, 8585, 15);
- } else {
+ if (!Game_Flag_Query(kFlagBB07ElectricityOn)) {
Ambient_Sounds_Play_Sound(592, 40, 20, 20, 99);
- Overlay_Play("BB07OVER", 1, 0, 1, 0);
- Overlay_Play("BB07OVER", 2, 1, 0, 0);
- Game_Flag_Set(396);
- if (!Game_Flag_Query(398)) {
- Actor_Says(kActorAnsweringMachine, 0, 3);
+ Overlay_Play("BB07OVER", 1, false, true, 0);
+ Overlay_Play("BB07OVER", 2, true, false, 0);
+ Game_Flag_Set(kFlagBB07ElectricityOn);
+ if (!Game_Flag_Query(kFlagBB07PrinterChecked)) {
+ Actor_Says(kActorAnsweringMachine, 0, kAnimationModeTalk);
}
+ } else {
+ Actor_Says(kActorMcCoy, 8585, 15);
}
}
}
@@ -169,11 +176,12 @@ void SceneScriptBB07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptBB07::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagBB05toBB07)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -594.0f, 252.59f, -1018.0f, 6, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -594.0f, 252.59f, -1018.0f, 6, false, false, 0);
Game_Flag_Reset(kFlagBB05toBB07);
}
+
if (Game_Flag_Query(kFlagBB12toBB07)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -602.0f, 252.59f, -1124.0f, 6, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -602.0f, 252.59f, -1124.0f, 6, false, false, 0);
Game_Flag_Reset(kFlagBB12toBB07);
}
}
diff --git a/engines/bladerunner/script/scene/bb08.cpp b/engines/bladerunner/script/scene/bb08.cpp
index 7dc951e..7c856db 100644
--- a/engines/bladerunner/script/scene/bb08.cpp
+++ b/engines/bladerunner/script/scene/bb08.cpp
@@ -30,29 +30,32 @@ void SceneScriptBB08::InitializeScene() {
} else {
Setup_Scene_Information(247.0f, 0.0f, 27.0f, 790);
}
- Scene_Exit_Add_2D_Exit(0, 307, 0, 361, 238, 0);
+
+ Scene_Exit_Add_2D_Exit(0, 307, 0, 361, 238, 0);
Scene_Exit_Add_2D_Exit(1, 117, 38, 214, 245, 0);
+
Ambient_Sounds_Add_Looping_Sound(105, 44, 0, 1);
- Ambient_Sounds_Add_Sound(291, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(292, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(293, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(294, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(295, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(291, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(292, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(293, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(294, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(295, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0);
Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- if (!Game_Flag_Query(496)) {
- Overlay_Play("BB08OVER", 0, 0, 0, 0);
- Game_Flag_Set(496);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+
+ if (!Game_Flag_Query(kFlagBB08Entered)) {
+ Overlay_Play("BB08OVER", 0, false, false, 0); // Sadik's shadow going up
+ Game_Flag_Set(kFlagBB08Entered);
}
}
@@ -80,10 +83,10 @@ bool SceneScriptBB08::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptBB08::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 204.0f, 0.1f, 94.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 204.0f, 0.1f, 94.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 256, false);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Ladder(kActorMcCoy, 8, 1, 0);
+ Loop_Actor_Travel_Ladder(kActorMcCoy, 8, true, 0);
Footstep_Sound_Override_Off();
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
@@ -92,11 +95,12 @@ bool SceneScriptBB08::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 247.0f, 0.1f, 27.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 247.0f, 0.1f, 27.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(506);
+ Game_Flag_Set(kFlagBB08toBB12);
Set_Enter(kSetBB12, kSceneBB12);
}
return true;
@@ -118,12 +122,12 @@ void SceneScriptBB08::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagBB09toBB08)) {
Actor_Set_At_XYZ(kActorMcCoy, 204.0f, 96.1f, 94.0f, 256);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Ladder(kActorMcCoy, 8, 0, 0);
+ Loop_Actor_Travel_Ladder(kActorMcCoy, 8, false, 0);
Footstep_Sound_Override_Off();
Actor_Face_Heading(kActorMcCoy, 768, false);
Game_Flag_Reset(kFlagBB09toBB08);
} else {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 188.0f, 0.1f, 28.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 188.0f, 0.1f, 28.0f, 0, false, false, 0);
}
}
diff --git a/engines/bladerunner/script/scene/bb09.cpp b/engines/bladerunner/script/scene/bb09.cpp
index 15d4919..ffe0fd0 100644
--- a/engines/bladerunner/script/scene/bb09.cpp
+++ b/engines/bladerunner/script/scene/bb09.cpp
@@ -33,27 +33,30 @@ void SceneScriptBB09::InitializeScene() {
Game_Flag_Reset(kFlagBB08toBB09);
Setup_Scene_Information(107.45f, -9.14f, 166.0f, 244);
}
+
Scene_Exit_Add_2D_Exit(0, 224, 213, 286, 353, 1);
- Scene_Exit_Add_2D_Exit(1, 75, 450, 480, 479, 2);
- Ambient_Sounds_Add_Looping_Sound(54, 20, 100, 1);
- Ambient_Sounds_Add_Looping_Sound(103, 40, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(105, 50, 55, 1);
- Ambient_Sounds_Add_Sound(297, 5, 20, 20, 25, -100, -100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(298, 5, 20, 20, 25, -100, -100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(299, 5, 20, 20, 25, -100, -100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Actor_Set_Targetable(kActorSadik, true);
+ Scene_Exit_Add_2D_Exit(1, 75, 450, 480, 479, 2);
+
+ Ambient_Sounds_Add_Looping_Sound(54, 20, 100, 1);
+ Ambient_Sounds_Add_Looping_Sound(103, 40, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound(105, 50, 55, 1);
+ Ambient_Sounds_Add_Sound(297, 5, 20, 20, 25, -100, -100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(298, 5, 20, 20, 25, -100, -100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(299, 5, 20, 20, 25, -100, -100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+
+ Actor_Set_Targetable(kActorSadik, true); // Don't kill Sadik yet, game cannot continue, a bug?
}
void SceneScriptBB09::SceneLoaded() {
@@ -80,8 +83,8 @@ bool SceneScriptBB09::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptBB09::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 454.56f, -9.0f, 190.31f, 0, 1, false, 0)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 450.56f, -9.0f, 250.31f, 0, 0, false, 0);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 454.56f, -9.0f, 190.31f, 0, true, false, 0)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 450.56f, -9.0f, 250.31f, 0, false, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagBB09toBB10a);
@@ -90,8 +93,9 @@ bool SceneScriptBB09::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 71.0f, -9.0f, 136.0f, 72, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 71.0f, -9.0f, 136.0f, 72, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagBB09toBB08);
diff --git a/engines/bladerunner/script/scene/bb10.cpp b/engines/bladerunner/script/scene/bb10.cpp
index 6ae671c..7e7fd78 100644
--- a/engines/bladerunner/script/scene/bb10.cpp
+++ b/engines/bladerunner/script/scene/bb10.cpp
@@ -26,50 +26,54 @@ namespace BladeRunner {
void SceneScriptBB10::InitializeScene() {
if (Game_Flag_Query(kFlagBB11toBB10)) {
- Setup_Scene_Information(255.29f, 90.24f, -103.0f, 830);
+ Setup_Scene_Information(255.29f, 90.24f, -103.0f, 830);
} else if (Game_Flag_Query(kFlagBB09toBB10b)) {
Game_Flag_Reset(kFlagBB09toBB10b);
- Setup_Scene_Information(151.67f, 66.84f, -313.06f, 0);
+ Setup_Scene_Information(151.67f, 66.84f, -313.06f, 0);
} else {
- Setup_Scene_Information(199.67f, 67.4f, -169.06f, 628);
+ Setup_Scene_Information(199.67f, 67.4f, -169.06f, 628);
}
- if (Global_Variable_Query(36) > 2) {
+
+ if (Global_Variable_Query(kVariableBB10ShelvesAvailable) > 2) {
Scene_Exit_Add_2D_Exit(0, 281, 0, 531, 115, 0);
}
+
Scene_Exit_Add_2D_Exit(1, 58, 91, 193, 401, 3);
+
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Add_Looping_Sound(382, 76, 0, 1);
Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- if (!Game_Flag_Query(466)) {
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+
+ if (!Game_Flag_Query(kFlagBB10Shelf1Available)) {
Scene_2D_Region_Add(0, 458, 99, 522, 133);
- Overlay_Play("BB10OVR1", 0, 1, 0, 0);
+ Overlay_Play("BB10OVR1", 0, true, false, 0);
}
- if (!Game_Flag_Query(467)) {
+ if (!Game_Flag_Query(kFlagBB10Shelf2Available)) {
Scene_2D_Region_Add(1, 459, 164, 522, 193);
- Overlay_Play("BB10OVR2", 0, 1, 0, 0);
+ Overlay_Play("BB10OVR2", 0, true, false, 0);
}
- if (!Game_Flag_Query(468)) {
+ if (!Game_Flag_Query(kFlagBB10Shelf3Available)) {
Scene_2D_Region_Add(2, 458, 194, 522, 223);
- Overlay_Play("BB10OVR3", 0, 1, 0, 0);
+ Overlay_Play("BB10OVR3", 0, true, false, 0);
}
- if (!Game_Flag_Query(469)) {
+ if (!Game_Flag_Query(kFlagBB10Shelf4Available)) {
Scene_2D_Region_Add(3, 458, 255, 522, 278);
- Overlay_Play("BB10OVR4", 0, 1, 0, 0);
+ Overlay_Play("BB10OVR4", 0, true, false, 0);
}
- if (!Game_Flag_Query(470)) {
+ if (!Game_Flag_Query(kFlagBB10Shelf5Available)) {
Scene_2D_Region_Add(4, 458, 316, 522, 335);
- Overlay_Play("BB10OVR5", 0, 1, 0, 0);
+ Overlay_Play("BB10OVR5", 0, true, false, 0);
}
}
@@ -99,14 +103,14 @@ bool SceneScriptBB10::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptBB10::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 225.58f, 67.2f, -102.1f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 225.58f, 67.2f, -102.1f, 0, true, false, 0)) {
Player_Set_Combat_Mode(false);
Actor_Face_Heading(kActorMcCoy, 274, false);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 1, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 2, true, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Ladder(kActorMcCoy, 3, 1, 0);
+ Loop_Actor_Travel_Ladder(kActorMcCoy, 3, true, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
@@ -115,8 +119,11 @@ bool SceneScriptBB10::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 206.01f, 66.84f, -261.62f, 0, 1, false, 0) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 151.67f, 66.84f, -313.06f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 206.01f, 66.84f, -261.62f, 0, true, false, 0)
+ && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 151.67f, 66.84f, -313.06f, 0, true, false, 0)
+ ) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Reset(kFlagBB09toBB10a);
@@ -129,40 +136,43 @@ bool SceneScriptBB10::ClickedOnExit(int exitId) {
}
bool SceneScriptBB10::ClickedOn2DRegion(int region) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 225.58f, 67.2f, -102.1f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 225.58f, 67.2f, -102.1f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 274, false);
Sound_Play(Random_Query(289, 290), 40, 70, 70, 50);
switch (region) {
- case 4:
- Overlay_Remove("BB10OVR5");
- Game_Flag_Set(470);
- Scene_2D_Region_Remove(4);
+ case 0:
+ Overlay_Remove("BB10OVR1");
+ Game_Flag_Set(kFlagBB10Shelf1Available);
+ Scene_2D_Region_Remove(0);
break;
- case 3:
- Overlay_Remove("BB10OVR4");
- Game_Flag_Set(469);
- Scene_2D_Region_Remove(3);
+
+ case 1:
+ Overlay_Remove("BB10OVR2");
+ Game_Flag_Set(kFlagBB10Shelf2Available);
+ Scene_2D_Region_Remove(1);
break;
+
case 2:
Overlay_Remove("BB10OVR3");
- Game_Flag_Set(468);
+ Game_Flag_Set(kFlagBB10Shelf3Available);
Scene_2D_Region_Remove(2);
break;
- case 1:
- Overlay_Remove("BB10OVR2");
- Game_Flag_Set(467);
- Scene_2D_Region_Remove(1);
- break;
- case 0:
- Overlay_Remove("BB10OVR1");
- Game_Flag_Set(466);
- Scene_2D_Region_Remove(0);
+
+ case 3:
+ Overlay_Remove("BB10OVR4");
+ Game_Flag_Set(kFlagBB10Shelf4Available);
+ Scene_2D_Region_Remove(3);
break;
- default:
+
+ case 4:
+ Overlay_Remove("BB10OVR5");
+ Game_Flag_Set(kFlagBB10Shelf5Available);
+ Scene_2D_Region_Remove(4);
break;
}
- Global_Variable_Increment(36, 1);
- if (Global_Variable_Query(36) > 4) {
+
+ Global_Variable_Increment(kVariableBB10ShelvesAvailable, 1);
+ if (Global_Variable_Query(kVariableBB10ShelvesAvailable) > 4) {
Scene_Exit_Add_2D_Exit(0, 281, 0, 531, 115, 0);
}
return false;
@@ -180,17 +190,17 @@ void SceneScriptBB10::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagBB09toBB10a)) {
Player_Loses_Control();
Actor_Set_At_XYZ(kActorMcCoy, 214.01f, 66.84f, -349.62f, 462);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 206.01f, 66.84f, -261.62f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 206.01f, 66.84f, -261.62f, 0, false, false, 0);
Player_Gains_Control();
Game_Flag_Reset(kFlagBB09toBB10a);
} else if (Game_Flag_Query(kFlagBB11toBB10)) {
Actor_Set_At_XYZ(kActorMcCoy, 249.58f, 127.2f, -102.1f, 256);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Ladder(kActorMcCoy, 3, 0, 0);
+ Loop_Actor_Travel_Ladder(kActorMcCoy, 3, false, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Actor_Face_Heading(kActorMcCoy, 768, false);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 0, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 3, false, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Game_Flag_Reset(kFlagBB11toBB10);
}
diff --git a/engines/bladerunner/script/scene/bb11.cpp b/engines/bladerunner/script/scene/bb11.cpp
index 8cb70b7..75e0c60 100644
--- a/engines/bladerunner/script/scene/bb11.cpp
+++ b/engines/bladerunner/script/scene/bb11.cpp
@@ -26,18 +26,20 @@ namespace BladeRunner {
void SceneScriptBB11::InitializeScene() {
Setup_Scene_Information(43.39f, -10.27f, -20.52f, 200);
- if (!Game_Flag_Query(509)) {
+ if (!Game_Flag_Query(kFlagBB11SadikFight)) {
Scene_Exit_Add_2D_Exit(0, 280, 154, 388, 247, 2);
}
+
Ambient_Sounds_Add_Looping_Sound(101, 90, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(99, 45, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound( 99, 45, 0, 1);
Ambient_Sounds_Add_Looping_Sound(100, 76, 0, 1);
- Ambient_Sounds_Add_Sound(68, 5, 180, 16, 25, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(69, 5, 180, 16, 25, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 68, 5, 180, 16, 25, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 69, 5, 180, 16, 25, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0);
- if (Game_Flag_Query(509)) {
+
+ if (Game_Flag_Query(kFlagBB11SadikFight)) {
Preload(19);
Preload(220);
Preload(227);
@@ -56,7 +58,7 @@ void SceneScriptBB11::InitializeScene() {
void SceneScriptBB11::SceneLoaded() {
Obstacle_Object("X2AIRCON01", true);
Unclickable_Object("X2AIRCON01");
- if (Game_Flag_Query(509)) {
+ if (Game_Flag_Query(kFlagBB11SadikFight)) {
Unobstacle_Object("X2PIPES01", true);
Unobstacle_Object("X2PIPES02", true);
Unobstacle_Object("X2PIPES03", true);
@@ -99,8 +101,10 @@ bool SceneScriptBB11::ClickedOn2DRegion(int region) {
}
void SceneScriptBB11::SceneFrameAdvanced(int frame) {
- if (Actor_Query_Goal_Number(kActorSadik) == 105 && !Game_Flag_Query(375)) {
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
+ if ( Actor_Query_Goal_Number(kActorSadik) == 105
+ && !Game_Flag_Query(375)
+ ) {
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
Game_Flag_Set(375);
} else {
if (frame == 1) {
@@ -113,7 +117,9 @@ void SceneScriptBB11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptBB11::PlayerWalkedIn() {
- if (Actor_Query_Goal_Number(kActorSadik) == 102 && Global_Variable_Query(kVariableChapter) == 2) {
+ if (Actor_Query_Goal_Number(kActorSadik) == 102
+ && Global_Variable_Query(kVariableChapter) == 2
+ ) {
Actor_Set_Invisible(kActorMcCoy, true);
Actor_Set_Goal_Number(kActorSadik, 103);
Music_Play(11, 61, 0, 1, -1, 0, 0);
diff --git a/engines/bladerunner/script/scene/bb12.cpp b/engines/bladerunner/script/scene/bb12.cpp
index 7f7f1d9..6667380 100644
--- a/engines/bladerunner/script/scene/bb12.cpp
+++ b/engines/bladerunner/script/scene/bb12.cpp
@@ -26,34 +26,37 @@ namespace BladeRunner {
void SceneScriptBB12::InitializeScene() {
if (Game_Flag_Query(kFlagBB07toBB12)) {
- Setup_Scene_Information(138.0f, 0.0f, 104.0f, 760);
- } else if (Game_Flag_Query(506)) {
- Setup_Scene_Information(-129.0f, 0.0f, 64.0f, 307);
+ Setup_Scene_Information( 138.0f, 0.0f, 104.0f, 760);
+ } else if (Game_Flag_Query(kFlagBB08toBB12)) {
+ Setup_Scene_Information(-129.0f, 0.0f, 64.0f, 307);
} else {
- Setup_Scene_Information(54.0f, 0.0f, 200.0f, 0);
+ Setup_Scene_Information( 54.0f, 0.0f, 200.0f, 0);
Game_Flag_Reset(kFlagBB05toBB12);
}
- Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3);
- Scene_Exit_Add_2D_Exit(1, 589, 0, 639, 479, 1);
+
+ Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3);
+ Scene_Exit_Add_2D_Exit(1, 589, 0, 639, 479, 1);
Scene_Exit_Add_2D_Exit(2, 377, 374, 533, 479, 2);
+
Ambient_Sounds_Add_Looping_Sound(103, 28, 0, 1);
Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(306, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(307, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(308, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(309, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(310, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(306, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(307, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(308, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(309, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(310, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
- if (!Game_Flag_Query(497)) {
- Overlay_Play("BB12OVER", 0, 0, 0, 0);
- Game_Flag_Set(497);
+
+ if (!Game_Flag_Query(kFlagBB12Entered)) {
+ Overlay_Play("BB12OVER", 0, false, false, 0); // Sadik's shadow going left
+ Game_Flag_Set(kFlagBB12Entered);
}
}
@@ -80,16 +83,17 @@ bool SceneScriptBB12::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptBB12::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -129.0f, 0.0f, 64.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -129.0f, 0.0f, 64.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(507);
+ Game_Flag_Set(kFlagBB12toBB08);
Set_Enter(kSetBB08, kSceneBB08);
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 138.0f, 0.0f, 104.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 138.0f, 0.0f, 104.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagBB12toBB07);
@@ -97,8 +101,9 @@ bool SceneScriptBB12::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 54.0f, 0.0f, 200.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 54.0f, 0.0f, 200.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagBB12toBB05);
@@ -114,9 +119,14 @@ bool SceneScriptBB12::ClickedOn2DRegion(int region) {
}
void SceneScriptBB12::SceneFrameAdvanced(int frame) {
- if (frame == 10 || frame == 22 || frame == 33 || frame == 41) {
+ if (frame == 10
+ || frame == 22
+ || frame == 33
+ || frame == 41
+ ) {
Sound_Play(311, 17, -30, -30, 50);
}
+
if (frame == 3) {
Sound_Play(313, 16, -30, -30, 50);
}
@@ -127,11 +137,11 @@ void SceneScriptBB12::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptBB12::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagBB07toBB12)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 114.0f, 0.0f, 104.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 114.0f, 0.0f, 104.0f, 0, false, false, 0);
Game_Flag_Reset(kFlagBB07toBB12);
- } else if (Game_Flag_Query(506)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -101.0f, 0.0f, 64.0f, 0, 0, false, 0);
- Game_Flag_Reset(506);
+ } else if (Game_Flag_Query(kFlagBB08toBB12)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -101.0f, 0.0f, 64.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagBB08toBB12);
}
}
diff --git a/engines/bladerunner/script/scene/bb51.cpp b/engines/bladerunner/script/scene/bb51.cpp
index a28f669..d53a8d7 100644
--- a/engines/bladerunner/script/scene/bb51.cpp
+++ b/engines/bladerunner/script/scene/bb51.cpp
@@ -27,22 +27,25 @@ namespace BladeRunner {
void SceneScriptBB51::InitializeScene() {
Setup_Scene_Information(101.0f, 0.0f, -25.0f, 152);
Game_Flag_Reset(kFlagBB06toBB51);
- Scene_Exit_Add_2D_Exit(0, 615, 0, 639, 479, 1);
- Scene_Exit_Add_2D_Exit(1, 0, 323, 241, 479, 2);
+
+ Scene_Exit_Add_2D_Exit(0, 615, 0, 639, 479, 1);
+ Scene_Exit_Add_2D_Exit(1, 0, 323, 241, 479, 2);
+
Ambient_Sounds_Add_Looping_Sound(103, 28, 0, 1);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Scene_Loop_Start_Special(0, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
Scene_Loop_Set_Default(1);
}
@@ -62,6 +65,7 @@ bool SceneScriptBB51::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Voice_Over(80, kActorVoiceOver);
Actor_Voice_Over(90, kActorVoiceOver);
}
+
if (Object_Query_Click("TOP02", objectName)) {
Actor_Face_Object(kActorMcCoy, "TOP02", true);
Actor_Voice_Over(100, kActorVoiceOver);
@@ -89,6 +93,7 @@ bool SceneScriptBB51::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 55.0f, 0.0f, -96.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
diff --git a/engines/bladerunner/script/scene/ct08.cpp b/engines/bladerunner/script/scene/ct08.cpp
index 5dc6861..eb1aea0 100644
--- a/engines/bladerunner/script/scene/ct08.cpp
+++ b/engines/bladerunner/script/scene/ct08.cpp
@@ -25,7 +25,7 @@
namespace BladeRunner {
void SceneScriptCT08::InitializeScene() {
- if (Game_Flag_Query(679)) {
+ if (Game_Flag_Query(kFlagChapter3Intro)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Outtake_Play(kOuttakeMovieB1, false, -1);
@@ -37,35 +37,40 @@ void SceneScriptCT08::InitializeScene() {
Outtake_Play(kOuttakeMovieB4, false, -1);
}
Outtake_Play(kOuttakeMovieB5, false, -1);
- Game_Flag_Reset(679);
+ Game_Flag_Reset(kFlagChapter3Intro);
}
Actor_Force_Stop_Walking(kActorMcCoy);
- if (Game_Flag_Query(380)) {
- Setup_Scene_Information(-11.0f, 0.0f, -156.0f, 769);
+
+ if (Game_Flag_Query(kFlagCT51toCT08)) {
+ Setup_Scene_Information( -11.0f, 0.0f, -156.0f, 769);
} else if (Game_Flag_Query(kFlagCT06toCT08)) {
- Setup_Scene_Information(-143.0f, 0.0f, -92.0f, 420);
+ Setup_Scene_Information(-143.0f, 0.0f, -92.0f, 420);
} else {
- Setup_Scene_Information(-183.0f, 0.0f, 128.0f, 205);
+ Setup_Scene_Information(-183.0f, 0.0f, 128.0f, 205);
}
- Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3);
- Scene_Exit_Add_2D_Exit(1, 389, 0, 639, 303, 0);
+
+ Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3);
+ Scene_Exit_Add_2D_Exit(1, 389, 0, 639, 303, 0);
Scene_Exit_Add_2D_Exit(2, 115, 87, 137, 267, 3);
- if (Game_Flag_Query(550)) {
+
+ if (Game_Flag_Query(kFlagMcCoyTiedDown)) {
Scene_2D_Region_Add(0, 185, 185, 230, 230);
}
+
Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1);
- Ambient_Sounds_Add_Looping_Sound(205, 20, 1, 1);
- Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
+ Ambient_Sounds_Add_Looping_Sound(205, 20, 1, 1);
+ Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
- Ambient_Sounds_Add_Sound(67, 80, 180, 16, 25, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(68, 50, 180, 16, 25, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(379, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(380, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(377, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0);
- if (Game_Flag_Query(380)) {
- Scene_Loop_Start_Special(0, 0, 0);
+ Ambient_Sounds_Add_Sound( 67, 80, 180, 16, 25, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 68, 50, 180, 16, 25, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(379, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(380, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(377, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0);
+
+ if (Game_Flag_Query(kFlagCT51toCT08)) {
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
Scene_Loop_Set_Default(1);
} else {
Scene_Loop_Set_Default(1);
@@ -76,10 +81,10 @@ void SceneScriptCT08::SceneLoaded() {
Obstacle_Object("ASHTRAY", true);
Unobstacle_Object("BLANKET03", true);
if (!Actor_Clue_Query(kActorMcCoy, kClueRagDoll)) {
- Item_Add_To_World(85, 943, 6, 44.0f, 0.0f, -95.0f, 540, 12, 12, false, true, false, true);
+ Item_Add_To_World(kItemRagDoll, 943, kSetCT08_CT51_UG12, 44.0f, 0.0f, -95.0f, 540, 12, 12, false, true, false, true);
}
if (!Actor_Clue_Query(kActorMcCoy, kClueCheese)) {
- Item_Add_To_World(81, 936, 6, -102.0f, 2.0f, 41.0f, 432, 6, 6, false, true, false, true);
+ Item_Add_To_World(kItemCheese, 936, kSetCT08_CT51_UG12, -102.0f, 2.0f, 41.0f, 432, 6, 6, false, true, false, true);
}
}
@@ -96,14 +101,16 @@ bool SceneScriptCT08::ClickedOnActor(int actorId) {
}
bool SceneScriptCT08::ClickedOnItem(int itemId, bool a2) {
- if (itemId == 81) {
- if (!Loop_Actor_Walk_To_Item(kActorMcCoy, 81, 36, 1, false) && !Game_Flag_Query(550)) {
- Actor_Clue_Acquire(kActorMcCoy, kClueCheese, true, -1);
- Item_Pickup_Spin_Effect(936, 266, 328);
- Item_Remove_From_World(81);
- Actor_Voice_Over(480, kActorVoiceOver);
- Actor_Voice_Over(490, kActorVoiceOver);
- Actor_Voice_Over(500, kActorVoiceOver);
+ if (itemId == kItemCheese) {
+ if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemCheese, 36, true, false)) {
+ if (!Game_Flag_Query(kFlagMcCoyTiedDown)) {
+ Actor_Clue_Acquire(kActorMcCoy, kClueCheese, true, -1);
+ Item_Pickup_Spin_Effect(936, 266, 328);
+ Item_Remove_From_World(kItemCheese);
+ Actor_Voice_Over(480, kActorVoiceOver);
+ Actor_Voice_Over(490, kActorVoiceOver);
+ Actor_Voice_Over(500, kActorVoiceOver);
+ }
}
return true;
}
@@ -112,7 +119,7 @@ bool SceneScriptCT08::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptCT08::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -183.0f, 0.0f, 128.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -183.0f, 0.0f, 128.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagCT08toCT09);
@@ -120,18 +127,20 @@ bool SceneScriptCT08::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -11.0f, 0.0f, -156.0f, 0, 1, false, 0)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, 0.0f, -102.0f, 0, 0, false, 0);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -11.0f, 0.0f, -156.0f, 0, true, false, 0)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, 0.0f, -102.0f, 0, false, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(379);
+ Game_Flag_Set(kFlagCT08toCT51);
Set_Enter(kSetCT08_CT51_UG12, kSceneCT51);
}
return true;
}
+
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -143.0f, 0.0f, -92.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -143.0f, 0.0f, -92.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagCT08toCT06);
@@ -144,9 +153,9 @@ bool SceneScriptCT08::ClickedOnExit(int exitId) {
bool SceneScriptCT08::ClickedOn2DRegion(int region) {
if (region == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -108.0f, 0.0f, -178.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -108.0f, 0.0f, -178.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 512, false);
- Game_Flag_Reset(550);
+ Game_Flag_Reset(kFlagMcCoyTiedDown);
Player_Set_Combat_Mode_Access(true);
Scene_Exits_Enable();
Ambient_Sounds_Play_Sound(564, 40, 99, 0, 0);
@@ -165,28 +174,28 @@ void SceneScriptCT08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptCT08::PlayerWalkedIn() {
- if (Game_Flag_Query(550)) {
+ if (Game_Flag_Query(kFlagMcCoyTiedDown)) {
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeTalk);
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle);
Actor_Set_At_XYZ(kActorMcCoy, -148.0f, 0.0f, 4.0f, 256);
Player_Set_Combat_Mode_Access(false);
Scene_Exits_Disable();
- Game_Flag_Reset(380);
+ Game_Flag_Reset(kFlagCT51toCT08);
Game_Flag_Reset(kFlagCT06toCT08);
Autosave_Game(1);
- } else if (Game_Flag_Query(380)) {
- Game_Flag_Reset(380);
+ } else if (Game_Flag_Query(kFlagCT51toCT08)) {
+ Game_Flag_Reset(kFlagCT51toCT08);
} else if (Game_Flag_Query(kFlagCT06toCT08)) {
Game_Flag_Reset(kFlagCT06toCT08);
} else {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -156.0f, 0.0f, 128.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -156.0f, 0.0f, 128.0f, 0, false, false, 0);
Game_Flag_Reset(kFlagCT09toCT08);
}
}
void SceneScriptCT08::PlayerWalkedOut() {
if (!Actor_Clue_Query(kActorMcCoy, kClueRagDoll)) {
- Item_Remove_From_World(85);
+ Item_Remove_From_World(kItemRagDoll);
}
}
diff --git a/engines/bladerunner/script/scene/ct10.cpp b/engines/bladerunner/script/scene/ct10.cpp
index 7b666ef..0bbc6c2 100644
--- a/engines/bladerunner/script/scene/ct10.cpp
+++ b/engines/bladerunner/script/scene/ct10.cpp
@@ -27,7 +27,9 @@ namespace BladeRunner {
void SceneScriptCT10::InitializeScene() {
Setup_Scene_Information(-121.0f, 0.0f, -78.0f, 446);
Game_Flag_Reset(kFlagCT09toCT08); // a bug?
+
Scene_Exit_Add_2D_Exit(0, 135, 74, 238, 340, 0);
+
Ambient_Sounds_Add_Looping_Sound(336, 28, 0, 1);
Ambient_Sounds_Add_Sound(375, 6, 180, 33, 33, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 5, 180, 33, 33, 0, 0, -101, -101, 0, 0);
diff --git a/engines/bladerunner/script/scene/ct51.cpp b/engines/bladerunner/script/scene/ct51.cpp
index 6f44fb0..0c6c1c8 100644
--- a/engines/bladerunner/script/scene/ct51.cpp
+++ b/engines/bladerunner/script/scene/ct51.cpp
@@ -26,15 +26,18 @@ namespace BladeRunner {
void SceneScriptCT51::InitializeScene() {
Setup_Scene_Information(0.0f, 0.0f, -102.0f, 470);
- Game_Flag_Reset(379);
+ Game_Flag_Reset(kFlagCT08toCT51);
+
Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3);
+
Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1);
- Ambient_Sounds_Add_Sound(68, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(69, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 68, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 69, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 60, 180, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0);
- Scene_Loop_Start_Special(0, 0, 0);
+
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
Scene_Loop_Set_Default(1);
}
@@ -42,10 +45,10 @@ void SceneScriptCT51::SceneLoaded() {
Unobstacle_Object("BLANKET03", true);
Clickable_Object("BED02");
if (!Actor_Clue_Query(kActorMcCoy, kClueRagDoll)) {
- Item_Add_To_World(85, 943, 6, 44.0f, 0.0f, -95.0f, 540, 24, 24, false, true, false, true);
+ Item_Add_To_World(kItemRagDoll, 943, kSetCT08_CT51_UG12, 44.0f, 0.0f, -95.0f, 540, 24, 24, false, true, false, true);
}
if (!Actor_Clue_Query(kActorMcCoy, kClueMoonbus1)) {
- Item_Add_To_World(120, 984, 6, 44.0f, 0.0f, -22.0f, 0, 12, 12, false, true, false, true);
+ Item_Add_To_World(kItemMoonbusPhoto, 984, kSetCT08_CT51_UG12, 44.0f, 0.0f, -22.0f, 0, 12, 12, false, true, false, true);
}
}
@@ -55,14 +58,13 @@ bool SceneScriptCT51::MouseClick(int x, int y) {
bool SceneScriptCT51::ClickedOn3DObject(const char *objectName, bool a2) {
if (Object_Query_Click("BED02", objectName)) {
- if (Actor_Clue_Query(kActorMcCoy, kClueHysteriaToken)) {
- Actor_Says(kActorMcCoy, 8580, 12);
- return false;
+ if (!Actor_Clue_Query(kActorMcCoy, kClueHysteriaToken)) {
+ Item_Pickup_Spin_Effect(970, 203, 200);
+ Actor_Clue_Acquire(kActorMcCoy, kClueHysteriaToken, true, -1);
+ Actor_Voice_Over(420, kActorVoiceOver);
+ return true;
}
- Item_Pickup_Spin_Effect(970, 203, 200);
- Actor_Clue_Acquire(kActorMcCoy, kClueHysteriaToken, true, -1);
- Actor_Voice_Over(420, kActorVoiceOver);
- return true;
+ Actor_Says(kActorMcCoy, 8580, 12);
}
return false;
}
@@ -72,18 +74,19 @@ bool SceneScriptCT51::ClickedOnActor(int actorId) {
}
bool SceneScriptCT51::ClickedOnItem(int itemId, bool a2) {
- if (itemId == 85) {
+ if (itemId == kItemRagDoll) {
Actor_Clue_Acquire(kActorMcCoy, kClueRagDoll, true, -1);
Item_Pickup_Spin_Effect(943, 260, 200);
Ambient_Sounds_Play_Sound(563, 40, 99, 0, 0);
- Item_Remove_From_World(85);
+ Item_Remove_From_World(kItemRagDoll);
return true;
}
- if (itemId == 120) {
+
+ if (itemId == kItemMoonbusPhoto) {
Actor_Clue_Acquire(kActorMcCoy, kClueMoonbus1, true, -1);
Item_Pickup_Spin_Effect(984, 490, 307);
- Item_Remove_From_World(120);
- Actor_Says(kActorMcCoy, 8527, 3);
+ Item_Remove_From_World(kItemMoonbusPhoto);
+ Actor_Says(kActorMcCoy, 8527, kAnimationModeTalk);
return true;
}
return false;
@@ -91,11 +94,11 @@ bool SceneScriptCT51::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptCT51::ClickedOnExit(int exitId) {
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, 0.0f, -102.0f, 0, 1, false, 0)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -11.0f, 0.0f, -156.0f, 0, 0, false, 0);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, 0.0f, -102.0f, 0, true, false, 0)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -11.0f, 0.0f, -156.0f, 0, false, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(380);
+ Game_Flag_Set(kFlagCT51toCT08);
Set_Enter(kSetCT08_CT51_UG12, kSceneCT08);
}
return true;
@@ -119,7 +122,7 @@ void SceneScriptCT51::PlayerWalkedIn() {
void SceneScriptCT51::PlayerWalkedOut() {
if (!Actor_Clue_Query(kActorMcCoy, kClueRagDoll)) {
- Item_Remove_From_World(85);
+ Item_Remove_From_World(kItemRagDoll);
}
}
Commit: cd37d510f93a7e9ba35a442d2a3d15de9f4846da
https://github.com/scummvm/scummvm/commit/cd37d510f93a7e9ba35a442d2a3d15de9f4846da
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-25T23:18:20+01:00
Commit Message:
BLADERUNNER: Cleanup of actor scripts for a fight in BB11
Also named goal for McCoy arrest
Changed paths:
engines/bladerunner/game_constants.h
engines/bladerunner/script/ai/clovis.cpp
engines/bladerunner/script/ai/dektora.cpp
engines/bladerunner/script/ai/gordo.cpp
engines/bladerunner/script/ai/mccoy.cpp
engines/bladerunner/script/ai/officer_grayford.cpp
engines/bladerunner/script/ai/sadik.cpp
engines/bladerunner/script/ai/steele.cpp
engines/bladerunner/script/ai/tyrell_guard.cpp
engines/bladerunner/script/scene/bb11.cpp
engines/bladerunner/script/scene/nr11.cpp
engines/bladerunner/script/scene/ps14.cpp
engines/bladerunner/script/scene/tb03.cpp
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 12d4eaa..4512a22 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -811,6 +811,7 @@ enum Flags {
kFlagNotUsed370 = 370, // is never checked
kFlagAR02DektoraBoughtScorpions = 374,
+ kFlagBB11SadikPunchedMcCoy = 375,
kFlagDirectorsCut = 378,
kFlagCT08toCT51 = 379, // is never checked
@@ -1460,7 +1461,12 @@ enum AffectionTowards {
enum GoalMcCoy {
kGoalMcCoyDefault = 0,
- kGoalMcCoyDodge = 1
+ kGoalMcCoyDodge = 1,
+ kGoalMcCoyBB11GetUp = 100,
+ kGoalMcCoyBB11PrepareToRunAway = 101,
+ kGoalMcCoyBB11RunAway = 102,
+ kGoalMcCoyBB11GetCaught = 103,
+ kGoalMcCoyArrested = 500
};
enum GoalSteele {
@@ -1511,6 +1517,15 @@ enum GoalGuzza {
kGoalGuzzaGoToOffice = 102
};
+enum GoalClovis {
+ kGoalClovisDefault = 100,
+ kGoalClovisBB11WalkToMcCoy = 101,
+ kGoalClovisBB11StopSadik = 102,
+ kGoalClovisBB11TalkWithSadik = 103,
+ kGoalClovisBB11PrepareToTalkToMcCoy = 104, // bug? this is not triggered when player skips dialogue
+ kGoalClovisBB11TalkToMcCoy = 105 // ends Chapter 2
+};
+
enum GoalIzo {
kGoalIzoDefault = 0,
kGoalIzoPrepareCamera = 1,
@@ -1533,6 +1548,17 @@ enum GoalIzo {
kGoalIzoDead = 599
};
+enum GoalSadik {
+ kGoalSadikDefaut = 100,
+ kGoalSadikRunFromBB09 = 101,
+ kGoalSadikBB11Wait = 102,
+ kGoalSadikBB11ThrowMcCoy = 103,
+ kGoalSadikBB11CatchMcCoy = 104,
+ kGoalSadikBB11KnockOutMcCoy = 105,
+ kGoalSadikBB11KickMcCoy = 106,
+ kGoalSadikBB11TalkWithClovis = 107
+};
+
enum GoalTransient {
kGoalTransientDefault = 0,
kGoalTransientCT04Leave = 2
diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp
index d95c0e5..4702c35 100644
--- a/engines/bladerunner/script/ai/clovis.cpp
+++ b/engines/bladerunner/script/ai/clovis.cpp
@@ -46,34 +46,52 @@ void AIScriptClovis::Initialize() {
_var5 = 0;
_flag = 0;
- Actor_Set_Goal_Number(kActorClovis, 100);
+ Actor_Set_Goal_Number(kActorClovis, kGoalClovisDefault);
}
bool AIScriptClovis::Update() {
- if (Actor_Query_Goal_Number(kActorClovis) == 104) {
- Actor_Set_Goal_Number(kActorClovis, 105);
+ if (Actor_Query_Goal_Number(kActorClovis) == kGoalClovisBB11PrepareToTalkToMcCoy) {
+ Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11TalkToMcCoy);
return true;
- } else if (Global_Variable_Query(kVariableChapter) == 3 && Actor_Query_Goal_Number(kActorClovis) < 350) {
+ }
+
+ if (Global_Variable_Query(kVariableChapter) == 3
+ && Actor_Query_Goal_Number(kActorClovis) < 350
+ ) {
Actor_Set_Goal_Number(kActorClovis, 350);
return true;
- } else if (Global_Variable_Query(kVariableChapter) == 4 && !Game_Flag_Query(542)) {
+ }
+
+ if ( Global_Variable_Query(kVariableChapter) == 4
+ && !Game_Flag_Query(542)
+ ) {
Game_Flag_Set(542);
Actor_Set_Goal_Number(kActorClovis, 400);
return true;
- } else {
- if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorClovis) < 500) {
- Actor_Set_Goal_Number(kActorClovis, 500);
- }
- if (Actor_Query_Goal_Number(kActorClovis) == 511 && Game_Flag_Query(657)) {
- Actor_Set_Goal_Number(kActorClovis, 512);
- }
- if (Game_Flag_Query(653) && !Game_Flag_Query(696) && Game_Flag_Query(697)) {
- Actor_Set_Goal_Number(kActorClovis, 517);
- Game_Flag_Set(696);
- return true;
- }
- return false;
}
+
+ if (Global_Variable_Query(kVariableChapter) == 5
+ && Actor_Query_Goal_Number(kActorClovis) < 500
+ ) {
+ Actor_Set_Goal_Number(kActorClovis, 500);
+ }
+
+ if (Actor_Query_Goal_Number(kActorClovis) == 511
+ && Game_Flag_Query(657)
+ ) {
+ Actor_Set_Goal_Number(kActorClovis, 512);
+ }
+
+ if ( Game_Flag_Query(653)
+ && !Game_Flag_Query(696)
+ && Game_Flag_Query(697)
+ ) {
+ Actor_Set_Goal_Number(kActorClovis, 517);
+ Game_Flag_Set(696);
+ return true;
+ }
+ return false;
+
}
void AIScriptClovis::TimerExpired(int timer) {
@@ -82,12 +100,12 @@ void AIScriptClovis::TimerExpired(int timer) {
void AIScriptClovis::CompletedMovementTrack() {
switch (Actor_Query_Goal_Number(kActorClovis)) {
- case 101:
- Actor_Set_Goal_Number(kActorClovis, 103);
+ case kGoalClovisBB11WalkToMcCoy:
+ Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11StopSadik);
break;
- case 102:
- Actor_Set_Goal_Number(kActorClovis, 102);
+ case kGoalClovisBB11StopSadik:
+ Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11TalkWithSadik);
break;
case 401:
@@ -223,28 +241,28 @@ int AIScriptClovis::GetFriendlinessModifierIfGetsClue(int otherActorId, int clue
bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) {
switch (newGoalNumber) {
- case 100:
+ case kGoalClovisDefault:
AI_Movement_Track_Flush(kActorClovis);
AI_Movement_Track_Append(kActorClovis, 33, 0);
AI_Movement_Track_Repeat(kActorClovis);
return true;
- case 101:
+ case kGoalClovisBB11WalkToMcCoy:
AI_Movement_Track_Flush(kActorClovis);
AI_Movement_Track_Append(kActorClovis, 319, 0);
AI_Movement_Track_Append(kActorClovis, 320, 0);
AI_Movement_Track_Repeat(kActorClovis);
return true;
- case 102:
+ case kGoalClovisBB11StopSadik:
Actor_Start_Speech_Sample(kActorClovis, 0);
AI_Movement_Track_Flush(kActorClovis);
AI_Movement_Track_Append(kActorClovis, 321, 0);
AI_Movement_Track_Repeat(kActorClovis);
return true;
- case 103:
- Actor_Set_Goal_Number(kActorSadik, 107);
+ case kGoalClovisBB11TalkWithSadik:
+ Actor_Set_Goal_Number(kActorSadik, kGoalSadikBB11TalkWithClovis);
Actor_Says(kActorClovis, 10, 15);
Actor_Says(kActorSadik, 0, kAnimationModeTalk);
Actor_Face_Actor(kActorClovis, kActorSadik, true);
@@ -260,7 +278,7 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Change_Animation_Mode(kActorClovis, kAnimationModeSit);
return true;
- case 105:
+ case kGoalClovisBB11TalkToMcCoy:
Actor_Says(kActorClovis, 60, 30);
Actor_Says(kActorSadik, 30, kAnimationModeTalk);
Actor_Says(kActorClovis, 70, 30);
@@ -544,7 +562,7 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
break;
case 1:
- if (!_var1) {
+ if (_var1 == 0) {
*animation = 228;
}
if (_var1 == 1) {
@@ -597,8 +615,8 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
_animationState = 2;
_animationFrame = 0;
*animation = 238;
- if (Actor_Query_Goal_Number(kActorClovis) == 103) {
- Actor_Set_Goal_Number(kActorClovis, 104);
+ if (Actor_Query_Goal_Number(kActorClovis) == kGoalClovisBB11TalkWithSadik) {
+ Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11PrepareToTalkToMcCoy);
}
}
break;
diff --git a/engines/bladerunner/script/ai/dektora.cpp b/engines/bladerunner/script/ai/dektora.cpp
index c7c6341..48972c4 100644
--- a/engines/bladerunner/script/ai/dektora.cpp
+++ b/engines/bladerunner/script/ai/dektora.cpp
@@ -269,7 +269,7 @@ bool AIScriptDektora::ShotAtAndHit() {
} else {
Actor_Change_Animation_Mode(kActorDektora, 48);
Delay(2000);
- Actor_Set_Goal_Number(kActorMcCoy, 500);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
}
return true;
diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp
index 9d1754a..e5fcebb 100644
--- a/engines/bladerunner/script/ai/gordo.cpp
+++ b/engines/bladerunner/script/ai/gordo.cpp
@@ -249,7 +249,7 @@ bool AIScriptGordo::ShotAtAndHit() {
Actor_Voice_Over(2410, kActorVoiceOver);
Actor_Voice_Over(2420, kActorVoiceOver);
Game_Flag_Set(532);
- Actor_Set_Goal_Number(kActorMcCoy, 500);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
}
if (Actor_Query_Goal_Number(kActorGordo) == 250) {
Actor_Set_Goal_Number(kActorGordo, 254);
@@ -618,7 +618,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Game_Flag_Reset(603);
Actor_Set_Targetable(kActorSteele, false);
Delay(3000);
- Actor_Set_Goal_Number(kActorMcCoy, 500);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
break;
case 260:
Actor_Set_Targetable(kActorGordo, false);
diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp
index 12e58b8..120d322 100644
--- a/engines/bladerunner/script/ai/mccoy.cpp
+++ b/engines/bladerunner/script/ai/mccoy.cpp
@@ -62,19 +62,25 @@ bool AIScriptMcCoy::Update() {
Sound_Play(dword_45A0F8, 100, 0, 0, 50);
dword_45A0F8 = -1;
}
+
switch (Actor_Query_Goal_Number(kActorMcCoy)) {
- case 101:
- Actor_Set_Goal_Number(kActorMcCoy, 102);
+ case kGoalMcCoyBB11PrepareToRunAway:
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyBB11RunAway);
return true;
- case 102:
- if (Actor_Query_Inch_Distance_From_Waypoint(kActorMcCoy, 316) < 36 && !Game_Flag_Query(375)) {
- Actor_Change_Animation_Mode(kActorMcCoy, 21);
- Game_Flag_Set(375);
+
+ case kGoalMcCoyBB11RunAway:
+ if ( Actor_Query_Inch_Distance_From_Waypoint(kActorMcCoy, 316) < 36
+ && !Game_Flag_Query(kFlagBB11SadikPunchedMcCoy)
+ ) {
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeHit);
+ Game_Flag_Set(kFlagBB11SadikPunchedMcCoy);
}
+
if (Actor_Query_Inch_Distance_From_Waypoint(kActorMcCoy, 316) < 4) {
- Actor_Set_Goal_Number(kActorMcCoy, 103);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyBB11GetCaught);
}
return true;
+
case 201:
Actor_Set_Goal_Number(kActorMcCoy, 0);
if (Player_Query_Current_Set() == kSetNR03) {
@@ -85,6 +91,7 @@ bool AIScriptMcCoy::Update() {
}
Player_Gains_Control();
return true;
+
case 212:
if (Global_Variable_Query(47) >= 13) {
Global_Variable_Set(47, 500);
@@ -92,17 +99,21 @@ bool AIScriptMcCoy::Update() {
Global_Variable_Decrement(47, 1);
}
break;
+
case 221:
Actor_Set_Goal_Number(kActorMcCoy, 0);
Actor_Set_Goal_Number(kActorEarlyQ, 212);
return true;
+
case 309:
sub_4053E0();
break;
+
case 391:
Actor_Retired_Here(kActorMcCoy, 12, 48, 1, -1);
Actor_Set_Goal_Number(kActorMcCoy, 599);
break;
+
case 231:
sub_4053E0();
break;
@@ -122,19 +133,23 @@ void AIScriptMcCoy::ReceivedClue(int clueId, int fromActorId) {
case kClueSushiMenu:
Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationChinatown, true);
break;
+
case kClueDragonflyEarring:
case kClueBombingSuspect:
Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationAnimoidRow, true);
break;
+
case kClueKingstonKitchenBox1:
case kClueKingstonKitchenBox2:
if (Query_Difficulty_Level() == 0) {
Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationAnimoidRow, true);
}
break;
+
case kClueDragonflyCollection:
Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationNightclubRow, true);
break;
+
case kClueHysteriaToken:
case kClueCarRegistration1:
case kClueCarRegistration2:
@@ -143,23 +158,28 @@ void AIScriptMcCoy::ReceivedClue(int clueId, int fromActorId) {
Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationHysteriaHall, true);
Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationNightclubRow, true);
break;
+
case kClueWeaponsCache:
case kClueWeaponsOrderForm:
case kClueShippingForm:
case kCluePoliceIssueWeapons:
Global_Variable_Increment(49, 1);
break;
+
case kClueFolder:
Global_Variable_Increment(49, 5);
break;
+
case kClueHomelessManKid:
case kClueOriginalRequisitionForm:
Global_Variable_Increment(49, 3);
break;
+
case kClueScaryChair:
case kClueIzosStashRaided:
Global_Variable_Increment(49, 2);
break;
+
case kClueDNATyrell:
case kClueDNASebastian:
case kClueDNAChew:
@@ -169,7 +189,11 @@ void AIScriptMcCoy::ReceivedClue(int clueId, int fromActorId) {
Global_Variable_Increment(kVariableDNAEvidences, 1);
break;
}
- if (Global_Variable_Query(49) > 6 && Global_Variable_Query(kVariableChapter) > 3 && !Actor_Clue_Query(kActorMcCoy, kClueGuzzaFramedMcCoy)) {
+
+ if ( Global_Variable_Query(49) > 6
+ && Global_Variable_Query(kVariableChapter) > 3
+ && !Actor_Clue_Query(kActorMcCoy, kClueGuzzaFramedMcCoy)
+ ) {
Delay(500);
Actor_Voice_Over(3320, kActorVoiceOver);
switch (clueId) {
@@ -185,16 +209,20 @@ void AIScriptMcCoy::ReceivedClue(int clueId, int fromActorId) {
Actor_Voice_Over(3370, kActorVoiceOver);
Actor_Voice_Over(3380, kActorVoiceOver);
break;
+
case kClueHomelessManKid:
Actor_Voice_Over(3330, kActorVoiceOver);
break;
+
case kClueScaryChair:
Actor_Voice_Over(3390, kActorVoiceOver);
Actor_Voice_Over(3400, kActorVoiceOver);
Actor_Voice_Over(3420, kActorVoiceOver);
break;
}
+
Actor_Clue_Acquire(kActorMcCoy, kClueGuzzaFramedMcCoy, true, -1);
+
if (clueId == kClueFolder) {
Actor_Voice_Over(2780, kActorVoiceOver);
Actor_Voice_Over(2800, kActorVoiceOver);
@@ -247,15 +275,19 @@ void AIScriptMcCoy::Retired(int byActorId) {
Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, kActorLucy, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false);
}
}
+
if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerLeary, kSetHF05) && Actor_Query_In_Set(kActorDektora, kSetHF05) && Actor_Query_Goal_Number(kActorDektora) != 599) {
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateUncover, true, kActorDektora, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false);
}
+
if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerGrayford, kSetHF05) && Actor_Query_In_Set(kActorDektora, kSetHF05) && Actor_Query_Goal_Number(kActorDektora) != 599) {
Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateUncover, true, kActorDektora, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false);
}
+
if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerLeary, kSetHF05) && Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != 599) {
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateUncover, true, kActorLucy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false);
}
+
if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerGrayford, kSetHF05) && Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != 599) {
Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateUncover, true, kActorLucy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false);
}
@@ -269,26 +301,32 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
unsigned int affectionTowards;
switch (newGoalNumber) {
- case 0:
+ case kGoalMcCoyDefault:
return true;
+
case kGoalMcCoyDodge:
dodge();
return true;
+
case 2:
sub_405920();
return true;
- case 100:
+
+ case kGoalMcCoyBB11GetUp:
Actor_Set_At_Waypoint(kActorMcCoy, 315, 263);
_animationState = 53;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(18) - 1;
Actor_Set_Invisible(kActorMcCoy, false);
return true;
- case 102:
+
+ case kGoalMcCoyBB11RunAway:
Async_Actor_Walk_To_Waypoint(kActorMcCoy, 316, 0, true);
return true;
- case 103:
+
+ case kGoalMcCoyBB11GetCaught:
Actor_Face_Actor(kActorMcCoy, kActorSadik, true);
return true;
+
case 231:
Player_Set_Combat_Mode(false);
Preload(18);
@@ -304,13 +342,16 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
flt_462710 = 110.84f;
off_45A100 = -6.0f;
return true;
+
case 230:
dword_45A0FC = Actor_Query_Goal_Number(kActorSteele) == 215;
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatAttack);
return true;
+
case 220:
Actor_Change_Animation_Mode(kActorMcCoy, 75);
return true;
+
case 212:
Global_Variable_Set(47, 0);
Player_Set_Combat_Mode_Access(false);
@@ -319,6 +360,7 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
_animationState = 68;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(18) - 1;
return true;
+
case 211:
Actor_Face_Heading(kActorMcCoy, 512, false);
Actor_Face_Heading(kActorMcCoy, 768, true);
@@ -332,6 +374,7 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Goal_Number(kActorMcCoy, 0);
Player_Gains_Control();
return true;
+
case 210:
Actor_Put_In_Set(kActorMcCoy, kSetNR01);
Actor_Set_At_XYZ(kActorMcCoy, -204.0, 24.0, -817.0, 256);
@@ -344,22 +387,27 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Invisible(kActorMcCoy, false);
}
return true;
+
case 200:
Player_Loses_Control();
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle);
return true;
+
case 301:
_animationState = 62;
_animationFrame = 0;
return true;
+
case 302:
_animationState = 64;
_animationFrame = 0;
return true;
+
case 303:
_animationState = 65;
_animationFrame = 0;
return true;
+
case 350:
Sound_Play(123, 50, 0, 0, 50);
Delay(1000);
@@ -397,6 +445,7 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorMcCoy, 6705, 11);
Sound_Play(123, 50, 0, 0, 50);
return true;
+
case 390:
Actor_Force_Stop_Walking(kActorMcCoy);
Player_Loses_Control();
@@ -408,6 +457,7 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
_animationFrame = Slice_Animation_Query_Number_Of_Frames(18) - 1;
}
return true;
+
case 400:
Actor_Set_Health(kActorMcCoy, 50, 50);
Game_Flag_Set(373);
@@ -453,7 +503,8 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Chapter_Enter(5, kSetMA02_MA04, kSceneMA02);
}
return true;
- case 500:
+
+ case kGoalMcCoyArrested:
Music_Stop(3);
Player_Set_Combat_Mode(false);
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle);
@@ -666,8 +717,8 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
*animation = 19;
_animationFrame = 0;
_animationState = 0;
- if (Actor_Query_Goal_Number(kActorMcCoy) == 100) {
- Actor_Set_Goal_Number(kActorMcCoy, 101);
+ if (Actor_Query_Goal_Number(kActorMcCoy) == kGoalMcCoyBB11GetUp) {
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyBB11PrepareToRunAway);
}
if (Actor_Query_Goal_Number(kActorMcCoy) == 210) {
Actor_Set_Goal_Number(kActorMcCoy, 211);
@@ -1292,6 +1343,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
return true;
}
break;
+
case kAnimationModeWalk:
if (_animationState != 27
&& _animationState != 50
@@ -1305,6 +1357,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
}
}
break;
+
case kAnimationModeRun:
if (_animationState != 27
&& _animationState != 50
@@ -1318,6 +1371,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
}
}
break;
+
case kAnimationModeTalk:
if (_animationState < 3 || _animationState > 12) {
_animationState = 13;
@@ -1329,6 +1383,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
dword_45A0F4 = 20;
}
break;
+
case kAnimationModeCombatIdle:
switch (_animationState) {
case 14:
@@ -1367,6 +1422,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
break;
}
break;
+
case kAnimationModeCombatAim:
switch (_animationState) {
case 17:
@@ -1387,22 +1443,26 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
break;
}
break;
+
case kAnimationModeCombatAttack:
_animationState = 21;
_animationFrame = 0;
break;
+
case kAnimationModeCombatWalk:
if (_animationState != 27 && _animationState != 50) {
_animationState = 36;
_animationFrame = 0;
}
break;
+
case kAnimationModeCombatRun:
if (_animationState != 27 && _animationState != 50) {
_animationState = 37;
_animationFrame = 0;
}
break;
+
case 9:
case 12:
if (_animationState < 3 || _animationState > 12) {
@@ -1415,6 +1475,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
dword_45A0F4 = 21;
}
break;
+
case 10:
case 13:
if (_animationState < 3 || _animationState > 12) {
@@ -1427,6 +1488,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
dword_45A0F4 = 27;
}
break;
+
case 11:
case 14:
if (_animationState < 3 || _animationState > 12) {
@@ -1439,6 +1501,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
dword_45A0F4 = 22;
}
break;
+
case 15:
if (_animationState < 3 || _animationState > 12) {
_animationState = 13;
@@ -1450,6 +1513,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
dword_45A0F4 = 23;
}
break;
+
case 16:
if (_animationState < 3 || _animationState > 12) {
_animationState = 13;
@@ -1461,6 +1525,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
dword_45A0F4 = 24;
}
break;
+
case 17:
if (_animationState < 3 || _animationState > 12) {
_animationState = 13;
@@ -1472,6 +1537,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
dword_45A0F4 = 25;
}
break;
+
case 18:
if (_animationState < 3 || _animationState > 12) {
_animationState = 13;
@@ -1483,6 +1549,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
dword_45A0F4 = 26;
}
break;
+
case 19:
if (_animationState < 3 || _animationState > 12) {
_animationState = 13;
@@ -1494,9 +1561,11 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
dword_45A0F4 = 27;
}
break;
+
case 20:
dodge();
break;
+
case kAnimationModeHit:
switch (_animationState) {
case 14:
@@ -1524,6 +1593,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
break;
}
break;
+
case kAnimationModeCombatHit:
if (Random_Query(0, 1) == 1) {
_animationState = 23;
@@ -1532,19 +1602,23 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
case 23:
_animationState = 66;
_animationFrame = 0;
break;
+
case 29:
Player_Loses_Control();
_animationFrame = 0;
_animationState = 71;
break;
+
case 38:
_animationState = 47;
_animationFrame = 0;
break;
+
case 39:
_animationFrame = 0;
_animationState = 52;
@@ -1552,35 +1626,43 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationFrame = 23;
}
break;
+
case 40:
_animationState = 44;
_animationFrame = 0;
break;
+
case 41:
_animationState = 45;
_animationFrame = 0;
break;
+
case 42:
_animationState = 46;
_animationFrame = 0;
Player_Loses_Control();
break;
+
case kAnimationModeWalkUp:
_animationState = 38;
_animationFrame = 0;
break;
+
case kAnimationModeWalkDown:
_animationState = 39;
_animationFrame = 0;
break;
+
case kAnimationModeCombatWalkUp:
_animationState = 40;
_animationFrame = 0;
break;
+
case kAnimationModeCombatWalkDown:
_animationState = 41;
_animationFrame = 0;
break;
+
case kAnimationModeDie:
switch (_animationState) {
case 14:
diff --git a/engines/bladerunner/script/ai/officer_grayford.cpp b/engines/bladerunner/script/ai/officer_grayford.cpp
index d55b611..da21d21 100644
--- a/engines/bladerunner/script/ai/officer_grayford.cpp
+++ b/engines/bladerunner/script/ai/officer_grayford.cpp
@@ -472,7 +472,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb
Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true);
if (Game_Flag_Query(kFlagDR04McCoyShotMoraji)) {
- Actor_Set_Goal_Number(kActorMcCoy, 500);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
} else {
Actor_Says(kActorMcCoy, 960, 15);
Actor_Says(kActorMcCoy, 965, 18);
diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp
index be81315..250e090 100644
--- a/engines/bladerunner/script/ai/sadik.cpp
+++ b/engines/bladerunner/script/ai/sadik.cpp
@@ -46,7 +46,7 @@ void AIScriptSadik::Initialize() {
Actor_Put_In_Set(kActorSadik, kSetFreeSlotA);
Actor_Set_At_Waypoint(kActorSadik, 33, 0);
- Actor_Set_Goal_Number(kActorSadik, 100);
+ Actor_Set_Goal_Number(kActorSadik, kGoalSadikDefaut);
}
bool AIScriptSadik::Update() {
@@ -54,14 +54,14 @@ bool AIScriptSadik::Update() {
&& Player_Query_Current_Scene() == kSceneBB09
&& !Game_Flag_Query(kFlagBB09SadikRun)
) {
- Actor_Set_Goal_Number(kActorSadik, 101);
+ Actor_Set_Goal_Number(kActorSadik, kGoalSadikRunFromBB09);
Actor_Set_Targetable(kActorSadik, true);
Game_Flag_Set(kFlagBB09SadikRun);
Game_Flag_Set(kFlagUnused406);
return true;
}
- if (_var1) {
+ if (_var1 != 0) {
Sound_Play(_var1, 100, 0, 0, 50);
_var1 = 0;
}
@@ -108,16 +108,16 @@ void AIScriptSadik::TimerExpired(int timer) {
void AIScriptSadik::CompletedMovementTrack() {
switch (Actor_Query_Goal_Number(kActorSadik)) {
- case 101:
- Actor_Set_Goal_Number(kActorSadik, 102);
+ case kGoalSadikRunFromBB09:
+ Actor_Set_Goal_Number(kActorSadik, kGoalSadikBB11Wait);
break;
- case 104:
- Actor_Set_Goal_Number(kActorSadik, 105);
+ case kGoalSadikBB11CatchMcCoy:
+ Actor_Set_Goal_Number(kActorSadik, kGoalSadikBB11KnockOutMcCoy);
break;
- case 105:
- Actor_Set_Goal_Number(kActorSadik, 106);
+ case kGoalSadikBB11KnockOutMcCoy:
+ Actor_Set_Goal_Number(kActorSadik, kGoalSadikBB11KickMcCoy);
break;
case 301:
@@ -231,13 +231,13 @@ int AIScriptSadik::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueI
bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
switch (newGoalNumber) {
- case 100:
+ case kGoalSadikDefaut:
AI_Movement_Track_Flush(kActorSadik);
AI_Movement_Track_Append(kActorSadik, 33, 0);
AI_Movement_Track_Repeat(kActorSadik);
return true;
- case 101:
+ case kGoalSadikRunFromBB09:
AI_Movement_Track_Flush(kActorSadik);
AI_Movement_Track_Append_Run(kActorSadik, 131, 0);
AI_Movement_Track_Append_Run(kActorSadik, 132, 0);
@@ -245,41 +245,41 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorSadik);
return true;
- case 102:
+ case kGoalSadikBB11Wait:
AI_Movement_Track_Flush(kActorSadik);
AI_Movement_Track_Append(kActorSadik, 313, 0);
AI_Movement_Track_Repeat(kActorSadik);
Game_Flag_Set(kFlagBB11SadikFight);
return true;
- case 103:
- Actor_Set_Immunity_To_Obstacles(kActorSadik, 1);
+ case kGoalSadikBB11ThrowMcCoy:
+ Actor_Set_Immunity_To_Obstacles(kActorSadik, true);
Actor_Face_Heading(kActorSadik, kActorMcCoy, kActorMcCoy);
_animationState = 32;
_animationFrame = -1;
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
return true;
- case 104:
- Actor_Set_Goal_Number(kActorMcCoy, 100);
+ case kGoalSadikBB11CatchMcCoy:
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyBB11GetUp);
AI_Movement_Track_Flush(kActorSadik);
AI_Movement_Track_Append(kActorSadik, 314, 0);
AI_Movement_Track_Append_Run(kActorSadik, 317, 0);
AI_Movement_Track_Repeat(kActorSadik);
return true;
- case 105:
+ case kGoalSadikBB11KnockOutMcCoy:
Actor_Change_Animation_Mode(kActorSadik, 62);
return true;
- case 106:
- Actor_Face_Heading(kActorSadik, 100, 0);
+ case kGoalSadikBB11KickMcCoy:
+ Actor_Face_Heading(kActorSadik, 100, false);
Actor_Change_Animation_Mode(kActorSadik, 63);
- Actor_Set_Goal_Number(kActorClovis, 101);
- Actor_Set_Immunity_To_Obstacles(kActorSadik, 0);
+ Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11WalkToMcCoy);
+ Actor_Set_Immunity_To_Obstacles(kActorSadik, false);
return true;
- case 107:
+ case kGoalSadikBB11TalkWithClovis:
_var1 = 0;
return false;
@@ -328,7 +328,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case 308:
- if (Player_Query_Current_Scene() == 102) {
+ if (Player_Query_Current_Scene() == kSceneUG18) {
Actor_Force_Stop_Walking(kActorMcCoy);
Actor_Change_Animation_Mode(kActorSadik, kAnimationModeCombatAttack);
Sound_Play(12, 100, 0, 0, 50);
@@ -767,14 +767,14 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 0;
*animation = 328;
- Actor_Set_Goal_Number(kActorSadik, 104);
+ Actor_Set_Goal_Number(kActorSadik, kGoalSadikBB11CatchMcCoy);
}
break;
case 33:
*animation = 344;
_animationFrame++;
- if (Actor_Query_Goal_Number(kActorSadik) == 105) {
+ if (Actor_Query_Goal_Number(kActorSadik) == kGoalSadikBB11KnockOutMcCoy) {
if (_animationFrame == 4) {
_var1 = 221;
}
@@ -788,7 +788,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
_animationState = 0;
Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle);
- if (Actor_Query_Goal_Number(kActorSadik) == 105) {
+ if (Actor_Query_Goal_Number(kActorSadik) == kGoalSadikBB11KnockOutMcCoy) {
Actor_Change_Animation_Mode(kActorSadik, 63);
}
}
@@ -798,7 +798,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
*animation = 343;
_animationFrame++;
if (_animationFrame == 4) {
- if (Actor_Query_Goal_Number(kActorSadik) == 105) {
+ if (Actor_Query_Goal_Number(kActorSadik) == kGoalSadikBB11KnockOutMcCoy) {
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
_var1 = 222;
} else {
@@ -812,12 +812,12 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 0;
Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle);
- if (Actor_Query_Goal_Number(kActorSadik) == 105) {
+ if (Actor_Query_Goal_Number(kActorSadik) == kGoalSadikBB11KnockOutMcCoy) {
AI_Movement_Track_Flush(kActorSadik);
AI_Movement_Track_Append(kActorSadik, 318, 0);
AI_Movement_Track_Repeat(kActorSadik);
} else {
- if (Actor_Query_Goal_Number(kActorSadik) == 106) {
+ if (Actor_Query_Goal_Number(kActorSadik) == kGoalSadikBB11KickMcCoy) {
Actor_Change_Animation_Mode(kActorSadik, 63);
}
}
@@ -839,7 +839,7 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
Actor_Set_Frame_Rate_FPS(kActorSadik, -2);
switch (mode) {
- case 0:
+ case kAnimationModeIdle:
switch (_animationState) {
case 19:
case 20:
@@ -862,22 +862,22 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
}
break;
- case 1:
+ case kAnimationModeWalk:
_animationFrame = 0;
_animationState = 1;
break;
- case 2:
+ case kAnimationModeRun:
_animationFrame = 0;
_animationState = 2;
break;
- case 3:
+ case kAnimationModeTalk:
_animationState = 20;
_animationFrame = 0;
break;
- case 4:
+ case kAnimationModeCombatIdle:
switch (_animationState) {
case 0:
_animationFrame = 0;
@@ -911,17 +911,17 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
case 20:
return true;
- case 6:
+ case kAnimationModeCombatAttack:
_animationFrame = 0;
_animationState = 18;
break;
- case 7:
+ case kAnimationModeCombatWalk:
_animationFrame = 0;
_animationState = 3;
break;
- case 8:
+ case kAnimationModeCombatRun:
_animationFrame = 0;
_animationState = 4;
break;
@@ -961,7 +961,7 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 21:
+ case kAnimationModeHit:
switch (_animationState) {
case 7:
case 8:
@@ -991,7 +991,7 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 22:
+ case kAnimationModeCombatHit:
if (Random_Query(0, 1)) {
_animationState = 12;
} else {
@@ -1005,14 +1005,14 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
_animationState = 14;
_animationFrame = 0;
break;
case 62:
- if (Actor_Query_Goal_Number(kActorSadik) != 105
- && Actor_Query_Goal_Number(kActorSadik) != 106
+ if (Actor_Query_Goal_Number(kActorSadik) != kGoalSadikBB11KnockOutMcCoy
+ && Actor_Query_Goal_Number(kActorSadik) != kGoalSadikBB11KickMcCoy
) {
_animationState = 31;
_animationFrame = 0;
@@ -1023,8 +1023,8 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) {
break;
case 63:
- if (Actor_Query_Goal_Number(kActorSadik) != 105
- && Actor_Query_Goal_Number(kActorSadik) != 106
+ if (Actor_Query_Goal_Number(kActorSadik) != kGoalSadikBB11KnockOutMcCoy
+ && Actor_Query_Goal_Number(kActorSadik) != kGoalSadikBB11KickMcCoy
) {
_animationState = 30;
_animationFrame = 2;
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index 9c7d51f..ddc50ad 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -1203,7 +1203,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Start_Speech_Sample(kActorSteele, 1150);
Actor_Change_Animation_Mode(kActorSteele, 49);
Delay(5000);
- Actor_Set_Goal_Number(kActorMcCoy, 500);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
return true;
case 275:
diff --git a/engines/bladerunner/script/ai/tyrell_guard.cpp b/engines/bladerunner/script/ai/tyrell_guard.cpp
index 0dea8ab..5e40453 100644
--- a/engines/bladerunner/script/ai/tyrell_guard.cpp
+++ b/engines/bladerunner/script/ai/tyrell_guard.cpp
@@ -119,7 +119,7 @@ bool AIScriptTyrellGuard::GoalChanged(int currentGoalNumber, int newGoalNumber)
Ambient_Sounds_Play_Sound(590, 100, 0, 0, 0);
Delay(1000);
Actor_Force_Stop_Walking(kActorMcCoy);
- Actor_Set_Goal_Number(kActorMcCoy, 500);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
return true;
case 302:
AI_Countdown_Timer_Reset(kActorTyrellGuard, 0);
@@ -131,7 +131,7 @@ bool AIScriptTyrellGuard::GoalChanged(int currentGoalNumber, int newGoalNumber)
Ambient_Sounds_Play_Sound(590, 100, 0, 0, 0);
Delay(1000);
Actor_Force_Stop_Walking(kActorMcCoy);
- Actor_Set_Goal_Number(kActorMcCoy, 500);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
return true;
case 304:
AI_Countdown_Timer_Reset(kActorTyrellGuard, 1);
diff --git a/engines/bladerunner/script/scene/bb11.cpp b/engines/bladerunner/script/scene/bb11.cpp
index 75e0c60..3e34b0b 100644
--- a/engines/bladerunner/script/scene/bb11.cpp
+++ b/engines/bladerunner/script/scene/bb11.cpp
@@ -101,11 +101,11 @@ bool SceneScriptBB11::ClickedOn2DRegion(int region) {
}
void SceneScriptBB11::SceneFrameAdvanced(int frame) {
- if ( Actor_Query_Goal_Number(kActorSadik) == 105
- && !Game_Flag_Query(375)
+ if ( Actor_Query_Goal_Number(kActorSadik) == kGoalSadikBB11KnockOutMcCoy
+ && !Game_Flag_Query(kFlagBB11SadikPunchedMcCoy)
) {
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
- Game_Flag_Set(375);
+ Game_Flag_Set(kFlagBB11SadikPunchedMcCoy);
} else {
if (frame == 1) {
Sound_Play(74, 10, -100, 100, 50);
@@ -117,11 +117,11 @@ void SceneScriptBB11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptBB11::PlayerWalkedIn() {
- if (Actor_Query_Goal_Number(kActorSadik) == 102
+ if (Actor_Query_Goal_Number(kActorSadik) == kGoalSadikBB11Wait
&& Global_Variable_Query(kVariableChapter) == 2
) {
Actor_Set_Invisible(kActorMcCoy, true);
- Actor_Set_Goal_Number(kActorSadik, 103);
+ Actor_Set_Goal_Number(kActorSadik, kGoalSadikBB11ThrowMcCoy);
Music_Play(11, 61, 0, 1, -1, 0, 0);
Player_Loses_Control();
}
diff --git a/engines/bladerunner/script/scene/nr11.cpp b/engines/bladerunner/script/scene/nr11.cpp
index 518f4fc..f97cc4c 100644
--- a/engines/bladerunner/script/scene/nr11.cpp
+++ b/engines/bladerunner/script/scene/nr11.cpp
@@ -330,7 +330,7 @@ void SceneScriptNR11::PlayerWalkedIn() {
Actor_Set_Goal_Number(kActorSteele, 275);
}
} else {
- Actor_Set_Goal_Number(kActorMcCoy, 500);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
}
}
// return true;
diff --git a/engines/bladerunner/script/scene/ps14.cpp b/engines/bladerunner/script/scene/ps14.cpp
index 44b57cb..73b87e7 100644
--- a/engines/bladerunner/script/scene/ps14.cpp
+++ b/engines/bladerunner/script/scene/ps14.cpp
@@ -79,7 +79,7 @@ bool SceneScriptPS14::ClickedOnExit(int exitId) {
Game_Flag_Set(666);
Actor_Set_Goal_Number(kActorMcCoy, 400);
} else {
- Actor_Set_Goal_Number(kActorMcCoy, 500);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
}
} else if (Global_Variable_Query(kVariableChapter) > 3) {
Actor_Says(kActorMcCoy, 8522, 12);
diff --git a/engines/bladerunner/script/scene/tb03.cpp b/engines/bladerunner/script/scene/tb03.cpp
index 8a46c8c..bd4d9c5 100644
--- a/engines/bladerunner/script/scene/tb03.cpp
+++ b/engines/bladerunner/script/scene/tb03.cpp
@@ -141,7 +141,7 @@ void SceneScriptTB03::PlayerWalkedIn() {
Actor_Says(kActorOfficerGrayford, 260, -1);
Actor_Says(kActorMcCoy, 170, 14);
Delay(1000);
- Actor_Set_Goal_Number(kActorMcCoy, 500);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
}
}
More information about the Scummvm-git-logs
mailing list