aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/bladerunner/actor.cpp4
-rw-r--r--engines/bladerunner/actor_clues.cpp10
-rw-r--r--engines/bladerunner/debugger.h1
-rw-r--r--engines/bladerunner/game_constants.h179
-rw-r--r--engines/bladerunner/script/ai/bullet_bob.cpp166
-rw-r--r--engines/bladerunner/script/ai/clovis.cpp6
-rw-r--r--engines/bladerunner/script/ai/crazylegs.cpp44
-rw-r--r--engines/bladerunner/script/ai/dektora.cpp4
-rw-r--r--engines/bladerunner/script/ai/gaff.cpp8
-rw-r--r--engines/bladerunner/script/ai/generic_walker_a.cpp2
-rw-r--r--engines/bladerunner/script/ai/gordo.cpp21
-rw-r--r--engines/bladerunner/script/ai/guzza.cpp48
-rw-r--r--engines/bladerunner/script/ai/hanoi.cpp2
-rw-r--r--engines/bladerunner/script/ai/holloway.cpp2
-rw-r--r--engines/bladerunner/script/ai/howie_lee.cpp60
-rw-r--r--engines/bladerunner/script/ai/izo.cpp9
-rw-r--r--engines/bladerunner/script/ai/klein.cpp28
-rw-r--r--engines/bladerunner/script/ai/mccoy.cpp68
-rw-r--r--engines/bladerunner/script/ai/moraji.cpp63
-rw-r--r--engines/bladerunner/script/ai/officer_leary.cpp187
-rw-r--r--engines/bladerunner/script/ai/photographer.cpp114
-rw-r--r--engines/bladerunner/script/ai/runciter.cpp2
-rw-r--r--engines/bladerunner/script/ai/sadik.cpp2
-rw-r--r--engines/bladerunner/script/ai/sebastian.cpp2
-rw-r--r--engines/bladerunner/script/ai/sergeant_walls.cpp12
-rw-r--r--engines/bladerunner/script/ai/steele.cpp558
-rw-r--r--engines/bladerunner/script/ai/zuben.cpp6
-rw-r--r--engines/bladerunner/script/ai_script.h3
-rw-r--r--engines/bladerunner/script/esper_script.cpp62
-rw-r--r--engines/bladerunner/script/scene/ar01.cpp86
-rw-r--r--engines/bladerunner/script/scene/ar02.cpp10
-rw-r--r--engines/bladerunner/script/scene/bb02.cpp8
-rw-r--r--engines/bladerunner/script/scene/bb03.cpp24
-rw-r--r--engines/bladerunner/script/scene/bb04.cpp6
-rw-r--r--engines/bladerunner/script/scene/bb05.cpp4
-rw-r--r--engines/bladerunner/script/scene/bb07.cpp2
-rw-r--r--engines/bladerunner/script/scene/bb10.cpp4
-rw-r--r--engines/bladerunner/script/scene/ct01.cpp212
-rw-r--r--engines/bladerunner/script/scene/ct02.cpp31
-rw-r--r--engines/bladerunner/script/scene/ct04.cpp26
-rw-r--r--engines/bladerunner/script/scene/ct05.cpp22
-rw-r--r--engines/bladerunner/script/scene/ct06.cpp2
-rw-r--r--engines/bladerunner/script/scene/ct08.cpp2
-rw-r--r--engines/bladerunner/script/scene/ct10.cpp4
-rw-r--r--engines/bladerunner/script/scene/ct11.cpp4
-rw-r--r--engines/bladerunner/script/scene/ct12.cpp134
-rw-r--r--engines/bladerunner/script/scene/ct51.cpp6
-rw-r--r--engines/bladerunner/script/scene/dr01.cpp4
-rw-r--r--engines/bladerunner/script/scene/dr03.cpp19
-rw-r--r--engines/bladerunner/script/scene/dr04.cpp103
-rw-r--r--engines/bladerunner/script/scene/dr05.cpp65
-rw-r--r--engines/bladerunner/script/scene/dr06.cpp113
-rw-r--r--engines/bladerunner/script/scene/hc01.cpp10
-rw-r--r--engines/bladerunner/script/scene/hc02.cpp8
-rw-r--r--engines/bladerunner/script/scene/hc03.cpp8
-rw-r--r--engines/bladerunner/script/scene/hc04.cpp4
-rw-r--r--engines/bladerunner/script/scene/hf01.cpp2
-rw-r--r--engines/bladerunner/script/scene/hf03.cpp4
-rw-r--r--engines/bladerunner/script/scene/hf04.cpp4
-rw-r--r--engines/bladerunner/script/scene/hf05.cpp4
-rw-r--r--engines/bladerunner/script/scene/hf06.cpp6
-rw-r--r--engines/bladerunner/script/scene/hf07.cpp4
-rw-r--r--engines/bladerunner/script/scene/kp05.cpp2
-rw-r--r--engines/bladerunner/script/scene/kp06.cpp4
-rw-r--r--engines/bladerunner/script/scene/ma01.cpp14
-rw-r--r--engines/bladerunner/script/scene/nr01.cpp28
-rw-r--r--engines/bladerunner/script/scene/nr02.cpp4
-rw-r--r--engines/bladerunner/script/scene/nr04.cpp8
-rw-r--r--engines/bladerunner/script/scene/nr06.cpp4
-rw-r--r--engines/bladerunner/script/scene/nr07.cpp10
-rw-r--r--engines/bladerunner/script/scene/nr08.cpp6
-rw-r--r--engines/bladerunner/script/scene/nr11.cpp2
-rw-r--r--engines/bladerunner/script/scene/ps01.cpp10
-rw-r--r--engines/bladerunner/script/scene/ps03.cpp14
-rw-r--r--engines/bladerunner/script/scene/ps04.cpp115
-rw-r--r--engines/bladerunner/script/scene/ps06.cpp6
-rw-r--r--engines/bladerunner/script/scene/ps07.cpp36
-rw-r--r--engines/bladerunner/script/scene/ps09.cpp26
-rw-r--r--engines/bladerunner/script/scene/ps14.cpp10
-rw-r--r--engines/bladerunner/script/scene/ps15.cpp39
-rw-r--r--engines/bladerunner/script/scene/rc01.cpp4
-rw-r--r--engines/bladerunner/script/scene/rc02.cpp45
-rw-r--r--engines/bladerunner/script/scene/rc03.cpp43
-rw-r--r--engines/bladerunner/script/scene/rc04.cpp312
-rw-r--r--engines/bladerunner/script/scene/rc51.cpp70
-rw-r--r--engines/bladerunner/script/scene/tb02.cpp204
-rw-r--r--engines/bladerunner/script/scene/tb05.cpp167
-rw-r--r--engines/bladerunner/script/scene/tb06.cpp149
-rw-r--r--engines/bladerunner/script/scene/tb07.cpp8
-rw-r--r--engines/bladerunner/script/scene/ug02.cpp16
-rw-r--r--engines/bladerunner/script/scene/ug03.cpp2
-rw-r--r--engines/bladerunner/script/scene/ug05.cpp4
-rw-r--r--engines/bladerunner/script/scene/ug06.cpp4
-rw-r--r--engines/bladerunner/script/scene/ug08.cpp4
-rw-r--r--engines/bladerunner/script/scene/ug10.cpp4
-rw-r--r--engines/bladerunner/script/scene/ug13.cpp78
-rw-r--r--engines/bladerunner/script/scene/ug14.cpp10
-rw-r--r--engines/bladerunner/script/scene/ug16.cpp10
-rw-r--r--engines/bladerunner/script/scene/ug18.cpp2
-rw-r--r--engines/bladerunner/script/scene_script.h8
-rw-r--r--engines/bladerunner/script/vk_script.cpp20
101 files changed, 2410 insertions, 1710 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp
index aa49d79664..66f2e7a6bb 100644
--- a/engines/bladerunner/actor.cpp
+++ b/engines/bladerunner/actor.cpp
@@ -562,6 +562,10 @@ bool Actor::tick(bool forceDraw, Common::Rect *screenRect) {
int newAnimation = 0, newFrame = 0;
_vm->_aiScripts->updateAnimation(_id, &newAnimation, &newFrame);
+ if (newFrame < 0) {
+ assert(newFrame >= 0);
+ }
+
if (_animationId != newAnimation) {
if (_fps != 0 && _fps != -1) {
_animationId = newAnimation;
diff --git a/engines/bladerunner/actor_clues.cpp b/engines/bladerunner/actor_clues.cpp
index 07df81e823..d7833d7ebf 100644
--- a/engines/bladerunner/actor_clues.cpp
+++ b/engines/bladerunner/actor_clues.cpp
@@ -110,14 +110,16 @@ int ActorClues::getModifier(int actorId, int otherActorId, int clueId) {
} else {
modifier1 = 0;
}
- modifier2 = 0;
- modifier3 = _vm->_aiScripts->callGetFriendlinessModifierIfGetsClue(otherActorId, actorId, clueId);
+ modifier2 = 0;
for (int i = 0; i < (int)_vm->_gameInfo->getActorCount(); i++) {
if (i != actorId && i != otherActorId) {
modifier2 += (friendliness - 50) * _vm->_aiScripts->callGetFriendlinessModifierIfGetsClue(i, otherActorId, clueId) / 100;
}
}
+
+ modifier3 = _vm->_aiScripts->callGetFriendlinessModifierIfGetsClue(otherActorId, actorId, clueId);
+
modifier4 = _vm->_rnd.getRandomNumberRng(0, (100 - actor->getIntelligence()) / 10);
if (_vm->_rnd.getRandomNumberRng(0, 1) == 1) {
@@ -160,14 +162,14 @@ void ActorClues::acquireCluesByRelations(int actorId, int otherActorId) {
uint avgParameters = (otherActor->getHonesty() + otherActor->getIntelligence() + actor->getFriendlinessToOther(otherActorId)) / 3;
int clue1count = avgParameters * count1 / 100;
- if (avgParameters >= 50 && !clue1count && count1 == 1) {
+ if (avgParameters >= 50 && clue1count == 0 && count1 == 1) {
clue1count = 1;
}
avgParameters = (actor->getHonesty() + actor->getIntelligence() + otherActor->getFriendlinessToOther(actorId)) / 3;
int clue2count = avgParameters * count2 / 100;
- if (avgParameters >= 50 && !clue2count && count2 == 1) {
+ if (avgParameters >= 50 && clue2count == 0 && count2 == 1) {
clue2count = 1;
}
diff --git a/engines/bladerunner/debugger.h b/engines/bladerunner/debugger.h
index fef545eda1..f801aee4f6 100644
--- a/engines/bladerunner/debugger.h
+++ b/engines/bladerunner/debugger.h
@@ -59,6 +59,7 @@ public:
bool cmdSay(int argc, const char **argv);
bool cmdScene(int argc, const char **argv);
bool cmdVariable(int argc, const char **argv);
+ bool cmdClue(int argc, const char **argv);
bool cmdLoad(int argc, const char **argv);
bool cmdSave(int argc, const char **argv);
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 98dc5fa78f..31851c91f3 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -143,7 +143,7 @@ enum Clues {
kClueLicensePlate = 37,
kClueLicensePlateMatch = 38,
kClueLabPaintTransfer = 39,
- kClueDispatchHitAndRun = 40,
+ kClueDispatchHitAndRun = 40, // is never acquired
kClueInceptShotRoy = 41,
kClueInceptShotsLeon = 42,
kCluePhoneCallGuzza = 43,
@@ -501,7 +501,6 @@ enum Flags {
kFlagCT02ZubenTalk = 59,
kFlagMA02MaggieIntroduced = 60,
kFlagChapter1Ended = 61,
- // 61 is never used
kFlagMA04toMA05 = 62,
kFlagMA05toMA04 = 63,
kFlagGaffApproachedMcCoyAboutZuben = 64,
@@ -539,8 +538,11 @@ enum Flags {
kFlagTB02toTB05 = 96, // is never checked
kFlagTB05toTB06 = 97, // is never checked
kFlagTB06toTB05 = 98,
-
- // 103 is never set
+ kFlagTB05MonitorIntro = 99,
+ kFlagTB05MonitorUnlockAttempt = 100,
+ kFlagTB05MonitorDone = 101,
+ kFlagTB06Visited = 102,
+ kFlagNotUsed103 = 103, // is never set
kFlagKleinTalkPaintTransfer = 104,
kFlagKleinTalkChromeDebris = 105,
kFlagIsabellaIntroduced = 105,
@@ -571,9 +573,12 @@ enum Flags {
kFlagPS02toPS07 = 131,
kFlagPS02toPS03 = 132,
kFlagPS02toPS09 = 133,
+ kFlagPS03toPS14 = 134,
+ kFlagPS14toPS03 = 135,
kFlagPS05toPS06 = 136,
kFlagHomelessTalkedTo = 137,
kFlagKleinInsulted = 138,
+ // 139 is never used
// 140 is never used
kFlagRC02LucyDeskAvailable = 141,
kFlagNotUsed142 = 142, // is never checked
@@ -583,7 +588,7 @@ enum Flags {
kFlagChapter1Ending = 146,
kFlagChopstickWrapperTaken = 147,
kFlagCandyTaken = 148,
- kFlagDogTaken = 149,
+ kFlagToyDogTaken = 149,
kFlagNotUsed150 = 150, // has no use
kFlagRC03UnlockedToUG01 = 151,
kFlagUG15toUG16 = 152,
@@ -592,7 +597,7 @@ enum Flags {
kFlagTB03toTB02 = 155,
kFlagKleinInsultedTalk = 156,
// 157 is never used
-
+ kFlagSergeantWallsBuzzInDone = 158,
kFlagGuzzaTalkZubenRetired = 159,
kFlagGuzzaTalkZubenEscaped = 160,
kFlagGuzzaTalk1 = 161,
@@ -618,15 +623,32 @@ enum Flags {
kFlagMcCoyAtNRxx = 181,
kFlagMcCoyAtRCxx = 182,
+
+
kFlagRC01PoliceDone = 186,
kFlagRC02TalkedToRunciter = 187,
-
+ // 188 is never used
+ // 189 is never used
kFlagShellCasingsTaken = 190,
// 191 is never used
kFlagBoughtHowieLeeFood = 192,
-
+ // 193 is never used
+ // 194 is never used
+ // 195 is never used
+ kFlagKleinAnimation1 = 196,
+ kFlagKleinAnimation2 = 197,
+ kFlagKleinAnimation3 = 198,
+ kFlagOfficerLearyTakingNotes = 199,
+ // 200 is never used
+ // 201 is never used
+ // 202 is never used
+ // 203 is never used
kFlagPS15toPS05 = 204,
-
+ // 205 is never used
+ kFlagSergeantWallsBuzzInRequest = 206, // is never set
+ // 207 is never used
+ // 208 is never used
+ // 209 is never used
kFlagCT02ZubenFled = 210,
kFlagPS09Entered = 211,
kFlagNotUsed212 = 212, // is never checked
@@ -645,10 +667,26 @@ enum Flags {
kFlagDR02toDR01 = 225,
kFlagDR02toDR03 = 226,
kFlagDR03toDR02 = 227,
-
+ kFlagDR04toDR05 = 228, // is never checked
+ kFlagDR05toDR04 = 229,
+ kFlagDR04toDR06 = 230,
+ kFlagDR06toDR04 = 231,
+ kFlagNotUsed232 = 232,
+ // 233 is never used
kFlagCT02toCT01walk = 234,
-
- kFlagArrivedFromSpinner = 247,
+ // 235 is never used
+ kFlagMcCoyAnimation1 = 236,
+ // 237 is never used
+ // 238 is never used
+ kFlagHowieLeeAnimation1 = 239,
+ // 240 is never used
+ // 241 is never used
+ // 242 is never used
+ // 243 is never used
+ // 244 is never used
+ // 245 is never used
+ // 246 is never used
+ kFlagArrivedFromSpinner1 = 247,
kFlagSpinnerAtCT01 = 248,
kFlagSpinnerAtRC01 = 249,
kFlagSpinnerAtMA01 = 250,
@@ -667,9 +705,41 @@ enum Flags {
kFlagBB02toBB01 = 263,
kFlagBB01toDR02 = 264,
kFlagDR02toBB01 = 265,
-
+ kFlagMorajiExploded = 266,
+ kFlagDR03ChewTalk1 = 267,
+ kFlagDR06JesterActive = 268,
+ kFlagDR05BombActivated = 269,
+ kFlagDR05ChainShot = 270,
+ kFlagDR05BombWillExplode = 271,
+ kFlagDR05BombExploded = 272,
+ kFlagArrivedFromSpinner2 = 273,
+ kFlagDR05MorajiTalk = 274,
+ // 275 is never used
+ kFlagNotUsed276 = 276, // is never set
+ // 277 is never used
+ kFlagDR06KeyboardChecked = 278,
+ // 279 is never used
+ kFlagDR06VidphoneChecked = 280,
+ kFlagBB03toBB02 = 281,
+ kFlagBB02toBB03 = 282, // is never checked
+ kFlagBB03toBB04 = 283,
+ kFlagBB04toBB03 = 284,
+ kFlagBB03toBB05 = 285, // is never checked
+ kFlagBB05toBB03 = 286,
+ kFlagRC04Entered = 287,
+ // 288 is never used
+ kFlagRC04McCoyShotBob = 289,
+ kFlagRC04BobTalk1 = 290,
+ // 291 is never used
+ kFlagRC04BobTalk2 = 292,
kFlagCT02PotTipped = 293,
kFlagGaffSpinnerCT12 = 294,
+ kFlagRC04BobShootMcCoy = 295,
+ kFlagRC04McCoyCombatMode = 296,
+
+ kFlagRC04McCoyWarned = 303,
+ kFlagRC04BobTalkAmmo = 305,
+ kFlagNotUsed306 = 306, // is never set
kFlagSpinnerAtTB02 = 307,
kFlagHF01toHF02 = 308,
kFlagHF02toHF01 = 309,
@@ -693,11 +763,27 @@ enum Flags {
kFlagUG09toCT12 = 432,
kFlagCT12ToUG09 = 433,
kFlagGenericWalkerWaiting = 443,
+ kFlagTB02ElevatorToTB05 = 450,
+ kFlagTB05Entered = 451,
+ kFlagTB02GuardTalk1 = 453,
+ kFlagTB02GuardTalk2 = 455,
+ kFlagTB02SteeleTalk = 456,
+ kFlagTB02SteeleEnter = 457,
+ kFlagSteeleWalkingAround = 460,
kFlagMaggieIsHurt = 461,
+ kFlagPS04GuzzaLeft = 462,
kFlagMcCoyArrested = 465,
+ kFlagMcCoyAtPS03 = 478, // has no use
+ kFlagMcCoyAtHCxx = 479,
+ kFlagTB06Introduction = 483,
+ kFlagPhotographerToTB06 = 485,
kFlagKIAPrivacyAddon = 487,
kFlagCT04HomelessTrashFinish = 492,
+ kFlagDR05ExplodedEntered = 511,
+ kFlagDR05BombExplosionView = 515,
kFlagCT07ZubenAttack = 516,
+ kFlagTB06DogCollarTaken = 519,
+ kFlagTB06KitchenBoxTaken = 520,
kFlagKIAPrivacyAddonIntro = 599,
kFlagTB07toTB02 = 608,
kFlagMcCoySleeping = 647,
@@ -709,12 +795,16 @@ enum Flags {
kFlagPS05TV2 = 690,
kFlagPS05TV3 = 691,
kFlagPS05TV4 = 692,
+ kFlagRC04Locked = 702,
+ kFlagTB06PhotographTalk1 = 707,
kFlagRC51Discovered = 709,
kFlagMA04WatchedTV = 711,
kFlagMcCoyShotAtZuben = 712,
+ kFlagRC04BobTalk3 = 717,
kFlagCT02McCoyFell = 719,
kFlagCT02McCoyCombatReady = 720,
- kFlagZubenBountyPaid = 723
+ kFlagZubenBountyPaid = 723,
+ kFlagPS04WeaponsOrderForm = 727
};
enum Variables {
@@ -722,6 +812,8 @@ enum Variables {
kVariableChinyen = 2,
kVariablePoliceMazeScore = 9,
kVariablePoliceMazePS10TargetCounter = 10,
+ kVariableMcCoyEvidenceMissed = 14,
+ kVariableBobShot = 24, // has no use
kVariableGenericWalkerAModel = 32,
kVariableGenericWalkerBModel = 33,
kVariableGenericWalkerCModel = 34,
@@ -790,6 +882,9 @@ enum AnimationModes {
kAnimationModeCombatRun = 8,
kAnimationModeHit = 21,
kAnimationModeCombatHit = 22,
+ kAnimationModeSpinnerGetIn = 41,
+ kAnimationModeSpinnerGetOut = 42,
+ // 43 - taking photo/using cellphone
kAnimationModeWalkUp = 44,
kAnimationModeWalkDown = 45,
kAnimationModeCombatWalkUp = 46,
@@ -844,9 +939,9 @@ enum Scenes {
kSceneDR04 = 28,
kSceneDR05 = 29,
kSceneDR06 = 30,
- kSceneHC01 = 31,
- kSceneHC02 = 32,
- kSceneHC03 = 33,
+ kSceneHC01 = 31, // Hawker's circle - Green pawn
+ kSceneHC02 = 32, // Hawker's circle - China bar
+ kSceneHC03 = 33, // Hawker's circle -
kSceneHF01 = 34,
kSceneHF02 = 35,
kSceneHF03 = 36,
@@ -893,12 +988,12 @@ enum Scenes {
kScenePS14 = 77,
kSceneRC01 = 78, // Runciter - Outside
kSceneRC02 = 79, // Runciter - Inside
- kSceneRC03 = 80,
- kSceneRC04 = 81,
- kSceneTB02 = 82,
+ kSceneRC03 = 80, // Bullet Bob - outside
+ kSceneRC04 = 81, // Bullet Bob - inside
+ kSceneTB02 = 82, // Tyrell Building - reception
kSceneTB03 = 83,
- kSceneTB05 = 84,
- kSceneTB06 = 85,
+ kSceneTB05 = 84, // Tyrell Building - Grav Test Lab - outside
+ kSceneTB06 = 85, // Tyrell Building - Grav Test Lab - inside
kSceneUG01 = 86,
kSceneUG02 = 87,
kSceneUG03 = 88,
@@ -919,10 +1014,10 @@ enum Scenes {
kSceneUG19 = 103,
kSceneBB51 = 104,
kSceneCT51 = 105,
- kSceneHC04 = 106,
+ kSceneHC04 = 106, // Hawker's circle - Kingston kitchen
kSceneRC51 = 107, // Runciter - Lucy's desk
kSceneTB07 = 108,
- kScenePS15 = 119,
+ kScenePS15 = 119, // Police Station - Armory
kSceneBB12 = 120
};
@@ -1044,12 +1139,21 @@ enum GameItems {
kItemPoliceMazeTarget8 = 7,
kItemPoliceMazeTarget9 = 8,
kItemChromeDebris = 66,
+ kItemDragonflyEarring = 76,
kItemCandy = 79,
kItemChopstickWrapper = 82,
+ kItemDogCollar = 84,
kItemToyDog = 98,
kItemShellCasingA = 100,
kItemShellCasingB = 101,
- kItemShellCasingC = 102
+ kItemShellCasingC = 102,
+ kItemDeadDogA = 103,
+ kItemDeadDogB = 104,
+ kItemDeadDogC = 105,
+ kItemKitchenBox = 108,
+ kItemWeaponsCrate = 110,
+ kItemWeaponsOrderForm = 111,
+ kItemTyrellSalesPamphlet = 119
};
enum Elevators {
@@ -1127,11 +1231,33 @@ enum GoalMcCoy {
kGoalMcCoyDodge = 1
};
+enum GoalSteele {
+ kGoalSteeleGoToTB02 = 110,
+ kGoalSteeleLeaveTB02 = 111,
+ kGoalSteeleGoToPoliceStation = 112,
+ kGoalSteeleWalkAround = 113,
+ kGoalSteeleWalkAroundRestart = 190
+};
+
+enum GoalGuzza {
+ kGoalGuzzaLeaveOffice = 100,
+ kGoalGuzzaGoToHawkersCircle = 101,
+ kGoalGuzzaGoToOffice = 102
+};
+
enum GoalTransient {
kGoalTransientDefault = 0,
kGoalTransientCT04Leave = 2
};
+enum GoalBulletBob {
+ kGoalBulletBobDefault = 0,
+ kGoalBulletBobWarningMcCoy = 1,
+ kGoalBulletBobShootMcCoy = 2,
+ kGoalBulletBobShotMcCoy = 3, // has no use
+ kGoalBulletBobDead = 4
+};
+
enum GoalZuben {
kGoalZubenDefault = 0,
kGoalZubenCT01Leave = 1,
@@ -1154,7 +1280,8 @@ enum GoalZuben {
enum GoalOfficerLeary {
kGoalOfficerLearyDefault = 0,
- kGoalOfficerLearyCrowdInterrogation = 1
+ kGoalOfficerLearyRC01WalkToCrowd = 1,
+ kGoalOfficerLearyRC01CrowdInterrogation = 2
};
} // End of namespace BladeRunner
diff --git a/engines/bladerunner/script/ai/bullet_bob.cpp b/engines/bladerunner/script/ai/bullet_bob.cpp
index 87394fa44e..439431d2d4 100644
--- a/engines/bladerunner/script/ai/bullet_bob.cpp
+++ b/engines/bladerunner/script/ai/bullet_bob.cpp
@@ -42,56 +42,68 @@ void AIScriptBulletBob::Initialize() {
_var3 = 1;
_var4 = 0;
- Actor_Set_Goal_Number(kActorBulletBob, 0);
- Actor_Set_Targetable(kActorBulletBob, 1);
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobDefault);
+ Actor_Set_Targetable(kActorBulletBob, true);
}
bool AIScriptBulletBob::Update() {
- if (Game_Flag_Query(289) && Actor_Query_Goal_Number(kActorBulletBob) != 4) {
- Actor_Set_Goal_Number(kActorBulletBob, 4);
+ if (Game_Flag_Query(kFlagRC04McCoyShotBob)
+ && Actor_Query_Goal_Number(kActorBulletBob) != kGoalBulletBobDead
+ ) {
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobDead);
}
- if (Player_Query_Combat_Mode() != 1
- || Player_Query_Current_Scene() != kSceneRC04
- || Game_Flag_Query(296)
- || Global_Variable_Query(kVariableChapter) >= 4) {
- if (Actor_Query_Goal_Number(kActorBulletBob) == 1 && !Player_Query_Combat_Mode()) {
- AI_Countdown_Timer_Reset(kActorBulletBob, 2);
- Game_Flag_Reset(296);
- Game_Flag_Set(303);
- Actor_Set_Goal_Number(kActorBulletBob, 0);
- }
- } else {
+
+ if ( Player_Query_Combat_Mode()
+ && Player_Query_Current_Scene() == kSceneRC04
+ && !Game_Flag_Query(kFlagRC04McCoyCombatMode)
+ && Global_Variable_Query(kVariableChapter) < 4
+ ) {
AI_Countdown_Timer_Reset(kActorBulletBob, 2);
AI_Countdown_Timer_Start(kActorBulletBob, 2, 10);
- Actor_Set_Goal_Number(kActorBulletBob, 1);
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobWarningMcCoy);
Actor_Modify_Friendliness_To_Other(kActorBulletBob, kActorMcCoy, -15);
- Game_Flag_Set(296);
+ Game_Flag_Set(kFlagRC04McCoyCombatMode);
+ } else if ( Actor_Query_Goal_Number(kActorBulletBob) == kGoalBulletBobWarningMcCoy
+ && !Player_Query_Combat_Mode()
+ ) {
+ AI_Countdown_Timer_Reset(kActorBulletBob, 2);
+ Game_Flag_Reset(kFlagRC04McCoyCombatMode);
+ Game_Flag_Set(kFlagRC04McCoyWarned);
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobDefault);
}
- if (Actor_Query_Goal_Number(kActorBulletBob) != 2 || Game_Flag_Query(295) || _animationState) {
- if (Game_Flag_Query(303) == 1 && Player_Query_Combat_Mode() == 1 && Actor_Query_Goal_Number(kActorBulletBob) != 4) {
- Actor_Set_Goal_Number(kActorBulletBob, 2);
- } else {
- return false;
- }
- } else {
- Actor_Face_Heading(kActorBulletBob, 208, 0);
+
+ if ( Actor_Query_Goal_Number(kActorBulletBob) == kGoalBulletBobShootMcCoy
+ && !Game_Flag_Query(kFlagRC04BobShootMcCoy)
+ && _animationState == 0
+ ) {
+ Actor_Face_Heading(kActorBulletBob, 208, false);
_animationFrame = 0;
_animationState = 2;
- Actor_Set_Goal_Number(kActorBulletBob, 3);
- Game_Flag_Set(295);
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShotMcCoy);
+ Game_Flag_Set(kFlagRC04BobShootMcCoy);
+ return true;
}
- return true;
+ if (Game_Flag_Query(kFlagRC04McCoyWarned)
+ && Player_Query_Combat_Mode()
+ && Actor_Query_Goal_Number(kActorBulletBob) != kGoalBulletBobDead
+ ) {
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShootMcCoy);
+ return true;
+ }
+
+ return false;
}
void AIScriptBulletBob::TimerExpired(int timer) {
- if (timer != 2 || Actor_Query_Goal_Number(kActorBulletBob) != 1)
- return; //false;
-
- Actor_Set_Goal_Number(kActorBulletBob, 2);
- AI_Countdown_Timer_Reset(kActorBulletBob, 2);
-
- return; //true;
+ if (timer == 2
+ && Actor_Query_Goal_Number(kActorBulletBob) == kGoalBulletBobWarningMcCoy
+ ) {
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShootMcCoy);
+ AI_Countdown_Timer_Reset(kActorBulletBob, 2);
+ return; //true;
+ }
+ return; //false;
}
void AIScriptBulletBob::CompletedMovementTrack() {
@@ -127,14 +139,14 @@ void AIScriptBulletBob::ShotAtAndMissed() {
}
bool AIScriptBulletBob::ShotAtAndHit() {
- Global_Variable_Increment(24, 1);
- if (Global_Variable_Query(24) > 0) {
- Actor_Set_Targetable(kActorBulletBob, 0);
+ Global_Variable_Increment(kVariableBobShot, 1);
+ if (Global_Variable_Query(kVariableBobShot) > 0) {
+ Actor_Set_Targetable(kActorBulletBob, false);
Actor_Set_Goal_Number(kActorBulletBob, 99);
_animationFrame = 0;
_animationState = 3;
Ambient_Sounds_Play_Speech_Sound(2, 9000, 100, 0, 0, 0);
- Actor_Face_Heading(kActorBulletBob, 281, 0);
+ Actor_Face_Heading(kActorBulletBob, 281, false);
}
return false;
@@ -149,35 +161,45 @@ int AIScriptBulletBob::GetFriendlinessModifierIfGetsClue(int otherActorId, int c
}
bool AIScriptBulletBob::GoalChanged(int currentGoalNumber, int newGoalNumber) {
- if (newGoalNumber || Game_Flag_Query(303) != 1 || Player_Query_Current_Scene() != kSceneRC04) {
- if (newGoalNumber == 1 && !Game_Flag_Query(303) && Player_Query_Current_Scene() == kSceneRC04) {
- Actor_Says(kActorBulletBob, 120, 37);
- Actor_Says(kActorMcCoy, 4915, 13);
- return true;
- }
- if (newGoalNumber == 6) {
- Scene_Exits_Disable();
- Actor_Force_Stop_Walking(kActorMcCoy);
- Ambient_Sounds_Play_Speech_Sound(kActorMcCoy, 9900, 100, 0, 0, 0);
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
- Actor_Retired_Here(kActorMcCoy, 6, 6, 1, -1);
- Scene_Exits_Enable();
- }
- if (newGoalNumber != 4) {
- return false;
- }
- if (Actor_Clue_Query(kActorMcCoy, 164) != 1) {
- Delay(2000);
- Actor_Voice_Over(2100, kActorVoiceOver);
- Actor_Voice_Over(2110, kActorVoiceOver);
- Actor_Voice_Over(2120, kActorVoiceOver);
- Actor_Voice_Over(2130, kActorVoiceOver);
- }
- } else {
+ if (newGoalNumber == kGoalBulletBobDefault
+ && Game_Flag_Query(kFlagRC04McCoyWarned)
+ && Player_Query_Current_Scene() == kSceneRC04
+ ) {
Actor_Says(kActorBulletBob, 140, 16);
+ return true;
}
- return true;
+ if ( newGoalNumber == kGoalBulletBobWarningMcCoy
+ && !Game_Flag_Query(kFlagRC04McCoyWarned)
+ && Player_Query_Current_Scene() == kSceneRC04
+ ) {
+ Actor_Says(kActorBulletBob, 120, 37);
+ Actor_Says(kActorMcCoy, 4915, 13);
+ return true;
+ }
+
+ if (newGoalNumber == kGoalBulletBobDead
+ && !Actor_Clue_Query(kActorMcCoy, kClueVKBobGorskyReplicant)
+ ) {
+ Delay(2000);
+ Actor_Voice_Over(2100, kActorVoiceOver);
+ Actor_Voice_Over(2110, kActorVoiceOver);
+ Actor_Voice_Over(2120, kActorVoiceOver);
+ Actor_Voice_Over(2130, kActorVoiceOver);
+ return true;
+ }
+
+ if (newGoalNumber == 6) {
+ Scene_Exits_Disable();
+ Actor_Force_Stop_Walking(kActorMcCoy);
+ Ambient_Sounds_Play_Speech_Sound(kActorMcCoy, 9900, 100, 0, 0, 0);
+ Actor_Change_Animation_Mode(kActorMcCoy, 48);
+ Actor_Retired_Here(kActorMcCoy, 6, 6, 1, -1);
+ Scene_Exits_Enable();
+ return true;
+ }
+
+ return false;
}
bool AIScriptBulletBob::UpdateAnimation(int *animation, int *frame) {
@@ -256,7 +278,7 @@ bool AIScriptBulletBob::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(510) - 1) {
_animationFrame = Slice_Animation_Query_Number_Of_Frames(510) - 1;
_animationState = 16;
- Game_Flag_Set(289);
+ Game_Flag_Set(kFlagRC04McCoyShotBob);
}
break;
@@ -414,14 +436,14 @@ bool AIScriptBulletBob::UpdateAnimation(int *animation, int *frame) {
bool AIScriptBulletBob::ChangeAnimationMode(int mode) {
switch (mode) {
- case 0:
+ case kAnimationModeIdle:
if (_animationState > 4 || _animationState) {
_animationState = 0;
_animationFrame = 0;
}
break;
- case 3:
+ case kAnimationModeTalk:
case 9:
case 30:
if (_animationState < 6 || _animationState > 13) {
@@ -431,14 +453,14 @@ bool AIScriptBulletBob::ChangeAnimationMode(int mode) {
}
break;
- case 4:
+ case kAnimationModeCombatIdle:
if (_animationState <= 4 && !_animationState) {
_animationState = 14;
_animationFrame = 0;
}
break;
- case 6:
+ case kAnimationModeCombatAttack:
_animationState = 2;
_animationFrame = 0;
break;
@@ -461,8 +483,8 @@ bool AIScriptBulletBob::ChangeAnimationMode(int mode) {
}
break;
- case 21:
- case 22:
+ case kAnimationModeHit:
+ case kAnimationModeCombatHit:
_animationState = 3;
_animationFrame = 0;
break;
diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp
index 04fd7cd818..a47a4bb7dd 100644
--- a/engines/bladerunner/script/ai/clovis.cpp
+++ b/engines/bladerunner/script/ai/clovis.cpp
@@ -178,7 +178,7 @@ void AIScriptClovis::Retired(int byActorId) {
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(579);
Game_Flag_Reset(653);
- Set_Enter(kSetKP05_KP06, kSetKP03);
+ Set_Enter(kSetKP05_KP06, kSceneKP06);
}
}
}
@@ -273,14 +273,14 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorClovis, 100, 17);
Delay(1000);
if (!Game_Flag_Query(48)) {
- Actor_Clue_Acquire(kActorMcCoy, kClueStaggeredbyPunches, 1, kActorSadik);
+ Actor_Clue_Acquire(kActorMcCoy, kClueStaggeredbyPunches, true, kActorSadik);
}
Game_Flag_Set(383);
Game_Flag_Reset(509);
Global_Variable_Set(kVariableChapter, 3);
Actor_Set_Goal_Number(kActorClovis, 200);
Actor_Set_Goal_Number(kActorSadik, 200);
- Actor_Clue_Acquire(kActorMcCoy, kClueAct2Ended, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueAct2Ended, true, -1);
Player_Gains_Control();
Chapter_Enter(3, 6, 20);
Game_Flag_Set(550);
diff --git a/engines/bladerunner/script/ai/crazylegs.cpp b/engines/bladerunner/script/ai/crazylegs.cpp
index f7141b5c51..4766efe915 100644
--- a/engines/bladerunner/script/ai/crazylegs.cpp
+++ b/engines/bladerunner/script/ai/crazylegs.cpp
@@ -117,22 +117,25 @@ int AIScriptCrazylegs::GetFriendlinessModifierIfGetsClue(int otherActorId, int c
}
bool AIScriptCrazylegs::GoalChanged(int currentGoalNumber, int newGoalNumber) {
- if (newGoalNumber > 2)
- return false;
-
- if (newGoalNumber) {
- if (newGoalNumber != 1) {
- AI_Movement_Track_Flush(kActorCrazylegs);
- AI_Movement_Track_Append(kActorCrazylegs, 360, 0);
- AI_Movement_Track_Append(kActorCrazylegs, 40, 0);
- AI_Movement_Track_Repeat(kActorCrazylegs);
- return true;
- }
+ if (newGoalNumber == 0) {
+ return true;
+ }
+
+ if (newGoalNumber == 1) {
AI_Movement_Track_Flush(kActorCrazylegs);
Actor_Set_Targetable(kActorCrazylegs, 0);
+ return true;
}
- return true;
+ if (newGoalNumber == 2) {
+ AI_Movement_Track_Flush(kActorCrazylegs);
+ AI_Movement_Track_Append(kActorCrazylegs, 360, 0);
+ AI_Movement_Track_Append(kActorCrazylegs, 40, 0);
+ AI_Movement_Track_Repeat(kActorCrazylegs);
+ return true;
+ }
+
+ return false;
}
bool AIScriptCrazylegs::UpdateAnimation(int *animation, int *frame) {
@@ -378,19 +381,6 @@ bool AIScriptCrazylegs::ChangeAnimationMode(int mode) {
_animationState = 4;
_animationFrame = 0;
break;
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 20:
- case 21:
- case 22:
- return true;
case 3:
if (_animationState == 2) {
_animationState = 15;
@@ -444,8 +434,8 @@ bool AIScriptCrazylegs::ChangeAnimationMode(int mode) {
_animationState = 3;
_animationFrame = 0;
break;
- default:
- if (mode == 43 && _animationState != 2) {
+ case 43:
+ if (_animationState != 2) {
_animationState = 18;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(469) - 1;
}
diff --git a/engines/bladerunner/script/ai/dektora.cpp b/engines/bladerunner/script/ai/dektora.cpp
index f2de729f7e..b7268c0daa 100644
--- a/engines/bladerunner/script/ai/dektora.cpp
+++ b/engines/bladerunner/script/ai/dektora.cpp
@@ -296,7 +296,7 @@ void AIScriptDektora::Retired(int byActorId) {
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(579);
Game_Flag_Reset(653);
- Set_Enter(kSetKP05_KP06, kSetKP03);
+ Set_Enter(kSetKP05_KP06, kSceneKP06);
return; //true;
}
@@ -422,7 +422,7 @@ bool AIScriptDektora::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_At_XYZ(kActorDektora, -177.0f, 23.88f, -373.0f, 300);
_animationState = 36;
_animationFrame = 0;
- Set_Enter(kSetNR01, kSetNR01);
+ Set_Enter(kSetNR01, kSceneNR01);
break;
case 279:
diff --git a/engines/bladerunner/script/ai/gaff.cpp b/engines/bladerunner/script/ai/gaff.cpp
index 0db6539ccf..6eaa5b979e 100644
--- a/engines/bladerunner/script/ai/gaff.cpp
+++ b/engines/bladerunner/script/ai/gaff.cpp
@@ -73,13 +73,13 @@ void AIScriptGaff::CompletedMovementTrack() {
Actor_Says(kActorGaff, 60, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 700, kAnimationModeTalk);
Actor_Says(kActorGaff, 70, kAnimationModeTalk);
- Actor_Clue_Acquire(kActorGaff, kClueMcCoyRetiredZuben, 1, -1);
+ Actor_Clue_Acquire(kActorGaff, kClueMcCoyRetiredZuben, true, -1);
} else {
Actor_Says(kActorGaff, 80, kAnimationModeTalk);
Actor_Says(kActorGaff, 90, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 705, kAnimationModeTalk);
Actor_Says(kActorGaff, 100, kAnimationModeTalk);
- Actor_Clue_Acquire(kActorGaff, kClueMcCoyLetZubenEscape, 1, -1);
+ Actor_Clue_Acquire(kActorGaff, kClueMcCoyLetZubenEscape, true, -1);
}
Actor_Says(kActorGaff, 20, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 680, kAnimationModeTalk);
@@ -87,9 +87,9 @@ void AIScriptGaff::CompletedMovementTrack() {
Actor_Says(kActorMcCoy, 685, kAnimationModeTalk);
Actor_Says(kActorGaff, 40, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 690, kAnimationModeTalk);
- Actor_Clue_Acquire(kActorMcCoy, kClueGaffsInformation, 1, kActorGaff);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGaffsInformation, true, kActorGaff);
CDB_Set_Crime(kClueZuben, kCrimeMoonbusHijacking);
- Actor_Clue_Acquire(kActorGaff, kClueMcCoyRetiredZuben, 1, -1);
+ Actor_Clue_Acquire(kActorGaff, kClueMcCoyRetiredZuben, true, -1);
Game_Flag_Set(kFlagGaffApproachedMcCoyAboutZuben);
Player_Gains_Control();
Actor_Set_Goal_Number(kActorGaff, 4);
diff --git a/engines/bladerunner/script/ai/generic_walker_a.cpp b/engines/bladerunner/script/ai/generic_walker_a.cpp
index 0ba48811ed..c747251f90 100644
--- a/engines/bladerunner/script/ai/generic_walker_a.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_a.cpp
@@ -58,7 +58,7 @@ bool AIScriptGenericWalkerA::Update() {
movingUpdate();
}
break;
- case 200:
+ case 200: // Automatic gun at Bullet Bob
Actor_Face_Actor(kActorGenwalkerA, kActorMcCoy, true);
break;
}
diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp
index 3cf685009e..2f48f90f9b 100644
--- a/engines/bladerunner/script/ai/gordo.cpp
+++ b/engines/bladerunner/script/ai/gordo.cpp
@@ -102,7 +102,9 @@ void AIScriptGordo::TimerExpired(int timer) {
}
void AIScriptGordo::CompletedMovementTrack() {
- if (Actor_Query_Goal_Number(kActorGordo) == 1 || Actor_Query_Goal_Number(kActorGordo) == 91) {
+ if (Actor_Query_Goal_Number(kActorGordo) == 1
+ || Actor_Query_Goal_Number(kActorGordo) == 91
+ ) {
Actor_Set_Goal_Number(kActorGordo, 2);
return;// true;
}
@@ -120,7 +122,7 @@ void AIScriptGordo::CompletedMovementTrack() {
Player_Set_Combat_Mode(false);
Player_Gains_Control();
}
- Actor_Clue_Acquire(kActorGordo, kClueMcCoyRetiredZuben, 1, -1);
+ Actor_Clue_Acquire(kActorGordo, kClueMcCoyRetiredZuben, true, -1);
Actor_Set_Goal_Number(kActorGordo, 4);
return;// true;
}
@@ -1408,7 +1410,10 @@ void AIScriptGordo::sub_40FD00() {
Player_Loses_Control();
Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
if (Game_Flag_Query(543)) {
- if (!Game_Flag_Query(272) || Actor_Clue_Query(kActorMcCoy, kClueGordoInterview1) || Actor_Clue_Query(kActorMcCoy, kClueGordoInterview2)) {
+ if (!Game_Flag_Query(kFlagDR05BombExploded)
+ || Actor_Clue_Query(kActorMcCoy, kClueGordoInterview1)
+ || Actor_Clue_Query(kActorMcCoy, kClueGordoInterview2)
+ ) {
if (Game_Flag_Query(544)) {
switch(Random_Query(1, 4)) {
case 1:
@@ -1447,7 +1452,7 @@ void AIScriptGordo::sub_40FD00() {
Actor_Says(kActorGordo, 1020, 13);
Actor_Says(kActorMcCoy, 6500, 14);
Actor_Says(kActorGordo, 1030, 15);
- Actor_Clue_Acquire(kActorMcCoy, kClueGordoInterview1, 0, kActorGordo);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGordoInterview1, false, kActorGordo);
} else {
Actor_Says(kActorGordo, 1040, 12);
Actor_Says(kActorGordo, 1050, 13);
@@ -1456,7 +1461,7 @@ void AIScriptGordo::sub_40FD00() {
Actor_Says(kActorGordo, 1070, 14);
Actor_Says(kActorMcCoy, 6510, 16);
Actor_Says(kActorGordo, 1080, 15);
- Actor_Clue_Acquire(kActorMcCoy, kClueGordoInterview2, 0, kActorGordo);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGordoInterview2, false, kActorGordo);
}
AI_Movement_Track_Unpause(kActorGordo);
}
@@ -1543,7 +1548,7 @@ void AIScriptGordo::sub_410590() {
Actor_Says(kActorGordo, 260, 18);
Actor_Says(kActorMcCoy, 3115, 14);
Actor_Says(kActorGordo, 270, 15);
- Actor_Clue_Acquire(kActorGordo, kClueMcCoyHelpedGordo, 1, -1);
+ Actor_Clue_Acquire(kActorGordo, kClueMcCoyHelpedGordo, true, -1);
} else {
Delay(1000);
Actor_Says(kActorGordo, 570, 13);
@@ -1596,7 +1601,7 @@ void AIScriptGordo::sub_41090C() {
if (Game_Flag_Query(kFlagGordoIsReplicant)) {
Actor_Says(kActorGordo, 450, 17);
Actor_Says(kActorMcCoy, 3280, 15);
- Actor_Clue_Acquire(kActorMcCoy, kClueGordoInterview3, 0, kActorGordo);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGordoInterview3, false, kActorGordo);
}
Actor_Says(kActorGordo, 460, 15);
break;
@@ -1637,7 +1642,7 @@ void AIScriptGordo::sub_41090C() {
Actor_Says(kActorGordo, 560, 13);
Actor_Says(kActorMcCoy, 3315, 15);
Actor_Says(kActorGordo, 570, 14);
- Actor_Clue_Acquire(kActorMcCoy, kClueGordoConfession, 0, kActorGordo);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGordoConfession, false, kActorGordo);
break;
case 810:
Actor_Says(kActorMcCoy, 3255, kAnimationModeTalk);
diff --git a/engines/bladerunner/script/ai/guzza.cpp b/engines/bladerunner/script/ai/guzza.cpp
index 5a4459535e..62267be715 100644
--- a/engines/bladerunner/script/ai/guzza.cpp
+++ b/engines/bladerunner/script/ai/guzza.cpp
@@ -44,14 +44,18 @@ void AIScriptGuzza::Initialize() {
bool AIScriptGuzza::Update() {
if (Global_Variable_Query(kVariableChapter) == 2) {
- if (!Game_Flag_Query(462)) {
- Game_Flag_Set(462);
+ if (!Game_Flag_Query(kFlagPS04GuzzaLeft)) {
+ Game_Flag_Set(kFlagPS04GuzzaLeft);
Actor_Put_In_Set(kActorGuzza, kSetFreeSlotC);
Actor_Set_At_Waypoint(kActorGuzza, 35, 0);
- Actor_Set_Goal_Number(kActorGuzza, 100);
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeaveOffice);
return true;
}
- if (Actor_Query_Goal_Number(kActorGuzza) != 101 && !Game_Flag_Query(463) && Game_Flag_Query(464)) {
+
+ if ( Actor_Query_Goal_Number(kActorGuzza) != kGoalGuzzaGoToHawkersCircle
+ && !Game_Flag_Query(463)
+ && Game_Flag_Query(464)
+ ) {
Game_Flag_Set(463);
Actor_Set_Goal_Number(kActorGuzza, 103);
return true;
@@ -66,26 +70,30 @@ void AIScriptGuzza::TimerExpired(int timer) {
void AIScriptGuzza::CompletedMovementTrack() {
switch (Actor_Query_Goal_Number(kActorGuzza)) {
- case 100:
- Actor_Set_Goal_Number(kActorGuzza, 102);
+ case kGoalGuzzaLeaveOffice:
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaGoToOffice);
// return true;
break;
- case 102:
+
+ case kGoalGuzzaGoToOffice:
if (Random_Query(1, 2) == 1) {
- Actor_Set_Goal_Number(kActorGuzza, 101);
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaGoToHawkersCircle);
} else {
Actor_Set_Goal_Number(kActorGuzza, 104);
}
// return true;
break;
+
case 103:
- Actor_Set_Goal_Number(kActorGuzza, 100);
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeaveOffice);
// return true;
break;
+
case 105:
- Actor_Set_Goal_Number(kActorGuzza, 100);
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeaveOffice);
// return true;
break;
+
}
// return false;
}
@@ -95,7 +103,9 @@ void AIScriptGuzza::ReceivedClue(int clueId, int fromActorId) {
}
void AIScriptGuzza::ClickedByPlayer() {
- if (Global_Variable_Query(kVariableChapter) == 2 && Game_Flag_Query(462) == 1) {
+ if (Global_Variable_Query(kVariableChapter) == 2
+ && Game_Flag_Query(kFlagPS04GuzzaLeft)
+ ) {
Actor_Face_Actor(kActorMcCoy, kActorGuzza, true);
if (Actor_Query_Friendliness_To_Other(kActorGordo, kActorMcCoy) < 48) {
Actor_Says(kActorMcCoy, 3970, 13);
@@ -164,14 +174,15 @@ int AIScriptGuzza::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueI
bool AIScriptGuzza::GoalChanged(int currentGoalNumber, int newGoalNumber) {
switch (newGoalNumber) {
- case 100:
+ case kGoalGuzzaLeaveOffice:
AI_Movement_Track_Flush(kActorGuzza);
AI_Movement_Track_Append_With_Facing(kActorGuzza, 263, 0, 150);
AI_Movement_Track_Append_With_Facing(kActorGuzza, 263, 5, 150);
AI_Movement_Track_Append(kActorGuzza, 35, 90);
AI_Movement_Track_Repeat(kActorGuzza);
return true;
- case 101:
+
+ case kGoalGuzzaGoToHawkersCircle:
AI_Movement_Track_Flush(kActorGuzza);
AI_Movement_Track_Append(kActorGuzza, 258, 0);
AI_Movement_Track_Append(kActorGuzza, 260, 8);
@@ -179,12 +190,14 @@ bool AIScriptGuzza::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorGuzza, 262, 0);
AI_Movement_Track_Repeat(kActorGuzza);
return true;
- case 102:
+
+ case kGoalGuzzaGoToOffice:
AI_Movement_Track_Flush(kActorGuzza);
AI_Movement_Track_Flush(kActorGuzza);
AI_Movement_Track_Append_With_Facing(kActorGuzza, 263, 600, 150);
AI_Movement_Track_Repeat(kActorGuzza);
return true;
+
case 103:
AI_Movement_Track_Flush(kActorGuzza);
AI_Movement_Track_Append(kActorGuzza, 258, 0);
@@ -192,16 +205,19 @@ bool AIScriptGuzza::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorGuzza, 258, 0);
AI_Movement_Track_Repeat(kActorGuzza);
return true;
+
case 104:
AI_Movement_Track_Flush(kActorGuzza);
AI_Movement_Track_Append(kActorGuzza, 34, 60);
AI_Movement_Track_Repeat(kActorGuzza);
return true;
+
case 105:
AI_Movement_Track_Flush(kActorGuzza);
AI_Movement_Track_Append(kActorGuzza, 39, 120);
AI_Movement_Track_Repeat(kActorGuzza);
return true;
+
case 201:
Actor_Change_Animation_Mode(kActorGuzza, 53);
_animationState = 1;
@@ -209,19 +225,23 @@ bool AIScriptGuzza::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Put_In_Set(kActorGuzza, kSetNR03);
Actor_Set_At_XYZ(kActorGuzza, -229.0f, -70.19f, -469.0f, 400);
return true;
+
case 300:
Actor_Put_In_Set(kActorGuzza, kSetUG18);
Actor_Set_At_XYZ(kActorGuzza, 10.79f, 0.0f, -354.17f, 400);
Actor_Change_Animation_Mode(kActorGuzza, kAnimationModeIdle);
return true;
+
case 301:
Actor_Set_Targetable(kActorGuzza, true);
return true;
+
case 302:
case 303:
case 304:
Actor_Set_Targetable(kActorGuzza, false);
return true;
+
case 305:
case 306:
case 307:
diff --git a/engines/bladerunner/script/ai/hanoi.cpp b/engines/bladerunner/script/ai/hanoi.cpp
index aba139a2d7..f735694b9f 100644
--- a/engines/bladerunner/script/ai/hanoi.cpp
+++ b/engines/bladerunner/script/ai/hanoi.cpp
@@ -280,7 +280,7 @@ bool AIScriptHanoi::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Put_In_Set(kActorHanoi, kSetNR01);
Actor_Set_At_XYZ(kActorHanoi, -444.0f, 24.0f, -845.0f, 512);
Actor_Change_Animation_Mode(kActorHanoi, 78);
- Set_Enter(kSetNR01, kSetNR01);
+ Set_Enter(kSetNR01, kSceneNR01);
break;
case 230:
diff --git a/engines/bladerunner/script/ai/holloway.cpp b/engines/bladerunner/script/ai/holloway.cpp
index 5c5f7f8925..7b5fd1dde8 100644
--- a/engines/bladerunner/script/ai/holloway.cpp
+++ b/engines/bladerunner/script/ai/holloway.cpp
@@ -184,7 +184,7 @@ bool AIScriptHolloway::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Player_Gains_Control();
}
Game_Flag_Set(334);
- Set_Enter(kSetUG04, kSetUG18);
+ Set_Enter(kSetUG04, kSceneUG04);
break;
default:
diff --git a/engines/bladerunner/script/ai/howie_lee.cpp b/engines/bladerunner/script/ai/howie_lee.cpp
index a321ce1032..2291d5ac12 100644
--- a/engines/bladerunner/script/ai/howie_lee.cpp
+++ b/engines/bladerunner/script/ai/howie_lee.cpp
@@ -41,24 +41,36 @@ void AIScriptHowieLee::Initialize() {
}
bool AIScriptHowieLee::Update() {
- if (Actor_Query_Goal_Number(kActorHowieLee) < 100 && Global_Variable_Query(kVariableChapter) == 2) {
+ if (Actor_Query_Goal_Number(kActorHowieLee) < 100
+ && Global_Variable_Query(kVariableChapter) == 2
+ ) {
Actor_Set_Goal_Number(kActorHowieLee, 100);
}
+
if (Global_Variable_Query(kVariableChapter) > 1) {
return true;
}
+
if (Actor_Query_Goal_Number(kActorHowieLee) == 0) {
Actor_Set_Goal_Number(kActorHowieLee, 1);
}
- if (Game_Flag_Query(kFlagMcCoyAtCTxx) && !Actor_Query_In_Set(kActorHowieLee, kSetCT01_CT12)) {
+
+ if ( Game_Flag_Query(kFlagMcCoyAtCTxx)
+ && !Actor_Query_In_Set(kActorHowieLee, kSetCT01_CT12)
+ ) {
AI_Movement_Track_Flush(kActorHowieLee);
AI_Movement_Track_Append(kActorHowieLee, 67, 0);
Actor_Set_Goal_Number(kActorHowieLee, 0);
}
- if (Actor_Query_Goal_Number(kActorHowieLee) == 1 && Game_Flag_Query(kFlagBoughtHowieLeeFood) && !Game_Flag_Query(kFlagMcCoyAtCTxx)) {
+
+ if ( Actor_Query_Goal_Number(kActorHowieLee) == 1
+ && Game_Flag_Query(kFlagBoughtHowieLeeFood)
+ && !Game_Flag_Query(kFlagMcCoyAtCTxx)
+ ) {
Actor_Set_Goal_Number(kActorHowieLee, 4);
return true;
}
+
return false;
}
@@ -69,23 +81,33 @@ void AIScriptHowieLee::TimerExpired(int timer) {
void AIScriptHowieLee::CompletedMovementTrack() {
if (Actor_Query_Goal_Number(kActorHowieLee) == 1) {
Actor_Set_Goal_Number(kActorHowieLee, 2);
- // return true;
- } else if (Actor_Query_Goal_Number(kActorHowieLee) == 2) {
+ return; // true;
+ }
+
+ if (Actor_Query_Goal_Number(kActorHowieLee) == 2) {
Actor_Set_Goal_Number(kActorHowieLee, 3);
- // return true;
- } else if (Actor_Query_Goal_Number(kActorHowieLee) == 3) {
+ return; // true;
+ }
+
+ if (Actor_Query_Goal_Number(kActorHowieLee) == 3) {
Actor_Set_Goal_Number(kActorHowieLee, 0);
- // return true;
- } else if (Actor_Query_Goal_Number(kActorHowieLee) == 3) {
- // Bug/intentional in original game
+ return; // true;
+ }
+
+ // Bug/intentional in original game?
+ if (Actor_Query_Goal_Number(kActorHowieLee) == 3) {
Actor_Set_Goal_Number(kActorHowieLee, 4);
- // return true;
- } else if (Actor_Query_Goal_Number(kActorHowieLee) == 4) {
+ return; // true;
+ }
+
+ if (Actor_Query_Goal_Number(kActorHowieLee) == 4) {
Actor_Set_Goal_Number(kActorHowieLee, 5);
- // return true;
- } else if (Actor_Query_Goal_Number(kActorHowieLee) == 5) {
+ return; // true;
+ }
+
+ if (Actor_Query_Goal_Number(kActorHowieLee) == 5) {
Actor_Set_Goal_Number(kActorHowieLee, 0);
- // return true;
+ return; // true;
}
// return false;
}
@@ -238,7 +260,7 @@ bool AIScriptHowieLee::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
var_45DFB8 = Random_Query(0, 1);
} else {
- Game_Flag_Set(239);
+ Game_Flag_Set(kFlagHowieLeeAnimation1);
}
*animation = 673;
}
@@ -251,8 +273,8 @@ bool AIScriptHowieLee::UpdateAnimation(int *animation, int *frame) {
}
break;
case 3:
- if (Game_Flag_Query(239)) {
- Game_Flag_Reset(239);
+ if (Game_Flag_Query(kFlagHowieLeeAnimation1)) {
+ Game_Flag_Reset(kFlagHowieLeeAnimation1);
_animationState = 0;
_animationFrame = 0;
var_45DFB8 = Random_Query(0, 1);
@@ -326,7 +348,7 @@ bool AIScriptHowieLee::ChangeAnimationMode(int mode) {
_animationFrame = 0;
var_45DFB8 = Random_Query(0, 1);
} else {
- Game_Flag_Set(239);
+ Game_Flag_Set(kFlagHowieLeeAnimation1);
}
break;
case kAnimationModeWalk:
diff --git a/engines/bladerunner/script/ai/izo.cpp b/engines/bladerunner/script/ai/izo.cpp
index eb0342f7ca..06966ef101 100644
--- a/engines/bladerunner/script/ai/izo.cpp
+++ b/engines/bladerunner/script/ai/izo.cpp
@@ -235,7 +235,7 @@ void AIScriptIzo::Retired(int byActorId) {
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(579);
Game_Flag_Reset(653);
- Set_Enter(kSetKP05_KP06, kSetKP03);
+ Set_Enter(kSetKP05_KP06, kSceneKP06);
return; //true;
}
@@ -446,16 +446,17 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
} else {
_animationFrame += _var2;
if (_animationFrame < 0) {
- _animationFrame--;
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(297) - 1;
} else if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(297)) {
_animationFrame = 0;
}
- if (!--_var1) {
+ --_var1;
+ if (_var1 == 0) {
_var2 = 2 * Random_Query(0, 1) - 1;
_var1 = Random_Query(6, 14);
_var3 = Random_Query(0, 2);
}
- if (!_animationFrame) {
+ if (_animationFrame == 0) {
if (!Random_Query(0, 5)) {
_var4 = 1;
}
diff --git a/engines/bladerunner/script/ai/klein.cpp b/engines/bladerunner/script/ai/klein.cpp
index 8e633527e5..955150c581 100644
--- a/engines/bladerunner/script/ai/klein.cpp
+++ b/engines/bladerunner/script/ai/klein.cpp
@@ -224,23 +224,29 @@ bool AIScriptKlein::GoalChanged(int currentGoalNumber, int newGoalNumber) {
bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
switch (_animationState) {
case 0:
- if (Actor_Query_Goal_Number(kActorKlein) == 1 || Actor_Query_Goal_Number(kActorKlein) == 2) {
+ if (Actor_Query_Goal_Number(kActorKlein) == 1
+ || Actor_Query_Goal_Number(kActorKlein) == 2
+ ) {
*animation = 691;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(691)) {
_animationFrame = 0;
}
- } else if (!Game_Flag_Query(196) && Actor_Query_Goal_Number(kActorKlein) == 3) {
+ } else if (!Game_Flag_Query(kFlagKleinAnimation1)
+ && Actor_Query_Goal_Number(kActorKlein) == 3
+ ) {
*animation = 689;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(689)) {
_animationFrame = 0;
if (Random_Query(1, 10) == 1) {
- Game_Flag_Set(196);
+ Game_Flag_Set(kFlagKleinAnimation1);
}
}
} else {
- if (Game_Flag_Query(198) && Actor_Query_Goal_Number(kActorKlein) == 3) {
+ if (Game_Flag_Query(kFlagKleinAnimation3)
+ && Actor_Query_Goal_Number(kActorKlein) == 3
+ ) {
_animationFrame--;
if (_animationFrame < 0) {
_animationFrame = 0;
@@ -251,24 +257,24 @@ bool AIScriptKlein::UpdateAnimation(int *animation, int *frame) {
*animation = 690;
if (_animationFrame <= 9) {
- if (Game_Flag_Query(198)) {
- Game_Flag_Reset(198);
+ if (Game_Flag_Query(kFlagKleinAnimation3)) {
+ Game_Flag_Reset(kFlagKleinAnimation3);
}
}
if (_animationFrame == 14) {
if (Random_Query(1, 5) == 1) {
- Game_Flag_Set(197);
+ Game_Flag_Set(kFlagKleinAnimation2);
}
}
if (_animationFrame == 15) {
- if (Game_Flag_Query(197) == 1) {
- Game_Flag_Reset(197);
- Game_Flag_Set(198);
+ if (Game_Flag_Query(kFlagKleinAnimation2)) {
+ Game_Flag_Reset(kFlagKleinAnimation2);
+ Game_Flag_Set(kFlagKleinAnimation3);
}
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(690)) {
_animationFrame = 0;
- Game_Flag_Reset(196);
+ Game_Flag_Reset(kFlagKleinAnimation1);
}
}
break;
diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp
index 96cb04ac58..2f514ca51f 100644
--- a/engines/bladerunner/script/ai/mccoy.cpp
+++ b/engines/bladerunner/script/ai/mccoy.cpp
@@ -194,7 +194,7 @@ void AIScriptMcCoy::ReceivedClue(int clueId, int fromActorId) {
Actor_Voice_Over(3420, kActorVoiceOver);
break;
}
- Actor_Clue_Acquire(kActorMcCoy, kClueGuzzaFramedMcCoy, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGuzzaFramedMcCoy, true, -1);
if (clueId == kClueFolder) {
Actor_Voice_Over(2780, kActorVoiceOver);
Actor_Voice_Over(2800, kActorVoiceOver);
@@ -1156,14 +1156,14 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
break;
case 3:
case 4:
- if (_animationFrame == 0 && !Game_Flag_Query(236)) {
+ if (_animationFrame == 0 && !Game_Flag_Query(kFlagMcCoyAnimation1)) {
_animationFrame = 1;
_animationState = dword_45A0F0;
*animation = dword_45A0F4;
dword_45A0F0 = 4;
dword_45A0F4 = 20;
- } else if (_animationFrame <= 4 && Game_Flag_Query(236)) {
- Game_Flag_Reset(236);
+ } else if (_animationFrame <= 4 && Game_Flag_Query(kFlagMcCoyAnimation1)) {
+ Game_Flag_Reset(kFlagMcCoyAnimation1);
*animation = 19;
_animationFrame = 0;
_animationState = 0;
@@ -1241,7 +1241,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
case 10:
case 11:
case 12:
- Game_Flag_Set(236);
+ Game_Flag_Set(kFlagMcCoyAnimation1);
dword_45A0D8 = 0;
dword_45A0DC = 30;
dword_45A0E4 = 0;
@@ -1319,7 +1319,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationStateNext = 3;
_animationNext = 20;
} else {
- Game_Flag_Reset(236);
+ Game_Flag_Reset(kFlagMcCoyAnimation1);
dword_45A0F0 = 4;
dword_45A0F4 = 20;
}
@@ -1405,7 +1405,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationStateNext = 5;
_animationNext = 21;
} else {
- Game_Flag_Reset(236);
+ Game_Flag_Reset(kFlagMcCoyAnimation1);
dword_45A0F0 = 5;
dword_45A0F4 = 21;
}
@@ -1417,7 +1417,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationStateNext = 6;
_animationNext = 27;
} else {
- Game_Flag_Reset(236);
+ Game_Flag_Reset(kFlagMcCoyAnimation1);
dword_45A0F0 = 6;
dword_45A0F4 = 27;
}
@@ -1429,7 +1429,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationStateNext = 7;
_animationNext = 22;
} else {
- Game_Flag_Reset(236);
+ Game_Flag_Reset(kFlagMcCoyAnimation1);
dword_45A0F0 = 7;
dword_45A0F4 = 22;
}
@@ -1440,7 +1440,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationStateNext = 8;
_animationNext = 23;
} else {
- Game_Flag_Reset(236);
+ Game_Flag_Reset(kFlagMcCoyAnimation1);
dword_45A0F0 = 8;
dword_45A0F4 = 23;
}
@@ -1451,7 +1451,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationStateNext = 9;
_animationNext = 24;
} else {
- Game_Flag_Reset(236);
+ Game_Flag_Reset(kFlagMcCoyAnimation1);
dword_45A0F0 = 9;
dword_45A0F4 = 24;
}
@@ -1462,7 +1462,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationStateNext = 10;
_animationNext = 25;
} else {
- Game_Flag_Reset(236);
+ Game_Flag_Reset(kFlagMcCoyAnimation1);
dword_45A0F0 = 10;
dword_45A0F4 = 25;
}
@@ -1473,7 +1473,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationStateNext = 11;
_animationNext = 26;
} else {
- Game_Flag_Reset(236);
+ Game_Flag_Reset(kFlagMcCoyAnimation1);
dword_45A0F0 = 11;
dword_45A0F4 = 26;
}
@@ -1484,7 +1484,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationStateNext = 12;
_animationNext = 27;
} else {
- Game_Flag_Reset(236);
+ Game_Flag_Reset(kFlagMcCoyAnimation1);
dword_45A0F0 = 12;
dword_45A0F4 = 27;
}
@@ -1719,25 +1719,6 @@ void AIScriptMcCoy::sub_405660() {
return;
}
switch (_animationState) {
- case 17:
- case 20:
- case 21:
- case 36:
- _animationState = 16;
- _animationFrame = 0;
- break;
- case 16:
- case 25:
- case 26:
- break;
- case 15:
- _animationState = 16;
- _animationFrame = 16 - 16 * _animationFrame / 12;
- break;
- case 14:
- _animationState = 16;
- _animationFrame = 0;
- break;
case 3:
case 4:
case 5:
@@ -1748,13 +1729,32 @@ void AIScriptMcCoy::sub_405660() {
case 10:
case 11:
case 12:
- Game_Flag_Set(236);
+ Game_Flag_Set(kFlagMcCoyAnimation1);
dword_45A0D8 = 0;
dword_45A0DC = 30;
dword_45A0E4 = 0;
_animationFrameDelta = 1;
dword_45A0E8 = 3;
break;
+ case 14:
+ _animationState = 16;
+ _animationFrame = 0;
+ break;
+ case 15:
+ _animationState = 16;
+ _animationFrame = 16 - 16 * _animationFrame / 12;
+ break;
+ case 17:
+ case 20:
+ case 21:
+ case 36:
+ _animationState = 16;
+ _animationFrame = 0;
+ break;
+ case 16:
+ case 25:
+ case 26:
+ break;
case 60:
_animationState = 61;
break;
diff --git a/engines/bladerunner/script/ai/moraji.cpp b/engines/bladerunner/script/ai/moraji.cpp
index a1896b0e6f..067b5668cd 100644
--- a/engines/bladerunner/script/ai/moraji.cpp
+++ b/engines/bladerunner/script/ai/moraji.cpp
@@ -42,46 +42,49 @@ void AIScriptMoraji::Initialize() {
}
bool AIScriptMoraji::Update() {
- if (Actor_Query_Goal_Number(kActorMoraji) || Player_Query_Current_Scene() != 29 || Game_Flag_Query(269)) {
- if (Actor_Query_Goal_Number(kActorMoraji) == 19) {
- Actor_Says(kActorMoraji, 80, 13);
- _animationState = 9;
- _animationFrame = -1;
- Actor_Set_Goal_Number(kActorMoraji, 18);
- }
- return false;
- } else {
+ if ( Actor_Query_Goal_Number(kActorMoraji) == 0
+ && Player_Query_Current_Scene() == kSceneDR05
+ && !Game_Flag_Query(kFlagDR05BombActivated)
+ ) {
AI_Countdown_Timer_Reset(kActorMoraji, 2);
AI_Countdown_Timer_Start(kActorMoraji, 2, 30);
- Game_Flag_Set(269);
+ Game_Flag_Set(kFlagDR05BombActivated);
return true;
}
+ if (Actor_Query_Goal_Number(kActorMoraji) == 19) {
+ Actor_Says(kActorMoraji, 80, 13);
+ _animationState = 9;
+ _animationFrame = -1;
+ Actor_Set_Goal_Number(kActorMoraji, 18);
+ }
+ return false;
}
void AIScriptMoraji::TimerExpired(int timer) {
- if (timer != 2) {
- return; //false;
+ if (timer == 2) {
+ AI_Countdown_Timer_Reset(kActorMoraji, 2);
+ if (Actor_Query_Goal_Number(kActorMoraji) != 20
+ && Actor_Query_Goal_Number(kActorMoraji) != 21
+ && Actor_Query_Goal_Number(kActorMoraji) != 99
+ ) {
+ Game_Flag_Set(kFlagDR05BombWillExplode);
+ }
+ return; //true;
}
- AI_Countdown_Timer_Reset(kActorMoraji, 2);
- if (Actor_Query_Goal_Number(kActorMoraji) != 20
- && Actor_Query_Goal_Number(kActorMoraji) != 21
- && Actor_Query_Goal_Number(kActorMoraji) != 99) {
- Game_Flag_Set(271);
- }
- return; //true;
+ return; //false;
}
void AIScriptMoraji::CompletedMovementTrack() {
- if (Actor_Query_Goal_Number(kActorMoraji) != 11)
- return; //false
-
- AI_Countdown_Timer_Reset(kActorMoraji, 2);
- Game_Flag_Set(271);
- _animationState = 3;
+ if (Actor_Query_Goal_Number(kActorMoraji) == 11) {
+ AI_Countdown_Timer_Reset(kActorMoraji, 2);
+ Game_Flag_Set(kFlagDR05BombWillExplode);
+ _animationState = 3;
- return; //true;
+ return; //true;
+ }
+ return; //false
}
void AIScriptMoraji::ReceivedClue(int clueId, int fromActorId) {
@@ -184,16 +187,16 @@ bool AIScriptMoraji::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
break;
case 30:
- if (Player_Query_Current_Scene() == 29) {
- Game_Flag_Set(515);
- Set_Enter(kSetDR01_DR02_DR04, kSetCT05);
+ if (Player_Query_Current_Scene() == kSceneDR05) {
+ Game_Flag_Set(kFlagDR05BombExplosionView);
+ Set_Enter(kSetDR01_DR02_DR04, kSceneDR04);
} else {
if (Actor_Query_In_Set(kActorMoraji, kSetDR05)) {
Actor_Set_Goal_Number(kActorMoraji, 99);
} else {
Actor_Set_Goal_Number(kActorMoraji, 20);
}
- Game_Flag_Set(266);
+ Game_Flag_Set(kFlagMorajiExploded);
}
return true;
case 99:
diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp
index ccc2851725..19aa6b5332 100644
--- a/engines/bladerunner/script/ai/officer_leary.cpp
+++ b/engines/bladerunner/script/ai/officer_leary.cpp
@@ -49,46 +49,73 @@ bool AIScriptOfficerLeary::Update() {
) {
AI_Movement_Track_Flush(kActorOfficerLeary);
Actor_Set_Goal_Number(kActorOfficerLeary, 300);
- } else if (Global_Variable_Query(kVariableChapter) == 5
- && Actor_Query_Goal_Number(kActorOfficerLeary) < 400
+ return false;
+ }
+
+ if (Global_Variable_Query(kVariableChapter) == 5
+ && Actor_Query_Goal_Number(kActorOfficerLeary) < 400
) {
AI_Movement_Track_Flush(kActorOfficerLeary);
Actor_Set_Goal_Number(kActorOfficerLeary, 400);
- } else if (!Game_Flag_Query(kFlagMcCoyAtRCxx)
- && Game_Flag_Query(kFlagChopstickWrapperTaken)
- && Game_Flag_Query(kFlagChromeDebrisTaken)
- && Player_Query_Current_Scene() != kSceneRC01
- && Global_Variable_Query(kVariableChapter) < 3
+ return false;
+ }
+
+ if (!Game_Flag_Query(kFlagMcCoyAtRCxx)
+ && Game_Flag_Query(kFlagChopstickWrapperTaken)
+ && Game_Flag_Query(kFlagChromeDebrisTaken)
+ && Player_Query_Current_Scene() != kSceneRC01
+ && Global_Variable_Query(kVariableChapter) < 3
) {
Game_Flag_Set(kFlagRC01PoliceDone);
Actor_Set_Goal_Number(kActorOfficerLeary, 3);
- } else if (Actor_Query_Goal_Number(kActorOfficerLeary) != kGoalOfficerLearyCrowdInterrogation
- && Actor_Query_Goal_Number(kActorOfficerLeary) != 2
- && Game_Flag_Query(199)
+ return false;
+ }
+
+ if (Actor_Query_Goal_Number(kActorOfficerLeary) != kGoalOfficerLearyRC01WalkToCrowd
+ && Actor_Query_Goal_Number(kActorOfficerLeary) != kGoalOfficerLearyRC01CrowdInterrogation
+ && Game_Flag_Query(kFlagOfficerLearyTakingNotes)
) {
- Game_Flag_Reset(199);
- } else if ( Global_Variable_Query(15) > 4
- && !Actor_Clue_Query(kActorOfficerLeary, kClueMcCoyIsStupid)
+ Game_Flag_Reset(kFlagOfficerLearyTakingNotes);
+ return false;
+ }
+
+ if ( Global_Variable_Query(15) > 4
+ && !Actor_Clue_Query(kActorOfficerLeary, kClueMcCoyIsStupid)
) {
- Actor_Clue_Acquire(kActorOfficerLeary, kClueMcCoyIsStupid, 1, -1);
- } else if (Game_Flag_Query(629)) {
+ Actor_Clue_Acquire(kActorOfficerLeary, kClueMcCoyIsStupid, true, -1);
+ return false;
+ }
+
+ if (Game_Flag_Query(629)) {
Game_Flag_Reset(629);
- } else if ( Game_Flag_Query(623)
- && !Game_Flag_Query(664)
+ return false;
+ }
+
+ if ( Game_Flag_Query(623)
+ && !Game_Flag_Query(664)
) {
Game_Flag_Set(664);
Actor_Set_Goal_Number(kActorOfficerLeary, 305);
- } else if (Actor_Query_Goal_Number(kActorOfficerLeary) == 310
- && Actor_Query_Which_Set_In(kActorOfficerLeary) != Player_Query_Current_Set()
+ return false;
+ }
+
+ if (Actor_Query_Goal_Number(kActorOfficerLeary) == 310
+ && Actor_Query_Which_Set_In(kActorOfficerLeary) != Player_Query_Current_Set()
) {
Non_Player_Actor_Combat_Mode_Off(kActorOfficerLeary);
Actor_Set_Goal_Number(kActorOfficerLeary, 305);
- } else if (Actor_Query_Goal_Number(kActorOfficerLeary) == 599
- && Actor_Query_Which_Set_In(kActorOfficerLeary) != Player_Query_Current_Set()
+ return false;
+ }
+
+ if (Actor_Query_Goal_Number(kActorOfficerLeary) == 599
+ && Actor_Query_Which_Set_In(kActorOfficerLeary) != Player_Query_Current_Set()
) {
Actor_Set_Health(kActorOfficerLeary, 40, 40);
Actor_Set_Goal_Number(kActorOfficerLeary, 305);
- } else if (Actor_Query_Goal_Number(kActorOfficerLeary) == 305) {
+ return false;
+ }
+
+ if (Actor_Query_Goal_Number(kActorOfficerLeary) == 305) {
switch (Actor_Query_Which_Set_In(kActorOfficerLeary)) {
case kSetDR01_DR02_DR04:
if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) {
@@ -180,37 +207,31 @@ void AIScriptOfficerLeary::TimerExpired(int timer) {
}
} else if (timer == 2) {
AI_Countdown_Timer_Reset(kActorOfficerLeary, 2);
- sub_431420();
+ Game_Flag_Reset(kFlagOfficerLearyTakingNotes);
}
}
void AIScriptOfficerLeary::CompletedMovementTrack() {
- int v0;
- unsigned int v1;
-
- v0 = Actor_Query_Goal_Number(kActorOfficerLeary);
- if (v0 == 1) {
- Actor_Set_Goal_Number(kActorOfficerLeary, 2);
+ int goal = Actor_Query_Goal_Number(kActorOfficerLeary);
+ if (goal == kGoalOfficerLearyRC01WalkToCrowd) {
+ Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyRC01CrowdInterrogation);
return;
}
- //todo: tidyup
- v1 = v0 - 305;
- if (v1 > 3) {
+ if (goal > 308) {
return;
}
- if (!v1) {
+ if (goal == 305) {
Actor_Set_Goal_Number(kActorOfficerLeary, 306);
return;
}
- if (v1 != 2) {
- if (v1 == 3) {
- Actor_Change_Animation_Mode(kActorOfficerLeary, 4);
- Actor_Face_Actor(kActorOfficerLeary, kActorMcCoy, true);
- Actor_Set_Goal_Number(kActorOfficerLeary, 309);
- }
- return;
+ if (goal == 307) {
+ Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 12, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, 0);
+ }
+ if (goal == 308) {
+ Actor_Change_Animation_Mode(kActorOfficerLeary, 4);
+ Actor_Face_Actor(kActorOfficerLeary, kActorMcCoy, true);
+ Actor_Set_Goal_Number(kActorOfficerLeary, 309);
}
- Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 12, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, 0);
}
void AIScriptOfficerLeary::ReceivedClue(int clueId, int fromActorId) {
@@ -279,7 +300,7 @@ int AIScriptOfficerLeary::GetFriendlinessModifierIfGetsClue(int otherActorId, in
bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) {
switch (newGoalNumber) {
- case 1:
+ case kGoalOfficerLearyRC01WalkToCrowd:
AI_Movement_Track_Flush(kActorOfficerLeary);
if (Random_Query(1, 2) == 1) {
AI_Movement_Track_Append(kActorOfficerLeary, 57, 7);
@@ -290,19 +311,23 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
}
AI_Movement_Track_Repeat(kActorOfficerLeary);
return true;
- case 2:
+ case kGoalOfficerLearyRC01CrowdInterrogation:
if (Random_Query(1, 3) == 1) {
- if (Random_Query(1, 2) == 1 && !Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewA)) {
- Actor_Clue_Acquire(kActorOfficerLeary, kClueCrowdInterviewA, 0, -1);
+ if ( Random_Query(1, 2) == 1
+ && !Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewA)
+ ) {
+ Actor_Clue_Acquire(kActorOfficerLeary, kClueCrowdInterviewA, false, -1);
} else if (!Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewB)) {
- Actor_Clue_Acquire(kActorOfficerLeary, kClueCrowdInterviewB, 0, -1);
+ Actor_Clue_Acquire(kActorOfficerLeary, kClueCrowdInterviewB, false, -1);
}
}
if (Game_Flag_Query(kFlagMcCoyAtRCxx)) {
- if (Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewA) && Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewB)) {
+ if (Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewA)
+ && Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewB)
+ ) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDefault);
} else {
- Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyCrowdInterrogation);
+ Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyRC01WalkToCrowd);
}
} else {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDefault);
@@ -827,11 +852,11 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
*frame = _animationFrame;
return true;
case 2:
- if (Game_Flag_Query(199)) {
+ if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
*animation = 603;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(603) - 1) {
- Game_Flag_Reset(199);
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(603)) {
+ Game_Flag_Reset(kFlagOfficerLearyTakingNotes);
_animationFrame = 0;
_animationState = _animationStateNext;
*animation = _animationNext;
@@ -872,7 +897,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(601)) {
_animationFrame = 0;
}
- if (!Game_Flag_Query(199)) {
+ if (!Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationState = 32;
_animationFrame = 0;
*animation = 603;
@@ -880,7 +905,8 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
*frame = _animationFrame;
return true;
case 0:
- if (Game_Flag_Query(199) && !Game_Flag_Query(KFlagMcCoyAndOfficerLearyTalking)) {
+ if ( Game_Flag_Query(kFlagOfficerLearyTakingNotes)
+ && !Game_Flag_Query(KFlagMcCoyAndOfficerLearyTalking)) {
_animationState = 31;
_animationFrame = 0;
*animation = 604;
@@ -928,7 +954,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
break;
case 20:
v1 = _animationFrame;
- Actor_Change_Animation_Mode(kActorOfficerLeary, 4);
+ Actor_Change_Animation_Mode(kActorOfficerLeary, kAnimationModeCombatIdle);
_animationFrame = v1;
_animationState = 21;
break;
@@ -966,7 +992,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationState = 2;
_animationStateNext = 11;
_animationNext = 592;
- if (Game_Flag_Query(199) == 1) {
+ if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
}
@@ -1016,11 +1042,10 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationState = 2;
_animationStateNext = 12;
_animationNext = 593;
- if (Game_Flag_Query(199) == 1) {
+ if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- }
- else if (_animationState > 19) {
+ } else if (_animationState > 19) {
_animationState = 12;
_animationFrame = 0;
var_45D5BC = 0;
@@ -1031,11 +1056,10 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationState = 2;
_animationStateNext = 13;
_animationNext = 594;
- if (Game_Flag_Query(199) == 1) {
+ if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- }
- else if (_animationState > 19) {
+ } else if (_animationState > 19) {
_animationState = 13;
_animationFrame = 0;
var_45D5BC = 0;
@@ -1046,11 +1070,10 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationState = 2;
_animationStateNext = 14;
_animationNext = 595;
- if (Game_Flag_Query(199) == 1) {
+ if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- }
- else if (_animationState > 19) {
+ } else if (_animationState > 19) {
_animationState = 14;
_animationFrame = 0;
var_45D5BC = 0;
@@ -1061,11 +1084,10 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationState = 2;
_animationStateNext = 15;
_animationNext = 596;
- if (Game_Flag_Query(199) == 1) {
+ if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- }
- else if (_animationState > 19) {
+ } else if (_animationState > 19) {
_animationState = 15;
_animationFrame = 0;
var_45D5BC = 0;
@@ -1076,11 +1098,10 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationState = 2;
_animationStateNext = 16;
_animationNext = 597;
- if (Game_Flag_Query(199) == 1) {
+ if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- }
- else if (_animationState > 19) {
+ } else if (_animationState > 19) {
_animationState = 16;
_animationFrame = 0;
var_45D5BC = 0;
@@ -1091,11 +1112,10 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationState = 2;
_animationStateNext = 17;
_animationNext = 598;
- if (Game_Flag_Query(199) == 1) {
+ if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
- }
- else if (_animationState > 19) {
+ } else if (_animationState > 19) {
_animationState = 17;
_animationFrame = 0;
var_45D5BC = 0;
@@ -1106,7 +1126,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationState = 2;
_animationStateNext = 18;
_animationNext = 599;
- if (Game_Flag_Query(199) == 1) {
+ if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
} else if (_animationState > 19) {
@@ -1120,7 +1140,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationState = 2;
_animationStateNext = 19;
_animationNext = 600;
- if (Game_Flag_Query(199) == 1) {
+ if (Game_Flag_Query(kFlagOfficerLearyTakingNotes)) {
_animationFrame = 0;
}
} else if (_animationState > 19) {
@@ -1155,10 +1175,10 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
case 27:
- Game_Flag_Reset(199);
+ Game_Flag_Reset(kFlagOfficerLearyTakingNotes);
break;
case 28:
- Game_Flag_Set(199);
+ Game_Flag_Set(kFlagOfficerLearyTakingNotes);
break;
case kAnimationModeWalkUp:
_animationState = 5;
@@ -1176,7 +1196,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) {
_animationState = 10;
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
if (_animationState == 24) {
_animationState = 28;
_animationFrame = 0;
@@ -1209,7 +1229,7 @@ void AIScriptOfficerLeary::SetAnimationState(int animationState, int animationFr
bool AIScriptOfficerLeary::ReachedMovementTrackWaypoint(int waypointId) {
if (waypointId == 57 || waypointId == 58) {
- sub_431408();
+ Game_Flag_Set(kFlagOfficerLearyTakingNotes);
AI_Countdown_Timer_Reset(kActorOfficerLeary, 2);
AI_Countdown_Timer_Start(kActorOfficerLeary, 2, 6);
}
@@ -1220,13 +1240,4 @@ void AIScriptOfficerLeary::FledCombat() {
Actor_Set_Goal_Number(kActorOfficerLeary, 300);
}
-bool AIScriptOfficerLeary::sub_431408() {
- Game_Flag_Set(199);
- return true;
-}
-
-bool AIScriptOfficerLeary::sub_431420() {
- Game_Flag_Reset(199);
- return true;
-}
} // End of namespace BladeRunner
diff --git a/engines/bladerunner/script/ai/photographer.cpp b/engines/bladerunner/script/ai/photographer.cpp
index dbe443b03e..2b082e8678 100644
--- a/engines/bladerunner/script/ai/photographer.cpp
+++ b/engines/bladerunner/script/ai/photographer.cpp
@@ -42,15 +42,18 @@ void AIScriptPhotographer::Initialize() {
}
bool AIScriptPhotographer::Update() {
- if (Game_Flag_Query(450) != 1 || Game_Flag_Query(485))
- return false;
+ if ( Game_Flag_Query(kFlagTB02ElevatorToTB05)
+ && !Game_Flag_Query(kFlagPhotographerToTB06)
+ ) {
+ Actor_Put_In_Set(kActorPhotographer, kSetFreeSlotC);
+ Actor_Set_At_Waypoint(kActorPhotographer, 35, 0);
+ Game_Flag_Set(kFlagPhotographerToTB06);
+ Actor_Set_Goal_Number(kActorPhotographer, 100);
- Actor_Put_In_Set(kActorPhotographer, kSetFreeSlotC);
- Actor_Set_At_Waypoint(kActorPhotographer, 35, 0);
- Game_Flag_Set(485);
- Actor_Set_Goal_Number(kActorPhotographer, 100);
+ return true;
+ }
- return true;
+ return false;
}
void AIScriptPhotographer::TimerExpired(int timer) {
@@ -83,22 +86,25 @@ void AIScriptPhotographer::ReceivedClue(int clueId, int fromActorId) {
}
void AIScriptPhotographer::ClickedByPlayer() {
- if (Actor_Clue_Query(kActorMcCoy, 44) != 1 || Actor_Clue_Query(kActorMcCoy, 50) || Game_Flag_Query(707)) {
- AI_Movement_Track_Pause(37);
- Actor_Face_Actor(kActorMcCoy, kActorPhotographer, 1);
- Actor_Face_Actor(kActorPhotographer, kActorMcCoy, 1);
- Actor_Says(kActorMcCoy, 5310, 11);
- Actor_Says(kActorPhotographer, 40, 3);
- AI_Movement_Track_Unpause(37);
- } else {
- AI_Movement_Track_Pause(37);
- Actor_Face_Actor(kActorMcCoy, kActorPhotographer, 1);
+ if ( Actor_Clue_Query(kActorMcCoy, kClueDragonflyEarring)
+ && !Actor_Clue_Query(kActorMcCoy, kClueVictimInformation)
+ && !Game_Flag_Query(kFlagTB06PhotographTalk1)
+ ) {
+ AI_Movement_Track_Pause(kActorPhotographer);
+ Actor_Face_Actor(kActorMcCoy, kActorPhotographer, true);
Actor_Says(kActorMcCoy, 5300, 14);
- Actor_Face_Actor(kActorPhotographer, kActorMcCoy, 1);
- Actor_Says(kActorPhotographer, 20, 3);
+ Actor_Face_Actor(kActorPhotographer, kActorMcCoy, true);
+ Actor_Says(kActorPhotographer, 20, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 5305, 15);
- Game_Flag_Set(707);
- AI_Movement_Track_Unpause(37);
+ Game_Flag_Set(kFlagTB06PhotographTalk1);
+ AI_Movement_Track_Unpause(kActorPhotographer);
+ } else {
+ AI_Movement_Track_Pause(kActorPhotographer);
+ Actor_Face_Actor(kActorMcCoy, kActorPhotographer, true);
+ Actor_Face_Actor(kActorPhotographer, kActorMcCoy, true);
+ Actor_Says(kActorMcCoy, 5310, 11);
+ Actor_Says(kActorPhotographer, 40, kAnimationModeTalk);
+ AI_Movement_Track_Unpause(kActorPhotographer);
}
}
@@ -140,55 +146,49 @@ bool AIScriptPhotographer::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Flush(kActorPhotographer);
AI_Movement_Track_Append(kActorPhotographer, 35, 0);
AI_Movement_Track_Repeat(kActorPhotographer);
-
return true;
case 101:
AI_Movement_Track_Flush(kActorPhotographer);
- switch (Random_Query(1, 3) - 1) {
- case 0:
+ switch (Random_Query(1, 3)) {
+ case 1:
AI_Movement_Track_Append(kActorPhotographer, 280, 4);
break;
- case 1:
+ case 2:
AI_Movement_Track_Append(kActorPhotographer, 279, 8);
break;
- case 2:
+ case 3:
AI_Movement_Track_Append(kActorPhotographer, 280, 3);
break;
}
-
AI_Movement_Track_Repeat(kActorPhotographer);
-
return false;
case 102:
AI_Movement_Track_Flush(kActorPhotographer);
AI_Movement_Track_Append(kActorPhotographer, 279, 5);
AI_Movement_Track_Repeat(kActorPhotographer);
- return 1;
+ return true;
case 199:
Actor_Put_In_Set(kActorPhotographer, kSetFreeSlotC);
Actor_Set_At_Waypoint(kActorPhotographer, 35, 0);
Actor_Put_In_Set(kActorMarcus, kSetFreeSlotI);
Actor_Set_At_Waypoint(kActorMarcus, 41, 0);
-
- if (Game_Flag_Query(102)) {
- Item_Remove_From_World(103);
- Item_Remove_From_World(104);
- Item_Remove_From_World(105);
+ if (Game_Flag_Query(kFlagTB06Visited)) {
+ Item_Remove_From_World(kItemDeadDogA);
+ Item_Remove_From_World(kItemDeadDogB);
+ Item_Remove_From_World(kItemDeadDogC);
}
-
- if (!Actor_Clue_Query(kActorMcCoy, 65)) {
- Actor_Clue_Acquire(kActorSteele, kClueDogCollar1, 1, -1);
- if (Game_Flag_Query(102)) {
- Item_Remove_From_World(84);
+ if (!Actor_Clue_Query(kActorMcCoy, kClueDogCollar1)) {
+ Actor_Clue_Acquire(kActorSteele, kClueDogCollar1, true, -1);
+ if (Game_Flag_Query(kFlagTB06Visited)) {
+ Item_Remove_From_World(kItemDogCollar);
}
- Global_Variable_Increment(14, 1);
+ Global_Variable_Increment(kVariableMcCoyEvidenceMissed, 1);
}
-
return true;
default:
@@ -216,11 +216,13 @@ bool AIScriptPhotographer::UpdateAnimation(int *animation, int *frame) {
case 2:
*animation = 747;
- if (!_animationFrame && _flag) {
+ if (_animationFrame == 0
+ && _flag
+ ) {
*animation = 745;
_animationState = 0;
_var2 = 0;
- _flag = 0;
+ _flag = false;
} else {
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(747)) {
@@ -275,7 +277,7 @@ bool AIScriptPhotographer::UpdateAnimation(int *animation, int *frame) {
*animation = 745;
_animationState = 0;
_animationFrame = 0;
- Actor_Change_Animation_Mode(kActorPhotographer, 0);
+ Actor_Change_Animation_Mode(kActorPhotographer, kAnimationModeIdle);
}
}
break;
@@ -290,48 +292,48 @@ bool AIScriptPhotographer::UpdateAnimation(int *animation, int *frame) {
bool AIScriptPhotographer::ChangeAnimationMode(int mode) {
switch (mode) {
- case 0:
- if (_animationState > 5) {
+ case kAnimationModeIdle:
+ if (_animationState < 2 || _animationState > 5) {
_animationState = 0;
_var2 = 0;
_animationFrame = 0;
} else {
- _flag = 1;
+ _flag = true;
}
break;
- case 1:
+ case kAnimationModeWalk:
_animationState = 1;
_var2 = 0;
_animationFrame = 0;
break;
- case 3:
+ case kAnimationModeTalk:
_animationState = 2;
_var2 = 0;
_animationFrame = 0;
- _flag = 0;
+ _flag = false;
break;
case 12:
_animationState = 3;
_var2 = 0;
_animationFrame = 0;
- _flag = 0;
+ _flag = false;
break;
case 13:
_animationState = 4;
_var2 = 0;
_animationFrame = 0;
- _flag = 0;
+ _flag = false;
break;
case 14:
_animationState = 5;
_var2 = 0;
_animationFrame = 0;
- _flag = 0;
+ _flag = false;
break;
case 43:
@@ -360,8 +362,12 @@ void AIScriptPhotographer::SetAnimationState(int animationState, int animationFr
}
bool AIScriptPhotographer::ReachedMovementTrackWaypoint(int waypointId) {
- if (waypointId == 276 || waypointId == 278 || waypointId == 280)
+ if (waypointId == 276
+ || waypointId == 278
+ || waypointId == 280
+ ) {
ChangeAnimationMode(43);
+ }
return true;
}
diff --git a/engines/bladerunner/script/ai/runciter.cpp b/engines/bladerunner/script/ai/runciter.cpp
index 8c52a9c197..19e15989a7 100644
--- a/engines/bladerunner/script/ai/runciter.cpp
+++ b/engines/bladerunner/script/ai/runciter.cpp
@@ -120,7 +120,7 @@ void AIScriptRunciter::OtherAgentEnteredCombatMode(int otherActorId, int combatM
Actor_Says(kActorMcCoy, 4790, -1);
Actor_Says(kActorRunciter, 650, 18);
Actor_Says(kActorRunciter, 660, 19);
- Actor_Clue_Acquire(kActorMcCoy, kClueRuncitersConfession1, 1, kActorRunciter);
+ Actor_Clue_Acquire(kActorMcCoy, kClueRuncitersConfession1, true, kActorRunciter);
} else {
Actor_Says(kActorRunciter, 670, 18);
Actor_Says(kActorMcCoy, 4795, -1);
diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp
index b5aabc2b3b..d66609f71d 100644
--- a/engines/bladerunner/script/ai/sadik.cpp
+++ b/engines/bladerunner/script/ai/sadik.cpp
@@ -196,7 +196,7 @@ void AIScriptSadik::Retired(int byActorId) {
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(579);
Game_Flag_Reset(653);
- Set_Enter(kSetKP05_KP06, kSetKP03);
+ Set_Enter(kSetKP05_KP06, kSceneKP06);
return; //true;
}
}
diff --git a/engines/bladerunner/script/ai/sebastian.cpp b/engines/bladerunner/script/ai/sebastian.cpp
index 4a52f3c2ba..b6a9b50bea 100644
--- a/engines/bladerunner/script/ai/sebastian.cpp
+++ b/engines/bladerunner/script/ai/sebastian.cpp
@@ -472,7 +472,7 @@ void AIScriptSebastian::dialogue() {
}
void AIScriptSebastian::setMcCoyIsABladeRunner() {
- Actor_Clue_Acquire(kActorSebastian, kClueMcCoyIsABladeRunner, 1, 0);
+ Actor_Clue_Acquire(kActorSebastian, kClueMcCoyIsABladeRunner, true, 0);
Actor_Modify_Friendliness_To_Other(kActorSebastian, kActorMcCoy, -5);
Actor_Says(kActorSebastian, 560, 15);
Actor_Says(kActorMcCoy, 7200, 14);
diff --git a/engines/bladerunner/script/ai/sergeant_walls.cpp b/engines/bladerunner/script/ai/sergeant_walls.cpp
index 2c2ae2bd5d..d657f3180c 100644
--- a/engines/bladerunner/script/ai/sergeant_walls.cpp
+++ b/engines/bladerunner/script/ai/sergeant_walls.cpp
@@ -35,8 +35,10 @@ void AIScriptSergeantWalls::Initialize() {
}
bool AIScriptSergeantWalls::Update() {
- if (Game_Flag_Query(206) && Game_Flag_Query(158)) {
- Game_Flag_Reset(206);
+ if (Game_Flag_Query(kFlagSergeantWallsBuzzInRequest)
+ && Game_Flag_Query(kFlagSergeantWallsBuzzInDone)
+ ) {
+ Game_Flag_Reset(kFlagSergeantWallsBuzzInRequest);
}
return false;
}
@@ -97,11 +99,13 @@ bool AIScriptSergeantWalls::UpdateAnimation(int *animation, int *frame) {
switch (_animationState) {
case 0:
_animationFrame++;
- if (Game_Flag_Query(206) && !Game_Flag_Query(158)) {
+ if ( Game_Flag_Query(kFlagSergeantWallsBuzzInRequest)
+ && !Game_Flag_Query(kFlagSergeantWallsBuzzInDone)
+ ) {
*animation = 724;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(724)) {
_animationFrame = 0;
- Game_Flag_Set(158);
+ Game_Flag_Set(kFlagSergeantWallsBuzzInDone);
}
} else {
*animation = 722;
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index 348443fdc9..e1f8feed19 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -43,140 +43,178 @@ void AIScriptSteele::Initialize() {
Actor_Put_In_Set(kActorSteele, kSetFreeSlotG);
Actor_Set_At_Waypoint(kActorSteele, 39, 0);
Actor_Set_Goal_Number(kActorSteele, 0);
- Actor_Clue_Acquire(kActorSteele, kClueCrimeSceneNotes, 1, -1);
+ Actor_Clue_Acquire(kActorSteele, kClueCrimeSceneNotes, true, -1);
}
bool AIScriptSteele::Update() {
- if (Global_Variable_Query(14) <= 5 || Actor_Clue_Query(kActorSteele, 239)) {
- switch (Global_Variable_Query(kVariableChapter)) {
- case 1:
- if (Game_Flag_Query(kFlagMcCoyAtRCxx) && Game_Flag_Query(kFlagMcCoyAtRCxx)) {
- Actor_Set_Goal_Number(kActorSteele, 3);
- return true;
- } else if (Game_Flag_Query(kFlagMcCoyAtCTxx) && Game_Flag_Query(184)) {
- Actor_Set_Goal_Number(kActorSteele, 6);
- return true;
- } else if (Game_Flag_Query(kFlagMcCoyAtPSxx) && Game_Flag_Query(185)) {
- Actor_Set_Goal_Number(kActorSteele, 10);
- return true;
- } else if (Actor_Query_Goal_Number(kActorSteele)
- || Game_Flag_Query(kFlagMcCoyAtRCxx)
- || Player_Query_Current_Scene() == kSceneRC01
- ) {
- if (Actor_Query_Goal_Number(kActorSteele) != 11) {
- break; // go to after switch
- }
- Actor_Set_Goal_Number(kActorSteele, 0);
- return true;
- } else {
- Actor_Set_Goal_Number(kActorSteele, 1);
- Game_Flag_Set(183);
- return true;
- }
+ if ( Global_Variable_Query(kVariableMcCoyEvidenceMissed) > 5
+ && !Actor_Clue_Query(kActorSteele, kClueMcCoyIsStupid)
+ ) {
+ Actor_Clue_Acquire(kActorSteele, kClueMcCoyIsStupid, true, -1);
+ return true;
+ }
- case 2:
- if (Game_Flag_Query(451) != 1 || Game_Flag_Query(457)) {
- if (Actor_Query_Goal_Number(kActorSteele) == 110 && Game_Flag_Query(456) == 1) {
- Actor_Set_Goal_Number(kActorSteele, 111);
- return true;
- } else if (Game_Flag_Query(460) || Actor_Query_Goal_Number(kActorSteele) != 112) {
- if (Actor_Query_Goal_Number(kActorSteele) != 190) {
- break; // go to after switch
- }
- Game_Flag_Reset(460);
- Actor_Set_Goal_Number(kActorSteele, 112);
- return true;
- } else {
- Actor_Set_Goal_Number(kActorSteele, 113);
- Game_Flag_Set(460);
- return true;
- }
- } else {
- Actor_Set_Goal_Number(kActorSteele, 110);
- Game_Flag_Set(457);
- return true;
- }
+ switch (Global_Variable_Query(kVariableChapter)) {
+ case 1:
+ if (Game_Flag_Query(kFlagMcCoyAtRCxx)
+ && Game_Flag_Query(183)
+ ) {
+ Actor_Set_Goal_Number(kActorSteele, 3);
+ return true;
+ }
- case 3:
- if (Global_Variable_Query(kVariableChapter) != 3) {
- break; // go to after switch
- }
- if (Actor_Query_Goal_Number(kActorSteele) < 205)
- Actor_Set_Goal_Number(kActorSteele, 205);
+ if (Game_Flag_Query(kFlagMcCoyAtCTxx)
+ && Game_Flag_Query(184)
+ ) {
+ Actor_Set_Goal_Number(kActorSteele, 6);
+ return true;
+ }
- if (Actor_Query_Goal_Number(kActorSteele) == 251
- && Player_Query_Current_Scene() == kSceneNR01
- && Actor_Query_In_Between_Two_Actors(0, 1, 2)) {
- Actor_Set_Goal_Number(kActorSteele, 255);
- }
- if (Actor_Query_Goal_Number(kActorSteele) == 213) {
- Actor_Set_Goal_Number(kActorSteele, 214);
- return true;
- } else if (Actor_Query_Goal_Number(kActorSteele) == 261) {
- Actor_Set_Goal_Number(kActorSteele, 262);
- return true;
- } else {
- if (Actor_Query_Goal_Number(kActorSteele) != 271) {
- break; // go to after switch
- }
- Actor_Set_Goal_Number(kActorSteele, 270);
- return true;
- }
+ if (Game_Flag_Query(kFlagMcCoyAtPSxx)
+ && Game_Flag_Query(185)
+ ) {
+ Actor_Set_Goal_Number(kActorSteele, 10);
+ return true;
+ }
- case 4:
- if (Actor_Query_Goal_Number(kActorSteele) < 300) {
- Actor_Set_Goal_Number(kActorSteele, 300);
- }
- break; // go to after switch
+ if ( Actor_Query_Goal_Number(kActorSteele) == 0
+ && !Game_Flag_Query(kFlagMcCoyAtRCxx)
+ && Player_Query_Current_Scene() != kSceneRC01
+ ) {
+ Actor_Set_Goal_Number(kActorSteele, 1);
+ Game_Flag_Set(183);
+ return true;
+ }
- case 5:
- if (Game_Flag_Query(653) != 1 || Actor_Query_Goal_Number(kActorSteele) >= 400) {
- break; // go to after switch
- }
- Actor_Set_Goal_Number(kActorSteele, 400);
+ if (Actor_Query_Goal_Number(kActorSteele) == 11) {
+ Actor_Set_Goal_Number(kActorSteele, 0);
return true;
+ }
- default:
- break; // go to after switch
+ break;
+
+ case 2:
+ if ( Game_Flag_Query(kFlagTB05Entered)
+ && !Game_Flag_Query(kFlagTB02SteeleEnter)
+ ) {
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleGoToTB02);
+ Game_Flag_Set(kFlagTB02SteeleEnter);
+ return true;
}
- if (Actor_Query_Goal_Number(kActorSteele) == 599 && !Actor_Query_In_Set(kActorSteele, kSetFreeSlotI)) {
- if (Actor_Query_Which_Set_In(kActorMcCoy) != Actor_Query_Which_Set_In(kActorSteele)) {
- AI_Movement_Track_Flush(kActorSteele);
- AI_Movement_Track_Append(kActorSteele, 41, 100);
- AI_Movement_Track_Repeat(kActorSteele);
- }
+ if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleGoToTB02
+ && Game_Flag_Query(kFlagTB02SteeleTalk)) {
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleLeaveTB02);
+ return true;
+ }
+
+ if (!Game_Flag_Query(kFlagSteeleWalkingAround)
+ && Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleGoToPoliceStation
+ ) {
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleWalkAround);
+ Game_Flag_Set(kFlagSteeleWalkingAround);
+ return true;
}
- return false;
- } else {
- Actor_Clue_Acquire(kActorSteele, 239, 1, -1);
- return true;
+
+ if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleWalkAroundRestart) {
+ Game_Flag_Reset(kFlagSteeleWalkingAround);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleGoToPoliceStation);
+ return true;
+ }
+
+ break;
+
+ case 3:
+ if (Global_Variable_Query(kVariableChapter) != 3) { // why is this here? double check?
+ break;
+ }
+
+ if (Actor_Query_Goal_Number(kActorSteele) < 205) {
+ Actor_Set_Goal_Number(kActorSteele, 205);
+ }
+
+ if (Actor_Query_Goal_Number(kActorSteele) == 251
+ && Player_Query_Current_Scene() == kSceneNR01
+ && Actor_Query_In_Between_Two_Actors(kActorMcCoy, kActorSteele, kActorGordo)
+ ) {
+ Actor_Set_Goal_Number(kActorSteele, 255);
+ }
+
+ if (Actor_Query_Goal_Number(kActorSteele) == 213) {
+ Actor_Set_Goal_Number(kActorSteele, 214);
+ return true;
+ }
+
+ if (Actor_Query_Goal_Number(kActorSteele) == 261) {
+ Actor_Set_Goal_Number(kActorSteele, 262);
+ return true;
+ }
+
+ if (Actor_Query_Goal_Number(kActorSteele) != 271) {
+ Actor_Set_Goal_Number(kActorSteele, 270);
+ }
+
+ break;
+
+ case 4:
+ if (Actor_Query_Goal_Number(kActorSteele) < 300) {
+ Actor_Set_Goal_Number(kActorSteele, 300);
+ }
+
+ break;
+
+ case 5:
+ if (Game_Flag_Query(653)
+ && Actor_Query_Goal_Number(kActorSteele) < 400
+ ) {
+ Actor_Set_Goal_Number(kActorSteele, 400);
+ return true;
+ }
+
+ break;
+
+ default:
+ break;
}
-}
-void AIScriptSteele::TimerExpired(int timer) {
- if (Actor_Query_Goal_Number(kActorSteele) != 210 || timer || Player_Query_Current_Scene() != kSceneNR11) {
- if (Actor_Query_Goal_Number(kActorSteele) != 210 || timer) {
- if (timer == 1) {
- int goal = Actor_Query_Goal_Number(kActorSteele);
+ if ( Actor_Query_Goal_Number(kActorSteele) == 599
+ && !Actor_Query_In_Set(kActorSteele, kSetFreeSlotI)
+ ) {
+ if (Actor_Query_Which_Set_In(kActorMcCoy) != Actor_Query_Which_Set_In(kActorSteele)) {
+ AI_Movement_Track_Flush(kActorSteele);
+ AI_Movement_Track_Append(kActorSteele, 41, 100);
+ AI_Movement_Track_Repeat(kActorSteele);
+ }
+ }
+ return false;
- AI_Countdown_Timer_Reset(kActorSteele, 1);
+}
- if (goal == 415) {
- Actor_Set_Goal_Number(kActorSteele, 416);
- } else if (goal == 416) {
- Actor_Set_Goal_Number(kActorSteele, 419);
- }
- }
- return; // false;
+void AIScriptSteele::TimerExpired(int timer) {
+ if (timer == 0
+ && Actor_Query_Goal_Number(kActorSteele) == 210
+ && Player_Query_Current_Scene() == kSceneNR11
+ ) {
+ if (Player_Query_Current_Scene() == kSceneNR11) {
+ Actor_Set_Goal_Number(kActorSteele, 212);
} else {
Actor_Set_Goal_Number(kActorSteele, 211);
- return; // true;
}
- } else {
- Actor_Set_Goal_Number(kActorSteele, 212);
return; // true;
}
+
+ if (timer == 1) {
+ int goal = Actor_Query_Goal_Number(kActorSteele);
+
+ AI_Countdown_Timer_Reset(kActorSteele, 1);
+
+ if (goal == 415) {
+ Actor_Set_Goal_Number(kActorSteele, 416);
+ } else if (goal == 416) {
+ Actor_Set_Goal_Number(kActorSteele, 419);
+ }
+ }
+ return; // false;
}
void AIScriptSteele::CompletedMovementTrack() {
@@ -195,8 +233,11 @@ void AIScriptSteele::CompletedMovementTrack() {
Actor_Clues_Transfer_New_From_Mainframe(kActorSteele);
}
- if (Query_Score(kActorMcCoy) > Query_Score(kActorSteele) && Query_Score(kActorMcCoy) < 75)
+ if (Query_Score(kActorMcCoy) > Query_Score(kActorSteele)
+ && Query_Score(kActorMcCoy) < 75
+ ) {
Set_Score(kActorSteele, Random_Query(2, 5) + Query_Score(kActorMcCoy));
+ }
Actor_Set_Goal_Number(kActorSteele, 4);
break;
@@ -238,7 +279,7 @@ void AIScriptSteele::CompletedMovementTrack() {
break;
case 100:
- if (Actor_Query_Goal_Number(kActorSteele) == 100) {
+ if (Actor_Query_Goal_Number(kActorSteele) == 100) { //why is this here? double check?
Player_Set_Combat_Mode(kActorMcCoy);
if (Actor_Query_Goal_Number(kActorIzo) != 199) {
@@ -253,12 +294,12 @@ void AIScriptSteele::CompletedMovementTrack() {
}
break;
- case 111:
- Actor_Set_Goal_Number(kActorSteele, 112);
+ case kGoalSteeleLeaveTB02:
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleGoToPoliceStation);
break;
- case 113:
- Actor_Set_Goal_Number(kActorSteele, 190);
+ case kGoalSteeleWalkAround:
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleWalkAroundRestart);
break;
case 241:
@@ -290,11 +331,11 @@ void AIScriptSteele::CompletedMovementTrack() {
Actor_Says(kActorSteele, 670, 59);
Actor_Set_Goal_Number(kActorSteele, 433);
Player_Set_Combat_Mode(kActorSteele);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -731.0f, 8.26f, -657.0f, 0, 0, 0, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -731.0f, 8.26f, -657.0f, 0, false, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(578);
- Set_Enter(kSetKP07, kSetKP04);
+ Set_Enter(kSetKP07, kSceneKP07);
break;
default:
@@ -358,29 +399,42 @@ void AIScriptSteele::ClickedByPlayer() {
void AIScriptSteele::EnteredScene(int sceneId) {
if (Actor_Query_Goal_Number(kActorSteele) == 2) {
- if (!Game_Flag_Query(147) && Random_Query(1, 3) == 1) {
- Actor_Clue_Acquire(kActorSteele, 8, 1, -1);
- Game_Flag_Set(147);
-
- if (Game_Flag_Query(709)) {
- Item_Remove_From_World(82);
+ if (!Game_Flag_Query(kFlagChopstickWrapperTaken)
+ && Random_Query(1, 3) == 1
+ ) {
+ Actor_Clue_Acquire(kActorSteele, kClueChopstickWrapper, true, -1);
+ Game_Flag_Set(kFlagChopstickWrapperTaken);
+
+ if (Game_Flag_Query(kFlagRC51Discovered)) {
+ Item_Remove_From_World(kItemChopstickWrapper);
}
- Global_Variable_Increment(14, 1);
- } else if (!Game_Flag_Query(148) && Random_Query(1, 3) == 1) {
- Actor_Clue_Acquire(kActorSteele, 6, 1, -1);
- Game_Flag_Set(148);
+ Global_Variable_Increment(kVariableMcCoyEvidenceMissed, 1);
+ return; //true;
+ }
+
+ if (!Game_Flag_Query(kFlagCandyTaken)
+ && Random_Query(1, 3) == 1
+ ) {
+ Actor_Clue_Acquire(kActorSteele, kClueCandy, true, -1);
+ Game_Flag_Set(kFlagCandyTaken);
- if (Game_Flag_Query(709)) {
- Item_Remove_From_World(79);
+ if (Game_Flag_Query(kFlagRC51Discovered)) {
+ Item_Remove_From_World(kItemCandy);
}
- } else if (!Game_Flag_Query(149) && Random_Query(1, 20) == 1) {
- Actor_Clue_Acquire(kActorSteele, 7, 1, -1);
- Game_Flag_Set(149);
+ return; //true;
+ }
+
+ if (!Game_Flag_Query(kFlagToyDogTaken)
+ && Random_Query(1, 20) == 1
+ ) {
+ Actor_Clue_Acquire(kActorSteele, kClueToyDog, true, -1);
+ Game_Flag_Set(kFlagToyDogTaken);
- if (Game_Flag_Query(709)) {
- Item_Remove_From_World(98);
+ if (Game_Flag_Query(kFlagRC51Discovered)) {
+ Item_Remove_From_World(kItemToyDog);
}
+ return; //true;
}
}
@@ -406,7 +460,9 @@ void AIScriptSteele::OtherAgentExitedThisScene(int otherActorId) {
}
void AIScriptSteele::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
- if (!otherActorId && Actor_Query_Goal_Number(kActorSteele) == 410)
+ if (otherActorId == kActorMcCoy
+ && Actor_Query_Goal_Number(kActorSteele) == 410
+ )
Actor_Set_Goal_Number(kActorSteele, 418);
}
@@ -415,8 +471,9 @@ void AIScriptSteele::ShotAtAndMissed() {
}
bool AIScriptSteele::ShotAtAndHit() {
- if (Actor_Query_Goal_Number(kActorSteele) == 251)
+ if (Actor_Query_Goal_Number(kActorSteele) == 251) {
Actor_Set_Goal_Number(kActorSteele, 271);
+ }
if (/* !a1 && */ Actor_Query_In_Set(kActorSteele, kSetHF06))
Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, kActorMcCoy, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false);
@@ -439,43 +496,44 @@ void AIScriptSteele::Retired(int byActorId) {
}
int AIScriptSteele::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) {
- if (otherActorId != kActorMcCoy)
+ if (otherActorId != kActorMcCoy) {
return 0;
+ }
switch (clueId) {
- case 202:
- case 223:
- case 224:
- case 226:
- case 227:
- case 228:
- case 231:
- case 241:
- case 242:
+ case kClueMcCoyRecoveredHoldensBadge:
+ case kClueMcCoyRetiredLucy:
+ case kClueMcCoyRetiredDektora:
+ case kClueMcCoyRetiredSadik:
+ case kClueMcCoyShotZubenInTheBack:
+ case kClueMcCoyRetiredLutherLance:
+ case kClueClovisOrdersMcCoysDeath:
+ case kClueMcCoyIsKind:
+ case kClueMcCoyIsInsane:
return 5;
- case 212:
- case 221:
- case 230:
+ case kClueMcCoyKilledRunciter1:
+ case kClueMcCoyShotGuzza:
+ case kClueMcCoyKilledRunciter2:
return 0;
- case 215:
+ case kClueMcCoyLetZubenEscape:
return -4;
- case 216:
- case 217:
- case 218:
- case 219:
- case 220:
+ case kClueMcCoyWarnedIzo:
+ case kClueMcCoyHelpedIzoIzoIsAReplicant:
+ case kClueMcCoyHelpedDektora:
+ case kClueMcCoyHelpedLucy:
+ case kClueMcCoyHelpedGordo:
return -5;
- case 222:
+ case kClueMcCoyRetiredZuben:
return 4;
- case 239:
+ case kClueMcCoyIsStupid:
return -3;
- case 240:
+ case kClueMcCoyIsAnnoying:
return -2;
}
@@ -501,16 +559,19 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorSteele, 12, 5);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 2:
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append(kActorSteele, 61, 30);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 3:
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append(kActorSteele, 35, 45);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 4:
AI_Movement_Track_Flush(kActorSteele);
Game_Flag_Set(184);
@@ -518,6 +579,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorSteele, 39, 45);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 5:
AI_Movement_Track_Flush(kActorSteele);
if (Random_Query(1, 10) == 1) {
@@ -527,11 +589,13 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 6:
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append(kActorSteele, 35, 45);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 7:
AI_Movement_Track_Flush(kActorSteele);
Game_Flag_Set(185);
@@ -539,6 +603,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorSteele, 39, 45);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 8:
AI_Movement_Track_Flush(kActorSteele);
if (Random_Query(1, 2) == 1) {
@@ -548,26 +613,30 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 9:
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append(kActorSteele, 62, 1);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 10:
AI_Movement_Track_Flush(kActorSteele);
Game_Flag_Reset(185);
AI_Movement_Track_Append(kActorSteele, 39, 30);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 11:
- Actor_Clue_Acquire(kActorSteele, kClueGrigorianInterviewA, 1, kActorGrigorian);
+ Actor_Clue_Acquire(kActorSteele, kClueGrigorianInterviewA, true, kActorGrigorian);
if (Game_Flag_Query(kFlagIzoIsReplicant)) {
- Actor_Clue_Acquire(kActorSteele, kClueGrigorianInterviewB1, 1, kActorGrigorian);
+ Actor_Clue_Acquire(kActorSteele, kClueGrigorianInterviewB1, true, kActorGrigorian);
} else {
- Actor_Clue_Acquire(kActorSteele, kClueGrigorianInterviewB2, 1, kActorGrigorian);
+ Actor_Clue_Acquire(kActorSteele, kClueGrigorianInterviewB2, true, kActorGrigorian);
}
Actor_Set_Goal_Number(kActorSteele, 0);
return true;
+
case 100:
AI_Movement_Track_Flush(kActorSteele);
if (Game_Flag_Query(kFlagIzoIsReplicant)) {
@@ -579,34 +648,40 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Movement_Track_Repeat(kActorSteele);
return true;
- case 110:
+
+ case kGoalSteeleGoToTB02:
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append(kActorSteele, 192, 0);
AI_Movement_Track_Repeat(kActorSteele);
return true;
- case 111:
+
+ case kGoalSteeleLeaveTB02:
Loop_Actor_Walk_To_XYZ(kActorSteele, -187.82f, 0.08f, 1460.74f, 0, 0, 0, 0);
- Actor_Face_Heading(kActorSteele, 802, 0);
- Loop_Actor_Travel_Stairs(kActorSteele, 10, 0, 0);
+ Actor_Face_Heading(kActorSteele, 802, false);
+ Loop_Actor_Travel_Stairs(kActorSteele, 10, false, kAnimationModeIdle);
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append(kActorSteele, 35, 0);
AI_Movement_Track_Repeat(kActorSteele);
return true;
- case 112:
+
+ case kGoalSteeleGoToPoliceStation:
if (Random_Query(1, 2) == 1) {
Actor_Clues_Transfer_New_To_Mainframe(kActorSteele);
Actor_Clues_Transfer_New_From_Mainframe(kActorSteele);
}
- if (Query_Score(kActorMcCoy) > Query_Score(kActorSteele) && Query_Score(kActorMcCoy) < 75) {
+ if (Query_Score(kActorMcCoy) > Query_Score(kActorSteele)
+ && Query_Score(kActorMcCoy) < 75
+ ) {
Set_Score(kActorSteele, Random_Query(2, 5) + Query_Score(kActorMcCoy));
}
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append(kActorSteele, 35, Random_Query(45, 120));
AI_Movement_Track_Repeat(kActorSteele);
return true;
- case 113:
+
+ case kGoalSteeleWalkAround:
AI_Movement_Track_Flush(kActorSteele);
- if (Random_Query(1, 5) == 1) {
+ if (Random_Query(1, 5) == 1) { // Animoid row & Bradbury building
AI_Movement_Track_Append(kActorSteele, 222, 0);
AI_Movement_Track_Append_With_Facing(kActorSteele, 223, 3, 973);
AI_Movement_Track_Append(kActorSteele, 224, 5);
@@ -624,34 +699,34 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorSteele, 228, 0);
AI_Movement_Track_Append(kActorSteele, 229, 10);
AI_Movement_Track_Repeat(kActorSteele);
- } else {
- if (Random_Query(1, 3) == 1) {
- AI_Movement_Track_Append(kActorSteele, 232, 0);
- AI_Movement_Track_Append(kActorSteele, 233, 0);
- AI_Movement_Track_Append(kActorSteele, 234, 3);
- AI_Movement_Track_Append(kActorSteele, 237, 0);
- AI_Movement_Track_Append(kActorSteele, 238, 0);
- AI_Movement_Track_Append(kActorSteele, 239, 0);
- AI_Movement_Track_Append(kActorSteele, 240, 10);
- AI_Movement_Track_Append(kActorSteele, 39, 120);
- AI_Movement_Track_Append(kActorSteele, 243, 0);
- AI_Movement_Track_Append(kActorSteele, 244, 10);
- } else {
- AI_Movement_Track_Append(kActorSteele, 248, 0);
- AI_Movement_Track_Append(kActorSteele, 249, 0);
- AI_Movement_Track_Append(kActorSteele, 250, 10);
- AI_Movement_Track_Append(kActorSteele, 253, 0);
- AI_Movement_Track_Append_With_Facing(kActorSteele, 254, 3, 1015);
- AI_Movement_Track_Append_With_Facing(kActorSteele, 255, 2, 1015);
- AI_Movement_Track_Append_With_Facing(kActorSteele, 256, 3, 1015);
- AI_Movement_Track_Append(kActorSteele, 257, 0);
- AI_Movement_Track_Append(kActorSteele, 39, 30);
- AI_Movement_Track_Append(kActorSteele, 35, 120);
- AI_Movement_Track_Append(kActorSteele, 39, 30);
- }
+ } else if (Random_Query(1, 3) == 1) { // Chinatown & DNA row
+ AI_Movement_Track_Append(kActorSteele, 232, 0);
+ AI_Movement_Track_Append(kActorSteele, 233, 0);
+ AI_Movement_Track_Append(kActorSteele, 234, 3);
+ AI_Movement_Track_Append(kActorSteele, 237, 0);
+ AI_Movement_Track_Append(kActorSteele, 238, 0);
+ AI_Movement_Track_Append(kActorSteele, 239, 0);
+ AI_Movement_Track_Append(kActorSteele, 240, 10);
+ AI_Movement_Track_Append(kActorSteele, 39, 120);
+ AI_Movement_Track_Append(kActorSteele, 243, 0);
+ AI_Movement_Track_Append(kActorSteele, 244, 10);
+ AI_Movement_Track_Repeat(kActorSteele);
+ } else { // Police station
+ AI_Movement_Track_Append(kActorSteele, 248, 0);
+ AI_Movement_Track_Append(kActorSteele, 249, 0);
+ AI_Movement_Track_Append(kActorSteele, 250, 10);
+ AI_Movement_Track_Append(kActorSteele, 253, 0);
+ AI_Movement_Track_Append_With_Facing(kActorSteele, 254, 3, 1015);
+ AI_Movement_Track_Append_With_Facing(kActorSteele, 255, 2, 1015);
+ AI_Movement_Track_Append_With_Facing(kActorSteele, 256, 3, 1015);
+ AI_Movement_Track_Append(kActorSteele, 257, 0);
+ AI_Movement_Track_Append(kActorSteele, 39, 30);
+ AI_Movement_Track_Append(kActorSteele, 35, 120);
+ AI_Movement_Track_Append(kActorSteele, 39, 30);
AI_Movement_Track_Repeat(kActorSteele);
}
return true;
+
case 120:
Actor_Force_Stop_Walking(kActorMcCoy);
Sound_Play(27, 100, 0, 0, 50);
@@ -677,6 +752,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Goal_Number(kActorSteele, 130);
Player_Gains_Control();
return true;
+
case 121:
Actor_Force_Stop_Walking(kActorMcCoy);
Actor_Face_Actor(kActorSteele, kActorIzo, 1);
@@ -715,6 +791,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Goal_Number(kActorSteele, 130);
Actor_Set_Goal_Number(kActorSteele, 0);
return true;
+
case 125:
Actor_Force_Stop_Walking(kActorMcCoy);
Actor_Set_Goal_Number(kActorIzo, 114);
@@ -731,35 +808,42 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Goal_Number(kActorSteele, 130);
Scene_Exits_Enable();
return true;
+
case 126:
return true;
+
case 130:
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append(kActorSteele, 174, 0);
AI_Movement_Track_Append(kActorSteele, 35, 0);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 200:
AI_Movement_Track_Flush(kActorSteele);
return true;
+
case 205:
if (Query_Score(kActorMcCoy) > Query_Score(kActorSteele) && Query_Score(kActorMcCoy) < 75) {
Set_Score(kActorSteele, Random_Query(2, 5) + Query_Score(kActorMcCoy));
}
- if (Game_Flag_Query(702)) {
+ if (Game_Flag_Query(kFlagRC04Locked)) {
Game_Flag_Set(643);
}
AI_Movement_Track_Flush(kActorSteele);
Actor_Put_In_Set(kActorSteele, kSetFreeSlotC);
Actor_Set_At_Waypoint(kActorSteele, 35, 0);
return true;
+
case 210:
AI_Countdown_Timer_Reset(kActorSteele, 0);
AI_Countdown_Timer_Start(kActorSteele, 0, 15);
return true;
+
case 211:
AI_Countdown_Timer_Reset(kActorSteele, 0);
return true;
+
case 212:
if (comp_distance(kActorMcCoy, -4.0, 0.33f, 0.0f, 100.0f, 0.33f, -4.0f) < 48.0f) {
Loop_Actor_Walk_To_XYZ(0, 32.0f, 0.33f, 17.0f, 0, 0, 0, 0);
@@ -774,10 +858,12 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
_animationState = 10;
_animationFrame = 0;
return true;
+
case 213:
case 216:
case 271:
return true;
+
case 214:
Player_Gains_Control();
switch (Actor_Query_Goal_Number(kActorDektora)) {
@@ -817,34 +903,39 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Goal_Number(kActorSteele, 275);
}
return true;
+
case 215:
Game_Flag_Set(635);
Actor_Change_Animation_Mode(kActorSteele, 6);
Scene_Exits_Disable();
return true;
+
case 230:
AI_Movement_Track_Flush(kActorSteele);
Actor_Put_In_Set(kActorSteele, kSetNR01);
Actor_Set_At_XYZ(kActorSteele, 94.03f, 23.88f, -794.46f, 685);
return true;
+
case 231:
AI_Movement_Track_Flush(kActorSteele);
Actor_Put_In_Set(kActorSteele, kSetNR05_NR08);
Actor_Set_At_XYZ(kActorSteele, -1034.09f, 0.32f, 224.77f, 440);
Game_Flag_Set(722);
- Set_Enter(kSetNR05_NR08, kSetPS01);
+ Set_Enter(kSetNR05_NR08, kSceneNR08);
return true;
+
case 232:
Game_Flag_Set(532);
- Set_Enter(kSetNR02, kSetNR03);
+ Set_Enter(kSetNR02, kSceneNR02);
return true;
+
case 233:
Game_Flag_Set(kFlagHF01toHF03);
Game_Flag_Reset(kFlagMcCoyAtNRxx);
Game_Flag_Set(kFlagMcCoyAtHFxx);
Actor_Put_In_Set(kActorSteele, kSetHF03);
Actor_Set_At_XYZ(kActorSteele, 291.0f, 47.76f, -892.0f, 453);
- Set_Enter(kSetHF03, kSetDR06);
+ Set_Enter(kSetHF03, kSceneHF03);
return true;
case 234:
AI_Movement_Track_Flush(kActorSteele);
@@ -852,16 +943,19 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorSteele, 35, 0);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 235:
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append_Run(kActorSteele, 467, 0);
AI_Movement_Track_Append(kActorSteele, 35, 0);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 236:
Actor_Put_In_Set(kActorSteele, kSetNR10);
Actor_Set_At_XYZ(kActorSteele, -118.13f, 2.84f, -197.90f, 305);
return true;
+
case 240:
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Flush(kActorLucy);
@@ -870,6 +964,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Put_In_Set(kActorLucy, kSetHF02);
Actor_Set_At_XYZ(kActorLucy, 596.49f, 47.76f, -260.04f, 731);
return true;
+
case 241:
Actor_Change_Animation_Mode(kActorSteele, 6);
Delay(500);
@@ -883,6 +978,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Delay(500);
ADQ_Add(6, 340, 48);
return true;
+
case 242:
AI_Movement_Track_Flush(kActorSteele);
Player_Loses_Control();
@@ -912,21 +1008,23 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_At_XYZ(kActorSteele, 12.17f, 23.88f, -533.37f, 674);
Game_Flag_Reset(255);
Game_Flag_Reset(256);
- Set_Enter(kSetNR01, kSetNR01);
+ Set_Enter(kSetNR01, kSceneNR01);
} else {
Actor_Put_In_Set(kActorSteele, kSetHF01);
Actor_Set_At_XYZ(kActorSteele, 324.32f, 8.0f, -465.87f, 674);
Game_Flag_Reset(255);
Game_Flag_Reset(256);
- Set_Enter(kSetHF01, kSetDR03);
+ Set_Enter(kSetHF01, kSceneHF04);
}
return true;
+
case 243:
Player_Loses_Control();
Delay(500);
Actor_Put_In_Set(kActorSteele, kSetHF02);
Actor_Set_At_XYZ(kActorSteele, 254.94f, 47.76f, -262.58f, 210);
return true;
+
case 244:
Actor_Face_Actor(kActorMcCoy, kActorSteele, 1);
Actor_Says(kActorMcCoy, 1560, 14);
@@ -936,6 +1034,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorSteele, 120, 15);
Actor_Set_Goal_Number(kActorSteele, 246);
return true;
+
case 245:
Actor_Face_Actor(kActorSteele, kActorMcCoy, 1);
Actor_Says(kActorSteele, 150, 13);
@@ -949,6 +1048,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorSteele, 200, 15);
Actor_Set_Goal_Number(kActorSteele, 246);
return true;
+
case 246:
Actor_Says(kActorSteele, 130, 13);
Actor_Says(kActorSteele, 140, 13);
@@ -960,15 +1060,16 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_At_XYZ(kActorSteele, 12.17f, 23.88f, -533.37f, 674);
Game_Flag_Reset(255);
Game_Flag_Reset(256);
- Set_Enter(kSetNR01, kSetNR01);
+ Set_Enter(kSetNR01, kSceneNR01);
} else {
Actor_Put_In_Set(kActorSteele, kSetHF01);
Actor_Set_At_XYZ(kActorSteele, 324.32f, 8.0f, -465.87f, 674);
Game_Flag_Reset(255);
Game_Flag_Reset(256);
- Set_Enter(kSetHF01, kSetDR03);
+ Set_Enter(kSetHF01, kSceneHF01);
}
return true;
+
case 250:
AI_Movement_Track_Flush(kActorSteele);
Actor_Put_In_Set(kActorSteele, kSetNR01);
@@ -981,9 +1082,11 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Change_Animation_Mode(kActorSteele, 0);
_var1 = 3;
return true;
+
case 251:
Actor_Set_Targetable(kActorSteele, 1);
return true;
+
case 252:
Player_Loses_Control();
Actor_Change_Animation_Mode(kActorSteele, 6);
@@ -1009,11 +1112,12 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Game_Flag_Set(617);
Game_Flag_Reset(255);
Game_Flag_Reset(256);
- Set_Enter(kSetHF01, kSetDR03);
+ Set_Enter(kSetHF01, kSceneHF01);
} else {
Actor_Set_Goal_Number(kActorSteele, 280);
}
return true;
+
case 255:
ADQ_Flush();
Actor_Change_Animation_Mode(kActorSteele, 6);
@@ -1024,6 +1128,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Goal_Number(kActorGordo, 251);
Actor_Says(kActorSteele, 1250, 3);
return true;
+
case 258:
Game_Flag_Reset(603);
ADQ_Flush();
@@ -1052,6 +1157,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Player_Gains_Control();
Actor_Set_Goal_Number(kActorSteele, 280);
return true;
+
case 260:
ADQ_Flush();
Actor_Change_Animation_Mode(kActorMcCoy, 6);
@@ -1064,6 +1170,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Targetable(kActorSteele, 0);
Player_Loses_Control();
return true;
+
case 262:
Actor_Face_Actor(kActorSteele, kActorMcCoy, 1);
Actor_Says(kActorSteele, 1160, 15);
@@ -1085,6 +1192,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Player_Gains_Control();
Actor_Set_Goal_Number(kActorSteele, 280);
return true;
+
case 270:
ADQ_Flush();
Player_Loses_Control();
@@ -1096,6 +1204,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Delay(5000);
Actor_Set_Goal_Number(kActorMcCoy, 500);
return true;
+
case 275:
Delay(500);
Game_Flag_Set(617);
@@ -1105,15 +1214,16 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_At_XYZ(kActorSteele, 12.17f, 23.88f, -533.37f, 674);
Game_Flag_Reset(255);
Game_Flag_Reset(256);
- Set_Enter(kSetNR01, kSetNR01);
+ Set_Enter(kSetNR01, kSceneNR01);
} else {
Actor_Put_In_Set(kActorSteele, kSetHF01);
Actor_Set_At_XYZ(kActorSteele, 324.32f, 8.0f, -465.87f, 674);
Game_Flag_Reset(255);
Game_Flag_Reset(256);
- Set_Enter(kSetHF01, kSetDR03);
+ Set_Enter(kSetHF01, kSceneHF01);
}
return true;
+
case 280:
Actor_Says(kActorMcCoy, 2970, 15);
Actor_Face_Actor(kActorSteele, kActorMcCoy, 1);
@@ -1149,13 +1259,15 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Goal_Number(kActorSteele, 291);
}
return true;
+
case 285:
Actor_Set_Goal_Number(kActorSteele, 290);
return true;
+
case 290:
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -281.0f, 31.93f, -1061.0f, 0, 0, 1, 0);
Actor_Face_Heading(kActorMcCoy, 45, 0);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 0, kAnimationModeIdle);
Global_Variable_Set(1, 4);
Scene_Exits_Enable();
Actor_Set_Health(kActorMcCoy, 50, 50);
@@ -1164,6 +1276,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Game_Flag_Set(680);
Chapter_Enter(4, 79, 91);
return true;
+
case 291:
Game_Flag_Set(722);
Global_Variable_Set(1, 4);
@@ -1172,6 +1285,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Game_Flag_Set(680);
Chapter_Enter(4, 79, 91);
return true;
+
case 300:
if (Query_Score(kActorMcCoy) > Query_Score(kActorSteele) && Query_Score(kActorMcCoy) < 75) {
Set_Score(kActorSteele, Random_Query(2, 5) + Query_Score(kActorMcCoy));
@@ -1181,14 +1295,17 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
Actor_Set_Goal_Number(kActorSteele, 305);
return true;
+
case 305:
Actor_Put_In_Set(kActorSteele, kSetFreeSlotC);
Actor_Set_At_Waypoint(kActorSteele, 35, 0);
return true;
+
case 400:
case 401:
case 423:
return true;
+
case 410:
Actor_Set_Targetable(kActorSteele, 1);
Actor_Face_Actor(kActorSteele, kActorMcCoy, 1);
@@ -1198,6 +1315,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Delay(3000);
Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, 0);
return true;
+
case 411:
Actor_Face_Actor(kActorMcCoy, kActorSteele, 1);
Actor_Says(kActorSteele, 430, 14);
@@ -1205,17 +1323,21 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Delay(4000);
Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, 0);
return true;
+
case 412:
Actor_Force_Stop_Walking(kActorSteele);
return true;
+
case 413:
Async_Actor_Walk_To_XYZ(kActorSteele, 1.0, -36.55f, 111.0f, 0, 0);
return true;
+
case 415:
Actor_Force_Stop_Walking(kActorSteele);
Actor_Change_Animation_Mode(kActorSteele, 51);
AI_Countdown_Timer_Start(kActorSteele, 1, 2);
return true;
+
case 416:
Actor_Set_At_XYZ(kActorSteele, -48.83f, -36.55f, 69.98f, 280);
Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 36, 0, 1);
@@ -1235,23 +1357,27 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Countdown_Timer_Start(kActorSteele, 1, 3);
return true;
+
case 418:
Actor_Face_Actor(kActorSteele, kActorMcCoy, 1);
Actor_Change_Animation_Mode(kActorSteele, 6);
Actor_Change_Animation_Mode(kActorMcCoy, 48);
Actor_Retired_Here(kActorMcCoy, 72, 18, 1, -1);
return true;
+
case 419:
Actor_Set_Targetable(kActorSteele, 0);
Game_Flag_Set(646);
Actor_Set_Goal_Number(kActorSteele, 599);
Actor_Retired_Here(kActorSteele, 60, 12, 1, -1);
return true;
+
case 420:
Actor_Put_In_Set(kActorSteele, kSetKP01);
Actor_Set_At_XYZ(kActorSteele, 20.0f, -12.2f, -97.0f, 907);
Actor_Change_Animation_Mode(kActorSteele, 43);
return true;
+
case 421:
Game_Flag_Reset(482);
Delay(2000);
@@ -1266,41 +1392,49 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorSteele, 390, 13);
Actor_Set_Goal_Number(kActorSteele, 422);
return true;
+
case 422:
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append(kActorSteele, 530, 0);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 430:
Actor_Put_In_Set(kActorSteele, kSetKP05_KP06);
Actor_Set_At_XYZ(kActorSteele, -1110.0f, 0.0f, 952.0f, 155);
Actor_Change_Animation_Mode(kActorSteele, 4);
return true;
+
case 431:
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append_Run(kActorSteele, 541, 0);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 432:
Actor_Set_At_Waypoint(kActorSteele, 542, 0);
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append_Run(kActorSteele, 543, 0);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 433:
AI_Movement_Track_Flush(kActorSteele);
AI_Movement_Track_Append_Run(kActorSteele, 542, 0);
AI_Movement_Track_Repeat(kActorSteele);
return true;
+
case 450:
Actor_Put_In_Set(kActorSteele, kSetKP05_KP06);
Actor_Set_At_XYZ(kActorSteele, -947.39f, 0.0f, 728.89f, 0);
return true;
+
case 499:
AI_Movement_Track_Flush(kActorSteele);
Actor_Put_In_Set(kActorSteele, kSetKP05_KP06);
Actor_Set_At_XYZ(kActorSteele, -782.15f, 8.26f, -263.64f, 52);
return true;
+
default:
return false;
}
@@ -2052,8 +2186,10 @@ void AIScriptSteele::SetAnimationState(int animationState, int animationFrame, i
}
bool AIScriptSteele::ReachedMovementTrackWaypoint(int waypointId) {
- if (waypointId == 174 && Actor_Query_Goal_Number(kActorSteele) == 130)
- Actor_Set_Goal_Number(kActorSteele, 112);
+ if (waypointId == 174
+ && Actor_Query_Goal_Number(kActorSteele) == 130
+ )
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleGoToPoliceStation);
return true;
}
diff --git a/engines/bladerunner/script/ai/zuben.cpp b/engines/bladerunner/script/ai/zuben.cpp
index a016bfd87e..47e74f7158 100644
--- a/engines/bladerunner/script/ai/zuben.cpp
+++ b/engines/bladerunner/script/ai/zuben.cpp
@@ -337,12 +337,12 @@ bool AIScriptZuben::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorZuben, 130, 17);
Actor_Says(kActorMcCoy, 485, 14);
if (Random_Query(1, 3) < 3) {
- Actor_Clue_Acquire(kActorZuben, kClueMcCoysDescription, 1, -1);
+ Actor_Clue_Acquire(kActorZuben, kClueMcCoysDescription, true, -1);
}
if (Random_Query(1, 5) < 5) {
- Actor_Clue_Acquire(kActorZuben, kClueMcCoyIsABladeRunner, 1, -1);
+ Actor_Clue_Acquire(kActorZuben, kClueMcCoyIsABladeRunner, true, -1);
}
- Actor_Clue_Acquire(kActorZuben, kClueMcCoyLetZubenEscape, 1, -1);
+ Actor_Clue_Acquire(kActorZuben, kClueMcCoyLetZubenEscape, true, -1);
Actor_Set_Goal_Number(kActorZuben, kGoalZubenCT07Leave);
return false;
case kGoalZubenCT07Leave:
diff --git a/engines/bladerunner/script/ai_script.h b/engines/bladerunner/script/ai_script.h
index a5669dc4a8..c9e945a29b 100644
--- a/engines/bladerunner/script/ai_script.h
+++ b/engines/bladerunner/script/ai_script.h
@@ -280,9 +280,6 @@ END_SCRIPT
DECLARE_SCRIPT(OfficerLeary)
int var_45D5B8;
int var_45D5BC;
-
- bool sub_431408();
- bool sub_431420();
END_SCRIPT
DECLARE_SCRIPT(OfficerGrayford)
diff --git a/engines/bladerunner/script/esper_script.cpp b/engines/bladerunner/script/esper_script.cpp
index bf369f96ae..e12e40f797 100644
--- a/engines/bladerunner/script/esper_script.cpp
+++ b/engines/bladerunner/script/esper_script.cpp
@@ -51,12 +51,12 @@ void ESPERScript::SCRIPT_ESPER_DLL_Initialize() {
if (!Actor_Clue_Query(kActorMcCoy, kClueRuncitersViewA)) {
Actor_Says(kActorAnsweringMachine, 160, 3);
Actor_Says(kActorAnsweringMachine, 180, 3);
- Actor_Clue_Acquire(kActorMcCoy, kClueRuncitersViewA, 1, kActorRunciter);
+ Actor_Clue_Acquire(kActorMcCoy, kClueRuncitersViewA, true, kActorRunciter);
v0 = 1;
}
ESPER_Add_Photo("RC02_FA.IMG", 0, 0);
if (!Actor_Clue_Query(kActorMcCoy, kClueRuncitersViewB)) {
- Actor_Clue_Acquire(kActorMcCoy, kClueRuncitersViewB, 1, kActorRunciter);
+ Actor_Clue_Acquire(kActorMcCoy, kClueRuncitersViewB, true, kActorRunciter);
}
ESPER_Add_Photo("RC02_RA.IMG", 1, 1);
}
@@ -64,7 +64,7 @@ void ESPERScript::SCRIPT_ESPER_DLL_Initialize() {
if (!Actor_Clue_Query(kActorMcCoy, kClueOuterDressingRoom)) {
Actor_Says(kActorAnsweringMachine, 160, 3);
Actor_Says(kActorAnsweringMachine, 170, 3);
- Actor_Clue_Acquire(kActorMcCoy, kClueOuterDressingRoom, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueOuterDressingRoom, true, -1);
v0 = 1;
}
ESPER_Add_Photo("NR060000.IMG", 2, 2);
@@ -85,7 +85,7 @@ void ESPERScript::SCRIPT_ESPER_DLL_Initialize() {
if (!Actor_Clue_Query(kActorMcCoy, kClueChinaBarSecurityPhoto)) {
Actor_Says(kActorAnsweringMachine, 160, 3);
Actor_Says(kActorAnsweringMachine, 170, 3);
- Actor_Clue_Acquire(kActorMcCoy, kClueChinaBarSecurityPhoto, 1, kActorHawkersBarkeep);
+ Actor_Clue_Acquire(kActorMcCoy, kClueChinaBarSecurityPhoto, true, kActorHawkersBarkeep);
v0 = 1;
}
ESPER_Add_Photo("HC02CB2.IMG", 7, 7);
@@ -94,7 +94,7 @@ void ESPERScript::SCRIPT_ESPER_DLL_Initialize() {
if (!Actor_Clue_Query(kActorMcCoy, kClueTyrellSecurityPhoto)) {
Actor_Says(kActorAnsweringMachine, 160, 3);
Actor_Says(kActorAnsweringMachine, 170, 3);
- Actor_Clue_Acquire(kActorMcCoy, kClueTyrellSecurityPhoto, 1, kActorTyrellGuard);
+ Actor_Clue_Acquire(kActorMcCoy, kClueTyrellSecurityPhoto, true, kActorTyrellGuard);
v0 = 1;
}
ESPER_Add_Photo("TB060000.IMG", 8, 8);
@@ -179,7 +179,7 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueMoonbusReflection)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueMoonbusReflection, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueMoonbusReflection, true, -1);
}
break;
case 23:
@@ -187,7 +187,7 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueMcCoyAtMoonbus)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueMcCoyAtMoonbus, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueMcCoyAtMoonbus, true, -1);
}
break;
case 24:
@@ -195,14 +195,14 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueClovisAtMoonbus)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueClovisAtMoonbus, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueClovisAtMoonbus, true, -1);
}
break;
case 25:
if (!Actor_Clue_Query(kActorMcCoy, kClueSadikAtMoonbus)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueSadikAtMoonbus, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueSadikAtMoonbus, true, -1);
}
break;
}
@@ -214,7 +214,7 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueKingstonKitchenBox2)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueKingstonKitchenBox2, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueKingstonKitchenBox2, true, -1);
}
break;
case 19:
@@ -222,7 +222,7 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueDogCollar2)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueDogCollar2, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDogCollar2, true, -1);
}
break;
case 20:
@@ -232,7 +232,7 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueBombingSuspect)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueBombingSuspect, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueBombingSuspect, true, -1);
}
break;
case 21:
@@ -240,7 +240,7 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kCluePlasticExplosive)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kCluePlasticExplosive, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kCluePlasticExplosive, true, -1);
}
break;
}
@@ -251,14 +251,14 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueIzo)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueIzo, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueIzo, true, -1);
}
} else if (region == 17) {
Actor_Voice_Over(4210, kActorVoiceOver);
if (!Actor_Clue_Query(kActorMcCoy, kClueGuzza)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueGuzza, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGuzza, true, -1);
}
}
return false;
@@ -268,14 +268,14 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueChinaBarSecurityCamera)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueChinaBarSecurityCamera, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueChinaBarSecurityCamera, true, -1);
}
} else if (region == 15) {
Actor_Voice_Over(4220, kActorVoiceOver);
if (!Actor_Clue_Query(kActorMcCoy, kClueIzosFriend)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueIzosFriend, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueIzosFriend, true, -1);
}
}
return false;
@@ -285,7 +285,7 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueStrangeScale2)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueStrangeScale2, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueStrangeScale2, true, -1);
}
}
return false;
@@ -295,14 +295,14 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueWomanInAnimoidRow)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueWomanInAnimoidRow, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueWomanInAnimoidRow, true, -1);
}
} else if (region == 12) {
Actor_Voice_Over(4180, kActorVoiceOver);
if (!Actor_Clue_Query(kActorMcCoy, kClueScorpions)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueScorpions, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueScorpions, true, -1);
}
}
return false;
@@ -312,7 +312,7 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueClovisflowers)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueClovisflowers, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueClovisflowers, true, -1);
}
return true;
} else if (region == 10) {
@@ -320,7 +320,7 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueLucyWithDektora)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueLucyWithDektora, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueLucyWithDektora, true, -1);
}
return true;
}
@@ -331,14 +331,14 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueEarlyQAndLucy)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueEarlyQAndLucy, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueEarlyQAndLucy, true, -1);
}
} else if (region == 7) {
Actor_Voice_Over(4190, kActorVoiceOver);
if (!Actor_Clue_Query(kActorMcCoy, kClueScorpionbox)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueScorpionbox, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueScorpionbox, true, -1);
}
}
return true;
@@ -348,28 +348,28 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueAnimalMurderSuspect)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueAnimalMurderSuspect, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueAnimalMurderSuspect, true, -1);
}
} else if (region == 4) {
Actor_Voice_Over(4110, kActorVoiceOver);
if (!Actor_Clue_Query(kActorMcCoy, kClueMilitaryBoots)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueMilitaryBoots, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueMilitaryBoots, true, -1);
}
} else if (region == 5) {
Actor_Voice_Over(4120, kActorVoiceOver);
if (!Actor_Clue_Query(kActorMcCoy, kCluePartialLicenseNumber)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kCluePartialLicenseNumber, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kCluePartialLicenseNumber, true, -1);
}
} else if (region == 6) {
Actor_Voice_Over(4070, kActorVoiceOver);
if (!Actor_Clue_Query(kActorMcCoy, kClueCarColorAndMake)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueCarColorAndMake, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueCarColorAndMake, true, -1);
}
}
return true;
@@ -379,21 +379,21 @@ bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region
if (!Actor_Clue_Query(kActorMcCoy, kClueDragonflyAnklet)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueDragonflyAnklet, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDragonflyAnklet, true, -1);
}
} else if (region == 1) {
Actor_Voice_Over(4040, kActorVoiceOver);
if (!Actor_Clue_Query(kActorMcCoy, kClueLucy)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueLucy, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueLucy, true, -1);
}
} else if (region == 2) {
Actor_Voice_Over(4060, kActorVoiceOver);
if (!Actor_Clue_Query(kActorMcCoy, kClueSushiMenu)) {
Actor_Says(kActorMcCoy, 6945, 3);
Sound_Play(417, 50, 0, 0, 50);
- Actor_Clue_Acquire(kActorMcCoy, kClueSushiMenu, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueSushiMenu, true, -1);
}
}
return true;
diff --git a/engines/bladerunner/script/scene/ar01.cpp b/engines/bladerunner/script/scene/ar01.cpp
index 2980209afc..adef4d4894 100644
--- a/engines/bladerunner/script/scene/ar01.cpp
+++ b/engines/bladerunner/script/scene/ar01.cpp
@@ -24,6 +24,22 @@
namespace BladeRunner {
+enum kAR01Loops {
+ kAR01LoopFromAR02WithSpinner = 0,
+ kAR01LoopInshoot = 1,
+ kAR01LoopMainLoop = 2,
+ kAR01LoopDoorAnim = 4,
+ kAR01LoopOutshoot = 5,
+ kAR01LoopFromAR02NoSpinner = 6,
+ kAR01LoopMainLoopNoSpinner = 7
+};
+
+enum kAR01Exits {
+ kAR01ExitHC01 = 0,
+ kAR01ExitAR02 = 1,
+ kAR01ExitSpinner = 2
+};
+
void SceneScriptAR01::InitializeScene() {
Music_Play(0, 25, 0, 2, -1, 1, 2);
if (Game_Flag_Query(kFlagHC01toAR01)) {
@@ -33,10 +49,10 @@ void SceneScriptAR01::InitializeScene() {
} else {
Setup_Scene_Information(-152.0f, 0.0f, 332.0f, 545);
}
- Scene_Exit_Add_2D_Exit(0, 134, 165, 177, 290, 3);
- Scene_Exit_Add_2D_Exit(1, 319, 0, 639, 207, 0);
+ Scene_Exit_Add_2D_Exit(kAR01ExitHC01, 134, 165, 177, 290, 3);
+ Scene_Exit_Add_2D_Exit(kAR01ExitAR02, 319, 0, 639, 207, 0);
if (Game_Flag_Query(kFlagSpinnerAtAR01)) {
- Scene_Exit_Add_2D_Exit(2, 0, 404, 99, 479, 2);
+ Scene_Exit_Add_2D_Exit(kAR01ExitSpinner, 0, 404, 99, 479, 2);
}
Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1);
Ambient_Sounds_Add_Looping_Sound(81, 60, 100, 1);
@@ -72,31 +88,31 @@ void SceneScriptAR01::InitializeScene() {
&& !Game_Flag_Query(kFlagHC01toAR01)
) {
Actor_Set_Invisible(kActorMcCoy, true);
- Game_Flag_Set(273);
- Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 1, false);
- Scene_Loop_Set_Default(2);
+ Game_Flag_Set(kFlagArrivedFromSpinner2);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kAR01LoopInshoot, false);
+ Scene_Loop_Set_Default(kAR01LoopMainLoop);
} else if (Game_Flag_Query(kFlagSpinnerAtAR01)
&& Game_Flag_Query(kFlagAR02toAR01)
) {
- Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
- Scene_Loop_Set_Default(2);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kAR01LoopFromAR02WithSpinner, false);
+ Scene_Loop_Set_Default(kAR01LoopMainLoop);
Game_Flag_Reset(kFlagAR02toAR01);
} else if (!Game_Flag_Query(kFlagSpinnerAtAR01)
&& Game_Flag_Query(kFlagAR02toAR01)
) {
- Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 6, false);
- Scene_Loop_Set_Default(7);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kAR01LoopFromAR02NoSpinner, false);
+ Scene_Loop_Set_Default(kAR01LoopMainLoopNoSpinner);
Game_Flag_Reset(kFlagAR02toAR01);
} else if (Game_Flag_Query(kFlagSpinnerAtAR01)
&& Game_Flag_Query(kFlagHC01toAR01)
) {
- Scene_Loop_Set_Default(2);
+ Scene_Loop_Set_Default(kAR01LoopMainLoop);
} else if (!Game_Flag_Query(kFlagSpinnerAtAR01)
&& Game_Flag_Query(kFlagHC01toAR01)
) {
- Scene_Loop_Set_Default(7);
+ Scene_Loop_Set_Default(kAR01LoopMainLoopNoSpinner);
} else {
- Scene_Loop_Set_Default(7);
+ Scene_Loop_Set_Default(kAR01LoopMainLoopNoSpinner);
}
}
@@ -133,7 +149,7 @@ bool SceneScriptAR01::ClickedOnActor(int actorId) {
Actor_Says(kActorFishDealer, 140, 14);
Actor_Says(kActorMcCoy, 50, 13);
Actor_Says(kActorFishDealer, 150, 14);
- Actor_Clue_Acquire(kActorMcCoy, kClueFishLadyInterview, 1, kActorMcCoy);
+ Actor_Clue_Acquire(kActorMcCoy, kClueFishLadyInterview, true, kActorMcCoy);
} else {
if (Random_Query(1, 2) == 1) {
Actor_Says(kActorMcCoy, 30, 17);
@@ -176,19 +192,19 @@ bool SceneScriptAR01::ClickedOnItem(int itemId, bool a2) {
}
bool SceneScriptAR01::ClickedOnExit(int exitId) {
- if (exitId == 0) {
+ if (exitId == kAR01ExitHC01) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -358.0, 0.0, -149.0, 0, 1, false, 0)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -477.0, 0.0, -149.0, 0, 0, false, 0);
Game_Flag_Set(kFlagAR01toHC01);
Game_Flag_Set(464);
Game_Flag_Reset(kFlagMcCoyAtARxx);
- Game_Flag_Set(479);
+ Game_Flag_Set(kFlagMcCoyAtHCxx);
Set_Enter(kSetHC01_HC02_HC03_HC04, kSceneHC01);
Actor_Set_Goal_Number(kActorFishDealer, 3);
}
return true;
}
- if (exitId == 1) {
+ if (exitId == kAR01ExitAR02) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -182.0, 0.0, -551.0, 0, 1, false, 0)) {
Game_Flag_Set(kFlagAR01toAR02);
Async_Actor_Walk_To_XYZ(kActorMcCoy, -222.0, 0.0, -690.0, 0, false);
@@ -197,7 +213,7 @@ bool SceneScriptAR01::ClickedOnExit(int exitId) {
}
return true;
}
- if (exitId == 2) {
+ if (exitId == kAR01ExitSpinner) {
if (Game_Flag_Query(486) == 1) {
Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationDNARow, true);
}
@@ -232,7 +248,7 @@ bool SceneScriptAR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagMcCoyAtHFxx);
Game_Flag_Reset(kFlagMcCoyAtARxx);
- int spinnerDest = Spinner_Interface_Choose_Dest(4, false);
+ int spinnerDest = Spinner_Interface_Choose_Dest(kAR01LoopDoorAnim, false);
Actor_Face_Heading(kActorMcCoy, 545, false);
switch (spinnerDest) {
@@ -241,63 +257,63 @@ bool SceneScriptAR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 5, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationMcCoysApartment:
Game_Flag_Set(kFlagMcCoyAtMAxx);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 5, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationRuncitersAnimals:
Game_Flag_Set(kFlagMcCoyAtRCxx);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 5, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationChinatown:
Game_Flag_Set(kFlagMcCoyAtCTxx);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 5, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationTyrellBuilding:
Game_Flag_Set(kFlagMcCoyAtTBxx);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 5, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationDNARow:
Game_Flag_Set(kFlagMcCoyAtDRxx);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 5, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationBradburyBuilding:
Game_Flag_Set(kFlagMcCoyAtBBxx);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 5, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationNightclubRow:
Game_Flag_Set(kFlagMcCoyAtNRxx);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtNR01);
Set_Enter(kSetNR01, kSceneNR01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 5, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationHysteriaHall:
Game_Flag_Set(kFlagMcCoyAtHFxx);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 5, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
default:
Game_Flag_Set(kFlagMcCoyAtARxx);
@@ -327,11 +343,17 @@ void SceneScriptAR01::SceneFrameAdvanced(int frame) {
if (frame == 256) {
Ambient_Sounds_Play_Sound(117, 40, -50, 80, 99);
}
- if ((frame == 75 || frame == 196) && Game_Flag_Query(273)) {
+ if ((frame == 75
+ || frame == 196
+ )
+ && Game_Flag_Query(kFlagArrivedFromSpinner2)
+ ) {
Actor_Face_Heading(kActorMcCoy, 545, false);
Actor_Change_Animation_Mode(kActorMcCoy, 42);
- Game_Flag_Reset(273);
- } else if (frame == 196 && !Game_Flag_Query(273)) {
+ Game_Flag_Reset(kFlagArrivedFromSpinner2);
+ } else if ( frame == 196
+ && !Game_Flag_Query(kFlagArrivedFromSpinner2
+ )) {
Actor_Change_Animation_Mode(kActorMcCoy, 41);
}
}
@@ -356,7 +378,7 @@ void SceneScriptAR01::PlayerWalkedOut() {
Actor_Set_Invisible(kActorMcCoy, false);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- if (!Game_Flag_Query(479)) {
+ if (!Game_Flag_Query(kFlagMcCoyAtHCxx)) {
Music_Stop(2);
}
if (!Game_Flag_Query(kFlagAR01toHC01)
diff --git a/engines/bladerunner/script/scene/ar02.cpp b/engines/bladerunner/script/scene/ar02.cpp
index d0b5bf8bba..ea95e7d60f 100644
--- a/engines/bladerunner/script/scene/ar02.cpp
+++ b/engines/bladerunner/script/scene/ar02.cpp
@@ -141,9 +141,9 @@ bool SceneScriptAR02::ClickedOnActor(int actorId) {
Actor_Says(kActorInsectDealer, 340, 13);
Actor_Says(kActorInsectDealer, 350, 12);
Actor_Says(kActorMcCoy, 235, 16);
- Actor_Clue_Acquire(kActorMcCoy, kCluePurchasedScorpions, 0, kActorInsectDealer);
+ Actor_Clue_Acquire(kActorMcCoy, kCluePurchasedScorpions, false, kActorInsectDealer);
}
- Actor_Clue_Acquire(kActorMcCoy, kClueDragonflyCollection, 0, kActorInsectDealer);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDragonflyCollection, false, kActorInsectDealer);
} else {
Actor_Says(kActorMcCoy, 240, 17);
Actor_Says(kActorInsectDealer, 360, 13);
@@ -285,7 +285,7 @@ void SceneScriptAR02::sub_402694() {
Actor_Says(kActorMcCoy, 100, 16);
Actor_Says(kActorInsectDealer, 180, 13);
Game_Flag_Set(329);
- Actor_Clue_Acquire(kActorMcCoy, kCluePeruvianLadyInterview, 1, kActorInsectDealer);
+ Actor_Clue_Acquire(kActorMcCoy, kCluePeruvianLadyInterview, true, kActorInsectDealer);
break;
case 510:
Actor_Says(kActorMcCoy, 8475, 12);
@@ -313,7 +313,7 @@ void SceneScriptAR02::sub_402AE0() {
if (Query_Difficulty_Level() != 0) {
Global_Variable_Decrement(2, 15);
}
- Actor_Clue_Acquire(kActorMcCoy, kClueMaggieBracelet, 1, kActorInsectDealer);
+ Actor_Clue_Acquire(kActorMcCoy, kClueMaggieBracelet, true, kActorInsectDealer);
Actor_Modify_Friendliness_To_Other(kActorInsectDealer, kActorMcCoy, 5);
} else if (answerValue == 540) {
Actor_Says(kActorMcCoy, 125, 13);
@@ -381,7 +381,7 @@ void SceneScriptAR02::sub_402CE4() {
Actor_Says(kActorHasan, 110, 12);
Actor_Says(kActorHasan, 120, 13);
Actor_Modify_Friendliness_To_Other(kActorHasan, kActorMcCoy, -1);
- Actor_Clue_Acquire(kActorMcCoy, kClueHasanInterview, 0, kActorHasan);
+ Actor_Clue_Acquire(kActorMcCoy, kClueHasanInterview, false, kActorHasan);
}
break;
}
diff --git a/engines/bladerunner/script/scene/bb02.cpp b/engines/bladerunner/script/scene/bb02.cpp
index 0f0e96324d..fa988790c3 100644
--- a/engines/bladerunner/script/scene/bb02.cpp
+++ b/engines/bladerunner/script/scene/bb02.cpp
@@ -25,7 +25,7 @@
namespace BladeRunner {
void SceneScriptBB02::InitializeScene() {
- if (Game_Flag_Query(281)) {
+ if (Game_Flag_Query(kFlagBB03toBB02)) {
Setup_Scene_Information(179.0f, -415.06f, 274.0f, 904);
} else if (Game_Flag_Query(333)) {
Setup_Scene_Information(-12.0f, -415.06f, -27.0f, 264);
@@ -112,7 +112,7 @@ bool SceneScriptBB02::ClickedOnExit(int exitId) {
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 86.0f, -415.06f, 174.0f, 0, 1, false, 0)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 179.0f, -415.06f, 274.0f, 0, 0, false, 0);
- Game_Flag_Set(282);
+ Game_Flag_Set(kFlagBB02toBB03);
Game_Flag_Reset(493);
Set_Enter(kSetBB03, kSceneBB03);
}
@@ -138,9 +138,9 @@ void SceneScriptBB02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptBB02::PlayerWalkedIn() {
- if (Game_Flag_Query(281)) {
+ if (Game_Flag_Query(kFlagBB03toBB02)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 86.0f, -415.06f, 174.0f, 0, 0, false, 0);
- Game_Flag_Reset(281);
+ Game_Flag_Reset(kFlagBB03toBB02);
} else if (Game_Flag_Query(333)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 35.0f, -415.06f, -27.0f, 0, 0, false, 0);
Player_Gains_Control();
diff --git a/engines/bladerunner/script/scene/bb03.cpp b/engines/bladerunner/script/scene/bb03.cpp
index c4121a9cee..118fa22d5a 100644
--- a/engines/bladerunner/script/scene/bb03.cpp
+++ b/engines/bladerunner/script/scene/bb03.cpp
@@ -26,11 +26,11 @@ namespace BladeRunner {
void SceneScriptBB03::InitializeScene() {
Setup_Scene_Information(20.0f, 60.16f, 0.0f, 0);
- Game_Flag_Reset(282);
- if (Game_Flag_Query(284)) {
+ Game_Flag_Reset(kFlagBB02toBB03);
+ if (Game_Flag_Query(kFlagBB04toBB03)) {
Setup_Scene_Information(176.0f, 60.16f, 0.0f, 900);
}
- if (Game_Flag_Query(286)) {
+ if (Game_Flag_Query(kFlagBB05toBB03)) {
Setup_Scene_Information(204.0f, 60.16f, -164.0f, 740);
}
Scene_Exit_Add_2D_Exit(0, 589, 0, 639, 479, 1);
@@ -86,7 +86,7 @@ bool SceneScriptBB03::ClickedOnExit(int exitId) {
if (exitId == 0) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 176.0f, 60.16f, -64.0f, 0, 1, false, 0)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 176.0f, 60.16f, 0.0f, 0, 0, false, 0);
- Game_Flag_Set(283);
+ Game_Flag_Set(kFlagBB03toBB04);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(kSetBB02_BB04_BB06_BB51, kSceneBB04);
@@ -95,7 +95,7 @@ bool SceneScriptBB03::ClickedOnExit(int exitId) {
}
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 20.0f, 60.16f, 0.0f, 0, 1, false, 0)) {
- Game_Flag_Set(281);
+ Game_Flag_Set(kFlagBB03toBB02);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(kSetBB02_BB04_BB06_BB51, kSceneBB02);
@@ -118,7 +118,7 @@ bool SceneScriptBB03::ClickedOnExit(int exitId) {
Actor_Set_Targetable(kActorBryant, false);
Actor_Set_Targetable(kActorGeneralDoll, false);
}
- Game_Flag_Set(285);
+ Game_Flag_Set(kFlagBB03toBB05);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(kSetBB05, kSceneBB05);
@@ -142,13 +142,13 @@ void SceneScriptBB03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptBB03::PlayerWalkedIn() {
- if (Game_Flag_Query(286)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 164.0f, 60.16f, -164.0f, 0, 0, false, 0);
- Game_Flag_Reset(286);
+ if (Game_Flag_Query(kFlagBB05toBB03)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 164.0f, 60.16f, -164.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagBB05toBB03);
}
- if (Game_Flag_Query(284)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 176.0f, 60.16f, -64.0f, 0, 0, false, 0);
- Game_Flag_Reset(284);
+ if (Game_Flag_Query(kFlagBB04toBB03)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 176.0f, 60.16f, -64.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagBB04toBB03);
}
}
diff --git a/engines/bladerunner/script/scene/bb04.cpp b/engines/bladerunner/script/scene/bb04.cpp
index 6ef7d7db00..270e28d254 100644
--- a/engines/bladerunner/script/scene/bb04.cpp
+++ b/engines/bladerunner/script/scene/bb04.cpp
@@ -25,9 +25,9 @@
namespace BladeRunner {
void SceneScriptBB04::InitializeScene() {
- if (Game_Flag_Query(283)) {
+ if (Game_Flag_Query(kFlagBB03toBB04)) {
Setup_Scene_Information(-107.0f, -26.6f, 397.0f, 29);
- Game_Flag_Reset(283);
+ Game_Flag_Reset(kFlagBB03toBB04);
} else {
Setup_Scene_Information(-15.0f, -25.17f, 45.0f, 691);
}
@@ -95,7 +95,7 @@ bool SceneScriptBB04::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -107.0f, -26.6f, 397.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(284);
+ Game_Flag_Set(kFlagBB04toBB03);
Set_Enter(kSetBB03, kSceneBB03);
}
return true;
diff --git a/engines/bladerunner/script/scene/bb05.cpp b/engines/bladerunner/script/scene/bb05.cpp
index e85b107427..1241a60e7b 100644
--- a/engines/bladerunner/script/scene/bb05.cpp
+++ b/engines/bladerunner/script/scene/bb05.cpp
@@ -100,7 +100,7 @@ bool SceneScriptBB05::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -212.0f, -60.31f, 131.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(286);
+ Game_Flag_Set(kFlagBB05toBB03);
Set_Enter(kSetBB03, kSceneBB03);
}
return true;
@@ -157,7 +157,7 @@ void SceneScriptBB05::PlayerWalkedIn() {
Game_Flag_Reset(302);
} else {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -76.0f, -60.31f, 131.0f, 0, 0, false, 0);
- Game_Flag_Reset(285);
+ Game_Flag_Reset(kFlagBB03toBB05);
}
if (Actor_Query_Goal_Number(kActorSebastian) == 200) {
Actor_Face_Actor(kActorSebastian, kActorMcCoy, true);
diff --git a/engines/bladerunner/script/scene/bb07.cpp b/engines/bladerunner/script/scene/bb07.cpp
index d2c9393829..12e3219cc9 100644
--- a/engines/bladerunner/script/scene/bb07.cpp
+++ b/engines/bladerunner/script/scene/bb07.cpp
@@ -73,7 +73,7 @@ bool SceneScriptBB07::ClickedOn3DObject(const char *objectName, bool a2) {
Item_Pickup_Spin_Effect(941, 439, 242);
Actor_Voice_Over(140, kActorVoiceOver);
Game_Flag_Set(398);
- Actor_Clue_Acquire(kActorMcCoy, kClueDNASebastian, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDNASebastian, true, -1);
} else if (Game_Flag_Query(396) && Game_Flag_Query(398)) {
Actor_Face_Object(kActorMcCoy, "PRINTER", true);
Actor_Says(kActorMcCoy, 8570, 13);
diff --git a/engines/bladerunner/script/scene/bb10.cpp b/engines/bladerunner/script/scene/bb10.cpp
index adaab3467d..5a521d6fca 100644
--- a/engines/bladerunner/script/scene/bb10.cpp
+++ b/engines/bladerunner/script/scene/bb10.cpp
@@ -103,7 +103,7 @@ bool SceneScriptBB10::ClickedOnExit(int exitId) {
Player_Set_Combat_Mode(false);
Actor_Face_Heading(kActorMcCoy, 274, false);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 1, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Footstep_Sound_Override_On(2);
Loop_Actor_Travel_Ladder(kActorMcCoy, 3, 1, 0);
@@ -190,7 +190,7 @@ void SceneScriptBB10::PlayerWalkedIn() {
Footstep_Sound_Override_Off();
Actor_Face_Heading(kActorMcCoy, 768, false);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 0, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Game_Flag_Reset(kFlagBB11toBB10);
}
diff --git a/engines/bladerunner/script/scene/ct01.cpp b/engines/bladerunner/script/scene/ct01.cpp
index 91022ff5bd..f00eba02d4 100644
--- a/engines/bladerunner/script/scene/ct01.cpp
+++ b/engines/bladerunner/script/scene/ct01.cpp
@@ -43,7 +43,7 @@ enum kCT01Exits {
void SceneScriptCT01::InitializeScene() {
Music_Play(3, 28, 0, 2, -1, 1, 0);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
if (Game_Flag_Query(kFlagCT02toCT01)) {
Game_Flag_Reset(kFlagCT02toCT01);
Setup_Scene_Information(-35.2f, -6.5f, 352.28f, 603);
@@ -64,7 +64,7 @@ void SceneScriptCT01::InitializeScene() {
}
} else if (Game_Flag_Query(kFlagSpinnerAtCT01)) {
Setup_Scene_Information(-530.0f, -6.5f, 241.0f, 506);
- Game_Flag_Set(kFlagArrivedFromSpinner);
+ Game_Flag_Set(kFlagArrivedFromSpinner1);
} else {
Setup_Scene_Information(-397.0f, -6.5f, 471.0f, 250);
}
@@ -135,7 +135,7 @@ bool SceneScriptCT01::ClickedOn3DObject(const char *objectName, bool a2) {
bool SceneScriptCT01::ClickedOnActor(int actorId) {
if (actorId == kActorHowieLee) {
Actor_Set_Goal_Number(kActorHowieLee, 50);
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -335.23f, -6.5f, 578.97f, 12, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -335.23f, -6.5f, 578.97f, 12, true, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorHowieLee, true);
Actor_Face_Actor(kActorHowieLee, kActorMcCoy, true);
if (!Game_Flag_Query(kFlagCT01McCoyTalkedToHowieLee)) {
@@ -143,28 +143,35 @@ bool SceneScriptCT01::ClickedOnActor(int actorId) {
Actor_Says(kActorHowieLee, 0, 14);
Game_Flag_Set(kFlagCT01McCoyTalkedToHowieLee);
Actor_Set_Goal_Number(kActorHowieLee, 0);
- } else if (!Game_Flag_Query(kFlagNotUsed30) && Actor_Query_Friendliness_To_Other(kActorHowieLee, kActorMcCoy) >= 40) {
+ return true;
+ }
+
+ if (!Game_Flag_Query(kFlagNotUsed30)
+ && Actor_Query_Friendliness_To_Other(kActorHowieLee, kActorMcCoy) >= 40
+ ) {
dialogueWithHowieLee();
Actor_Set_Goal_Number(kActorHowieLee, 0);
+ return true;
+ }
+
+ if (Game_Flag_Query(kFlagCT01ZubenGone)) {
+ Actor_Says(kActorMcCoy, 330, 17);
+ Actor_Says(kActorHowieLee, 130, 13);
+ Actor_Says(kActorHowieLee, 140, 14);
+ } else if (Actor_Query_Friendliness_To_Other(kActorHowieLee, kActorMcCoy) < 50) {
+ Actor_Says(kActorMcCoy, 330, 13);
+ Actor_Says(kActorHowieLee, 160, 15);
} else {
- if (Game_Flag_Query(kFlagCT01ZubenGone)) {
- Actor_Says(kActorMcCoy, 330, 17);
- Actor_Says(kActorHowieLee, 130, 13);
- Actor_Says(kActorHowieLee, 140, 14);
- } else if (Actor_Query_Friendliness_To_Other(kActorHowieLee, kActorMcCoy) < 50) {
- Actor_Says(kActorMcCoy, 330, 13);
- Actor_Says(kActorHowieLee, 160, 15);
- } else {
- Actor_Says(kActorMcCoy, 310, 11);
- Actor_Says(kActorHowieLee, 10, 16);
- }
- Actor_Set_Goal_Number(kActorHowieLee, 0);
+ Actor_Says(kActorMcCoy, 310, 11);
+ Actor_Says(kActorHowieLee, 10, 16);
}
+ Actor_Set_Goal_Number(kActorHowieLee, 0);
return true;
}
}
+
if (actorId == kActorZuben) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -335.23f, -6.5f, 578.97f, 12, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -335.23f, -6.5f, 578.97f, 12, true, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorZuben, true);
Actor_Says(kActorMcCoy, 355, 18);
if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenDefault) {
@@ -179,38 +186,37 @@ bool SceneScriptCT01::ClickedOnActor(int actorId) {
return true;
}
}
+
if (actorId == kActorGordo) {
- //todo: some weird code in assembly EBP is used but may not be initialized, loc_401C78
if (Actor_Query_Goal_Number(kActorGordo) == 0) {
- if (Loop_Actor_Walk_To_XYZ(kActorMcCoy, -338.1f, -6.5f, 419.65f, 6, 1, false, 0)) {
- return false;
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -338.1f, -6.5f, 419.65f, 6, true, false, 0)) {
+ Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
+ if (!Game_Flag_Query(kFlagCT01McCoyTalkedToGordo)) {
+ Actor_Says(kActorMcCoy, 335, 18);
+ Actor_Says(kActorGordo, 20, 30);
+ Game_Flag_Set(kFlagCT01McCoyTalkedToGordo);
+ Actor_Clue_Acquire(kActorGordo, kClueMcCoysDescription, true, kActorMcCoy);
+ Actor_Clue_Acquire(kActorMcCoy, kClueMcCoyIsABladeRunner, true, kActorMcCoy);
+ Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -1);
+ } else if (Actor_Query_Goal_Number(kActorGordo) != 0) {
+ Actor_Says(kActorMcCoy, 365, 14);
+ } else {
+ Actor_Says(kActorMcCoy, 340, 13);
+ Actor_Says(kActorMcCoy, 345, 11);
+ Actor_Says(kActorGordo, 30, 30);
+ Actor_Says(kActorMcCoy, 350, 13);
+ Actor_Says(kActorGordo, 40, 30);
+ Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -5);
+ Player_Loses_Control();
+ }
+ if (Actor_Query_Is_In_Current_Set(kActorZuben)) {
+ Actor_Modify_Friendliness_To_Other(kActorZuben, kActorMcCoy, -2);
+ }
+ return true;
}
}
-
- Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
- if (!Game_Flag_Query(kFlagCT01McCoyTalkedToGordo)) {
- Actor_Says(kActorMcCoy, 335, 18);
- Actor_Says(kActorGordo, 20, 30);
- Game_Flag_Set(kFlagCT01McCoyTalkedToGordo);
- Actor_Clue_Acquire(kActorGordo, kClueMcCoysDescription, 1, kActorMcCoy);
- Actor_Clue_Acquire(kActorMcCoy, kClueMcCoyIsABladeRunner, 1, kActorMcCoy);
- Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -1);
- } else if (Actor_Query_Goal_Number(kActorGordo) != 0) {
- Actor_Says(kActorMcCoy, 365, 14);
- } else {
- Actor_Says(kActorMcCoy, 340, 13);
- Actor_Says(kActorMcCoy, 345, 11);
- Actor_Says(kActorGordo, 30, 30);
- Actor_Says(kActorMcCoy, 350, 13);
- Actor_Says(kActorGordo, 40, 30);
- Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -5);
- Player_Loses_Control();
- }
- if (Actor_Query_Is_In_Current_Set(kActorZuben)) {
- Actor_Modify_Friendliness_To_Other(kActorZuben, kActorMcCoy, -2);
- }
- return true;
}
+
return false;
}
@@ -220,30 +226,33 @@ bool SceneScriptCT01::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptCT01::ClickedOnExit(int exitId) {
if (exitId == kCT01ExitCT02) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -327.5f, -6.5f, 352.28f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -327.5f, -6.5f, 352.28f, 0, true, false, 0)) {
Player_Loses_Control();
- Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 106, 0, 0, false);
+ Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 106, 0, false, false);
Player_Gains_Control();
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Set_Enter(kSetCT02, kSceneCT02);
}
return true;
}
+
if (exitId == kCT01ExitCT03) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -259.0f, -6.5f, 710.0f, 0, 1, false, 0)) {
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -259.0f, -6.5f, 710.0f, 0, true, false, 0)) {
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Set_Enter(kSetCT03_CT04, kSceneCT03);
}
return true;
}
+
if (exitId == kCT01ExitCT12) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -419.0f, -6.5f, 696.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -419.0f, -6.5f, 696.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagCT01toCT12);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Set_Enter(kSetCT01_CT12, kSceneCT12);
}
return true;
}
+
if (exitId == kCT01ExitSpinner) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -314.0f, -6.5f, 326.0f, 0, true, false, 0)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -330.0f, -6.5f, 221.0f, 0, false, true, 0);
@@ -261,7 +270,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
switch (spinnerDest) {
case kSpinnerDestinationPoliceStation:
Game_Flag_Set(kFlagMcCoyAtPSxx);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
@@ -269,7 +278,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
break;
case kSpinnerDestinationMcCoysApartment:
Game_Flag_Set(kFlagMcCoyAtMAxx);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
@@ -277,7 +286,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
break;
case kSpinnerDestinationRuncitersAnimals:
Game_Flag_Set(kFlagMcCoyAtRCxx);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
@@ -285,7 +294,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
break;
case kSpinnerDestinationAnimoidRow:
Game_Flag_Set(kFlagMcCoyAtARxx);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
@@ -294,14 +303,14 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
case kSpinnerDestinationTyrellBuilding:
Game_Flag_Set(kFlagMcCoyAtTBxx);
Game_Flag_Reset(kFlagSpinnerAtCT01);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kCT01LoopOutshot, true);
break;
case kSpinnerDestinationDNARow:
Game_Flag_Set(kFlagMcCoyAtDRxx);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
@@ -309,7 +318,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
break;
case kSpinnerDestinationBradburyBuilding:
Game_Flag_Set(kFlagMcCoyAtBBxx);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
@@ -317,7 +326,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
break;
case kSpinnerDestinationNightclubRow:
Game_Flag_Set(kFlagMcCoyAtNRxx);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtNR01);
Set_Enter(kSetNR01, kSceneNR01);
@@ -325,7 +334,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
break;
case kSpinnerDestinationHysteriaHall:
Game_Flag_Set(kFlagMcCoyAtHFxx);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
@@ -343,6 +352,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
}
return true;
}
+
return false;
}
@@ -351,16 +361,25 @@ bool SceneScriptCT01::ClickedOn2DRegion(int region) {
}
void SceneScriptCT01::SceneFrameAdvanced(int frame) {
- if ((frame < 316 || frame > 435) && !((frame - 1) % 10)) {
- Ambient_Sounds_Play_Sound(/*v1*/Random_Query(59, 60), 25, 30, 30, 0);
+ if ((frame < 316
+ || frame > 435
+ )
+ && ((frame - 1) % 10) == 0
+ ) {
+ Ambient_Sounds_Play_Sound(Random_Query(59, 60), 25, 30, 30, 0);
}
+
if (frame == 23) {
Ambient_Sounds_Play_Sound(118, 40, 99, 0, 0);
}
+
if (frame == 316) {
Ambient_Sounds_Play_Sound(373, 50, -50, 100, 99);
}
- if (frame == 196 || frame == 452) {
+
+ if (frame == 196
+ || frame == 452
+ ) {
int v3 = Random_Query(0, 6);
if (v3 == 0) {
Overlay_Play("ct01spnr", 0, false, true, 0);
@@ -385,15 +404,15 @@ void SceneScriptCT01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptCT01::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagCT02toCT01walk)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -327.2f, -6.5f, 352.28f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -327.2f, -6.5f, 352.28f, 0, false, false, 0);
Game_Flag_Reset(kFlagCT02toCT01walk);
} else {
- if (!Game_Flag_Query(kFlagArrivedFromSpinner)) {
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ if (!Game_Flag_Query(kFlagArrivedFromSpinner1)) {
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
return;
}
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -330.0f, -6.5f, 221.0f, 0, 0, false, 0);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -314.0f, -6.5f, 326.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -330.0f, -6.5f, 221.0f, 0, false, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -314.0f, -6.5f, 326.0f, 0, false, false, 0);
if (!Game_Flag_Query(kFlagCT01Visited)) {
Game_Flag_Set(kFlagCT01Visited);
if (!Game_Flag_Query(kFlagDirectorsCut)) {
@@ -427,38 +446,47 @@ void SceneScriptCT01::DialogueQueueFlushed(int a1) {
void SceneScriptCT01::dialogueWithHowieLee() {
Dialogue_Menu_Clear_List();
if (Actor_Clue_Query(kActorMcCoy, kClueLucy)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(40, 4, 5, 6);
+ DM_Add_To_List_Never_Repeat_Once_Selected(40, 4, 5, 6); // LUCY PHOTO
}
+
if (
( Actor_Clue_Query(kActorMcCoy, kClueChopstickWrapper)
|| Actor_Clue_Query(kActorMcCoy, kClueSushiMenu)
)
&& !Game_Flag_Query(kFlagCT01Evidence1Linked)
) {
- DM_Add_To_List_Never_Repeat_Once_Selected(50, 5, 5, 4);
+ DM_Add_To_List_Never_Repeat_Once_Selected(50, 5, 5, 4); // RUNCITER CLUES
}
+
if ( Actor_Clue_Query(kActorMcCoy, kClueChopstickWrapper)
&& Actor_Clue_Query(kActorMcCoy, kClueSushiMenu)
&& Game_Flag_Query(kFlagCT01Evidence1Linked)
&& !Game_Flag_Query(kFlagCT01Evidence2Linked)
) {
- DM_Add_To_List_Never_Repeat_Once_Selected(60, 3, 5, 5);
+ DM_Add_To_List_Never_Repeat_Once_Selected(60, 3, 5, 5); // MORE RUNCITER CLUES
}
+
if (Game_Flag_Query(kFlagCT02PotTipped)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(80, 9, 9, 9);
+ DM_Add_To_List_Never_Repeat_Once_Selected(80, 9, 9, 9); // EMPLOYEE
} else if (Game_Flag_Query(kFlagCT01ZubenLeft)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(80, 3, 4, 8);
+ DM_Add_To_List_Never_Repeat_Once_Selected(80, 3, 4, 8); // EMPLOYEE
}
- if (Actor_Clue_Query(kActorMcCoy, kClueCarColorAndMake) && Actor_Clue_Query(kActorMcCoy, kClueDispatchHitAndRun) == 1) {
- DM_Add_To_List_Never_Repeat_Once_Selected(90, 5, 4, 5);
+
+ if (Actor_Clue_Query(kActorMcCoy, kClueCarColorAndMake)
+ && Actor_Clue_Query(kActorMcCoy, kClueDispatchHitAndRun) // this clue is never obtained
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(90, 5, 4, 5); // HIT AND RUN
}
- DM_Add_To_List_Never_Repeat_Once_Selected(70, 7, 3, -1);
- Dialogue_Menu_Add_DONE_To_List(100);
+
+ DM_Add_To_List_Never_Repeat_Once_Selected(70, 7, 3, -1); // SMALL TALK
+ Dialogue_Menu_Add_DONE_To_List(100); // DONE
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
+
switch (answer) {
- case 40:
+ case 40: // LUCY PHOTO
Actor_Says(kActorMcCoy, 265, 11);
Actor_Says(kActorHowieLee, 20, 14);
if (Actor_Query_Is_In_Current_Set(kActorZuben)) {
@@ -472,12 +500,13 @@ void SceneScriptCT01::dialogueWithHowieLee() {
Actor_Modify_Friendliness_To_Other(kActorZuben, kActorMcCoy, -2);
if (Actor_Query_Is_In_Current_Set(kActorGordo)) {
Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -3);
- Actor_Clue_Acquire(kActorGordo, kClueMcCoysDescription, 1, kActorMcCoy);
+ Actor_Clue_Acquire(kActorGordo, kClueMcCoysDescription, true, kActorMcCoy);
}
}
}
break;
- case 50:
+
+ case 50: // RUNCITER CLUES
if (Actor_Clue_Query(kActorMcCoy, kClueChopstickWrapper)) {
Actor_Says(kActorMcCoy, 270, 11);
Actor_Says(kActorHowieLee, 30, 16);
@@ -487,7 +516,8 @@ void SceneScriptCT01::dialogueWithHowieLee() {
}
Game_Flag_Set(kFlagCT01Evidence1Linked);
break;
- case 60:
+
+ case 60: // MORE RUNCITER CLUES
if (Actor_Clue_Query(kActorMcCoy, kClueSushiMenu)) {
Actor_Says(kActorMcCoy, 270, 11);
Actor_Says(kActorHowieLee, 40, 15);
@@ -498,9 +528,14 @@ void SceneScriptCT01::dialogueWithHowieLee() {
Actor_Modify_Friendliness_To_Other(kActorHowieLee, kActorMcCoy, 5);
Game_Flag_Set(kFlagCT01Evidence2Linked);
break;
- case 70:
+
+ case 70: // SMALL TALK
Actor_Says(kActorMcCoy, 290, 13);
- if (Actor_Query_Friendliness_To_Other(kActorHowieLee, kActorMcCoy) > 49 && (Global_Variable_Query(kVariableChinyen) > 10 || Query_Difficulty_Level() == 0)) {
+ if (Actor_Query_Friendliness_To_Other(kActorHowieLee, kActorMcCoy) > 49
+ && (Global_Variable_Query(kVariableChinyen) > 10
+ || Query_Difficulty_Level() == 0
+ )
+ ) {
Actor_Says(kActorHowieLee, 50, kAnimationModeTalk);
Actor_Says(kActorHowieLee, 60, kAnimationModeTalk);
Actor_Face_Actor(kActorHowieLee, kActorMcCoy, true);
@@ -514,18 +549,21 @@ void SceneScriptCT01::dialogueWithHowieLee() {
Actor_Says(kActorHowieLee, 130, 15);
}
break;
- case 80:
+
+ case 80: // EMPLOYEE
Actor_Says(kActorMcCoy, 295, 11);
Actor_Says(kActorHowieLee, 90, 14);
Actor_Says(kActorHowieLee, 100, 13);
- Actor_Clue_Acquire(kActorMcCoy, kClueHowieLeeInterview, 1, kActorHowieLee);
+ Actor_Clue_Acquire(kActorMcCoy, kClueHowieLeeInterview, true, kActorHowieLee);
Actor_Modify_Friendliness_To_Other(kActorHowieLee, kActorMcCoy, -3);
break;
- case 90:
+
+ case 90: // HIT AND RUN
Actor_Says(kActorMcCoy, 300, 13);
Actor_Says(kActorHowieLee, 110, 16);
break;
- case 100:
+
+ case 100: // DONE
Actor_Says(kActorMcCoy, 305, 18);
break;
}
diff --git a/engines/bladerunner/script/scene/ct02.cpp b/engines/bladerunner/script/scene/ct02.cpp
index 8ee3f1bf02..97d7304b94 100644
--- a/engines/bladerunner/script/scene/ct02.cpp
+++ b/engines/bladerunner/script/scene/ct02.cpp
@@ -119,10 +119,12 @@ bool SceneScriptCT02::ClickedOn3DObject(const char *objectName, bool a2) {
void SceneScriptCT02::dialogueWithZuben() {
Dialogue_Menu_Clear_List();
if (Actor_Clue_Query(kActorMcCoy, kClueLucy)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(270, 8, 5, 3);
+ DM_Add_To_List_Never_Repeat_Once_Selected(270, 8, 5, 3); // LUCY PHOTO
}
- if (Actor_Clue_Query(kActorMcCoy, kClueRunciterInterviewA) && !Actor_Clue_Query(kActorMcCoy, kClueLucy)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(280, 8, 5, 3);
+ if ( Actor_Clue_Query(kActorMcCoy, kClueRunciterInterviewA)
+ && !Actor_Clue_Query(kActorMcCoy, kClueLucy)
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(280, 8, 5, 3); // LUCY
}
int evidenceCount = 0;
if (Actor_Clue_Query(kActorMcCoy, kClueDoorForced2)) {
@@ -141,29 +143,33 @@ void SceneScriptCT02::dialogueWithZuben() {
++evidenceCount;
}
if (evidenceCount > 3) {
- DM_Add_To_List_Never_Repeat_Once_Selected(290, -1, 4, 8);
+ DM_Add_To_List_Never_Repeat_Once_Selected(290, -1, 4, 8); // VOIGT-KAMPFF
}
- Dialogue_Menu_Add_DONE_To_List(300);
+ Dialogue_Menu_Add_DONE_To_List(300); // DONE
+
Dialogue_Menu_Appear(320, 240);
int answerValue = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
+
switch (answerValue) {
- case 270:
+ case 270: // LUCY PHOTO
Actor_Says(kActorMcCoy, 380, 11);
Actor_Says(kActorZuben, 30, 17);
Actor_Says(kActorZuben, 40, 15);
Actor_Says(kActorMcCoy, 410, 9);
Actor_Says(kActorZuben, 50, 18);
Actor_Says(kActorMcCoy, 415, 10);
- Actor_Clue_Acquire(kActorMcCoy, kClueZubenInterview, 0, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueZubenInterview, false, -1);
Actor_Modify_Friendliness_To_Other(kActorZuben, kActorMcCoy, -5);
break;
- case 280:
+
+ case 280: // LUCY
Actor_Says(kActorMcCoy, 385, 9);
Actor_Says(kActorZuben, 40, 19);
Actor_Modify_Friendliness_To_Other(kActorZuben, kActorMcCoy, -2);
break;
- case 290:
+
+ case 290: // VOIGT-KAMPFF
Actor_Says(kActorMcCoy, 395, 9);
Actor_Says(kActorMcCoy, 400, 9);
Actor_Says(kActorZuben, 70, 17);
@@ -171,14 +177,15 @@ void SceneScriptCT02::dialogueWithZuben() {
Actor_Says(kActorZuben, 80, 14);
Actor_Modify_Friendliness_To_Other(kActorZuben, kActorMcCoy, -10);
break;
- case 300:
+
+ case 300: // DONE
Actor_Says(kActorMcCoy, 405, 11);
break;
}
if (Actor_Query_Friendliness_To_Other(kActorZuben, kActorMcCoy) < 44) {
Scene_Exits_Disable();
- Actor_Clue_Acquire(kActorMcCoy, kClueZubenRunsAway, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueZubenRunsAway, true, -1);
Actor_Set_Goal_Number(kActorZuben, kGoalZubenCT02PushPot);
Game_Flag_Set(kFlagCT02PotTipped);
Scene_Loop_Set_Default(kCT02LoopMainPotTipped);
@@ -188,7 +195,7 @@ void SceneScriptCT02::dialogueWithZuben() {
bool SceneScriptCT02::ClickedOnActor(int actorId) {
if (actorId == kActorZuben && Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT01Leave) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -255.02f, -145.11f, 212.42f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -255.02f, -145.11f, 212.42f, 0, true, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorZuben, true);
Actor_Face_Actor(kActorZuben, kActorMcCoy, true);
if (!Game_Flag_Query(kFlagCT02ZubenTalk)) {
diff --git a/engines/bladerunner/script/scene/ct04.cpp b/engines/bladerunner/script/scene/ct04.cpp
index 07819ceba2..5f307d476d 100644
--- a/engines/bladerunner/script/scene/ct04.cpp
+++ b/engines/bladerunner/script/scene/ct04.cpp
@@ -80,6 +80,7 @@ bool SceneScriptCT04::ClickedOn3DObject(const char *objectName, bool a2) {
Game_Flag_Set(kFlagHomelessTalkedTo);
Actor_Set_Goal_Number(kActorTransient, kGoalTransientCT04Leave);
}
+
if ( Game_Flag_Query(kFlagMcCoyKilledHomeless)
&& !Game_Flag_Query(kFlagHomelessBodyInDumpster)
&& !Game_Flag_Query(kFlagHomelessBodyFound)
@@ -100,6 +101,7 @@ bool SceneScriptCT04::ClickedOn3DObject(const char *objectName, bool a2) {
}
return false;
}
+
if (Game_Flag_Query(kFlagHomelessBodyInDumpster)) {
if (Game_Flag_Query(kFlagDumpsterEmptied)) {
Actor_Voice_Over(270, kActorVoiceOver);
@@ -114,16 +116,18 @@ bool SceneScriptCT04::ClickedOn3DObject(const char *objectName, bool a2) {
}
return true;
}
- if (Game_Flag_Query(kFlagLicensePlaceFound)) {
+
+ if (!Game_Flag_Query(kFlagLicensePlaceFound)) {
if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 75, 0, true, false)) {
Actor_Face_Heading(kActorMcCoy, 707, false);
Actor_Change_Animation_Mode(kActorMcCoy, 38);
- Actor_Clue_Acquire(kActorMcCoy, kClueLicensePlate, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueLicensePlate, true, -1);
Item_Pickup_Spin_Effect(952, 392, 225);
Game_Flag_Set(kFlagLicensePlaceFound);
return true;
}
}
+
if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 75, 0, true, false)) {
Actor_Face_Heading(kActorMcCoy, 707, false);
Actor_Change_Animation_Mode(kActorMcCoy, 38);
@@ -138,24 +142,32 @@ bool SceneScriptCT04::ClickedOn3DObject(const char *objectName, bool a2) {
void SceneScriptCT04::dialogueWithHomeless() {
Dialogue_Menu_Clear_List();
- if (Global_Variable_Query(kVariableChinyen) > 10 || Query_Difficulty_Level() == 0) {
- DM_Add_To_List_Never_Repeat_Once_Selected(410, 8, 4, -1);
+ if (Global_Variable_Query(kVariableChinyen) > 10
+ || Query_Difficulty_Level() == 0
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(410, 8, 4, -1); // YES
}
- DM_Add_To_List_Never_Repeat_Once_Selected(420, 2, 6, 8);
+ DM_Add_To_List_Never_Repeat_Once_Selected(420, 2, 6, 8); // NO
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
- if (answer == 410) {
+
+ switch (answer) {
+ case 410: // YES
Actor_Says(kActorTransient, 10, 14);
Actor_Says(kActorTransient, 20, 14);
Actor_Modify_Friendliness_To_Other(kActorTransient, kActorMcCoy, 5);
if (Query_Difficulty_Level() != 0) {
Global_Variable_Decrement(kVariableChinyen, 10);
}
- } else if (answer == 420) {
+ break;
+
+ case 420: // NO
Actor_Says(kActorMcCoy, 430, 3);
Actor_Says(kActorTransient, 30, 14);
Actor_Modify_Friendliness_To_Other(kActorTransient, kActorMcCoy, -5);
+ break;
}
}
diff --git a/engines/bladerunner/script/scene/ct05.cpp b/engines/bladerunner/script/scene/ct05.cpp
index c2cea7ea09..0db0b47621 100644
--- a/engines/bladerunner/script/scene/ct05.cpp
+++ b/engines/bladerunner/script/scene/ct05.cpp
@@ -137,7 +137,7 @@ bool SceneScriptCT05::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptCT05::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -128.42f, -109.91f, 112.83f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -128.42f, -109.91f, 112.83f, 0, true, false, 0)) {
Game_Flag_Set(kFlagCT05toCT12);
if (Actor_Query_Goal_Number(kActorGaff) == 1) {
Overlay_Remove("ct05over");
@@ -147,7 +147,7 @@ bool SceneScriptCT05::ClickedOnExit(int exitId) {
return true;
}
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -308.18f, -109.91f, 674.77f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -308.18f, -109.91f, 674.77f, 0, true, false, 0)) {
Game_Flag_Set(kFlagCT05toCT04);
if (Actor_Query_Goal_Number(kActorGaff) == 1) {
Overlay_Remove("ct05over");
@@ -159,12 +159,12 @@ bool SceneScriptCT05::ClickedOnExit(int exitId) {
return true;
}
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 71.99f, -109.91f, 288.79f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 71.99f, -109.91f, 288.79f, 0, true, false, 0)) {
Footstep_Sound_Override_On(2);
Actor_Face_Object(kActorMcCoy, "STAIR 2", true);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 9, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 9, true, kAnimationModeIdle);
Actor_Set_At_XYZ(kActorMcCoy, 99.73f, -19.91f, 134.97f, 256);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 5, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 5, true, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Game_Flag_Set(kFlagCT05toCT06);
if (Actor_Query_Goal_Number(kActorGaff) == 1) {
@@ -211,20 +211,22 @@ void SceneScriptCT05::PlayerWalkedIn() {
Player_Loses_Control();
Game_Flag_Reset(kFlagCT04toCT05);
if (Player_Query_Combat_Mode()) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -308.18f, -109.91f, 674.77f, 0, 0, true, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -308.18f, -109.91f, 674.77f, 0, false, true, 0);
} else {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -308.18f, -109.91f, 674.77f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -308.18f, -109.91f, 674.77f, 0, false, false, 0);
}
Player_Gains_Control();
}
if (Game_Flag_Query(kFlagCT06toCT05)) {
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 7, false, kAnimationModeIdle);
Actor_Set_At_XYZ(kActorMcCoy, 90.73f, -19.91f, 164.97f, 520);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 10, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 10, false, kAnimationModeIdle);
Game_Flag_Reset(kFlagCT06toCT05);
Footstep_Sound_Override_Off();
- if (Actor_Query_Goal_Number(kActorGordo) == 2 && Game_Flag_Query(145)) {
+ if (Actor_Query_Goal_Number(kActorGordo) == 2
+ && Game_Flag_Query(kFlagZubenPhoto)
+ ) {
Actor_Set_Goal_Number(kActorGordo, 3);
}
}
diff --git a/engines/bladerunner/script/scene/ct06.cpp b/engines/bladerunner/script/scene/ct06.cpp
index dd78e208f6..11bd36cd90 100644
--- a/engines/bladerunner/script/scene/ct06.cpp
+++ b/engines/bladerunner/script/scene/ct06.cpp
@@ -91,7 +91,7 @@ bool SceneScriptCT06::ClickedOnActor(int actorId) {
Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorZuben, 24, true, false);
Actor_Face_Actor(kActorMcCoy, kActorZuben, true);
if (!Game_Flag_Query(kFlagZubenPhoto)) {
- Actor_Clue_Acquire(kActorMcCoy, kClueZuben, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueZuben, true, -1);
Item_Pickup_Spin_Effect(984, 340, 369);
Actor_Voice_Over(350, kActorVoiceOver);
Actor_Voice_Over(360, kActorVoiceOver);
diff --git a/engines/bladerunner/script/scene/ct08.cpp b/engines/bladerunner/script/scene/ct08.cpp
index e7d7334b18..6e814c132b 100644
--- a/engines/bladerunner/script/scene/ct08.cpp
+++ b/engines/bladerunner/script/scene/ct08.cpp
@@ -98,7 +98,7 @@ 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, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueCheese, true, -1);
Item_Pickup_Spin_Effect(936, 266, 328);
Item_Remove_From_World(81);
Actor_Voice_Over(480, kActorVoiceOver);
diff --git a/engines/bladerunner/script/scene/ct10.cpp b/engines/bladerunner/script/scene/ct10.cpp
index 53d3ee717c..dbc26d27a9 100644
--- a/engines/bladerunner/script/scene/ct10.cpp
+++ b/engines/bladerunner/script/scene/ct10.cpp
@@ -72,7 +72,7 @@ void SceneScriptCT10::sub_401844() {
Actor_Voice_Over(3700, kActorVoiceOver);
} else {
Item_Pickup_Spin_Effect(931, 435, 258);
- Actor_Clue_Acquire(kActorMcCoy, kClueHoldensBadge, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueHoldensBadge, true, -1);
}
Player_Gains_Control();
}
@@ -90,7 +90,7 @@ bool SceneScriptCT10::ClickedOn3DObject(const char *objectName, bool a2) {
if (Actor_Clue_Query(kActorMcCoy, kClueStrangeScale1)) {
Actor_Voice_Over(3700, kActorVoiceOver);
} else {
- Actor_Clue_Acquire(kActorMcCoy, kClueStrangeScale1, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueStrangeScale1, true, -1);
Item_Pickup_Spin_Effect(969, 364, 214);
}
Delay(1000);
diff --git a/engines/bladerunner/script/scene/ct11.cpp b/engines/bladerunner/script/scene/ct11.cpp
index 37823fe879..50b5a34195 100644
--- a/engines/bladerunner/script/scene/ct11.cpp
+++ b/engines/bladerunner/script/scene/ct11.cpp
@@ -130,7 +130,7 @@ bool SceneScriptCT11::ClickedOn2DRegion(int region) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 686.0f, 0.0f, 658.0f, 12, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 47, false);
Item_Remove_From_World(115);
- Actor_Clue_Acquire(kActorMcCoy, kClueLichenDogWrapper, 0, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueLichenDogWrapper, false, -1);
Item_Pickup_Spin_Effect(951, 510, 319);
Game_Flag_Reset(725);
Game_Flag_Set(645);
@@ -170,7 +170,7 @@ bool SceneScriptCT11::ClickedOn2DRegion(int region) {
Actor_Voice_Over(520, kActorVoiceOver);
Actor_Voice_Over(530, kActorVoiceOver);
Actor_Voice_Over(540, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueCar, 0, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueCar, false, -1);
Scene_2D_Region_Remove(1);
}
}
diff --git a/engines/bladerunner/script/scene/ct12.cpp b/engines/bladerunner/script/scene/ct12.cpp
index 4a2f05fb44..b303171bbf 100644
--- a/engines/bladerunner/script/scene/ct12.cpp
+++ b/engines/bladerunner/script/scene/ct12.cpp
@@ -59,32 +59,45 @@ void SceneScriptCT12::InitializeScene() {
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);
- if (Global_Variable_Query(kVariableChapter) < 2 && Actor_Query_Goal_Number(kActorGaff) == 1) {
+ if (Global_Variable_Query(kVariableChapter) < 2
+ && Actor_Query_Goal_Number(kActorGaff) == 1
+ ) {
Actor_Put_In_Set(kActorGaff, kSetCT01_CT12);
Actor_Set_At_XYZ(kActorGaff, -534.0f, -6.5f, 952.0f, 367);
Game_Flag_Set(kFlagGaffSpinnerCT12);
}
- if (Game_Flag_Query(kFlagCT01toCT12) && Game_Flag_Query(kFlagSpinnerAtCT01)) {
- if (Global_Variable_Query(kVariableChapter) != 2 && Global_Variable_Query(kVariableChapter) != 3) {
+ if (Game_Flag_Query(kFlagCT01toCT12)
+ && Game_Flag_Query(kFlagSpinnerAtCT01)
+ ) {
+ if (Global_Variable_Query(kVariableChapter) != 2
+ && Global_Variable_Query(kVariableChapter) != 3
+ ) {
Scene_Loop_Start_Special(0, 1, 0);
}
Scene_Loop_Set_Default(2);
Game_Flag_Reset(kFlagCT01toCT12);
- } else if (Game_Flag_Query(kFlagCT01toCT12) && !Game_Flag_Query(kFlagSpinnerAtCT01)) {
- if (Global_Variable_Query(kVariableChapter) != 2 && Global_Variable_Query(kVariableChapter) != 3) {
+ } else if ( Game_Flag_Query(kFlagCT01toCT12)
+ && !Game_Flag_Query(kFlagSpinnerAtCT01)
+ ) {
+ if (Global_Variable_Query(kVariableChapter) != 2
+ && Global_Variable_Query(kVariableChapter) != 3
+ ) {
Scene_Loop_Start_Special(0, 0, 0);
}
Scene_Loop_Set_Default(2);
Game_Flag_Reset(kFlagCT01toCT12);
- } else if (Game_Flag_Query(kFlagCT05toCT12) && Game_Flag_Query(kFlagGaffSpinnerCT12)) {
+ } else if (Game_Flag_Query(kFlagCT05toCT12)
+ && Game_Flag_Query(kFlagGaffSpinnerCT12)
+ ) {
Game_Flag_Reset(kFlagCT05toCT12);
Scene_Loop_Set_Default(4);
- } else if (Game_Flag_Query(kFlagCT05toCT12) && !Game_Flag_Query(kFlagGaffSpinnerCT12)) {
+ } else if ( Game_Flag_Query(kFlagCT05toCT12)
+ && !Game_Flag_Query(kFlagGaffSpinnerCT12)
+ ) {
Game_Flag_Reset(kFlagCT05toCT12);
Scene_Loop_Set_Default(2);
} else {
Scene_Loop_Set_Default(2);
-
}
}
@@ -104,27 +117,32 @@ bool SceneScriptCT12::ClickedOn3DObject(const char *objectName, bool a2) {
}
bool SceneScriptCT12::ClickedOnActor(int actorId) {
- if (actorId == 28) {
+ if (actorId == kActorHowieLee) {
Actor_Face_Actor(kActorMcCoy, kActorHowieLee, true);
Actor_Says(kActorMcCoy, 8910, 16);
}
- if (actorId == 24 && Global_Variable_Query(kVariableChapter) == 4 && Game_Flag_Query(671) && Game_Flag_Query(703)) {
+
+ if (actorId == kActorOfficerGrayford
+ && Global_Variable_Query(kVariableChapter) == 4
+ && Game_Flag_Query(671)
+ && Game_Flag_Query(703)
+ ) {
Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true);
- Actor_Says(kActorMcCoy, 710, 3);
- Actor_Says(kActorOfficerGrayford, 20, 3);
- Actor_Says(kActorMcCoy, 715, 3);
- Actor_Says(kActorOfficerGrayford, 30, 3);
- Actor_Says(kActorMcCoy, 720, 3);
- Actor_Says(kActorOfficerGrayford, 40, 3);
- Actor_Says(kActorOfficerGrayford, 50, 3);
- Actor_Says(kActorOfficerGrayford, 60, 3);
- Actor_Says(kActorMcCoy, 725, 3);
- Actor_Says(kActorOfficerGrayford, 70, 3);
- Actor_Says(kActorOfficerGrayford, 80, 3);
- Actor_Says(kActorOfficerGrayford, 90, 3);
- Actor_Says(kActorOfficerGrayford, 100, 3);
- Actor_Says(kActorOfficerGrayford, 110, 3);
+ Actor_Says(kActorMcCoy, 710, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 20, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 715, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 30, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 720, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 40, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 50, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 60, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 725, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 70, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 80, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 90, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 100, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 110, kAnimationModeTalk);
Game_Flag_Set(629);
Game_Flag_Set(666);
Actor_Set_Goal_Number(kActorMcCoy, 400);
@@ -138,7 +156,7 @@ bool SceneScriptCT12::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptCT12::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -419.15f, -6.5f, 696.94f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -419.15f, -6.5f, 696.94f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Game_Flag_Set(kFlagCT12toCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
@@ -146,7 +164,7 @@ bool SceneScriptCT12::ClickedOnExit(int exitId) {
return true;
}
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -182.69f, -6.5f, 696.94f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -182.69f, -6.5f, 696.94f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagCT12toCT03);
@@ -155,7 +173,7 @@ bool SceneScriptCT12::ClickedOnExit(int exitId) {
return true;
}
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -386.13f, -6.5f, 1132.72f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -386.13f, -6.5f, 1132.72f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagCT12toCT05);
@@ -164,7 +182,7 @@ bool SceneScriptCT12::ClickedOnExit(int exitId) {
return true;
}
if (exitId == 3) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -493.0f, -6.5f, 1174.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -493.0f, -6.5f, 1174.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagCT12toCT11);
@@ -173,7 +191,7 @@ bool SceneScriptCT12::ClickedOnExit(int exitId) {
return true;
}
if (exitId == 4) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -292.0f, -6.5f, 990.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -292.0f, -6.5f, 990.0f, 0, true, false, 0)) {
if (Global_Variable_Query(kVariableChapter) == 4) {
Game_Flag_Set(629);
}
@@ -193,19 +211,7 @@ bool SceneScriptCT12::ClickedOn2DRegion(int region) {
void SceneScriptCT12::SceneFrameAdvanced(int frame) {
if (((frame - 1) % 10) == 0) {
- /*int v2 = Random_Query(0, 1);
- if (v2 <= 1)
- {
- if (v2)
- {
- v1 = 60;
- }
- else
- {
- v1 = 59;
- }
- }*/
- Sound_Play(/*v1*/Random_Query(59, 60), 10, -80, -80, 50);
+ Sound_Play(Random_Query(59, 60), 10, -80, -80, 50);
}
if (frame == 160) {
Actor_Change_Animation_Mode(kActorGaff, 41);
@@ -238,37 +244,37 @@ void SceneScriptCT12::PlayerWalkedIn() {
Loop_Actor_Walk_To_Actor(kActorGaff, kActorMcCoy, 48, false, false);
Actor_Face_Actor(kActorGaff, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorGaff, true);
- Actor_Says(kActorGaff, 0, 3);
- Actor_Says(kActorMcCoy, 670, 3);
- Actor_Says(kActorGaff, 10, 3);
- Actor_Says(kActorMcCoy, 675, 3);
- Actor_Says(kActorGaff, 20, 3);
- Actor_Says(kActorMcCoy, 680, 3);
- Actor_Says(kActorGaff, 30, 3);
- Actor_Says(kActorMcCoy, 685, 3);
- Actor_Says(kActorGaff, 40, 3);
- Actor_Says(kActorMcCoy, 690, 3);
- Actor_Clue_Acquire(kActorMcCoy, kClueGaffsInformation, 1, kActorGaff);
+ Actor_Says(kActorGaff, 0, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 670, kAnimationModeTalk);
+ Actor_Says(kActorGaff, 10, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 675, kAnimationModeTalk);
+ Actor_Says(kActorGaff, 20, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 680, kAnimationModeTalk);
+ Actor_Says(kActorGaff, 30, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 685, kAnimationModeTalk);
+ Actor_Says(kActorGaff, 40, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 690, kAnimationModeTalk);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGaffsInformation, true, kActorGaff);
Game_Flag_Set(kFlagGaffApproachedMcCoyAboutZuben);
CDB_Set_Crime(kClueZuben, kCrimeMoonbusHijacking);
if (Game_Flag_Query(kFlagGaffApproachedMcCoyAboutZuben)
&& Game_Flag_Query(kFlagZubenRetired)
) {
- Actor_Says(kActorGaff, 50, 3);
- Actor_Says(kActorMcCoy, 695, 3);
- Actor_Says(kActorGaff, 60, 3);
- Actor_Says(kActorMcCoy, 700, 3);
- Actor_Says(kActorGaff, 70, 3);
- Actor_Clue_Acquire(kActorGaff, kClueMcCoyRetiredZuben, 1, -1);
+ Actor_Says(kActorGaff, 50, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 695, kAnimationModeTalk);
+ Actor_Says(kActorGaff, 60, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 700, kAnimationModeTalk);
+ Actor_Says(kActorGaff, 70, kAnimationModeTalk);
+ Actor_Clue_Acquire(kActorGaff, kClueMcCoyRetiredZuben, true, -1);
} else if (Game_Flag_Query(kFlagGaffApproachedMcCoyAboutZuben)
&& Game_Flag_Query(kFlagZubenSpared)
) {
- Actor_Says(kActorGaff, 80, 3);
- Actor_Says(kActorGaff, 90, 3);
- Actor_Says(kActorMcCoy, 705, 3);
- Actor_Says(kActorGaff, 100, 3);
- Actor_Clue_Acquire(kActorGaff, kClueMcCoyLetZubenEscape, 1, -1);
+ Actor_Says(kActorGaff, 80, kAnimationModeTalk);
+ Actor_Says(kActorGaff, 90, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 705, kAnimationModeTalk);
+ Actor_Says(kActorGaff, 100, kAnimationModeTalk);
+ Actor_Clue_Acquire(kActorGaff, kClueMcCoyLetZubenEscape, true, -1);
}
Actor_Set_Goal_Number(kActorGaff, 2);
diff --git a/engines/bladerunner/script/scene/ct51.cpp b/engines/bladerunner/script/scene/ct51.cpp
index 887ae08f89..f022e04696 100644
--- a/engines/bladerunner/script/scene/ct51.cpp
+++ b/engines/bladerunner/script/scene/ct51.cpp
@@ -60,7 +60,7 @@ bool SceneScriptCT51::ClickedOn3DObject(const char *objectName, bool a2) {
return false;
}
Item_Pickup_Spin_Effect(970, 203, 200);
- Actor_Clue_Acquire(kActorMcCoy, kClueHysteriaToken, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueHysteriaToken, true, -1);
Actor_Voice_Over(420, kActorVoiceOver);
return true;
}
@@ -73,14 +73,14 @@ bool SceneScriptCT51::ClickedOnActor(int actorId) {
bool SceneScriptCT51::ClickedOnItem(int itemId, bool a2) {
if (itemId == 85) {
- Actor_Clue_Acquire(kActorMcCoy, kClueRagDoll, 1, -1);
+ 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);
return true;
}
if (itemId == 120) {
- Actor_Clue_Acquire(kActorMcCoy, kClueMoonbus1, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueMoonbus1, true, -1);
Item_Pickup_Spin_Effect(984, 490, 307);
Item_Remove_From_World(120);
Actor_Says(kActorMcCoy, 8527, 3);
diff --git a/engines/bladerunner/script/scene/dr01.cpp b/engines/bladerunner/script/scene/dr01.cpp
index 1284c028b7..f58ebc6a38 100644
--- a/engines/bladerunner/script/scene/dr01.cpp
+++ b/engines/bladerunner/script/scene/dr01.cpp
@@ -55,12 +55,12 @@ void SceneScriptDR01::InitializeScene() {
Ambient_Sounds_Add_Sound(378, 5, 80, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(379, 5, 80, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(380, 5, 80, 50, 100, -100, 100, -101, -101, 0, 0);
- if (Game_Flag_Query(272)
+ if (Game_Flag_Query(kFlagDR05BombExploded)
&& Game_Flag_Query(kFlagDR04toDR01)
) {
Scene_Loop_Start_Special(0, 3, 0);
Scene_Loop_Set_Default(4);
- } else if (!Game_Flag_Query(272)
+ } else if (!Game_Flag_Query(kFlagDR05BombExploded)
&& Game_Flag_Query(kFlagDR04toDR01)
) {
Scene_Loop_Start_Special(0, 2, 0);
diff --git a/engines/bladerunner/script/scene/dr03.cpp b/engines/bladerunner/script/scene/dr03.cpp
index 2fa1f35974..f012c68ea5 100644
--- a/engines/bladerunner/script/scene/dr03.cpp
+++ b/engines/bladerunner/script/scene/dr03.cpp
@@ -59,21 +59,22 @@ bool SceneScriptDR03::ClickedOn3DObject(const char *objectName, bool a2) {
}
bool SceneScriptDR03::ClickedOnActor(int actorId) {
- if (actorId == 52) {
+ if (actorId == kActorChew) {
Actor_Face_Actor(kActorMcCoy, kActorChew, true);
Actor_Face_Actor(kActorChew, kActorMcCoy, true);
- if (!Game_Flag_Query(267)) {
+ if (!Game_Flag_Query(kFlagDR03ChewTalk1)) {
Actor_Says(kActorMcCoy, 755, 18);
Actor_Says(kActorChew, 10, 14);
Actor_Says(kActorMcCoy, 760, 18);
Actor_Says(kActorChew, 20, 14);
Actor_Says(kActorMcCoy, 765, 18);
Actor_Says(kActorChew, 30, 14);
- Game_Flag_Set(267);
+ Game_Flag_Set(kFlagDR03ChewTalk1);
return true;
}
if (Actor_Clue_Query(kActorMcCoy, kClueChewInterview)) {
- if (Game_Flag_Query(266) && Game_Flag_Query(267)) {
+ if (Game_Flag_Query(kFlagMorajiExploded)
+ && Game_Flag_Query(kFlagDR03ChewTalk1)) {
Actor_Says(kActorMcCoy, 815, 18);
Actor_Says(kActorChew, 60, 14);
Actor_Says(kActorChew, 70, 14);
@@ -82,7 +83,7 @@ bool SceneScriptDR03::ClickedOnActor(int actorId) {
Actor_Says(kActorChew, 90, 14);
Actor_Says(kActorMcCoy, 825, 18);
Actor_Says(kActorChew, 100, 14);
- Game_Flag_Reset(266);
+ Game_Flag_Reset(kFlagMorajiExploded);
Game_Flag_Set(505);
return true;
}
@@ -114,7 +115,7 @@ bool SceneScriptDR03::ClickedOnActor(int actorId) {
Actor_Says(kActorMcCoy, 855, 18);
Actor_Says(kActorChew, 210, 12);
}
- Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, 1, kActorChew);
+ Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, true, kActorChew);
return true;
}
return false;
@@ -216,7 +217,7 @@ void SceneScriptDR03::sub_401B18() {
Actor_Says(kActorMcCoy, 855, 18);
Actor_Says(kActorChew, 210, 12);
}
- Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, 1, kActorChew);
+ Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, true, kActorChew);
break;
case 650:
Actor_Says(kActorMcCoy, 775, 11);
@@ -239,11 +240,11 @@ void SceneScriptDR03::sub_401B18() {
Actor_Says(kActorChew, 280, 12);
Actor_Says(kActorMcCoy, 870, 18);
Actor_Says(kActorChew, 290, 15);
- if (!Game_Flag_Query(266)) {
+ if (!Game_Flag_Query(kFlagMorajiExploded)) {
Actor_Says(kActorChew, 300, 12);
}
}
- Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, 1, kActorChew);
+ Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, true, kActorChew);
break;
case 670:
Actor_Says(kActorMcCoy, 765, 12);
diff --git a/engines/bladerunner/script/scene/dr04.cpp b/engines/bladerunner/script/scene/dr04.cpp
index 0483d191f8..d4aa636a1c 100644
--- a/engines/bladerunner/script/scene/dr04.cpp
+++ b/engines/bladerunner/script/scene/dr04.cpp
@@ -25,13 +25,13 @@
namespace BladeRunner {
void SceneScriptDR04::InitializeScene() {
- if (Game_Flag_Query(515)) {
+ if (Game_Flag_Query(kFlagDR05BombExplosionView)) {
Setup_Scene_Information(0.0f, 0.0f, 0.0f, 0);
} else if (Game_Flag_Query(kFlagDR01toDR04)) {
Setup_Scene_Information(-711.0f, -0.04f, 70.0f, 472);
- } else if (Game_Flag_Query(229)) {
+ } else if (Game_Flag_Query(kFlagDR05toDR04)) {
Setup_Scene_Information(-1067.0f, 7.18f, 421.0f, 125);
- } else if (Game_Flag_Query(231)) {
+ } else if (Game_Flag_Query(kFlagDR06toDR04)) {
Setup_Scene_Information(-897.75f, 134.45f, 569.75f, 512);
} else {
Setup_Scene_Information(-810.0f, -0.04f, 242.0f, 125);
@@ -52,13 +52,13 @@ void SceneScriptDR04::InitializeScene() {
Ambient_Sounds_Add_Sound(378, 5, 80, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(379, 5, 80, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(380, 5, 80, 50, 100, 0, 0, -101, -101, 0, 0);
- if (Game_Flag_Query(272)) {
+ if (Game_Flag_Query(kFlagDR05BombExploded)) {
Scene_Loop_Set_Default(1);
} else {
Scene_Loop_Set_Default(4);
}
if (Game_Flag_Query(kFlagDR01toDR04)) {
- if (Game_Flag_Query(272)) {
+ if (Game_Flag_Query(kFlagDR05BombExploded)) {
Scene_Loop_Start_Special(0, 0, 0);
} else {
Scene_Loop_Start_Special(0, 3, 0);
@@ -92,33 +92,34 @@ bool SceneScriptDR04::ClickedOn3DObject(const char *objectName, bool a2) {
}
bool SceneScriptDR04::ClickedOnActor(int actorId) {
- if (actorId == 35 && !Player_Query_Combat_Mode()) {
- if (Actor_Query_Goal_Number(kActorMoraji) != 21) {
- if (Actor_Query_Goal_Number(kActorMoraji) == 23) {
- if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorMoraji, 36, 1, false)) {
- Actor_Set_Goal_Number(kActorOfficerGrayford, 106);
- return true;
- }
+ if ( actorId == kActorMoraji
+ && !Player_Query_Combat_Mode()
+ ) {
+ if (Actor_Query_Goal_Number(kActorMoraji) == 21) {
+ if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 109, 0, true, true)) {
+ Actor_Face_Actor(kActorMcCoy, kActorMoraji, true);
+ Actor_Says(kActorMcCoy, 945, 13);
+ Actor_Says(kActorMoraji, 0, 3);
+ Actor_Says(kActorMoraji, 10, 3);
+ Actor_Says(kActorMcCoy, 950, 13);
+ Actor_Says(kActorMoraji, 20, 3);
+ Actor_Says(kActorMoraji, 30, 3);
+ Actor_Says(kActorMcCoy, 955, 13);
+ Actor_Says_With_Pause(kActorMoraji, 40, 0.0f, 3);
+ Actor_Says(kActorMoraji, 50, 3);
+ Actor_Clue_Acquire(kActorMcCoy, kClueMorajiInterview, true, kActorMoraji);
+ Actor_Set_Goal_Number(kActorMoraji, 22);
+ Actor_Set_Goal_Number(kActorOfficerGrayford, 101);
+ return true;
}
- return false;
}
- if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 109, 0, 1, true)) {
- Actor_Face_Actor(kActorMcCoy, kActorMoraji, true);
- Actor_Says(kActorMcCoy, 945, 13);
- Actor_Says(kActorMoraji, 0, 3);
- Actor_Says(kActorMoraji, 10, 3);
- Actor_Says(kActorMcCoy, 950, 13);
- Actor_Says(kActorMoraji, 20, 3);
- Actor_Says(kActorMoraji, 30, 3);
- Actor_Says(kActorMcCoy, 955, 13);
- Actor_Says_With_Pause(kActorMoraji, 40, 0.0f, 3);
- Actor_Says(kActorMoraji, 50, 3);
- Actor_Clue_Acquire(kActorMcCoy, kClueMorajiInterview, 1, kActorMoraji);
- Actor_Set_Goal_Number(kActorMoraji, 22);
- Actor_Set_Goal_Number(kActorOfficerGrayford, 101);
- return true;
+
+ if (Actor_Query_Goal_Number(kActorMoraji) == 23) {
+ if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorMoraji, 36, true, false)) {
+ Actor_Set_Goal_Number(kActorOfficerGrayford, 106);
+ return true;
+ }
}
- return false;
}
return false;
}
@@ -144,8 +145,8 @@ bool SceneScriptDR04::ClickedOnExit(int exitId) {
}
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1067.0f, 7.18f, 421.0f, 0, 1, false, 0)) {
- Game_Flag_Set(232);
- Game_Flag_Set(228);
+ Game_Flag_Set(kFlagNotUsed232);
+ Game_Flag_Set(kFlagDR04toDR05);
Set_Enter(kSetDR05, kSceneDR05);
}
return true;
@@ -155,13 +156,13 @@ bool SceneScriptDR04::ClickedOnExit(int exitId) {
Footstep_Sound_Override_On(3);
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, true);
Actor_Face_Heading(kActorMcCoy, 512, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 1, kAnimationModeIdle);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -899.0f, 71.64f, 647.0f, 0, 0, false, 0);
Actor_Face_Heading(kActorMcCoy, 0, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 1, kAnimationModeIdle);
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, false);
Footstep_Sound_Override_Off();
- Game_Flag_Set(230);
+ Game_Flag_Set(kFlagDR04toDR06);
Set_Enter(kSetDR06, kSceneDR06);
}
return true;
@@ -180,17 +181,17 @@ bool SceneScriptDR04::sub_401160() {
}
void SceneScriptDR04::SceneFrameAdvanced(int frame) {
- if (Game_Flag_Query(515)) {
- Game_Flag_Reset(515);
- Game_Flag_Reset(271);
+ if (Game_Flag_Query(kFlagDR05BombExplosionView)) {
+ Game_Flag_Reset(kFlagDR05BombExplosionView);
+ Game_Flag_Reset(kFlagDR05BombWillExplode);
Scene_Loop_Set_Default(1);
Scene_Loop_Start_Special(kSceneLoopModeOnce, 6, true);
Music_Stop(4);
Actor_Set_Goal_Number(kActorMoraji, 99);
} else {
- if (Game_Flag_Query(271)) {
- Game_Flag_Reset(271);
- Game_Flag_Set(272);
+ if (Game_Flag_Query(kFlagDR05BombWillExplode)) {
+ Game_Flag_Reset(kFlagDR05BombWillExplode);
+ Game_Flag_Set(kFlagDR05BombExploded);
Scene_Loop_Set_Default(1);
Scene_Loop_Start_Special(kSceneLoopModeOnce, 6, true);
Item_Remove_From_World(78);
@@ -215,7 +216,10 @@ void SceneScriptDR04::SceneFrameAdvanced(int frame) {
Player_Gains_Control();
break;
case 235:
- if (Actor_Query_Goal_Number(kActorMoraji) != 20 && Actor_Query_Goal_Number(kActorMoraji) != 21 && Actor_Query_Goal_Number(kActorMoraji) != 99) {
+ if (Actor_Query_Goal_Number(kActorMoraji) != 20
+ && Actor_Query_Goal_Number(kActorMoraji) != 21
+ && Actor_Query_Goal_Number(kActorMoraji) != 99
+ ) {
Actor_Set_Goal_Number(kActorOfficerGrayford, 101);
}
Scene_Exits_Enable();
@@ -231,30 +235,33 @@ void SceneScriptDR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptDR04::PlayerWalkedIn() {
- if (Game_Flag_Query(515)) {
+ if (Game_Flag_Query(kFlagDR05BombExplosionView)) {
Player_Loses_Control();
Delay(4000);
Actor_Retired_Here(kActorMcCoy, 6, 6, 1, -1);
} else {
- if (Game_Flag_Query(269) && !Game_Flag_Query(272)) {
+ if ( Game_Flag_Query(kFlagDR05BombActivated)
+ && !Game_Flag_Query(kFlagDR05BombExploded)
+ ) {
Scene_Exits_Disable();
}
- if (Game_Flag_Query(231)) {
+
+ if (Game_Flag_Query(kFlagDR06toDR04)) {
Footstep_Sound_Override_On(3);
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, true);
Actor_Face_Heading(kActorMcCoy, 512, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 0, kAnimationModeIdle);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -851.0f, 71.64f, 647.0f, 0, 0, false, 0);
Actor_Face_Heading(kActorMcCoy, 0, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 0, kAnimationModeIdle);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -774.85f, 7.18f, 386.67f, 0, 0, false, 0);
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, false);
Footstep_Sound_Override_Off();
}
}
Game_Flag_Reset(kFlagDR01toDR04);
- Game_Flag_Reset(229);
- Game_Flag_Reset(231);
+ Game_Flag_Reset(kFlagDR05toDR04);
+ Game_Flag_Reset(kFlagDR06toDR04);
}
void SceneScriptDR04::PlayerWalkedOut() {
diff --git a/engines/bladerunner/script/scene/dr05.cpp b/engines/bladerunner/script/scene/dr05.cpp
index dfa4b8bbbf..6ad6604c23 100644
--- a/engines/bladerunner/script/scene/dr05.cpp
+++ b/engines/bladerunner/script/scene/dr05.cpp
@@ -26,13 +26,13 @@ namespace BladeRunner {
void SceneScriptDR05::InitializeScene() {
Setup_Scene_Information(-22.0f, 0.3f, 221.0f, 0);
- Game_Flag_Reset(228);
+ Game_Flag_Reset(kFlagDR04toDR05);
Scene_Exit_Add_2D_Exit(0, 0, 38, 80, 467, 3);
Ambient_Sounds_Add_Looping_Sound(383, 25, 0, 1);
- if (!Game_Flag_Query(272)) {
+ if (!Game_Flag_Query(kFlagDR05BombExploded)) {
Overlay_Play("DR05OVER", 0, 1, 0, 0);
}
- if (Game_Flag_Query(272)) {
+ if (Game_Flag_Query(kFlagDR05BombExploded)) {
Scene_Loop_Set_Default(2);
} else {
Scene_Loop_Set_Default(0);
@@ -44,9 +44,9 @@ void SceneScriptDR05::SceneLoaded() {
Unobstacle_Object("BOX06", true);
Unobstacle_Object("BOX183", true);
Clickable_Object("T2 DOORWAY");
- if (!Game_Flag_Query(272)) {
+ if (!Game_Flag_Query(kFlagDR05BombExploded)) {
Item_Add_To_World(78, 932, 35, -1.57f, 31.33f, 75.21f, 540, 16, 16, true, true, false, true);
- if (!Actor_Query_Goal_Number(kActorMoraji)) {
+ if (Actor_Query_Goal_Number(kActorMoraji) == 0) {
Item_Add_To_World(122, 931, 35, 37.35f, 1.59f, 46.72f, 0, 20, 20, true, true, false, true);
}
}
@@ -58,8 +58,10 @@ bool SceneScriptDR05::MouseClick(int x, int y) {
bool SceneScriptDR05::ClickedOn3DObject(const char *objectName, bool a2) {
if (Object_Query_Click("T2 DOORWAY", objectName)) {
- if (Game_Flag_Query(276) || Actor_Query_Goal_Number(kActorMoraji)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 57.61f, 0.3f, 69.27f, 0, 1, false, 0)) {
+ if (Game_Flag_Query(kFlagNotUsed276)
+ || Actor_Query_Goal_Number(kActorMoraji) != 0
+ ) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 57.61f, 0.3f, 69.27f, 0, true, false, 0)) {
Actor_Face_Object(kActorMcCoy, "T2 DOORWAY", true);
Actor_Says(kActorMcCoy, 8522, 13);
Actor_Says(kActorMcCoy, 8521, 14);
@@ -81,9 +83,12 @@ bool SceneScriptDR05::ClickedOnActor(int actorId) {
bool SceneScriptDR05::ClickedOnItem(int itemId, bool a2) {
if (itemId == 78) {
if (Player_Query_Combat_Mode()) {
- Game_Flag_Set(271);
+ Game_Flag_Set(kFlagDR05BombWillExplode);
Actor_Set_Goal_Number(kActorMoraji, 30);
- } else if (!Game_Flag_Query(272) && !Loop_Actor_Walk_To_Item(kActorMcCoy, 78, 24, 1, true) && Actor_Query_Goal_Number(kActorMoraji) != 11) {
+ } else if (!Game_Flag_Query(kFlagDR05BombExploded)
+ && !Loop_Actor_Walk_To_Item(kActorMcCoy, 78, 24, 1, true)
+ && Actor_Query_Goal_Number(kActorMoraji) != 11
+ ) {
if (!Actor_Query_Goal_Number(kActorMoraji)) {
Actor_Says_With_Pause(kActorMcCoy, 1015, 0.1f, 12);
Actor_Says(kActorMoraji, 70, 13);
@@ -92,10 +97,13 @@ bool SceneScriptDR05::ClickedOnItem(int itemId, bool a2) {
}
//return true; //bug?
}
- if (itemId == 122 && Player_Query_Combat_Mode() && Actor_Query_Goal_Number(kActorMoraji) == 0) {
+ if (itemId == 122
+ && Player_Query_Combat_Mode()
+ && Actor_Query_Goal_Number(kActorMoraji) == 0
+ ) {
Overlay_Play("DR05OVER", 1, 0, 1, 0);
Item_Remove_From_World(122);
- Game_Flag_Set(270);
+ Game_Flag_Set(kFlagDR05ChainShot);
Actor_Set_Goal_Number(kActorMoraji, 10);
Music_Play(18, 71, 0, 0, -1, 0, 2);
return true;
@@ -105,9 +113,9 @@ bool SceneScriptDR05::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptDR05::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -22.0f, 0.3f, 221.0f, 0, 1, false, 0)) {
- Game_Flag_Reset(232);
- Game_Flag_Set(229);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -22.0f, 0.3f, 221.0f, 0, true, false, 0)) {
+ Game_Flag_Reset(kFlagNotUsed232);
+ Game_Flag_Set(kFlagDR05toDR04);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR04);
}
return true;
@@ -123,10 +131,10 @@ void SceneScriptDR05::SceneFrameAdvanced(int frame) {
if (frame == 49) {
Sound_Play(148, Random_Query(50, 50), 80, 80, 50);
}
- if (Game_Flag_Query(271)) {
+ if (Game_Flag_Query(kFlagDR05BombWillExplode)) {
Item_Remove_From_World(78);
- Game_Flag_Reset(271);
- Game_Flag_Set(272);
+ Game_Flag_Reset(kFlagDR05BombWillExplode);
+ Game_Flag_Set(kFlagDR05BombExploded);
Actor_Set_Goal_Number(kActorMoraji, 30);
}
}
@@ -135,39 +143,46 @@ void SceneScriptDR05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptDR05::PlayerWalkedIn() {
- if (!Game_Flag_Query(511) && !Game_Flag_Query(270) && Game_Flag_Query(272)) {
+ if (!Game_Flag_Query(kFlagDR05ExplodedEntered)
+ && !Game_Flag_Query(kFlagDR05ChainShot)
+ && Game_Flag_Query(kFlagDR05BombExploded)
+ ) {
Item_Remove_From_World(122);
}
- if (Game_Flag_Query(272)) {
+
+ if (Game_Flag_Query(kFlagDR05BombExploded)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.0f, 0.3f, 133.0f, 0, 0, false, 0);
- if (!Game_Flag_Query(511)) {
- Game_Flag_Set(511);
+ if (!Game_Flag_Query(kFlagDR05ExplodedEntered)) {
+ Game_Flag_Set(kFlagDR05ExplodedEntered);
if (Game_Flag_Query(kFlagSadikIsReplicant)) {
Actor_Voice_Over(730, kActorVoiceOver);
Actor_Voice_Over(740, kActorVoiceOver);
Actor_Voice_Over(750, kActorVoiceOver);
Actor_Voice_Over(760, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueExpertBomber, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueExpertBomber, true, -1);
} else {
Actor_Voice_Over(670, kActorVoiceOver);
Actor_Voice_Over(680, kActorVoiceOver);
Actor_Voice_Over(700, kActorVoiceOver);
Actor_Voice_Over(710, kActorVoiceOver);
Actor_Voice_Over(720, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueAmateurBomber, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueAmateurBomber, true, -1);
}
}
} else {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.0f, 0.3f, 133.0f, 0, 0, true, 0);
}
- if (!Game_Flag_Query(274) && !Actor_Query_Goal_Number(kActorMoraji)) {
+
+ if (!Game_Flag_Query(kFlagDR05MorajiTalk)
+ && !Actor_Query_Goal_Number(kActorMoraji)
+ ) {
Actor_Face_Actor(kActorMcCoy, kActorMoraji, true);
Actor_Says(kActorMcCoy, 1010, 13);
Actor_Face_Item(kActorMcCoy, 78, true);
Player_Set_Combat_Mode(true);
Actor_Says(kActorMoraji, 60, 12);
Actor_Change_Animation_Mode(kActorMcCoy, 0);
- Game_Flag_Set(274);
+ Game_Flag_Set(kFlagDR05MorajiTalk);
//return true;
}
//return false;
diff --git a/engines/bladerunner/script/scene/dr06.cpp b/engines/bladerunner/script/scene/dr06.cpp
index 6d8271bec4..c28ec2db4f 100644
--- a/engines/bladerunner/script/scene/dr06.cpp
+++ b/engines/bladerunner/script/scene/dr06.cpp
@@ -25,19 +25,21 @@
namespace BladeRunner {
void SceneScriptDR06::InitializeScene() {
- if (Game_Flag_Query(230)) {
+ if (Game_Flag_Query(kFlagDR04toDR06)) {
Setup_Scene_Information(-733.57f, 136.6f, -968.64f, 0);
} else {
Setup_Scene_Information(-707.57f, 136.6f, -1132.64f, 472);
}
Scene_Exit_Add_2D_Exit(0, 601, 11, 639, 479, 1);
- if (Global_Variable_Query(kVariableChapter) > 3 && Game_Flag_Query(715)) {
+ if (Global_Variable_Query(kVariableChapter) > 3
+ && Game_Flag_Query(715)
+ ) {
Scene_Exit_Add_2D_Exit(1, 0, 272, 46, 477, 2);
}
Ambient_Sounds_Add_Looping_Sound(383, 25, 0, 1);
Ambient_Sounds_Add_Sound(73, 5, 60, 20, 20, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(74, 5, 60, 20, 20, -100, 100, -101, -101, 0, 0);
- if (Game_Flag_Query(268)) {
+ if (Game_Flag_Query(kFlagDR06JesterActive)) {
Overlay_Play("DR06over", 1, 1, 0, 0);
Ambient_Sounds_Add_Looping_Sound(300, 47, -75, 0);
} else {
@@ -67,79 +69,86 @@ bool SceneScriptDR06::MouseClick(int x, int y) {
bool SceneScriptDR06::ClickedOn3DObject(const char *objectName, bool a2) {
if (Object_Query_Click("BOX16", objectName)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -743.0f, 136.6f, -1091.0f, 0, 1, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -743.0f, 136.6f, -1091.0f, 0, true, false, 0);
Actor_Face_Object(kActorMcCoy, "BOX16", true);
- if (!Game_Flag_Query(268)) {
+ if (!Game_Flag_Query(kFlagDR06JesterActive)) {
Overlay_Play("DR06over", 1, 1, 1, 0);
Ambient_Sounds_Add_Looping_Sound(300, 47, -75, 0);
- Game_Flag_Set(268);
- return true;
+ Game_Flag_Set(kFlagDR06JesterActive);
+ } else {
+ Overlay_Play("DR06over", 0, 1, 1, 0);
+ Ambient_Sounds_Remove_Looping_Sound(300, false);
+ Game_Flag_Reset(kFlagDR06JesterActive);
}
- Overlay_Play("DR06over", 0, 1, 1, 0);
- Ambient_Sounds_Remove_Looping_Sound(300, false);
- Game_Flag_Reset(268);
return true;
}
+
if (Object_Query_Click("X2_MON01A04", objectName)) {
if (Actor_Clue_Query(kActorMcCoy, kClueAnsweringMachineMessage)) {
Actor_Face_Object(kActorMcCoy, "X2_MON01A04", true);
Actor_Says(kActorMcCoy, 8570, 13);
- } else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -684.94f, 136.6f, -1136.12f, 0, 1, false, 0)) {
- Actor_Face_Object(kActorMcCoy, "X2_MON01A04", true);
- Actor_Says(kActorAnsweringMachine, 10, 3);
- Actor_Says(kActorAnsweringMachine, 20, 3);
- Actor_Says(kActorAnsweringMachine, 30, 3);
- Actor_Says(kActorMcCoy, 1025, 13);
- Actor_Says(kActorSebastian, 0, 3);
- Actor_Says(kActorSebastian, 10, 3);
- Actor_Says(kActorSebastian, 20, 3);
- Actor_Says(kActorSebastian, 30, 3);
- Actor_Says(kActorSebastian, 40, 3);
- Actor_Says(kActorSebastian, 50, 3);
- Actor_Says(kActorAnsweringMachine, 40, 3);
- Actor_Says(kActorMcCoy, 1030, 13);
- Actor_Says(kActorAnsweringMachine, 50, 3);
- Actor_Clue_Acquire(kActorMcCoy, kClueAnsweringMachineMessage, 1, kActorAnsweringMachine);
+ } else {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -684.94f, 136.6f, -1136.12f, 0, true, false, 0)) {
+ Actor_Face_Object(kActorMcCoy, "X2_MON01A04", true);
+ Actor_Says(kActorAnsweringMachine, 10, 3);
+ Actor_Says(kActorAnsweringMachine, 20, 3);
+ Actor_Says(kActorAnsweringMachine, 30, 3);
+ Actor_Says(kActorMcCoy, 1025, 13);
+ Actor_Says(kActorSebastian, 0, 3);
+ Actor_Says(kActorSebastian, 10, 3);
+ Actor_Says(kActorSebastian, 20, 3);
+ Actor_Says(kActorSebastian, 30, 3);
+ Actor_Says(kActorSebastian, 40, 3);
+ Actor_Says(kActorSebastian, 50, 3);
+ Actor_Says(kActorAnsweringMachine, 40, 3);
+ Actor_Says(kActorMcCoy, 1030, 13);
+ Actor_Says(kActorAnsweringMachine, 50, 3);
+ Actor_Clue_Acquire(kActorMcCoy, kClueAnsweringMachineMessage, true, kActorAnsweringMachine);
+ }
}
return true;
}
+
if (Object_Query_Click("X2_MON01D01", objectName)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -645.34f, 136.6f, -1047.37f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -645.34f, 136.6f, -1047.37f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 329, false);
- if (Actor_Clue_Query(kActorMcCoy, kClueFolder) && Actor_Clue_Query(kActorMcCoy, kClueGuzzaFramedMcCoy) && !Game_Flag_Query(670)) {
+ if ( Actor_Clue_Query(kActorMcCoy, kClueFolder)
+ && Actor_Clue_Query(kActorMcCoy, kClueGuzzaFramedMcCoy)
+ && !Game_Flag_Query(670)
+ ) {
Actor_Set_Goal_Number(kActorMcCoy, 350);
Game_Flag_Set(670);
- } else if (Game_Flag_Query(280)) {
- Actor_Says(kActorMcCoy, 8570, 13);
- } else {
+ } else if (!Game_Flag_Query(kFlagDR06VidphoneChecked)) {
Actor_Voice_Over(770, kActorVoiceOver);
Actor_Voice_Over(780, kActorVoiceOver);
Actor_Voice_Over(790, kActorVoiceOver);
Actor_Voice_Over(800, kActorVoiceOver);
- Game_Flag_Set(280);
+ Game_Flag_Set(kFlagDR06VidphoneChecked);
+ } else {
+ Actor_Says(kActorMcCoy, 8570, 13);
}
}
return true;
}
- if (Object_Query_Click("X2_KEYBRD02", objectName) && !Game_Flag_Query(278)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -655.57f, 136.6f, -1092.64f, 0, 1, false, 0);
+
+ if ( Object_Query_Click("X2_KEYBRD02", objectName) // a bug? there is no X2_KEYBRD02 only X2KEYBRD02
+ && !Game_Flag_Query(kFlagDR06KeyboardChecked)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -655.57f, 136.6f, -1092.64f, 0, true, false, 0);
Actor_Face_Object(kActorMcCoy, "X2_KEYBRD02", true);
Actor_Voice_Over(830, kActorVoiceOver);
Actor_Voice_Over(840, kActorVoiceOver);
- Game_Flag_Set(278);
+ Game_Flag_Set(kFlagDR06KeyboardChecked);
return true;
}
+
if (Object_Query_Click("X2_TORSO04HIRES", objectName)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -700.0f, 136.6f, -1133.0f, 4, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -700.0f, 136.6f, -1133.0f, 4, true, false, 0)) {
Actor_Face_Object(kActorMcCoy, "x2_TORSO04HIRES", true);
if (Global_Variable_Query(39) > 12) {
return true;
}
- if (Game_Flag_Query(548)) {
- Overlay_Remove("DR06ovr2");
- Game_Flag_Reset(548);
- Sound_Play(161, 100, 0, 0, 50);
- } else {
+
+ if (!Game_Flag_Query(548)) {
Overlay_Play("DR06ovr2", 0, 1, 0, 0);
Game_Flag_Set(548);
Sound_Play(160, 100, 0, 0, 50);
@@ -149,12 +158,17 @@ bool SceneScriptDR06::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Voice_Over(860, kActorVoiceOver);
Actor_Voice_Over(870, kActorVoiceOver);
Actor_Voice_Over(880, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueEnvelope, 1, kActorLance);
+ Actor_Clue_Acquire(kActorMcCoy, kClueEnvelope, true, kActorLance);
if (Query_Difficulty_Level() != 0) {
Global_Variable_Increment(2, 200);
}
}
+ } else {
+ Overlay_Remove("DR06ovr2");
+ Game_Flag_Reset(548);
+ Sound_Play(161, 100, 0, 0, 50);
}
+
Global_Variable_Increment(39, 1);
if (Global_Variable_Query(39) > 12) {
Sound_Play(204, 100, 0, 0, 50);
@@ -163,7 +177,8 @@ bool SceneScriptDR06::ClickedOn3DObject(const char *objectName, bool a2) {
}
return true;
}
- Actor_Face_Object(kActorMcCoy, "X2_MON01D01", true);
+
+ Actor_Face_Object(kActorMcCoy, "X2_MON01D01", true); //a bug? or why?
Actor_Says(kActorMcCoy, 8525, 13);
return true;
}
@@ -178,14 +193,14 @@ bool SceneScriptDR06::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptDR06::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -733.0f, 136.6f, -980.0f, 0, 1, false, 0)) {
- Game_Flag_Set(231);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -733.0f, 136.6f, -980.0f, 0, true, false, 0)) {
+ Game_Flag_Set(kFlagDR06toDR04);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR04);
}
return true;
}
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -707.57f, 136.6f, -1132.64f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -707.57f, 136.6f, -1132.64f, 0, true, false, 0)) {
Game_Flag_Set(552);
Set_Enter(kSetUG16, kSceneUG16);
}
@@ -205,10 +220,10 @@ void SceneScriptDR06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptDR06::PlayerWalkedIn() {
- if (Game_Flag_Query(230)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -729.57f, 136.6f, -1016.0f, 0, 0, false, 0);
+ if (Game_Flag_Query(kFlagDR04toDR06)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -729.57f, 136.6f, -1016.0f, 0, false, false, 0);
}
- Game_Flag_Reset(230);
+ Game_Flag_Reset(kFlagDR04toDR06);
Game_Flag_Reset(551);
}
diff --git a/engines/bladerunner/script/scene/hc01.cpp b/engines/bladerunner/script/scene/hc01.cpp
index 89ac7d72ca..e9ef0a2209 100644
--- a/engines/bladerunner/script/scene/hc01.cpp
+++ b/engines/bladerunner/script/scene/hc01.cpp
@@ -131,11 +131,11 @@ bool SceneScriptHC01::ClickedOnItem(int itemId, bool a2) {
Delay(1500);
Item_Pickup_Spin_Effect(984, 330, 384);
if (Game_Flag_Query(374)) {
- Actor_Clue_Acquire(kActorMcCoy, kCluePhotoOfMcCoy1, 1, kActorIzo);
+ Actor_Clue_Acquire(kActorMcCoy, kCluePhotoOfMcCoy1, true, kActorIzo);
} else {
- Actor_Clue_Acquire(kActorMcCoy, kCluePhotoOfMcCoy2, 1, kActorIzo);
+ Actor_Clue_Acquire(kActorMcCoy, kCluePhotoOfMcCoy2, true, kActorIzo);
}
- Actor_Clue_Acquire(kActorMcCoy, kClueChinaBar, 1, kActorIzo);
+ Actor_Clue_Acquire(kActorMcCoy, kClueChinaBar, true, kActorIzo);
return true;
}
return false;
@@ -147,7 +147,7 @@ bool SceneScriptHC01::ClickedOnExit(int exitId) {
Music_Adjust(12, 0, 2);
Game_Flag_Set(kFlagHC01toAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
- Game_Flag_Reset(479);
+ Game_Flag_Reset(kFlagMcCoyAtHCxx);
Game_Flag_Set(kFlagMcCoyAtARxx);
}
return true;
@@ -279,7 +279,7 @@ void SceneScriptHC01::sub_402384() {
}
if (answer == 1010) {
Dialogue_Menu_Remove_From_List(1010);
- Actor_Clue_Acquire(kActorMcCoy, kClueIzoInterview, 0, kActorIzo);
+ Actor_Clue_Acquire(kActorMcCoy, kClueIzoInterview, false, kActorIzo);
Actor_Says(kActorMcCoy, 1070, 13);
Actor_Says(kActorIzo, 200, 17);
Actor_Says(kActorIzo, 210, 12);
diff --git a/engines/bladerunner/script/scene/hc02.cpp b/engines/bladerunner/script/scene/hc02.cpp
index f59d350307..4b293612dc 100644
--- a/engines/bladerunner/script/scene/hc02.cpp
+++ b/engines/bladerunner/script/scene/hc02.cpp
@@ -104,10 +104,10 @@ bool SceneScriptHC02::ClickedOnActor(int actorId) {
Actor_Says(kActorMcCoy, 4545, 11);
Actor_Says(kActorHawkersBarkeep, 120, 12);
Actor_Says(kActorHawkersBarkeep, 180, 13);
- Actor_Clue_Acquire(kActorMcCoy, kClueChinaBarSecurityDisc, 1, kActorHawkersBarkeep);
+ Actor_Clue_Acquire(kActorMcCoy, kClueChinaBarSecurityDisc, true, kActorHawkersBarkeep);
Item_Pickup_Spin_Effect(975, 229, 215);
} else if (Actor_Clue_Query(kActorMcCoy, kClueHomelessManInterview1) && !Actor_Clue_Query(kActorMcCoy, kClueFlaskOfAbsinthe) && (Global_Variable_Query(2) > 20 || Query_Difficulty_Level() == 0)) {
- Actor_Clue_Acquire(kActorMcCoy, kClueFlaskOfAbsinthe, 1, kActorHawkersBarkeep);
+ Actor_Clue_Acquire(kActorMcCoy, kClueFlaskOfAbsinthe, true, kActorHawkersBarkeep);
Actor_Says(kActorMcCoy, 1230, 13);
Actor_Says(kActorHawkersBarkeep, 20, 12);
Actor_Says(kActorMcCoy, 1235, 13);
@@ -124,7 +124,9 @@ bool SceneScriptHC02::ClickedOnActor(int actorId) {
}
Actor_Says(kActorMcCoy, 1245, 13);
} else {
- if (Actor_Clue_Query(kActorMcCoy, kClueMaggieBracelet) && !Game_Flag_Query(405)) {
+ if ( Actor_Clue_Query(kActorMcCoy, kClueMaggieBracelet)
+ && !Game_Flag_Query(405)
+ ) {
Actor_Says(kActorHawkersBarkeep, 80, 16);
Actor_Says(kActorMcCoy, 1265, 13);
Actor_Says(kActorHawkersBarkeep, 90, 13);
diff --git a/engines/bladerunner/script/scene/hc03.cpp b/engines/bladerunner/script/scene/hc03.cpp
index 762a40c170..e8490b5d4d 100644
--- a/engines/bladerunner/script/scene/hc03.cpp
+++ b/engines/bladerunner/script/scene/hc03.cpp
@@ -117,11 +117,11 @@ bool SceneScriptHC03::ClickedOnItem(int itemId, bool a2) {
Delay(1500);
Item_Pickup_Spin_Effect(984, 58, 435);
if (Game_Flag_Query(374)) {
- Actor_Clue_Acquire(kActorMcCoy, kCluePhotoOfMcCoy1, 1, kActorIzo);
+ Actor_Clue_Acquire(kActorMcCoy, kCluePhotoOfMcCoy1, true, kActorIzo);
} else {
- Actor_Clue_Acquire(kActorMcCoy, kCluePhotoOfMcCoy2, 1, kActorIzo);
+ Actor_Clue_Acquire(kActorMcCoy, kCluePhotoOfMcCoy2, true, kActorIzo);
}
- Actor_Clue_Acquire(kActorMcCoy, kClueChinaBar, 1, kActorIzo);
+ Actor_Clue_Acquire(kActorMcCoy, kClueChinaBar, true, kActorIzo);
return true;
}
return false;
@@ -139,7 +139,7 @@ bool SceneScriptHC03::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 628.0f, 2.04f, -123.0f, 0, 1, false, 0)) {
if (Game_Flag_Query(388)) {
Game_Flag_Set(kFlagHC03toUG02);
- Game_Flag_Reset(479);
+ Game_Flag_Reset(kFlagMcCoyAtHCxx);
Game_Flag_Set(kFlagMcCoyAtUGxx);
Game_Flag_Set(388);
Music_Stop(2);
diff --git a/engines/bladerunner/script/scene/hc04.cpp b/engines/bladerunner/script/scene/hc04.cpp
index 2cf0d8424c..a20b65c623 100644
--- a/engines/bladerunner/script/scene/hc04.cpp
+++ b/engines/bladerunner/script/scene/hc04.cpp
@@ -111,7 +111,7 @@ bool SceneScriptHC04::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -108.0f, 0.14f, -639.0f, 0, 1, false, 0)) {
Music_Stop(2);
Game_Flag_Set(kFlagHC04toRC03);
- Game_Flag_Reset(479);
+ Game_Flag_Reset(kFlagMcCoyAtHCxx);
Game_Flag_Set(kFlagMcCoyAtRCxx);
Set_Enter(kSetRC03, kSceneRC03);
}
@@ -220,7 +220,7 @@ void SceneScriptHC04::sub_401B90() {
Actor_Says(kActorIsabella, 320, 3);
Actor_Says(kActorMcCoy, 1395, 3);
Actor_Says(kActorIsabella, 330, 3);
- Actor_Clue_Acquire(kActorMcCoy, kClueStolenCheese, 0, kActorIsabella);
+ Actor_Clue_Acquire(kActorMcCoy, kClueStolenCheese, false, kActorIsabella);
break;
case 390:
Actor_Says(kActorMcCoy, 1310, 3);
diff --git a/engines/bladerunner/script/scene/hf01.cpp b/engines/bladerunner/script/scene/hf01.cpp
index adec56fd87..9e445ca572 100644
--- a/engines/bladerunner/script/scene/hf01.cpp
+++ b/engines/bladerunner/script/scene/hf01.cpp
@@ -438,7 +438,7 @@ void SceneScriptHF01::sub_4026B4() {
Actor_Says(kActorMurray, 220, 13);
Actor_Says(kActorMia, 140, 12);
Actor_Says(kActorMurray, 230, 13);
- Actor_Clue_Acquire(kActorMcCoy, kClueSpecialIngredient, 0, kActorMurray);
+ Actor_Clue_Acquire(kActorMcCoy, kClueSpecialIngredient, false, kActorMurray);
break;
case 470:
Actor_Says(kActorMcCoy, 1495, 14);
diff --git a/engines/bladerunner/script/scene/hf03.cpp b/engines/bladerunner/script/scene/hf03.cpp
index e24aab74cb..4557d0a3d0 100644
--- a/engines/bladerunner/script/scene/hf03.cpp
+++ b/engines/bladerunner/script/scene/hf03.cpp
@@ -119,7 +119,7 @@ void SceneScriptHF03::sub_401C80() {
Actor_Says(kActorLucy, 220, 13);
Actor_Says(kActorMcCoy, 1660, 15);
Actor_Says(kActorLucy, 230, 14);
- Actor_Clue_Acquire(kActorLucy, kClueMcCoyHelpedLucy, 1, kActorMcCoy);
+ Actor_Clue_Acquire(kActorLucy, kClueMcCoyHelpedLucy, true, kActorMcCoy);
if (Game_Flag_Query(kFlagLucyIsReplicant)) {
Actor_Set_Goal_Number(kActorLucy, 212);
} else {
@@ -140,7 +140,7 @@ void SceneScriptHF03::sub_401C80() {
Actor_Says(kActorLucy, 300, 16);
Actor_Says(kActorMcCoy, 1675, 12);
Actor_Says(kActorLucy, 310, 13);
- Actor_Clue_Acquire(kActorMcCoy, kClueLucyInterview, 0, kActorLucy);
+ Actor_Clue_Acquire(kActorMcCoy, kClueLucyInterview, false, kActorLucy);
break;
case 880:
Actor_Says(kActorMcCoy, 1650, 14);
diff --git a/engines/bladerunner/script/scene/hf04.cpp b/engines/bladerunner/script/scene/hf04.cpp
index 11a8479da7..5921f57f0d 100644
--- a/engines/bladerunner/script/scene/hf04.cpp
+++ b/engines/bladerunner/script/scene/hf04.cpp
@@ -53,7 +53,9 @@ void SceneScriptHF04::SceneLoaded() {
Unobstacle_Object("HIDE_WALL_B", true);
}
if (Actor_Query_Goal_Number(kActorLucy) == 213) {
- if (Actor_Clue_Query(kActorLucy, kClueMcCoyHelpedLucy) && Global_Variable_Query(40) != 3) {
+ if (Actor_Clue_Query(kActorLucy, kClueMcCoyHelpedLucy)
+ && Global_Variable_Query(40) != 3
+ ) {
Game_Flag_Set(593);
} else {
Actor_Set_Goal_Number(kActorLucy, 230);
diff --git a/engines/bladerunner/script/scene/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp
index 4022d1952c..75c9dc1547 100644
--- a/engines/bladerunner/script/scene/hf05.cpp
+++ b/engines/bladerunner/script/scene/hf05.cpp
@@ -274,7 +274,7 @@ void SceneScriptHF05::PlayerWalkedIn() {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 399.0f, 40.63f, -85.0f, 0, 0, false, 0);
} else if (Game_Flag_Query(358)) {
Actor_Set_At_XYZ(kActorMcCoy, 346.0f, 4.63f, -151.0f, 603);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 1, kAnimationModeIdle);
}
if (Actor_Query_In_Set(kActorCrazylegs, kSetHF05)) {
if (Game_Flag_Query(562)) {
@@ -569,7 +569,7 @@ void SceneScriptHF05::sub_403A34(int actorId) {
Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 28, 0, false);
Item_Pickup_Spin_Effect(986, 315, 327);
Actor_Says(kActorCrazylegs, 80, 23);
- Actor_Clue_Acquire(kActorMcCoy, kClueSpinnerKeys, 1, kActorCrazylegs);
+ Actor_Clue_Acquire(kActorMcCoy, kClueSpinnerKeys, true, kActorCrazylegs);
Actor_Says(kActorCrazylegs, 90, 15);
Actor_Says(kActorMcCoy, 1735, 17);
Actor_Says(kActorCrazylegs, 100, 16);
diff --git a/engines/bladerunner/script/scene/hf06.cpp b/engines/bladerunner/script/scene/hf06.cpp
index 318e104c14..3c1eac4807 100644
--- a/engines/bladerunner/script/scene/hf06.cpp
+++ b/engines/bladerunner/script/scene/hf06.cpp
@@ -122,7 +122,7 @@ bool SceneScriptHF06::ClickedOnExit(int exitId) {
if (exitId == 0) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 170.0f, 367.93f, 497.0f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 730, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 0, kAnimationModeIdle);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(530);
@@ -166,7 +166,7 @@ void SceneScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
Actor_Voice_Over(1030, kActorVoiceOver);
Actor_Voice_Over(1040, kActorVoiceOver);
Actor_Voice_Over(1050, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueBomb, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueBomb, true, -1);
}
if (Actor_Query_In_Set(kActorDektora, kSetHF06)) {
Actor_Set_Targetable(kActorDektora, false);
@@ -199,7 +199,7 @@ void SceneScriptHF06::PlayerWalkedIn() {
}
}
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 1, kAnimationModeIdle);
Footstep_Sound_Override_Off();
if (Game_Flag_Query(662) && !Game_Flag_Query(559)) {
sub_401EF4();
diff --git a/engines/bladerunner/script/scene/hf07.cpp b/engines/bladerunner/script/scene/hf07.cpp
index 318cb93c5e..8194e95359 100644
--- a/engines/bladerunner/script/scene/hf07.cpp
+++ b/engines/bladerunner/script/scene/hf07.cpp
@@ -78,7 +78,7 @@ bool SceneScriptHF07::ClickedOnExit(int exitId) {
if (!Game_Flag_Query(662)) {
Actor_Face_Heading(kActorMcCoy, 0, false);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 30, true, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 30, true, kAnimationModeIdle);
Footstep_Sound_Override_Off();
}
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
@@ -128,7 +128,7 @@ void SceneScriptHF07::PlayerWalkedIn() {
} else if (Game_Flag_Query(359)) {
Actor_Set_At_XYZ(kActorMcCoy, 267.72f, 329.43f, -86.75f, 940);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 30, false, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 30, false, kAnimationModeIdle);
Footstep_Sound_Override_Off();
}
Game_Flag_Reset(359);
diff --git a/engines/bladerunner/script/scene/kp05.cpp b/engines/bladerunner/script/scene/kp05.cpp
index a3c7d1ee1a..8d8aa7ffee 100644
--- a/engines/bladerunner/script/scene/kp05.cpp
+++ b/engines/bladerunner/script/scene/kp05.cpp
@@ -74,7 +74,7 @@ bool SceneScriptKP05::ClickedOnItem(int itemId, bool a2) {
if (itemId == 118) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1058.0f, 0.0f, 852.0f, 0, 1, false, 0)) {
Actor_Face_Item(kActorMcCoy, 118, true);
- Actor_Clue_Acquire(kActorMcCoy, kCluePowerSource, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kCluePowerSource, true, -1);
Item_Remove_From_World(118);
Item_Pickup_Spin_Effect(960, 58, 321);
}
diff --git a/engines/bladerunner/script/scene/kp06.cpp b/engines/bladerunner/script/scene/kp06.cpp
index 569ccbb8b6..f08b6d8b36 100644
--- a/engines/bladerunner/script/scene/kp06.cpp
+++ b/engines/bladerunner/script/scene/kp06.cpp
@@ -80,7 +80,7 @@ bool SceneScriptKP06::ClickedOnActor(int actorId) {
} else if (Actor_Clue_Query(kActorMcCoy, kCluePowerSource) ) {
Actor_Says(kActorSadik, 280, 3);
Actor_Says(kActorSadik, 290, 3);
- Actor_Clue_Acquire(kActorSadik, kCluePowerSource, 1, kActorMcCoy);
+ Actor_Clue_Acquire(kActorSadik, kCluePowerSource, true, kActorMcCoy);
} else {
Actor_Says(kActorMcCoy, 2320, 3);
Actor_Says(kActorMcCoy, 2325, 3);
@@ -125,7 +125,7 @@ bool SceneScriptKP06::ClickedOnExit(int exitId) {
} else if (Actor_Clue_Query(kActorMcCoy, kCluePowerSource) ) {
Actor_Says(kActorSadik, 280, 3);
Actor_Says(kActorSadik, 290, 3);
- Actor_Clue_Acquire(kActorSadik, kCluePowerSource, 1, kActorMcCoy);
+ Actor_Clue_Acquire(kActorSadik, kCluePowerSource, true, kActorMcCoy);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -731.0f, 8.26f, -657.0f, 0, 0, true, 0);
Player_Set_Combat_Mode(false);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
diff --git a/engines/bladerunner/script/scene/ma01.cpp b/engines/bladerunner/script/scene/ma01.cpp
index d48795eb65..c4594810c7 100644
--- a/engines/bladerunner/script/scene/ma01.cpp
+++ b/engines/bladerunner/script/scene/ma01.cpp
@@ -61,7 +61,7 @@ void SceneScriptMA01::InitializeScene() {
Game_Flag_Reset(kFlagMA06toMA01);
} else {
Actor_Set_Invisible(kActorMcCoy, true);
- Game_Flag_Set(273);
+ Game_Flag_Set(kFlagArrivedFromSpinner2);
Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kMA01LoopInshotRoof, false);
Scene_Loop_Set_Default(kMA01LoopMain);
}
@@ -226,12 +226,18 @@ void SceneScriptMA01::SceneFrameAdvanced(int frame) {
if (frame == 58) {
Sound_Play(122, 17, 20, 20, 50);
}
- if ((frame == 75 || frame == 196) && Game_Flag_Query(273)) {
+ if ((frame == 75
+ || frame == 196
+ )
+ && Game_Flag_Query(kFlagArrivedFromSpinner2)
+ ) {
Actor_Face_Heading(kActorMcCoy, 736, false);
Actor_Change_Animation_Mode(kActorMcCoy, 42);
- Game_Flag_Reset(273);
+ Game_Flag_Reset(kFlagArrivedFromSpinner2);
} else {
- if (frame == 196 && !Game_Flag_Query(273)) {
+ if ( frame == 196
+ && !Game_Flag_Query(kFlagArrivedFromSpinner2)
+ ) {
Actor_Change_Animation_Mode(kActorMcCoy, 41);
//return true;
return;
diff --git a/engines/bladerunner/script/scene/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp
index 528d9d74e0..8be9fe219b 100644
--- a/engines/bladerunner/script/scene/nr01.cpp
+++ b/engines/bladerunner/script/scene/nr01.cpp
@@ -71,11 +71,11 @@ void SceneScriptNR01::InitializeScene() {
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagSpinnerAtHF01);
}
- if (Game_Flag_Query(kFlagSpinnerAtNR01) && !Game_Flag_Query(kFlagArrivedFromSpinner)) {
+ if (Game_Flag_Query(kFlagSpinnerAtNR01) && !Game_Flag_Query(kFlagArrivedFromSpinner1)) {
Scene_Loop_Start_Special(0, 0, 0);
Scene_Loop_Set_Default(1);
- Game_Flag_Set(kFlagArrivedFromSpinner);
- } else if (Game_Flag_Query(kFlagSpinnerAtNR01) && Game_Flag_Query(kFlagArrivedFromSpinner)) {
+ Game_Flag_Set(kFlagArrivedFromSpinner1);
+ } else if (Game_Flag_Query(kFlagSpinnerAtNR01) && Game_Flag_Query(kFlagArrivedFromSpinner1)) {
Scene_Loop_Set_Default(1);
} else {
Scene_Loop_Set_Default(4);
@@ -124,7 +124,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -281.0f, 31.93f, -1061.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 45, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 0, kAnimationModeIdle);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(343);
@@ -155,7 +155,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
case kSpinnerDestinationPoliceStation:
Game_Flag_Set(kFlagMcCoyAtPSxx);
Game_Flag_Reset(kFlagSpinnerAtNR01);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
@@ -163,7 +163,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
case kSpinnerDestinationMcCoysApartment:
Game_Flag_Set(kFlagMcCoyAtMAxx);
Game_Flag_Reset(kFlagSpinnerAtNR01);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
@@ -171,7 +171,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
case kSpinnerDestinationRuncitersAnimals:
Game_Flag_Set(kFlagMcCoyAtRCxx);
Game_Flag_Reset(kFlagSpinnerAtNR01);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
@@ -179,7 +179,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
case kSpinnerDestinationChinatown:
Game_Flag_Set(kFlagMcCoyAtCTxx);
Game_Flag_Reset(kFlagSpinnerAtNR01);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
@@ -187,7 +187,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
case kSpinnerDestinationAnimoidRow:
Game_Flag_Set(kFlagMcCoyAtARxx);
Game_Flag_Reset(kFlagSpinnerAtNR01);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
@@ -195,7 +195,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
case kSpinnerDestinationTyrellBuilding:
Game_Flag_Set(kFlagMcCoyAtTBxx);
Game_Flag_Reset(kFlagSpinnerAtNR01);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
@@ -203,7 +203,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
case kSpinnerDestinationDNARow:
Game_Flag_Set(kFlagMcCoyAtDRxx);
Game_Flag_Reset(kFlagSpinnerAtNR01);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
@@ -211,7 +211,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
case kSpinnerDestinationBradburyBuilding:
Game_Flag_Set(kFlagMcCoyAtBBxx);
Game_Flag_Reset(kFlagSpinnerAtNR01);
- Game_Flag_Reset(kFlagArrivedFromSpinner);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
@@ -226,7 +226,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
default:
Player_Loses_Control();
Game_Flag_Set(kFlagMcCoyAtNRxx);
- Game_Flag_Set(kFlagArrivedFromSpinner);
+ Game_Flag_Set(kFlagArrivedFromSpinner1);
Player_Gains_Control();
break;
}
@@ -312,7 +312,7 @@ void SceneScriptNR01::PlayerWalkedIn() {
Game_Flag_Reset(534);
} else {
if (Game_Flag_Query(342)) {
- Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 1, kAnimationModeIdle);
Game_Flag_Reset(342);
if (Actor_Query_Goal_Number(kActorSteele) == 230) {
Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
diff --git a/engines/bladerunner/script/scene/nr02.cpp b/engines/bladerunner/script/scene/nr02.cpp
index 37956e380f..83c92275c7 100644
--- a/engines/bladerunner/script/scene/nr02.cpp
+++ b/engines/bladerunner/script/scene/nr02.cpp
@@ -109,12 +109,12 @@ bool SceneScriptNR02::ClickedOnItem(int itemId, bool a2) {
if (itemId == 89) {
Item_Remove_From_World(89);
Item_Pickup_Spin_Effect(953, 214, 380);
- Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter1, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter1, true, -1);
}
if (itemId == 90) {
Item_Remove_From_World(90);
Item_Pickup_Spin_Effect(954, 214, 380);
- Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter2, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter2, true, -1);
}
}
return false;
diff --git a/engines/bladerunner/script/scene/nr04.cpp b/engines/bladerunner/script/scene/nr04.cpp
index 6b8d606c9d..dc571ed7cc 100644
--- a/engines/bladerunner/script/scene/nr04.cpp
+++ b/engines/bladerunner/script/scene/nr04.cpp
@@ -88,7 +88,7 @@ bool SceneScriptNR04::ClickedOn3DObject(const char *objectName, bool a2) {
} else if (Actor_Clue_Query(kActorMcCoy, kClueCollectionReceipt)) {
Actor_Says(kActorMcCoy, 8580, 3);
} else {
- Actor_Clue_Acquire(kActorMcCoy, kClueCollectionReceipt, 0, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueCollectionReceipt, false, -1);
Item_Pickup_Spin_Effect(961, 247, 141);
Actor_Voice_Over(1560, kActorVoiceOver);
Actor_Voice_Over(1570, kActorVoiceOver);
@@ -109,7 +109,7 @@ bool SceneScriptNR04::ClickedOn3DObject(const char *objectName, bool a2) {
Item_Pickup_Spin_Effect(975, 358, 160);
Actor_Voice_Over(1620, kActorVoiceOver);
Actor_Voice_Over(1630, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueEarlyQsClub, 0, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueEarlyQsClub, false, -1);
Actor_Set_Goal_Number(kActorEarlyQ, 201);
}
return false;
@@ -190,7 +190,7 @@ void SceneScriptNR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
//return true;
break;
case 213:
- Actor_Clue_Acquire(kActorMcCoy, kClueDektorasDressingRoom, 0, kActorEarlyQ);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDektorasDressingRoom, false, kActorEarlyQ);
Item_Pickup_Spin_Effect(984, 200, 160);
Actor_Says(kActorEarlyQ, 200, 30);
Actor_Says(kActorEarlyQ, 210, 30);
@@ -223,7 +223,7 @@ void SceneScriptNR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
Actor_Change_Animation_Mode(kActorEarlyQ, 85);
Actor_Face_Actor(kActorMcCoy, kActorEarlyQ, true);
Actor_Set_Goal_Number(kActorEarlyQ, 208);
- Actor_Clue_Acquire(kActorMcCoy, kClueEarlyQInterview, 0, kActorEarlyQ);
+ Actor_Clue_Acquire(kActorMcCoy, kClueEarlyQInterview, false, kActorEarlyQ);
//return true;
break;
case 204:
diff --git a/engines/bladerunner/script/scene/nr06.cpp b/engines/bladerunner/script/scene/nr06.cpp
index 2c227165bb..acb8bc7525 100644
--- a/engines/bladerunner/script/scene/nr06.cpp
+++ b/engines/bladerunner/script/scene/nr06.cpp
@@ -91,7 +91,7 @@ bool SceneScriptNR06::ClickedOnExit(int exitId) {
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -137.0f, -71.88f, -243.0f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 95, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 8, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 8, 1, kAnimationModeIdle);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -36.0f, 0.37f, -373.0f, 0, 0, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
@@ -124,7 +124,7 @@ void SceneScriptNR06::PlayerWalkedIn() {
} else {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -81.72f, 0.12f, -323.49f, 0, 0, false, 0);
Actor_Face_Heading(kActorMcCoy, 600, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 8, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 8, 0, kAnimationModeIdle);
Game_Flag_Reset(440);
}
//return false;
diff --git a/engines/bladerunner/script/scene/nr07.cpp b/engines/bladerunner/script/scene/nr07.cpp
index 2d5d86120f..13d3139197 100644
--- a/engines/bladerunner/script/scene/nr07.cpp
+++ b/engines/bladerunner/script/scene/nr07.cpp
@@ -217,7 +217,7 @@ void SceneScriptNR07::sub_401C60() {
Actor_Face_Object(kActorMcCoy, "VASE", true);
if (Actor_Query_Is_In_Current_Set(kActorDektora)) {
if (!Actor_Clue_Query(kActorMcCoy, kClueDektoraInterview3)) {
- Actor_Clue_Acquire(kActorMcCoy, kClueDektoraInterview3, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDektoraInterview3, true, -1);
int v0 = Actor_Query_Friendliness_To_Other(kActorDektora, kActorMcCoy);
if (v0 > 50) {
Actor_Modify_Friendliness_To_Other(kActorDektora, kActorMcCoy, 2);
@@ -233,7 +233,7 @@ void SceneScriptNR07::sub_401C60() {
} else if (Actor_Clue_Query(kActorMcCoy, kClueDektorasCard)) {
Actor_Says(kActorMcCoy, 8585, 14);
} else {
- Actor_Clue_Acquire(kActorMcCoy, kClueDektorasCard, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDektorasCard, true, -1);
Loop_Actor_Walk_To_Scene_Object(kActorMcCoy, "VASE", 100, true, false);
Actor_Change_Animation_Mode(kActorMcCoy, 23);
Item_Pickup_Spin_Effect(935, 526, 268);
@@ -243,7 +243,7 @@ void SceneScriptNR07::sub_401C60() {
}
void SceneScriptNR07::sub_401EF4() {
- Actor_Clue_Acquire(kActorMcCoy, kClueDektoraInterview2, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDektoraInterview2, true, -1);
Actor_Says(kActorMcCoy, 3625, 19);
Actor_Says(kActorDektora, 570, 30);
Actor_Says_With_Pause(kActorDektora, 580, 1.0f, 31);
@@ -255,7 +255,7 @@ void SceneScriptNR07::sub_401EF4() {
Actor_Face_Actor(kActorMcCoy, kActorDektora, true);
Actor_Face_Actor(kActorDektora, kActorMcCoy, true);
Game_Flag_Set(638);
- Actor_Clue_Acquire(kActorMcCoy, kClueDragonflyBelt, 1, kActorDektora);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDragonflyBelt, true, kActorDektora);
int v0 = Actor_Query_Friendliness_To_Other(kActorDektora, kActorMcCoy);
if (!Game_Flag_Query(kFlagDektoraIsReplicant) && v0 < 40) {
sub_4018D4();
@@ -288,7 +288,7 @@ void SceneScriptNR07::sub_4020F0() {
}
void SceneScriptNR07::sub_402284() {
- Actor_Clue_Acquire(kActorMcCoy, kClueDektoraInterview1, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDektoraInterview1, true, -1);
Actor_Start_Speech_Sample(kActorMcCoy, 3660);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -109.0f, -73.0f, -89.0f, 0, 0, false, 0);
Actor_Face_Actor(kActorMcCoy, kActorDektora, true);
diff --git a/engines/bladerunner/script/scene/nr08.cpp b/engines/bladerunner/script/scene/nr08.cpp
index b946f3e612..5f58e4ce28 100644
--- a/engines/bladerunner/script/scene/nr08.cpp
+++ b/engines/bladerunner/script/scene/nr08.cpp
@@ -104,7 +104,7 @@ bool SceneScriptNR08::ClickedOnExit(int exitId) {
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -724.7f, 0.0f, 384.24f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 505, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 1, kAnimationModeIdle);
Game_Flag_Set(440);
Set_Enter(kSetNR06, kSceneNR06);
}
@@ -114,7 +114,7 @@ bool SceneScriptNR08::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1663.33f, 0.65f, 342.84f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 831, false);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 6, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 6, 1, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Game_Flag_Set(614);
Set_Enter(kSetNR09, kSceneNR09);
@@ -179,7 +179,7 @@ void SceneScriptNR08::PlayerWalkedIn() {
}
if (Actor_Query_Goal_Number(kActorDektora) == 245) {
Actor_Face_Heading(kActorDektora, 790, false);
- Loop_Actor_Travel_Stairs(kActorDektora, 8, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorDektora, 8, 1, kAnimationModeIdle);
Actor_Set_Goal_Number(kActorDektora, 246);
}
if (Actor_Query_Goal_Number(kActorSteele) == 231) {
diff --git a/engines/bladerunner/script/scene/nr11.cpp b/engines/bladerunner/script/scene/nr11.cpp
index 16ccfda8d0..4a48ebeca4 100644
--- a/engines/bladerunner/script/scene/nr11.cpp
+++ b/engines/bladerunner/script/scene/nr11.cpp
@@ -146,7 +146,7 @@ bool SceneScriptNR11::ClickedOn3DObject(const char *objectName, bool a2) {
Loop_Actor_Walk_To_XYZ(kActorDektora, -135.0f, 0.33f, -267.0f, 0, 0, false, 0);
Actor_Face_Actor(kActorDektora, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorDektora, true);
- Actor_Clue_Acquire(kActorMcCoy, kClueDektoraInterview4, 1, kActorDektora);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDektoraInterview4, true, kActorDektora);
Actor_Says(kActorDektora, 990, 13);
Actor_Says(kActorDektora, 1000, 14);
Loop_Actor_Walk_To_Actor(kActorDektora, kActorMcCoy, 108, 0, false);
diff --git a/engines/bladerunner/script/scene/ps01.cpp b/engines/bladerunner/script/scene/ps01.cpp
index 69fcdf7395..681f68a1a0 100644
--- a/engines/bladerunner/script/scene/ps01.cpp
+++ b/engines/bladerunner/script/scene/ps01.cpp
@@ -44,7 +44,7 @@ void SceneScriptPS01::InitializeScene() {
}
} else {
Actor_Set_Invisible(kActorMcCoy, true);
- Game_Flag_Set(273);
+ Game_Flag_Set(kFlagArrivedFromSpinner2);
Scene_Loop_Start_Special(0, 0, 0);
Scene_Loop_Set_Default(1);
Player_Loses_Control();
@@ -163,7 +163,7 @@ bool SceneScriptPS01::ClickedOnExit(int exitId) {
default:
Actor_Face_Heading(kActorMcCoy, 870, false);
Game_Flag_Set(kFlagMcCoyAtPSxx);
- Game_Flag_Set(273);
+ Game_Flag_Set(kFlagArrivedFromSpinner2);
Player_Loses_Control();
Scene_Loop_Start_Special(2, 3, 1);
break;
@@ -200,7 +200,7 @@ void SceneScriptPS01::SceneFrameAdvanced(int frame) {
if (frame == 275) {
Sound_Play(117, 40, 0, 0, 50);
}
- if (!Game_Flag_Query(273)) {
+ if (!Game_Flag_Query(kFlagArrivedFromSpinner2)) {
switch (frame) {
case 196:
Actor_Face_Heading(kActorMcCoy, 870, false);
@@ -224,14 +224,14 @@ void SceneScriptPS01::SceneFrameAdvanced(int frame) {
return;
}
if (frame == 119) {
- Game_Flag_Reset(273);
+ Game_Flag_Reset(kFlagArrivedFromSpinner2);
Player_Gains_Control();
//return true;
return;
}
if (frame > 195) {
if (frame == 239) {
- Game_Flag_Reset(273);
+ Game_Flag_Reset(kFlagArrivedFromSpinner2);
Player_Gains_Control();
}
//return true;
diff --git a/engines/bladerunner/script/scene/ps03.cpp b/engines/bladerunner/script/scene/ps03.cpp
index ea6f8d7de8..d8ccf47133 100644
--- a/engines/bladerunner/script/scene/ps03.cpp
+++ b/engines/bladerunner/script/scene/ps03.cpp
@@ -29,9 +29,9 @@ void SceneScriptPS03::InitializeScene() {
Actor_Set_At_XYZ(kActorMcCoy, -674.0f, -354.0f, 550.0f, 900);
Setup_Scene_Information(-674.0f, -354.62f, 550.0f, 900);
Game_Flag_Reset(kFlagPS04toPS03);
- } else if (Game_Flag_Query(135)) {
+ } else if (Game_Flag_Query(kFlagPS14toPS03)) {
Setup_Scene_Information(-875.0f, -354.62f, -1241.0f, 450);
- Game_Flag_Reset(135);
+ Game_Flag_Reset(kFlagPS14toPS03);
} else {
Setup_Scene_Information(-569.54f, -354.62f, -1076.15f, 475);
Game_Flag_Reset(kFlagPS02toPS03);
@@ -88,16 +88,16 @@ bool SceneScriptPS03::ClickedOnExit(int exitId) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(kSetPS02, kScenePS02);
- Game_Flag_Reset(478);
+ Game_Flag_Reset(kFlagMcCoyAtPS03);
if (Global_Variable_Query(kVariableChapter) < 4) {
- Actor_Set_Goal_Number(kActorGuzza, 100);
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeaveOffice);
}
}
return true;
}
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -875.0f, -354.0f, -1241.0f, 0, 1, false, 0)) {
- Game_Flag_Set(134);
+ Game_Flag_Set(kFlagPS03toPS14);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(kSetPS14, kScenePS14);
@@ -118,8 +118,8 @@ void SceneScriptPS03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptPS03::PlayerWalkedIn() {
- if (!Game_Flag_Query(478)) {
- Game_Flag_Set(478);
+ if (!Game_Flag_Query(kFlagMcCoyAtPS03)) {
+ Game_Flag_Set(kFlagMcCoyAtPS03);
//return true;
}
//return false;
diff --git a/engines/bladerunner/script/scene/ps04.cpp b/engines/bladerunner/script/scene/ps04.cpp
index 2d372b0ade..605b1d5340 100644
--- a/engines/bladerunner/script/scene/ps04.cpp
+++ b/engines/bladerunner/script/scene/ps04.cpp
@@ -56,10 +56,15 @@ void SceneScriptPS04::SceneLoaded() {
Unobstacle_Object("B.DOOR", true);
Unobstacle_Object("B.CHAIR01", true);
Unclickable_Object("CHAIR07");
- if (Global_Variable_Query(kVariableChapter) == 2 && !Actor_Clue_Query(kActorMcCoy, kClueWeaponsOrderForm) && !Game_Flag_Query(727)) {
- Item_Add_To_World(111, 958, 64, -643.5f, -318.82f, 1148.87f, 525, 16, 12, false, true, false, true);
- Game_Flag_Set(727);
+
+ if ( Global_Variable_Query(kVariableChapter) == 2
+ && !Actor_Clue_Query(kActorMcCoy, kClueWeaponsOrderForm)
+ && !Game_Flag_Query(kFlagPS04WeaponsOrderForm)
+ ) {
+ Item_Add_To_World(kItemWeaponsOrderForm, 958, 64, -643.5f, -318.82f, 1148.87f, 525, 16, 12, false, true, false, true);
+ Game_Flag_Set(kFlagPS04WeaponsOrderForm);
}
+
if (Actor_Query_Is_In_Current_Set(kActorGuzza)) {
Actor_Change_Animation_Mode(kActorGuzza, 53);
}
@@ -75,10 +80,10 @@ bool SceneScriptPS04::ClickedOn3DObject(const char *objectName, bool a2) {
bool SceneScriptPS04::ClickedOnActor(int actorId) {
if (actorId == kActorGuzza) {
- if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorGuzza, 36, 1, false)) {
+ if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorGuzza, 36, true, false)) {
Actor_Face_Actor(kActorMcCoy, kActorGuzza, true);
Actor_Face_Actor(kActorGuzza, kActorMcCoy, true);
- sub_4017E4();
+ dialogueWithGuzza();
return true;
}
}
@@ -86,20 +91,22 @@ bool SceneScriptPS04::ClickedOnActor(int actorId) {
}
bool SceneScriptPS04::ClickedOnItem(int itemId, bool a2) {
- if (itemId == 111 && Actor_Query_Is_In_Current_Set(kActorGuzza)) {
+ if (itemId == kItemWeaponsOrderForm
+ && Actor_Query_Is_In_Current_Set(kActorGuzza)
+ ) {
Actor_Says(kActorGuzza, 560, 30);
} else if (!Actor_Clue_Query(kActorMcCoy, kClueWeaponsOrderForm)) {
- Item_Remove_From_World(111);
+ Item_Remove_From_World(kItemWeaponsOrderForm);
Item_Pickup_Spin_Effect(958, 464, 362);
- Actor_Says(kActorMcCoy, 4485, 3);
- Actor_Clue_Acquire(kActorMcCoy, kClueWeaponsOrderForm, 1, kActorMcCoy);
+ Actor_Says(kActorMcCoy, 4485, kAnimationModeTalk);
+ Actor_Clue_Acquire(kActorMcCoy, kClueWeaponsOrderForm, true, kActorMcCoy);
}
return false;
}
bool SceneScriptPS04::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -668.0f, -350.85f, 962.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -668.0f, -350.85f, 962.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagPS04toPS03);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
@@ -134,27 +141,56 @@ void SceneScriptPS04::PlayerWalkedOut() {
void SceneScriptPS04::DialogueQueueFlushed(int a1) {
}
-void SceneScriptPS04::sub_4017E4() {
+void SceneScriptPS04::dialogueWithGuzza() {
Dialogue_Menu_Clear_List();
if (Global_Variable_Query(kVariableChapter) > 1) {
if (Actor_Clue_Query(kActorMcCoy, kClueAttemptedFileAccess)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(110, 5, 7, 4);
+ DM_Add_To_List_Never_Repeat_Once_Selected(110, 5, 7, 4); // REQUEST TYRELL MEETING
}
- DM_Add_To_List_Never_Repeat_Once_Selected(120, 1, -1, -1);
+ DM_Add_To_List_Never_Repeat_Once_Selected(120, 1, -1, -1); // MONEY
if (Actor_Clue_Query(kActorMcCoy, kClueHoldensBadge)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(150, 7, 6, 5);
+ DM_Add_To_List_Never_Repeat_Once_Selected(150, 7, 6, 5); // HOLDEN'S BADGE
}
}
if (Game_Flag_Query(kFlagMcCoyKilledHomeless)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(140, 3, -1, -1);
+ DM_Add_To_List_Never_Repeat_Once_Selected(140, 3, -1, -1); // CONFESS TO SHOOTING
}
- DM_Add_To_List(130, 1, 1, 1);
- Dialogue_Menu_Add_DONE_To_List(160);
+ DM_Add_To_List(130, 1, 1, 1); // REPORT IN
+ Dialogue_Menu_Add_DONE_To_List(160); // DONE
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
+
switch (answer) {
- case 130:
+ case 110: // REQUEST TYRELL MEETING
+ Actor_Says(kActorMcCoy, 3990, 19);
+ Actor_Says(kActorMcCoy, 3995, 17);
+ Actor_Says(kActorGuzza, 440, 31);
+ Actor_Says(kActorMcCoy, 4035, 13);
+ Actor_Says(kActorGuzza, 450, 34);
+ Actor_Says(kActorGuzza, 460, 33);
+ Actor_Says(kActorMcCoy, 4040, 17);
+ Game_Flag_Set(625);
+ break;
+
+ case 120: // MONEY
+ Actor_Says(kActorMcCoy, 4000, 18);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGuzzasCash, true, kActorGuzza);
+ Actor_Says(kActorGuzza, 520, 33);
+ Actor_Says(kActorMcCoy, 4055, 13);
+ Actor_Says(kActorGuzza, 530, 31);
+ Actor_Says(kActorMcCoy, 4060, 13);
+ Actor_Says(kActorGuzza, 540, 31);
+ Actor_Says(kActorGuzza, 550, 32);
+ Actor_Says(kActorMcCoy, 4065, 18);
+ Actor_Says(kActorGuzza, 560, 34);
+ if (Query_Difficulty_Level() != 0) {
+ Global_Variable_Increment(2, 100);
+ }
+ break;
+
+ case 130: // REPORT IN
if ( Game_Flag_Query(kFlagZubenRetired)
&& !Game_Flag_Query(kFlagGuzzaTalkZubenRetired)
) {
@@ -166,7 +202,7 @@ void SceneScriptPS04::sub_4017E4() {
Actor_Says(kActorMcCoy, 3925, 18);
Actor_Face_Actor(kActorGuzza, kActorMcCoy, true);
Actor_Says(kActorGuzza, 170, 33);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -716.0f, -354.85f, 1042.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -716.0f, -354.85f, 1042.0f, 0, false, false, 0);
Actor_Face_Actor(kActorMcCoy, kActorGuzza, true);
Actor_Says(kActorMcCoy, 3930, 13);
Actor_Face_Actor(kActorGuzza, kActorMcCoy, true);
@@ -246,32 +282,8 @@ void SceneScriptPS04::sub_4017E4() {
Actor_Says(kActorMcCoy, 3915, 13);
}
break;
- case 110:
- Actor_Says(kActorMcCoy, 3990, 19);
- Actor_Says(kActorMcCoy, 3995, 17);
- Actor_Says(kActorGuzza, 440, 31);
- Actor_Says(kActorMcCoy, 4035, 13);
- Actor_Says(kActorGuzza, 450, 34);
- Actor_Says(kActorGuzza, 460, 33);
- Actor_Says(kActorMcCoy, 4040, 17);
- Game_Flag_Set(625);
- break;
- case 120:
- Actor_Says(kActorMcCoy, 4000, 18);
- Actor_Clue_Acquire(kActorMcCoy, kClueGuzzasCash, 1, kActorGuzza);
- Actor_Says(kActorGuzza, 520, 33);
- Actor_Says(kActorMcCoy, 4055, 13);
- Actor_Says(kActorGuzza, 530, 31);
- Actor_Says(kActorMcCoy, 4060, 13);
- Actor_Says(kActorGuzza, 540, 31);
- Actor_Says(kActorGuzza, 550, 32);
- Actor_Says(kActorMcCoy, 4065, 18);
- Actor_Says(kActorGuzza, 560, 34);
- if (Query_Difficulty_Level() != 0) {
- Global_Variable_Increment(2, 100);
- }
- break;
- case 140:
+
+ case 140: // CONFESS TO SHOOTING
Actor_Says(kActorMcCoy, 4010, 12);
Actor_Says(kActorGuzza, 600, 31);
Actor_Says(kActorMcCoy, 4080, 18);
@@ -284,10 +296,10 @@ void SceneScriptPS04::sub_4017E4() {
Actor_Says(kActorGuzza, 710, 31);
Actor_Says(kActorGuzza, 720, 34);
Actor_Says(kActorMcCoy, 4105, 18);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -668.0f, -350.85f, 962.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -668.0f, -350.85f, 962.0f, 0, false, false, 0);
Actor_Says(kActorGuzza, 730, 32);
Actor_Face_Actor(kActorMcCoy, kActorGuzza, true);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -716.0f, -354.85f, 1042.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -716.0f, -354.85f, 1042.0f, 0, false, false, 0);
Actor_Face_Actor(kActorGuzza, kActorMcCoy, true);
Actor_Says(kActorGuzza, 740, 31);
Actor_Says(kActorGuzza, 750, 32);
@@ -297,7 +309,8 @@ void SceneScriptPS04::sub_4017E4() {
Actor_Says(kActorGuzza, 770, 32);
Actor_Says(kActorGuzza, 780, 31);
break;
- case 150:
+
+ case 150: // HOLDEN'S BADGE
Actor_Says(kActorMcCoy, 4015, 16);
Actor_Says(kActorGuzza, 630, 34);
Actor_Says(kActorMcCoy, 4085, 19);
@@ -309,9 +322,9 @@ void SceneScriptPS04::sub_4017E4() {
Actor_Says(kActorGuzza, 680, 32);
Actor_Says(kActorGuzza, 690, 31);
break;
- default:
- //TODO: what is this for?
- //answer != 160;
+
+ case 160: // DONE
+ // nothing here
break;
}
}
diff --git a/engines/bladerunner/script/scene/ps06.cpp b/engines/bladerunner/script/scene/ps06.cpp
index 2e9ce53af2..4298f98bf6 100644
--- a/engines/bladerunner/script/scene/ps06.cpp
+++ b/engines/bladerunner/script/scene/ps06.cpp
@@ -71,19 +71,19 @@ bool SceneScriptPS06::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Voice_Over(3810, kActorVoiceOver);
Actor_Voice_Over(3820, kActorVoiceOver);
Actor_Voice_Over(3830, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueCarRegistration1, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueCarRegistration1, true, -1);
} else if (Game_Flag_Query(kFlagGordoIsReplicant)) {
Actor_Voice_Over(3840, kActorVoiceOver);
Actor_Voice_Over(3850, kActorVoiceOver);
Actor_Voice_Over(3860, kActorVoiceOver);
Actor_Voice_Over(3870, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueCarRegistration2, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueCarRegistration2, true, -1);
} else {
Actor_Voice_Over(3880, kActorVoiceOver);
Actor_Voice_Over(3890, kActorVoiceOver);
Actor_Voice_Over(3900, kActorVoiceOver);
Actor_Voice_Over(3910, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueCarRegistration3, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueCarRegistration3, true, -1);
}
Actor_Clues_Transfer_New_To_Mainframe(kActorMcCoy);
Actor_Clues_Transfer_New_From_Mainframe(kActorMcCoy);
diff --git a/engines/bladerunner/script/scene/ps07.cpp b/engines/bladerunner/script/scene/ps07.cpp
index 5f11993488..4d15adbc54 100644
--- a/engines/bladerunner/script/scene/ps07.cpp
+++ b/engines/bladerunner/script/scene/ps07.cpp
@@ -68,10 +68,18 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) {
if (actorId == kActorKlein) {
Actor_Face_Actor(kActorMcCoy, kActorKlein, true);
Actor_Set_Goal_Number(kActorKlein, 3);
+
if (!Game_Flag_Query(kFlagKleinTalkClues)) {
Actor_Says(kActorMcCoy, 4115, 13);
}
- if (!Game_Flag_Query(kFlagKleinTalkClues) && (Game_Flag_Query(kFlagMcCoyHasShellCasings) || Game_Flag_Query(kFlagMcCoyHasOfficersStatement) || Game_Flag_Query(kFlagMcCoyHasPaintTransfer) || Game_Flag_Query(kFlagMcCoyHasChromeDebris))) {
+
+ if (!Game_Flag_Query(kFlagKleinTalkClues)
+ && (Game_Flag_Query(kFlagMcCoyHasShellCasings)
+ || Game_Flag_Query(kFlagMcCoyHasOfficersStatement)
+ || Game_Flag_Query(kFlagMcCoyHasPaintTransfer)
+ || Game_Flag_Query(kFlagMcCoyHasChromeDebris)
+ )
+ ) {
Actor_Face_Actor(kActorKlein, kActorMcCoy, true);
Actor_Says(kActorKlein, 30, 12);
Game_Flag_Set(kFlagKleinTalkClues);
@@ -80,9 +88,12 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) {
Actor_Says(kActorMcCoy, 4130, 18);
}
}
- if (Game_Flag_Query(kFlagMcCoyHasShellCasings) && !Game_Flag_Query(kFlagKleinTalkShellCasings)) {
+
+ if ( Game_Flag_Query(kFlagMcCoyHasShellCasings)
+ && !Game_Flag_Query(kFlagKleinTalkShellCasings)
+ ) {
Game_Flag_Set(kFlagKleinTalkShellCasings);
- Actor_Clue_Acquire(kActorMcCoy, kClueLabShellCasings, 0, kActorKlein);
+ Actor_Clue_Acquire(kActorMcCoy, kClueLabShellCasings, false, kActorKlein);
Actor_Says(kActorKlein, 50, 16);
Actor_Says(kActorMcCoy, 4135, 13);
Actor_Says(kActorKlein, 60, 15);
@@ -93,9 +104,12 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) {
Actor_Set_Goal_Number(kActorKlein, 1);
return true;
}
- if (Game_Flag_Query(kFlagMcCoyHasOfficersStatement) && !Game_Flag_Query(kFlagKleinTalkOfficersStatement)) {
+
+ if ( Game_Flag_Query(kFlagMcCoyHasOfficersStatement)
+ && !Game_Flag_Query(kFlagKleinTalkOfficersStatement)
+ ) {
Game_Flag_Set(kFlagKleinTalkOfficersStatement);
- Actor_Clue_Acquire(kActorMcCoy, kClueLabCorpses, 0, kActorKlein);
+ Actor_Clue_Acquire(kActorMcCoy, kClueLabCorpses, false, kActorKlein);
Actor_Says(kActorKlein, 100, 13);
Actor_Says(kActorMcCoy, 4145, 13);
Actor_Says(kActorKlein, 110, 12);
@@ -113,9 +127,12 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) {
Actor_Set_Goal_Number(kActorKlein, 1);
return true;
}
- if (Game_Flag_Query(kFlagMcCoyHasPaintTransfer) && !Game_Flag_Query(kFlagKleinTalkPaintTransfer)) {
+
+ if ( Game_Flag_Query(kFlagMcCoyHasPaintTransfer)
+ && !Game_Flag_Query(kFlagKleinTalkPaintTransfer)
+ ) {
Game_Flag_Set(kFlagKleinTalkPaintTransfer);
- Actor_Clue_Acquire(kActorMcCoy, kClueLabPaintTransfer, 0, kActorKlein);
+ Actor_Clue_Acquire(kActorMcCoy, kClueLabPaintTransfer, false, kActorKlein);
Actor_Says(kActorKlein, 170, 14);
Actor_Says(kActorMcCoy, 4180, 13);
Actor_Says(kActorKlein, 180, 12);
@@ -127,7 +144,10 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) {
Actor_Set_Goal_Number(kActorKlein, 1);
return true;
}
- if (Game_Flag_Query(kFlagMcCoyHasChromeDebris) && !Game_Flag_Query(kFlagKleinTalkChromeDebris)) {
+
+ if ( Game_Flag_Query(kFlagMcCoyHasChromeDebris)
+ && !Game_Flag_Query(kFlagKleinTalkChromeDebris)
+ ) {
Game_Flag_Set(kFlagKleinTalkChromeDebris);
Actor_Says(kActorKlein, 220, 12);
Actor_Says(kActorMcCoy, 4190, 13);
diff --git a/engines/bladerunner/script/scene/ps09.cpp b/engines/bladerunner/script/scene/ps09.cpp
index d4888b0ad2..456a3038ce 100644
--- a/engines/bladerunner/script/scene/ps09.cpp
+++ b/engines/bladerunner/script/scene/ps09.cpp
@@ -285,9 +285,9 @@ void SceneScriptPS09::dialogueWithGregorian() {
|| Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB1)
|| Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB2)
) {
- DM_Add_To_List_Never_Repeat_Once_Selected(170, 5, 5, 3);
- DM_Add_To_List_Never_Repeat_Once_Selected(180, -1, 5, 5);
- DM_Add_To_List_Never_Repeat_Once_Selected(200, -1, 3, 6);
+ DM_Add_To_List_Never_Repeat_Once_Selected(170, 5, 5, 3); // PROTEST
+ DM_Add_To_List_Never_Repeat_Once_Selected(180, -1, 5, 5); // CARS
+ DM_Add_To_List_Never_Repeat_Once_Selected(200, -1, 3, 6); // VOIGT-KAMPFF
}
if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote)
&& (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewA)
@@ -295,14 +295,16 @@ void SceneScriptPS09::dialogueWithGregorian() {
|| Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB2)
)
) {
- DM_Add_To_List_Never_Repeat_Once_Selected(190, 5, 6, -1);
+ DM_Add_To_List_Never_Repeat_Once_Selected(190, 5, 6, -1); // NOTE
}
- Dialogue_Menu_Add_To_List(210);
+ Dialogue_Menu_Add_To_List(210); // DONE
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
+
switch (answer) {
- case 170:
+ case 170: // PROTEST
Actor_Says(kActorMcCoy, 4270, 13);
Actor_Says(kActorMcCoy, 4250, 18);
Actor_Says(kActorGrigorian, 50, 13);
@@ -334,7 +336,8 @@ void SceneScriptPS09::dialogueWithGregorian() {
return;
}
break;
- case 180:
+
+ case 180: // CARS
Actor_Says(kActorMcCoy, 4270, 18);
Actor_Says(kActorMcCoy, 4255, 3);
Actor_Says(kActorGrigorian, 210, 12);
@@ -378,7 +381,8 @@ void SceneScriptPS09::dialogueWithGregorian() {
Actor_Says(kActorMcCoy, 4375, 18);
}
break;
- case 190:
+
+ case 190: // NOTE
Actor_Says(kActorMcCoy, 4270, 18);
Actor_Says(kActorMcCoy, 4260, 3);
Actor_Says(kActorGrigorian, 360, 16);
@@ -391,7 +395,8 @@ void SceneScriptPS09::dialogueWithGregorian() {
Actor_Says(kActorGrigorian, 390, 12);
Actor_Modify_Friendliness_To_Other(kActorGrigorian, kActorMcCoy, -5);
break;
- case 200:
+
+ case 200: // VOIGT-KAMPFF
Actor_Says(kActorMcCoy, 4265, 14);
Actor_Says(kActorGrigorian, 400, 13);
Actor_Says(kActorMcCoy, 4400, 13);
@@ -401,7 +406,8 @@ void SceneScriptPS09::dialogueWithGregorian() {
Voight_Kampff_Activate(kActorGrigorian, 20);
Actor_Modify_Friendliness_To_Other(kActorGrigorian, kActorMcCoy, -10);
break;
- case 210:
+
+ case 210: // DONE
Actor_Says(kActorMcCoy, 8600, 18);
Actor_Says(kActorGrigorian, 20, 15);
break;
diff --git a/engines/bladerunner/script/scene/ps14.cpp b/engines/bladerunner/script/scene/ps14.cpp
index e8d3f31c0f..2d1bb42816 100644
--- a/engines/bladerunner/script/scene/ps14.cpp
+++ b/engines/bladerunner/script/scene/ps14.cpp
@@ -25,9 +25,9 @@
namespace BladeRunner {
void SceneScriptPS14::InitializeScene() {
- if (Game_Flag_Query(134)) {
+ if (Game_Flag_Query(kFlagPS03toPS14)) {
Setup_Scene_Information(-1119.61f, 508.14f, -1208.22f, 315);
- Game_Flag_Reset(134);
+ Game_Flag_Reset(kFlagPS03toPS14);
} else {
Setup_Scene_Information(-785.45f, 508.14f, -1652.0f, 315);
}
@@ -69,7 +69,7 @@ bool SceneScriptPS14::ClickedOnExit(int exitId) {
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -2101.0f, 508.14f, -1361.0f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 819, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 1, kAnimationModeIdle);
if (Global_Variable_Query(kVariableChapter) == 4 && Game_Flag_Query(671)) {
if (Actor_Clue_Query(kActorMcCoy, kClueBriefcase)) {
Game_Flag_Set(666);
@@ -80,9 +80,9 @@ bool SceneScriptPS14::ClickedOnExit(int exitId) {
} else if (Global_Variable_Query(kVariableChapter) > 3) {
Actor_Says(kActorMcCoy, 8522, 12);
Actor_Face_Heading(kActorMcCoy, 307, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 3, false, kAnimationModeIdle);
} else {
- Game_Flag_Set(135);
+ Game_Flag_Set(kFlagPS14toPS03);
Set_Enter(kSetPS03, kScenePS03);
}
}
diff --git a/engines/bladerunner/script/scene/ps15.cpp b/engines/bladerunner/script/scene/ps15.cpp
index e04ff08caf..def00bfcbb 100644
--- a/engines/bladerunner/script/scene/ps15.cpp
+++ b/engines/bladerunner/script/scene/ps15.cpp
@@ -43,7 +43,7 @@ void SceneScriptPS15::InitializeScene() {
void SceneScriptPS15::SceneLoaded() {
Obstacle_Object("E.ARCH", true);
if (Global_Variable_Query(kVariableChapter) == 2) {
- Item_Add_To_World(110, 983, 101, -208.0f, -113.43f, 30.28f, 750, 16, 12, false, true, false, true);
+ Item_Add_To_World(kItemWeaponsCrate, 983, 101, -208.0f, -113.43f, 30.28f, 750, 16, 12, false, true, false, true);
}
}
@@ -56,9 +56,13 @@ bool SceneScriptPS15::ClickedOn3DObject(const char *objectName, bool a2) {
}
bool SceneScriptPS15::ClickedOnActor(int actorId) {
- if (actorId == 34) {
- if ((Actor_Clue_Query(kActorMcCoy, kClueWeaponsOrderForm) || Actor_Clue_Query(kActorMcCoy, kCluePoliceIssueWeapons)) && !Actor_Clue_Query(kActorMcCoy, kClueShippingForm)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -256.0f, -113.43f, 43.51f, 0, 1, false, 0)) {
+ if (actorId == kActorSergeantWalls) {
+ if ((Actor_Clue_Query(kActorMcCoy, kClueWeaponsOrderForm)
+ || Actor_Clue_Query(kActorMcCoy, kCluePoliceIssueWeapons)
+ )
+ && !Actor_Clue_Query(kActorMcCoy, kClueShippingForm)
+ ) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -256.0f, -113.43f, 43.51f, 0, true, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorSergeantWalls, true);
Actor_Face_Actor(kActorSergeantWalls, kActorMcCoy, true);
Actor_Says(kActorMcCoy, 4470, 17);
@@ -68,9 +72,9 @@ bool SceneScriptPS15::ClickedOnActor(int actorId) {
Actor_Says(kActorSergeantWalls, 140, 16);
Item_Pickup_Spin_Effect(965, 211, 239);
Actor_Says(kActorSergeantWalls, 150, 14);
- Actor_Clue_Acquire(kActorMcCoy, kClueShippingForm, 1, kActorSergeantWalls);
- if (!Game_Flag_Query(727)) {
- Item_Remove_From_World(111);
+ Actor_Clue_Acquire(kActorMcCoy, kClueShippingForm, true, kActorSergeantWalls);
+ if (!Game_Flag_Query(kFlagPS04WeaponsOrderForm)) {
+ Item_Remove_From_World(kItemWeaponsOrderForm);
}
}
} else {
@@ -84,8 +88,10 @@ bool SceneScriptPS15::ClickedOnActor(int actorId) {
}
bool SceneScriptPS15::ClickedOnItem(int itemId, bool a2) {
- if (itemId == 110) {
- if (Actor_Clue_Query(kActorMcCoy, kClueWeaponsOrderForm) && Actor_Clue_Query(kActorMcCoy, kCluePoliceIssueWeapons)) {
+ if (itemId == kItemWeaponsCrate) {
+ if (Actor_Clue_Query(kActorMcCoy, kClueWeaponsOrderForm)
+ && Actor_Clue_Query(kActorMcCoy, kCluePoliceIssueWeapons)
+ ) {
Actor_Says(kActorMcCoy, 8570, 14);
} else {
Actor_Face_Actor(kActorMcCoy, kActorSergeantWalls, true);
@@ -94,8 +100,8 @@ bool SceneScriptPS15::ClickedOnItem(int itemId, bool a2) {
Actor_Says(kActorSergeantWalls, 160, 14);
Actor_Says(kActorMcCoy, 4490, 12);
Actor_Says(kActorSergeantWalls, 170, 13);
- Actor_Clue_Acquire(kActorMcCoy, kClueWeaponsOrderForm, 1, kActorMcCoy);
- Actor_Clue_Acquire(kActorMcCoy, kCluePoliceIssueWeapons, 1, kActorMcCoy);
+ Actor_Clue_Acquire(kActorMcCoy, kClueWeaponsOrderForm, true, kActorMcCoy);
+ Actor_Clue_Acquire(kActorMcCoy, kCluePoliceIssueWeapons, true, kActorMcCoy);
}
return true;
}
@@ -104,20 +110,21 @@ bool SceneScriptPS15::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptPS15::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -360.0f, -113.43f, 50.0f, 0, 1, false, 0)) {
- Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -360.0f, -113.43f, 50.0f, 0, true, false, 0)) {
+ Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagPS15toPS05);
Set_Enter(kSetPS05, kScenePS05);
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -183.58f, -113.43f, 91.7f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -183.58f, -113.43f, 91.7f, 0, true, false, 0)) {
Actor_Says(kActorMcCoy, 4440, 18);
Actor_Says(kActorSergeantWalls, 150, 17);
Sound_Play(155, 90, 0, 0, 50);
- Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
+ Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(kSetPS10_PS11_PS12_PS13, kScenePS10);
}
@@ -137,7 +144,7 @@ void SceneScriptPS15::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptPS15::PlayerWalkedIn() {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -326.93f, -113.43f, 101.42f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -326.93f, -113.43f, 101.42f, 0, false, false, 0);
if (!Game_Flag_Query(kFlagPS15Entered)) {
Actor_Face_Actor(kActorMcCoy, kActorSergeantWalls, true);
Actor_Face_Actor(kActorSergeantWalls, kActorMcCoy, true);
diff --git a/engines/bladerunner/script/scene/rc01.cpp b/engines/bladerunner/script/scene/rc01.cpp
index e535fec8dc..a347d3e38e 100644
--- a/engines/bladerunner/script/scene/rc01.cpp
+++ b/engines/bladerunner/script/scene/rc01.cpp
@@ -309,7 +309,7 @@ bool SceneScriptRC01::ClickedOnActor(int actorId) {
if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorOfficerLeary, 36, true, false)) {
Actor_Face_Actor(kActorMcCoy, kActorOfficerLeary, true);
Actor_Face_Actor(kActorOfficerLeary, kActorMcCoy, true);
- if (Actor_Query_Goal_Number(kActorOfficerLeary) == kGoalOfficerLearyCrowdInterrogation) {
+ if (Actor_Query_Goal_Number(kActorOfficerLeary) == kGoalOfficerLearyRC01WalkToCrowd) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDefault);
}
if (Game_Flag_Query(kFlagGotOfficersStatement)) {
@@ -583,7 +583,7 @@ void SceneScriptRC01::interrogateCrowd() {
Actor_Says(kActorMcCoy, 4500, 14);
I_Sez("MG: We don't want any of that abstract art oozing out onto the street.");
Actor_Says(kActorOfficerLeary, 10, 14);
- Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyCrowdInterrogation);
+ Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyRC01WalkToCrowd);
}
}
}
diff --git a/engines/bladerunner/script/scene/rc02.cpp b/engines/bladerunner/script/scene/rc02.cpp
index 4227196873..c4bb775dce 100644
--- a/engines/bladerunner/script/scene/rc02.cpp
+++ b/engines/bladerunner/script/scene/rc02.cpp
@@ -123,7 +123,7 @@ bool SceneScriptRC02::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
Actor_Says(kActorRunciter, 30, 23);
Actor_Says(kActorMcCoy, 4555, 18);
- Actor_Clue_Acquire(kActorMcCoy, kClueRuncitersVideo, 1, kActorRunciter);
+ Actor_Clue_Acquire(kActorMcCoy, kClueRuncitersVideo, true, kActorRunciter);
Unclickable_Object("SCRTY CA03");
AI_Movement_Track_Unpause(kActorRunciter);
return true;
@@ -138,19 +138,21 @@ bool SceneScriptRC02::ClickedOn3DObject(const char *objectName, bool a2) {
void SceneScriptRC02::dialogueWithRunciter() {
Dialogue_Menu_Clear_List();
- DM_Add_To_List_Never_Repeat_Once_Selected(0, 5, 6, 2);
- DM_Add_To_List_Never_Repeat_Once_Selected(10, 5, 4, 8);
+ DM_Add_To_List_Never_Repeat_Once_Selected(0, 5, 6, 2); // MOTIVES
+ DM_Add_To_List_Never_Repeat_Once_Selected(10, 5, 4, 8); // LUCY
if (Actor_Clue_Query(kActorMcCoy, kClueRunciterInterviewB1)
|| Actor_Clue_Query(kActorMcCoy, kClueRunciterInterviewB2)
) {
- DM_Add_To_List_Never_Repeat_Once_Selected(20, 6, 4, 5);
+ DM_Add_To_List_Never_Repeat_Once_Selected(20, 6, 4, 5); // REFERENCE
}
- Dialogue_Menu_Add_DONE_To_List(30);
+ Dialogue_Menu_Add_DONE_To_List(30); // DONE
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
+
switch (answer) {
- case 0:
+ case 0: // MOTIVES
Actor_Says(kActorMcCoy, 4580, 13);
Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
Actor_Says(kActorRunciter, 110, 18);
@@ -160,17 +162,18 @@ void SceneScriptRC02::dialogueWithRunciter() {
Actor_Says(kActorRunciter, 140, 16);
Game_Flag_Set(kFlagRC02TalkedToRunciter);
break;
- case 10:
+
+ case 10: // LUCY
Actor_Says(kActorMcCoy, 4585, 13);
Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
if (Game_Flag_Query(kFlagLucyIsReplicant)) {
Actor_Says(kActorRunciter, 250, 13);
Actor_Says(kActorRunciter, 270, 13);
- Actor_Clue_Acquire(kActorMcCoy, kClueRunciterInterviewB1, 1, kActorRunciter);
+ Actor_Clue_Acquire(kActorMcCoy, kClueRunciterInterviewB1, true, kActorRunciter);
} else {
Actor_Says(kActorRunciter, 260, 14);
Actor_Says(kActorRunciter, 270, 13);
- Actor_Clue_Acquire(kActorMcCoy, kClueRunciterInterviewB2, 1, kActorRunciter);
+ Actor_Clue_Acquire(kActorMcCoy, kClueRunciterInterviewB2, true, kActorRunciter);
}
Actor_Says(kActorMcCoy, 4645, 13);
Actor_Says(kActorRunciter, 280, 13);
@@ -184,25 +187,27 @@ void SceneScriptRC02::dialogueWithRunciter() {
Scene_Exit_Add_2D_Exit(kRC02ExitRC51, 265, 58, 346, 154, 0);
Game_Flag_Set(kFlagRC02LucyDeskAvailable);
break;
- case 20:
+
+ case 20: // REFERENCE
Actor_Says(kActorMcCoy, 4590, 19);
Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
Actor_Says(kActorRunciter, 360, 13);
- Loop_Actor_Walk_To_Waypoint(kActorRunciter, 89, 0, 0, false);
- Loop_Actor_Walk_To_Waypoint(kActorRunciter, 102, 0, 0, false);
+ Loop_Actor_Walk_To_Waypoint(kActorRunciter, 89, 0, false, false);
+ Loop_Actor_Walk_To_Waypoint(kActorRunciter, 102, 0, false, false);
Actor_Face_Actor(kActorMcCoy, kActorRunciter, true);
Actor_Face_Heading(kActorRunciter, 539, false);
Delay(2000);
- Loop_Actor_Walk_To_Waypoint(kActorRunciter, 89, 0, 0, false);
+ Loop_Actor_Walk_To_Waypoint(kActorRunciter, 89, 0, false, false);
Actor_Face_Actor(kActorMcCoy, kActorRunciter, true);
- Loop_Actor_Walk_To_Actor(kActorRunciter, kActorMcCoy, 24, 0, false);
+ Loop_Actor_Walk_To_Actor(kActorRunciter, kActorMcCoy, 24, false, false);
Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorRunciter, true);
Item_Pickup_Spin_Effect(964, 357, 228);
Actor_Says(kActorRunciter, 1700, 13);
- Actor_Clue_Acquire(kActorMcCoy, kClueReferenceLetter, 1, kActorRunciter);
+ Actor_Clue_Acquire(kActorMcCoy, kClueReferenceLetter, true, kActorRunciter);
break;
- case 30:
+
+ case 30: // DONE
Actor_Says(kActorMcCoy, 4595, 14);
break;
}
@@ -264,7 +269,7 @@ bool SceneScriptRC02::ClickedOnActor(int actorId) {
Actor_Says(kActorMcCoy, 4570, 18);
Actor_Says(kActorRunciter, 70, 13);
Game_Flag_Set(kFlagRunciterInterviewA);
- Actor_Clue_Acquire(kActorMcCoy, kClueRunciterInterviewA, 1, kActorRunciter);
+ Actor_Clue_Acquire(kActorMcCoy, kClueRunciterInterviewA, true, kActorRunciter);
AI_Movement_Track_Unpause(kActorRunciter);
return true;
}
@@ -309,7 +314,7 @@ bool SceneScriptRC02::ClickedOnItem(int itemId, bool a2) {
if (itemId == kItemShellCasingA || itemId == kItemShellCasingB || itemId == kItemShellCasingC) {
if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemShellCasingA, 24, 1, false)) {
Actor_Face_Item(kActorMcCoy, kItemShellCasingA, true);
- Actor_Clue_Acquire(kActorMcCoy, kClueShellCasings, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueShellCasings, true, -1);
Game_Flag_Set(kFlagShellCasingsTaken);
Item_Remove_From_World(kItemShellCasingA);
Item_Remove_From_World(kItemShellCasingB);
@@ -366,8 +371,8 @@ void SceneScriptRC02::PlayerWalkedIn() {
Actor_Voice_Over(1970, kActorVoiceOver);
Actor_Voice_Over(1980, kActorVoiceOver);
Actor_Voice_Over(1990, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueLimpingFootprints, 1, -1);
- Actor_Clue_Acquire(kActorMcCoy, kClueGracefulFootprints, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueLimpingFootprints, true, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGracefulFootprints, true, -1);
Game_Flag_Set(kFlagRC02Discovered);
}
if (Actor_Query_Which_Set_In(kActorRunciter) == kSetRC02_RC51 && Actor_Query_Goal_Number(kActorRunciter) < 300) {
diff --git a/engines/bladerunner/script/scene/rc03.cpp b/engines/bladerunner/script/scene/rc03.cpp
index 9578378040..969d8daf12 100644
--- a/engines/bladerunner/script/scene/rc03.cpp
+++ b/engines/bladerunner/script/scene/rc03.cpp
@@ -24,8 +24,6 @@
namespace BladeRunner {
-
-
void SceneScriptRC03::InitializeScene() {
if (Game_Flag_Query(kFlagRC01toRC03)) {
Setup_Scene_Information(298.0f, -4.0f, 405.0f, 800);
@@ -78,7 +76,9 @@ void SceneScriptRC03::InitializeScene() {
Ambient_Sounds_Add_Sound(193, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(194, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(195, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
- if (Game_Flag_Query(kFlagHC04toRC03) && Actor_Query_Goal_Number(kActorIzo) != 102) {
+ if (Game_Flag_Query(kFlagHC04toRC03)
+ && Actor_Query_Goal_Number(kActorIzo) != 102
+ ) {
Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
}
Scene_Loop_Set_Default(1);
@@ -138,9 +138,9 @@ bool SceneScriptRC03::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptRC03::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 298.0f, -4.0f, 405.0f, 0, 1, false, 0)) {
- if (Game_Flag_Query(289)) {
- Game_Flag_Set(702);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 298.0f, -4.0f, 405.0f, 0, true, false, 0)) {
+ if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
+ Game_Flag_Set(kFlagRC04Locked);
}
Game_Flag_Set(kFlagRC03toRC01);
Set_Enter(kSetRC01, kSceneRC01);
@@ -149,9 +149,9 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) {
return true;
}
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -469.0f, -4.0f, 279.0f, 0, 1, false, 0)) {
- if (Game_Flag_Query(289)) {
- Game_Flag_Set(702);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -469.0f, -4.0f, 279.0f, 0, true, false, 0)) {
+ if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
+ Game_Flag_Set(kFlagRC04Locked);
}
Game_Flag_Set(kFlagRC03toAR02);
Game_Flag_Reset(kFlagMcCoyAtRCxx);
@@ -161,12 +161,12 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) {
return true;
}
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 147.51f, -4.0f, 166.48f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 147.51f, -4.0f, 166.48f, 0, true, false, 0)) {
Game_Flag_Set(kFlagRC03toUG01);
Game_Flag_Reset(kFlagMcCoyAtRCxx);
Game_Flag_Set(kFlagMcCoyAtUGxx);
- if (Game_Flag_Query(289)) {
- Game_Flag_Set(702);
+ if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
+ Game_Flag_Set(kFlagRC04Locked);
}
Set_Enter(kSetUG01, kSceneUG01);
Actor_Set_Goal_Number(kActorDektora, 100);
@@ -174,12 +174,12 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) {
return true;
}
if (exitId == 3) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -487.0f, 1.0f, 116.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -487.0f, 1.0f, 116.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagRC03toHC04);
Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Set(479);
- if (Game_Flag_Query(289)) {
- Game_Flag_Set(702);
+ Game_Flag_Set(kFlagMcCoyAtHCxx);
+ if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
+ Game_Flag_Set(kFlagRC04Locked);
}
Set_Enter(kSetHC01_HC02_HC03_HC04, kSceneHC04);
Actor_Set_Goal_Number(kActorDektora, 100);
@@ -187,8 +187,11 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) {
return true;
}
if (exitId == 4) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -22.0f, 1.0f, -63.0f, 0, 1, false, 0)) {
- if (Global_Variable_Query(kVariableChapter) == 3 || Global_Variable_Query(kVariableChapter) == 5 || Game_Flag_Query(702)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -22.0f, 1.0f, -63.0f, 0, true, false, 0)) {
+ if (Global_Variable_Query(kVariableChapter) == 3
+ || Global_Variable_Query(kVariableChapter) == 5
+ || Game_Flag_Query(kFlagRC04Locked)
+ ) {
Actor_Says(kActorMcCoy, 8522, 14);
} else {
Game_Flag_Set(kFlagRC03toRC04);
@@ -253,7 +256,7 @@ void SceneScriptRC03::PlayerWalkedIn() {
Actor_Set_Goal_Number(kActorSteele, 100);
}
Actor_Change_Animation_Mode(kActorMcCoy, 20);
- Loop_Actor_Walk_To_XYZ(kActorIzo, 180.0f, -4.0f, 184.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorIzo, 180.0f, -4.0f, 184.0f, 0, false, false, 0);
Actor_Change_Animation_Mode(kActorIzo, 6);
if (!Game_Flag_Query(kFlagIzoIsReplicant)) {
Actor_Set_Goal_Number(kActorSteele, 100);
@@ -297,7 +300,7 @@ void SceneScriptRC03::PlayerWalkedOut() {
if (Actor_Query_Goal_Number(kActorIzo) == 199) {
Actor_Set_Goal_Number(kActorIzo, 198);
}
- Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
+ Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
}
diff --git a/engines/bladerunner/script/scene/rc04.cpp b/engines/bladerunner/script/scene/rc04.cpp
index 1c768c58dd..d865cecc25 100644
--- a/engines/bladerunner/script/scene/rc04.cpp
+++ b/engines/bladerunner/script/scene/rc04.cpp
@@ -28,11 +28,11 @@ void SceneScriptRC04::InitializeScene() {
Setup_Scene_Information(45.0f, 0.15f, 68.0f, 1018);
Game_Flag_Reset(kFlagRC03toRC04);
Scene_Exit_Add_2D_Exit(0, 225, 47, 359, 248, 0);
- if (!Game_Flag_Query(289)) {
+ if (!Game_Flag_Query(kFlagRC04McCoyShotBob)) {
Actor_Put_In_Set(kActorBulletBob, kSetRC04);
Actor_Set_At_XYZ(kActorBulletBob, -60.0f, -11.0f, 62.0f, 12);
}
- if (Game_Flag_Query(289)) {
+ if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
Actor_Change_Animation_Mode(kActorBulletBob, 88);
}
Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1);
@@ -59,34 +59,44 @@ bool SceneScriptRC04::ClickedOn3DObject(const char *objectName, bool a2) {
return false;
}
-void SceneScriptRC04::sub_401DF4() {
+void SceneScriptRC04::dialogueWithBulletBob() {
Dialogue_Menu_Clear_List();
- if (Actor_Clue_Query(kActorMcCoy, kClueLabShellCasings) && !Actor_Clue_Query(kActorMcCoy, kClueRadiationGoggles)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(580, -1, 4, 9);
+ if ( Actor_Clue_Query(kActorMcCoy, kClueLabShellCasings)
+ && !Actor_Clue_Query(kActorMcCoy, kClueRadiationGoggles)
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(580, -1, 4, 9); // WEAPONS
}
- if (Actor_Clue_Query(kActorMcCoy, kClueShellCasings) && !Actor_Clue_Query(kActorMcCoy, kClueLabShellCasings) && !Actor_Clue_Query(kActorMcCoy, kClueRadiationGoggles)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(590, 6, 5, 3);
+ if ( Actor_Clue_Query(kActorMcCoy, kClueShellCasings)
+ && !Actor_Clue_Query(kActorMcCoy, kClueLabShellCasings)
+ && !Actor_Clue_Query(kActorMcCoy, kClueRadiationGoggles)
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(590, 6, 5, 3); // SHELL CASINGS
}
if (Actor_Clue_Query(kActorMcCoy, kClueHasanInterview)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(600, -1, 3, 7);
- DM_Add_To_List_Never_Repeat_Once_Selected(1310, -1, 2, 8);
+ DM_Add_To_List_Never_Repeat_Once_Selected(600, -1, 3, 7); // HASAN
+ DM_Add_To_List_Never_Repeat_Once_Selected(1310, -1, 2, 8); // VOIGT-KAMPFF
}
- if (Actor_Clue_Query(kActorMcCoy, kClueRadiationGoggles) && !Actor_Clue_Query(kActorMcCoy, kClueGogglesReplicantIssue)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(610, 4, 5, 6);
+ if ( Actor_Clue_Query(kActorMcCoy, kClueRadiationGoggles)
+ && !Actor_Clue_Query(kActorMcCoy, kClueGogglesReplicantIssue)
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(610, 4, 5, 6); // GOGGLES
}
- if (!Game_Flag_Query(305)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1280, 1, 2, 3);
+ if (!Game_Flag_Query(kFlagRC04BobTalkAmmo)) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1280, 1, 2, 3); // AMMO
}
- if (Actor_Clue_Query(kActorMcCoy, kClueHoldensBadge) && !Actor_Clue_Query(kActorBulletBob, kClueHoldensBadge)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(620, 1, -1, -1);
+ if ( Actor_Clue_Query(kActorMcCoy, kClueHoldensBadge)
+ && !Actor_Clue_Query(kActorBulletBob, kClueHoldensBadge)
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(620, 1, -1, -1); // HOLDEN'S BADGE
}
- Dialogue_Menu_Add_DONE_To_List(630);
+ Dialogue_Menu_Add_DONE_To_List(630); // DONE
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
switch (answer) {
- case 580:
+ case 580: // WEAPONS
Actor_Says(kActorMcCoy, 4955, 30);
Actor_Says(kActorBulletBob, 210, 37);
Actor_Says(kActorBulletBob, 220, 37);
@@ -113,7 +123,7 @@ void SceneScriptRC04::sub_401DF4() {
Actor_Says(kActorBulletBob, 380, 37);
Actor_Says(kActorBulletBob, 390, 11);
Actor_Says(kActorBulletBob, 400, 37);
- Actor_Clue_Acquire(kActorMcCoy, kClueBobInterview1, 1, kActorMcCoy);
+ Actor_Clue_Acquire(kActorMcCoy, kClueBobInterview1, true, kActorMcCoy);
} else {
Actor_Says(kActorBulletBob, 410, 11);
Actor_Says(kActorBulletBob, 420, 37);
@@ -123,10 +133,11 @@ void SceneScriptRC04::sub_401DF4() {
Actor_Says(kActorBulletBob, 450, 32);
Actor_Says(kActorMcCoy, 5030, 16);
Actor_Says(kActorBulletBob, 460, 37);
- Actor_Clue_Acquire(kActorMcCoy, kClueBobInterview2, 1, kActorMcCoy);
+ Actor_Clue_Acquire(kActorMcCoy, kClueBobInterview2, true, kActorMcCoy);
}
return;
- case 590:
+
+ case 590: // SHELL CASINGS
Actor_Says(kActorMcCoy, 4960, 13);
Actor_Says(kActorBulletBob, 250, 30);
Actor_Says(kActorBulletBob, 260, 33);
@@ -151,7 +162,7 @@ void SceneScriptRC04::sub_401DF4() {
Actor_Says(kActorBulletBob, 380, 33);
Actor_Says(kActorBulletBob, 390, 37);
Actor_Says(kActorBulletBob, 400, 32);
- Actor_Clue_Acquire(kActorMcCoy, kClueBobInterview1, 1, kActorMcCoy);
+ Actor_Clue_Acquire(kActorMcCoy, kClueBobInterview1, true, kActorMcCoy);
} else {
Actor_Says(kActorBulletBob, 410, 32);
Actor_Says(kActorBulletBob, 420, 30);
@@ -161,10 +172,11 @@ void SceneScriptRC04::sub_401DF4() {
Actor_Says(kActorBulletBob, 450, 37);
Actor_Says(kActorMcCoy, 5030, 16);
Actor_Says(kActorBulletBob, 460, 30);
- Actor_Clue_Acquire(kActorMcCoy, kClueBobInterview2, 1, kActorMcCoy);
+ Actor_Clue_Acquire(kActorMcCoy, kClueBobInterview2, true, kActorMcCoy);
}
break;
- case 600:
+
+ case 600: // HASAN
Actor_Says(kActorMcCoy, 4965, 11);
Actor_Says(kActorBulletBob, 470, 11);
Actor_Says(kActorMcCoy, 5035, 15);
@@ -179,7 +191,8 @@ void SceneScriptRC04::sub_401DF4() {
Actor_Says(kActorBulletBob, 550, 11);
Actor_Modify_Friendliness_To_Other(kActorBulletBob, kActorMcCoy, -6);
break;
- case 610:
+
+ case 610: // GOGGLES
Actor_Says(kActorMcCoy, 4970, 16);
if (Actor_Query_Friendliness_To_Other(kActorBulletBob, kActorMcCoy) < 50) {
Actor_Says(kActorBulletBob, 700, 11);
@@ -189,7 +202,7 @@ void SceneScriptRC04::sub_401DF4() {
Actor_Says(kActorBulletBob, 720, 30);
Actor_Says(kActorMcCoy, 5080, 11);
Actor_Says(kActorBulletBob, 730, 37);
- Actor_Clue_Acquire(kActorMcCoy, kClueBobInterview1, 1, kActorMcCoy);
+ Actor_Clue_Acquire(kActorMcCoy, kClueBobInterview1, true, kActorMcCoy);
} else {
Actor_Says(kActorBulletBob, 560, 37);
Actor_Says(kActorMcCoy, 5070, 13);
@@ -206,24 +219,48 @@ void SceneScriptRC04::sub_401DF4() {
Actor_Says(kActorBulletBob, 650, 35);
Actor_Says(kActorBulletBob, 660, 30);
Actor_Says(kActorMcCoy, 5060, 13);
- Actor_Clue_Acquire(kActorMcCoy, kClueGogglesReplicantIssue, 1, kActorMcCoy);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGogglesReplicantIssue, true, kActorMcCoy);
+ }
+ break;
+
+ case 620: // HOLDEN'S BADGE
+ Actor_Says(kActorMcCoy, 4985, 11);
+ Actor_Says(kActorBulletBob, 850, 35);
+ Actor_Says(kActorMcCoy, 5105, 13);
+ Actor_Says(kActorMcCoy, 5110, 11);
+ Actor_Says(kActorBulletBob, 860, 30);
+ Actor_Says(kActorMcCoy, 5115, 16);
+ Actor_Says(kActorBulletBob, 870, 31);
+ Actor_Says(kActorMcCoy, 5120, 15);
+ Actor_Says(kActorBulletBob, 880, 34);
+ Actor_Clue_Acquire(kActorBulletBob, kClueHoldensBadge, true, kActorMcCoy);
+ Actor_Modify_Friendliness_To_Other(kActorBulletBob, kActorMcCoy, 8);
+ if (Query_Difficulty_Level() != 0) {
+ Global_Variable_Increment(kVariableChinyen, 60);
}
break;
- case 1280:
+
+ case 630: // DONE
+ Actor_Says(kActorMcCoy, 1315, 12);
+ break;
+
+ case 1280: // AMMO
Actor_Says(kActorMcCoy, 9040, 16);
- if (!Game_Flag_Query(305)) {
+ if (!Game_Flag_Query(kFlagRC04BobTalkAmmo)) {
Actor_Says(kActorBulletBob, 2080, 30);
Actor_Says(kActorBulletBob, 2090, 37);
Actor_Says(kActorMcCoy, 9045, 14);
Actor_Says(kActorBulletBob, 2100, 32);
Actor_Says(kActorBulletBob, 2110, 37);
- Game_Flag_Set(305);
+ Game_Flag_Set(kFlagRC04BobTalkAmmo);
}
Actor_Says(kActorBulletBob, 2120, 31);
- if (Global_Variable_Query(2) > 40 || Query_Difficulty_Level() == 0) {
+ if (Global_Variable_Query(kVariableChinyen) > 40
+ || Query_Difficulty_Level() == 0
+ ) {
Actor_Says(kActorMcCoy, 4940, 13);
if (Query_Difficulty_Level() != 0) {
- Global_Variable_Decrement(2, 40);
+ Global_Variable_Decrement(kVariableChinyen, 40);
}
Item_Pickup_Spin_Effect(995, 405, 192);
Give_McCoy_Ammo(1, 24);
@@ -232,7 +269,8 @@ void SceneScriptRC04::sub_401DF4() {
Actor_Modify_Friendliness_To_Other(kActorBulletBob, kActorMcCoy, -2);
}
break;
- case 1310:
+
+ case 1310: // VOIGT-KAMPFF
Actor_Says(kActorMcCoy, 4980, 11);
if (Actor_Query_Friendliness_To_Other(kActorBulletBob, kActorMcCoy) > 49) {
Actor_Says(kActorBulletBob, 740, 37);
@@ -262,25 +300,6 @@ void SceneScriptRC04::sub_401DF4() {
Actor_Says(kActorBulletBob, 840, 34);
}
break;
- case 620:
- Actor_Says(kActorMcCoy, 4985, 11);
- Actor_Says(kActorBulletBob, 850, 35);
- Actor_Says(kActorMcCoy, 5105, 13);
- Actor_Says(kActorMcCoy, 5110, 11);
- Actor_Says(kActorBulletBob, 860, 30);
- Actor_Says(kActorMcCoy, 5115, 16);
- Actor_Says(kActorBulletBob, 870, 31);
- Actor_Says(kActorMcCoy, 5120, 15);
- Actor_Says(kActorBulletBob, 880, 34);
- Actor_Clue_Acquire(kActorBulletBob, kClueHoldensBadge, 1, kActorMcCoy);
- Actor_Modify_Friendliness_To_Other(kActorBulletBob, kActorMcCoy, 8);
- if (Query_Difficulty_Level() != 0) {
- Global_Variable_Increment(2, 60);
- }
- break;
- case 630:
- Actor_Says(kActorMcCoy, 1315, 12);
- break;
}
}
@@ -288,78 +307,100 @@ bool SceneScriptRC04::ClickedOnActor(int actorId) {
if (Player_Query_Combat_Mode()) {
return false;
}
- if (actorId == 14 && Global_Variable_Query(kVariableChapter) == 2 && !Game_Flag_Query(289)) {
- Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 104, 0, 0, false);
- Actor_Face_Actor(kActorMcCoy, kActorBulletBob, true);
- if (Game_Flag_Query(287) && !Game_Flag_Query(292) && Actor_Query_Friendliness_To_Other(kActorBulletBob, kActorMcCoy) > 45) {
- Actor_Says(kActorBulletBob, 30, 30);
- Actor_Says(kActorMcCoy, 4875, 13);
- Actor_Says(kActorBulletBob, 80, 31);
- Actor_Says(kActorMcCoy, 4900, 15);
- Actor_Says(kActorBulletBob, 90, 33);
- Actor_Says(kActorBulletBob, 100, 34);
- Actor_Says(kActorMcCoy, 4905, 15);
- Game_Flag_Set(292);
- } else if (Game_Flag_Query(287) && !Game_Flag_Query(290) && Actor_Query_Friendliness_To_Other(kActorBulletBob, kActorMcCoy) < 45) {
- Actor_Says(kActorBulletBob, 40, 30);
- Actor_Says(kActorMcCoy, 4880, 13);
- Actor_Says(kActorBulletBob, 50, 35);
- Actor_Says(kActorMcCoy, 4875, 16);
- Actor_Says(kActorBulletBob, 60, 36);
- Actor_Says(kActorMcCoy, 4890, 13);
- Actor_Says(kActorBulletBob, 70, 33);
- Actor_Says(kActorMcCoy, 4895, 16);
- Actor_Modify_Friendliness_To_Other(kActorBulletBob, kActorMcCoy, -5);
- Game_Flag_Set(290);
- } else if (Actor_Query_Friendliness_To_Other(kActorBulletBob, kActorMcCoy) > 51 && !Game_Flag_Query(717)) {
- Actor_Says(kActorBulletBob, 1870, 30);
- Actor_Says(kActorBulletBob, 1880, 30);
- Actor_Says(kActorMcCoy, 8960, 13);
- Actor_Says(kActorBulletBob, 1890, 36);
- Actor_Says(kActorBulletBob, 1900, 35);
- Actor_Says(kActorMcCoy, 8965, 16);
- Actor_Says(kActorBulletBob, 1920, 36);
- Actor_Says(kActorBulletBob, 1930, 33);
- Actor_Says(kActorBulletBob, 1940, 36);
- Actor_Says(kActorBulletBob, 1950, 30);
- Actor_Says(kActorMcCoy, 8970, 13);
- Actor_Says(kActorBulletBob, 1960, 33);
- Actor_Says(kActorBulletBob, 1970, 30);
- Actor_Says(kActorBulletBob, 1980, 36);
- Delay(1000);
- Actor_Says(kActorBulletBob, 2010, 35);
- if (Global_Variable_Query(2) > 50 || Query_Difficulty_Level() == 0) {
- Actor_Says(kActorMcCoy, 8975, 16);
- if (Query_Difficulty_Level() != 0) {
- Global_Variable_Decrement(2, 50);
+
+ if (actorId == kActorBulletBob) {
+ if ( Global_Variable_Query(kVariableChapter) == 2
+ && !Game_Flag_Query(kFlagRC04McCoyShotBob)
+ ) {
+ Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 104, 0, false, false);
+ Actor_Face_Actor(kActorMcCoy, kActorBulletBob, true);
+ if ( Game_Flag_Query(kFlagRC04Entered)
+ && !Game_Flag_Query(kFlagRC04BobTalk2)
+ && Actor_Query_Friendliness_To_Other(kActorBulletBob, kActorMcCoy) > 45
+ ) {
+ Actor_Says(kActorBulletBob, 30, 30);
+ Actor_Says(kActorMcCoy, 4875, 13);
+ Actor_Says(kActorBulletBob, 80, 31);
+ Actor_Says(kActorMcCoy, 4900, 15);
+ Actor_Says(kActorBulletBob, 90, 33);
+ Actor_Says(kActorBulletBob, 100, 34);
+ Actor_Says(kActorMcCoy, 4905, 15);
+ Game_Flag_Set(kFlagRC04BobTalk2);
+ } else if ( Game_Flag_Query(kFlagRC04Entered)
+ && !Game_Flag_Query(kFlagRC04BobTalk1)
+ && Actor_Query_Friendliness_To_Other(kActorBulletBob, kActorMcCoy) < 45
+ ) {
+ Actor_Says(kActorBulletBob, 40, 30);
+ Actor_Says(kActorMcCoy, 4880, 13);
+ Actor_Says(kActorBulletBob, 50, 35);
+ Actor_Says(kActorMcCoy, 4875, 16);
+ Actor_Says(kActorBulletBob, 60, 36);
+ Actor_Says(kActorMcCoy, 4890, 13);
+ Actor_Says(kActorBulletBob, 70, 33);
+ Actor_Says(kActorMcCoy, 4895, 16);
+ Actor_Modify_Friendliness_To_Other(kActorBulletBob, kActorMcCoy, -5);
+ Game_Flag_Set(kFlagRC04BobTalk1);
+ } else if ( Actor_Query_Friendliness_To_Other(kActorBulletBob, kActorMcCoy) > 51
+ && !Game_Flag_Query(kFlagRC04BobTalk3)
+ ) {
+ Actor_Says(kActorBulletBob, 1870, 30);
+ Actor_Says(kActorBulletBob, 1880, 30);
+ Actor_Says(kActorMcCoy, 8960, 13);
+ Actor_Says(kActorBulletBob, 1890, 36);
+ Actor_Says(kActorBulletBob, 1900, 35);
+ Actor_Says(kActorMcCoy, 8965, 16);
+ Actor_Says(kActorBulletBob, 1920, 36);
+ Actor_Says(kActorBulletBob, 1930, 33);
+ Actor_Says(kActorBulletBob, 1940, 36);
+ Actor_Says(kActorBulletBob, 1950, 30);
+ Actor_Says(kActorMcCoy, 8970, 13);
+ Actor_Says(kActorBulletBob, 1960, 33);
+ Actor_Says(kActorBulletBob, 1970, 30);
+ Actor_Says(kActorBulletBob, 1980, 36);
+ Delay(1000);
+ Actor_Says(kActorBulletBob, 2010, 35);
+ if (Global_Variable_Query(kVariableChinyen) > 50
+ || Query_Difficulty_Level() == 0
+ ) {
+ Actor_Says(kActorMcCoy, 8975, 16);
+ if (Query_Difficulty_Level() != 0) {
+ Global_Variable_Decrement(kVariableChinyen, 50);
+ }
+ Delay(3000);
+ Item_Pickup_Spin_Effect(941, 405, 192);
+ Actor_Says(kActorBulletBob, 2030, 30);
+ Game_Flag_Set(kFlagKIAPrivacyAddon);
+ } else {
+ Actor_Says(kActorMcCoy, 8980, 16);
+ Actor_Says(kActorBulletBob, 2040, 30);
+ Actor_Says(kActorMcCoy, 8985, 15);
+ Actor_Says(kActorBulletBob, 2050, 33);
}
- Delay(3000);
- Item_Pickup_Spin_Effect(941, 405, 192);
- Actor_Says(kActorBulletBob, 2030, 30);
- Game_Flag_Set(kFlagKIAPrivacyAddon);
+ Game_Flag_Set(kFlagRC04BobTalk3);
+ } else if ( Actor_Clue_Query(kActorMcCoy, kClueLabShellCasings)
+ || Actor_Clue_Query(kActorMcCoy, kClueShellCasings)
+ || Actor_Clue_Query(kActorMcCoy, kClueRadiationGoggles)
+ || Actor_Clue_Query(kActorMcCoy, kClueHoldensBadge)
+ || Actor_Clue_Query(kActorMcCoy, kClueHasanInterview)
+ || !Game_Flag_Query(kFlagRC04BobTalkAmmo)
+ ) {
+ dialogueWithBulletBob();
} else {
- Actor_Says(kActorMcCoy, 8980, 16);
- Actor_Says(kActorBulletBob, 2040, 30);
- Actor_Says(kActorMcCoy, 8985, 15);
- Actor_Says(kActorBulletBob, 2050, 33);
+ Actor_Says(kActorBulletBob, 1820, 30);
}
- Game_Flag_Set(717);
- } else if (Actor_Clue_Query(kActorMcCoy, kClueLabShellCasings) || Actor_Clue_Query(kActorMcCoy, kClueShellCasings) || Actor_Clue_Query(kActorMcCoy, kClueRadiationGoggles) || Actor_Clue_Query(kActorMcCoy, kClueHoldensBadge) || Actor_Clue_Query(kActorMcCoy, kClueHasanInterview) || !Game_Flag_Query(305)) {
- sub_401DF4();
- } else {
- Actor_Says(kActorBulletBob, 1820, 30);
+ return true;
}
- return true;
- }
- if (actorId == 14 && Game_Flag_Query(289)) {
- Actor_Face_Actor(kActorMcCoy, kActorBulletBob, true);
- if (Actor_Clue_Query(kActorMcCoy, kClueVKBobGorskyReplicant)) {
- Actor_Says(kActorMcCoy, 8590, -1);
- } else {
- Actor_Voice_Over(2100, kActorVoiceOver);
- Actor_Voice_Over(2110, kActorVoiceOver);
+
+ if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
+ Actor_Face_Actor(kActorMcCoy, kActorBulletBob, true);
+ if (Actor_Clue_Query(kActorMcCoy, kClueVKBobGorskyReplicant)) {
+ Actor_Says(kActorMcCoy, 8590, -1);
+ } else {
+ Actor_Voice_Over(2100, kActorVoiceOver);
+ Actor_Voice_Over(2110, kActorVoiceOver);
+ }
+ return true;
}
- return true;
}
return false;
}
@@ -390,28 +431,39 @@ void SceneScriptRC04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptRC04::PlayerWalkedIn() {
- Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 103, 0, 0, false);
- if (Global_Variable_Query(kVariableChapter) != 2 || Game_Flag_Query(287) || Player_Query_Combat_Mode()) {
- if (Global_Variable_Query(kVariableChapter) == 4 && !Game_Flag_Query(289) && !Game_Flag_Query(306)) {
- Actor_Says(kActorDispatcher, 40, 3);
- Actor_Says(kActorBulletBob, 890, 37);
- Actor_Set_Goal_Number(kActorBulletBob, 2);
- }
- Game_Flag_Set(287);
- } else {
+ Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 103, 0, false, false);
+
+ if ( Global_Variable_Query(kVariableChapter) == 2
+ && !Game_Flag_Query(kFlagRC04Entered)
+ && !Player_Query_Combat_Mode()
+ ) {
Actor_Says(kActorBulletBob, 0, 31);
- Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 104, 0, 0, false);
+ Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 104, 0, false, false);
Actor_Face_Actor(kActorMcCoy, kActorBulletBob, true);
Actor_Says(kActorMcCoy, 4865, 13);
Actor_Says(kActorBulletBob, 10, 32);
Actor_Says(kActorMcCoy, 4870, 16);
Actor_Says(kActorBulletBob, 20, 31);
- Game_Flag_Set(287);
+ Game_Flag_Set(kFlagRC04Entered);
+ return; //true;
+ }
+
+ if ( Global_Variable_Query(kVariableChapter) == 4
+ && !Game_Flag_Query(kFlagRC04McCoyShotBob)
+ && !Game_Flag_Query(kFlagNotUsed306)
+ ) {
+ Actor_Says(kActorDispatcher, 40, 3);
+ Actor_Says(kActorBulletBob, 890, 37);
+ Actor_Set_Goal_Number(kActorBulletBob, 2);
}
+
+ Game_Flag_Set(kFlagRC04Entered);
+
+ //return false;
}
void SceneScriptRC04::PlayerWalkedOut() {
- Game_Flag_Reset(303);
+ Game_Flag_Reset(kFlagRC04McCoyWarned);
}
void SceneScriptRC04::DialogueQueueFlushed(int a1) {
diff --git a/engines/bladerunner/script/scene/rc51.cpp b/engines/bladerunner/script/scene/rc51.cpp
index 8019ea0462..47b243d12b 100644
--- a/engines/bladerunner/script/scene/rc51.cpp
+++ b/engines/bladerunner/script/scene/rc51.cpp
@@ -53,7 +53,7 @@ void SceneScriptRC51::SceneLoaded() {
if (!Game_Flag_Query(kFlagCandyTaken)) {
Item_Add_To_World(kItemCandy, 933, kSetRC02_RC51, 67.28f, -1193.38f, 108011.27f, 0, 6, 6, false, true, false, true);
}
- if (!Game_Flag_Query(kFlagDogTaken)) {
+ if (!Game_Flag_Query(kFlagToyDogTaken)) {
Item_Add_To_World(kItemToyDog, 971, kSetRC02_RC51, -69.65f, -1238.89f, 107995.24f, 256, 18, 18, false, true, false, true);
}
}
@@ -76,42 +76,52 @@ bool SceneScriptRC51::ClickedOnActor(int actorId) {
}
bool SceneScriptRC51::ClickedOnItem(int itemId, bool a2) {
- if (itemId == kItemChopstickWrapper && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 17.97f, -1238.89f, 108053.5f, 0, false, false, 0)) {
- Actor_Face_Item(kActorMcCoy, kItemChopstickWrapper, true);
- Actor_Clue_Acquire(kActorMcCoy, kClueChopstickWrapper, 1, -1);
- Item_Remove_From_World(kItemChopstickWrapper);
- Item_Pickup_Spin_Effect(937, 437, 407);
- Actor_Voice_Over(2010, kActorVoiceOver);
- Game_Flag_Set(kFlagChopstickWrapperTaken);
- return true;
+ if (itemId == kItemChopstickWrapper) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 17.97f, -1238.89f, 108053.5f, 0, false, false, 0)) {
+ Actor_Face_Item(kActorMcCoy, kItemChopstickWrapper, true);
+ Actor_Clue_Acquire(kActorMcCoy, kClueChopstickWrapper, true, -1);
+ Item_Remove_From_World(kItemChopstickWrapper);
+ Item_Pickup_Spin_Effect(937, 437, 407);
+ Actor_Voice_Over(2010, kActorVoiceOver);
+ Game_Flag_Set(kFlagChopstickWrapperTaken);
+ return true;
+ }
}
- if (itemId == kItemCandy && !Loop_Actor_Walk_To_Item(kActorMcCoy, kItemCandy, 36, true, false)) {
- Actor_Face_Item(kActorMcCoy, kItemCandy, true);
- Actor_Clue_Acquire(kActorMcCoy, kClueCandy, 1, -1);
- Item_Remove_From_World(kItemCandy);
- Item_Pickup_Spin_Effect(933, 445, 230);
- Actor_Says(kActorMcCoy, 8735, 3);
- Actor_Says(kActorMcCoy, 8529, 3);
- Game_Flag_Set(kFlagCandyTaken);
- return true;
+
+ if (itemId == kItemCandy) {
+ if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemCandy, 36, true, false)) {
+ Actor_Face_Item(kActorMcCoy, kItemCandy, true);
+ Actor_Clue_Acquire(kActorMcCoy, kClueCandy, true, -1);
+ Item_Remove_From_World(kItemCandy);
+ Item_Pickup_Spin_Effect(933, 445, 230);
+ Actor_Says(kActorMcCoy, 8735, 3);
+ Actor_Says(kActorMcCoy, 8529, 3);
+ Game_Flag_Set(kFlagCandyTaken);
+ return true;
+ }
}
- if (itemId == kItemToyDog && !Loop_Actor_Walk_To_Item(kActorMcCoy, kItemToyDog, 36, true, false)) {
- Actor_Face_Item(kActorMcCoy, kItemToyDog, true);
- Actor_Clue_Acquire(kActorMcCoy, kClueToyDog, 1, -1);
- Item_Remove_From_World(kItemToyDog);
- Item_Pickup_Spin_Effect(971, 55, 376);
- Actor_Says(kActorMcCoy, 8525, 3);
- Actor_Says(kActorMcCoy, 8740, 3);
- Game_Flag_Set(kFlagDogTaken);
- return true;
+
+ if (itemId == kItemToyDog) {
+ if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemToyDog, 36, true, false)) {
+ Actor_Face_Item(kActorMcCoy, kItemToyDog, true);
+ Actor_Clue_Acquire(kActorMcCoy, kClueToyDog, true, -1);
+ Item_Remove_From_World(kItemToyDog);
+ Item_Pickup_Spin_Effect(971, 55, 376);
+ Actor_Says(kActorMcCoy, 8525, 3);
+ Actor_Says(kActorMcCoy, 8740, 3);
+ Game_Flag_Set(kFlagToyDogTaken);
+ return true;
+ }
}
return false;
}
bool SceneScriptRC51::ClickedOnExit(int exitId) {
- if (exitId == kRC51ExitRC02 && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, -8.87f, -1238.89f, 108173.27f, 0, true, false, 0)) {
- Set_Enter(kSetRC02_RC51, kSceneRC02);
- return true;
+ if (exitId == kRC51ExitRC02) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -8.87f, -1238.89f, 108173.27f, 0, true, false, 0)) {
+ Set_Enter(kSetRC02_RC51, kSceneRC02);
+ return true;
+ }
}
return false;
}
diff --git a/engines/bladerunner/script/scene/tb02.cpp b/engines/bladerunner/script/scene/tb02.cpp
index 04142e8706..2bb548c51d 100644
--- a/engines/bladerunner/script/scene/tb02.cpp
+++ b/engines/bladerunner/script/scene/tb02.cpp
@@ -32,7 +32,7 @@ void SceneScriptTB02::InitializeScene() {
} else if (Game_Flag_Query(kFlagTB07toTB02)) {
Setup_Scene_Information(-32.0f, 0.0f, 1578.0f, 639);
} else {
- Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
+ Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Outtake_Play(kOuttakeTyrellBuildingFly, false, -1);
Setup_Scene_Information(-304.0f, -81.46f, 1434.0f, 250);
@@ -63,7 +63,9 @@ void SceneScriptTB02::InitializeScene() {
Ambient_Sounds_Add_Sound(194, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(195, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
}
- if (Game_Flag_Query(kFlagSpinnerAtTB02) && Global_Variable_Query(kVariableChapter) < 4) {
+ if (Game_Flag_Query(kFlagSpinnerAtTB02)
+ && Global_Variable_Query(kVariableChapter) < 4
+ ) {
Scene_Exit_Add_2D_Exit(2, 67, 0, 233, 362, 3);
}
if (Game_Flag_Query(kFlagTB03toTB02)) {
@@ -96,12 +98,14 @@ bool SceneScriptTB02::ClickedOn3DObject(const char *objectName, bool a2) {
}
bool SceneScriptTB02::ClickedOnActor(int actorId) {
- if (actorId == 17) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -76.35f, 0.15f, 1564.2f, 0, 1, false, 0)) {
+ if (actorId == kActorTyrellGuard) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -76.35f, 0.15f, 1564.2f, 0, true, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorTyrellGuard, true);
- int v1 = Global_Variable_Query(kVariableChapter);
- if (v1 == 2) {
- if (Game_Flag_Query(450) && !Game_Flag_Query(451)) {
+ int chapter = Global_Variable_Query(kVariableChapter);
+ if (chapter == 2) {
+ if ( Game_Flag_Query(kFlagTB02ElevatorToTB05)
+ && !Game_Flag_Query(kFlagTB05Entered)
+ ) {
Actor_Says(kActorMcCoy, 5150, 18);
Actor_Says(kActorTyrellGuard, 60, 12);
Actor_Says(kActorTyrellGuard, 70, 13);
@@ -109,15 +113,19 @@ bool SceneScriptTB02::ClickedOnActor(int actorId) {
Actor_Modify_Friendliness_To_Other(kActorTyrellGuard, kActorMcCoy, -1);
return true;
}
- if (!Game_Flag_Query(450) && !Game_Flag_Query(451)) {
- Game_Flag_Set(450);
+
+ if (!Game_Flag_Query(kFlagTB02ElevatorToTB05)
+ && !Game_Flag_Query(kFlagTB05Entered)
+ ) {
+ Game_Flag_Set(kFlagTB02ElevatorToTB05);
Actor_Says(kActorMcCoy, 5160, 18);
Actor_Says(kActorTyrellGuard, 80, 14);
Scene_Exit_Add_2D_Exit(1, 430, 235, 487, 396, 0);
return true;
}
- if (Game_Flag_Query(451)) {
- sub_402644();
+
+ if (Game_Flag_Query(kFlagTB05Entered)) {
+ dialogueWithTyrellGuard();
} else {
Actor_Face_Actor(kActorTyrellGuard, kActorMcCoy, true);
Actor_Says(kActorMcCoy, 5150, 18);
@@ -129,7 +137,8 @@ bool SceneScriptTB02::ClickedOnActor(int actorId) {
}
return true;
}
- if (v1 == 3) {
+
+ if (chapter == 3) {
Actor_Says(kActorMcCoy, 5235, 18);
Actor_Says(kActorTyrellGuard, 280, 13);
Actor_Says(kActorTyrellGuard, 290, 12);
@@ -137,7 +146,8 @@ bool SceneScriptTB02::ClickedOnActor(int actorId) {
Actor_Says(kActorTyrellGuard, 300, 12);
return false;
}
- if (v1 == 4) {
+
+ if (chapter == 4) {
if (Actor_Query_Goal_Number(kActorTyrellGuard) == 300) {
Actor_Set_Goal_Number(kActorTyrellGuard, 301);
}
@@ -157,7 +167,7 @@ bool SceneScriptTB02::ClickedOnExit(int exitId) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagTB02toTB03);
- Game_Flag_Reset(450);
+ Game_Flag_Reset(kFlagTB02ElevatorToTB05);
Set_Enter(kSetTB02_TB03, kSceneTB03);
Async_Actor_Walk_To_XYZ(kActorMcCoy, -152.0f, 0.0f, 1890.0f, 0, false);
}
@@ -168,7 +178,7 @@ bool SceneScriptTB02::ClickedOnExit(int exitId) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
if (Global_Variable_Query(kVariableChapter) < 4) {
- Game_Flag_Set(451);
+ Game_Flag_Set(kFlagTB05Entered);
Game_Flag_Set(kFlagTB02toTB05);
Set_Enter(kSetTB05, kSceneTB05);
} else {
@@ -180,7 +190,7 @@ bool SceneScriptTB02::ClickedOnExit(int exitId) {
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -192.0f, 0.0f, 1430.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 800, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 9, false, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 9, false, kAnimationModeIdle);
if (Actor_Query_Goal_Number(kActorTyrellGuard) == 300) {
Actor_Set_Goal_Number(kActorTyrellGuard, 301);
} else {
@@ -191,7 +201,7 @@ bool SceneScriptTB02::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagMcCoyAtBBxx);
Game_Flag_Reset(kFlagMcCoyAtHFxx);
Game_Flag_Reset(kFlagMcCoyAtTBxx);
- Game_Flag_Reset(450);
+ Game_Flag_Reset(kFlagTB02ElevatorToTB05);
switch (Spinner_Interface_Choose_Dest(-1, false)) {
case kSpinnerDestinationPoliceStation:
Game_Flag_Set(kFlagMcCoyAtPSxx);
@@ -290,8 +300,8 @@ void SceneScriptTB02::PlayerWalkedIn() {
}
Music_Play(1, 50, 0, 2, -1, 0, 0);
} else {
- Loop_Actor_Travel_Stairs(kActorMcCoy, 9, 1, 0);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -140.0f, 0.79f, 1470.0f, 0, 0, false, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 9, true, kAnimationModeIdle);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -140.0f, 0.79f, 1470.0f, 0, false, false, 0);
}
int chapter = Global_Variable_Query(kVariableChapter);
if (chapter > 4) {
@@ -299,7 +309,7 @@ void SceneScriptTB02::PlayerWalkedIn() {
return;
}
if (chapter == 2) {
- if (!Game_Flag_Query(453)) {
+ if (!Game_Flag_Query(kFlagTB02GuardTalk1)) {
Player_Loses_Control();
Actor_Says(kActorMcCoy, 5125, 18);
Actor_Says(kActorTyrellGuard, 0, 50);
@@ -310,45 +320,55 @@ void SceneScriptTB02::PlayerWalkedIn() {
Actor_Says(kActorMcCoy, 5140, 17);
Actor_Says(kActorTyrellGuard, 30, 14);
Actor_Says(kActorTyrellGuard, 40, 13);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -140.0f, 0.0f, 1586.0f, 12, 0, false, 0);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -112.0f, 0.0f, 1586.0f, 12, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -140.0f, 0.0f, 1586.0f, 12, false, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -112.0f, 0.0f, 1586.0f, 12, false, false, 0);
Actor_Face_Actor(kActorMcCoy, kActorTyrellGuard, true);
Actor_Face_Actor(kActorTyrellGuard, kActorMcCoy, true);
Actor_Says(kActorMcCoy, 5145, 13);
Actor_Says(kActorTyrellGuard, 50, 15);
Actor_Face_Heading(kActorTyrellGuard, 788, false);
- Actor_Clue_Acquire(kActorMcCoy, kClueTyrellSecurity, 1, -1);
- Game_Flag_Set(453);
- Game_Flag_Set(450);
+ Actor_Clue_Acquire(kActorMcCoy, kClueTyrellSecurity, true, -1);
+ Game_Flag_Set(kFlagTB02GuardTalk1);
+ Game_Flag_Set(kFlagTB02ElevatorToTB05);
Player_Gains_Control();
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -138.17f, 0.15f, 1578.32f, 0, 1, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -138.17f, 0.15f, 1578.32f, 0, true, false, 0);
}
- if (Game_Flag_Query(450)) {
+
+ if (Game_Flag_Query(kFlagTB02ElevatorToTB05)) {
Scene_Exit_Add_2D_Exit(1, 430, 235, 487, 396, 0);
}
- if (Game_Flag_Query(451) && !Game_Flag_Query(450)) {
+
+ if ( Game_Flag_Query(kFlagTB05Entered)
+ && !Game_Flag_Query(kFlagTB02ElevatorToTB05)
+ ) {
Actor_Says(kActorTyrellGuard, 90, 18);
- Game_Flag_Set(450);
+ Game_Flag_Set(kFlagTB02ElevatorToTB05);
Scene_Exit_Add_2D_Exit(1, 430, 235, 487, 396, 0);
}
- if (Game_Flag_Query(451) && !Game_Flag_Query(456)) {
- Loop_Actor_Walk_To_Actor(kActorSteele, kActorMcCoy, 36, 1, false);
+
+ if ( Game_Flag_Query(kFlagTB05Entered)
+ && !Game_Flag_Query(kFlagTB02SteeleTalk)
+ ) {
+ Loop_Actor_Walk_To_Actor(kActorSteele, kActorMcCoy, 36, true, false);
Actor_Says(kActorSteele, 2220, 14);
Actor_Says(kActorMcCoy, 5245, 13);
Actor_Says(kActorSteele, 2230, 12);
Actor_Says(kActorSteele, 2240, 13);
- sub_402B50();
+ dialogueWithSteele();
//return true;
}
//return false;
return;
}
- if (chapter == 3 && !Game_Flag_Query(455)) {
+
+ if ( chapter == 3
+ && !Game_Flag_Query(kFlagTB02GuardTalk2)
+ ) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -131.28f, 0.79f, 1448.25f, 12, 1, false, 0);
Actor_Says(kActorTyrellGuard, 260, 15);
Actor_Says(kActorMcCoy, 5225, 16);
Actor_Says(kActorTyrellGuard, 270, 14);
- Game_Flag_Set(455);
+ Game_Flag_Set(kFlagTB02GuardTalk2);
Actor_Modify_Friendliness_To_Other(kActorTyrellGuard, kActorMcCoy, -1);
}
//return false;
@@ -362,53 +382,37 @@ void SceneScriptTB02::PlayerWalkedOut() {
void SceneScriptTB02::DialogueQueueFlushed(int a1) {
}
-void SceneScriptTB02::sub_402644() {
+void SceneScriptTB02::dialogueWithTyrellGuard() {
Dialogue_Menu_Clear_List();
- DM_Add_To_List_Never_Repeat_Once_Selected(700, 4, 5, 6);
+ DM_Add_To_List_Never_Repeat_Once_Selected(700, 4, 5, 6); // VICTIM
+
if (Actor_Clue_Query(kActorMcCoy, kClueDragonflyEarring)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(710, 5, 5, 4);
+ DM_Add_To_List_Never_Repeat_Once_Selected(710, 5, 5, 4); // EARRING
}
- if (Actor_Clue_Query(kActorMcCoy, kClueVictimInformation) || Actor_Clue_Query(kActorMcCoy, kClueAttemptedFileAccess)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(720, 3, 5, 5);
+
+ if (Actor_Clue_Query(kActorMcCoy, kClueVictimInformation)
+ || Actor_Clue_Query(kActorMcCoy, kClueAttemptedFileAccess)
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(720, 3, 5, 5); // TYRELL
}
+
if (Actor_Clue_Query(kActorMcCoy, kClueAttemptedFileAccess)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(730, 3, 4, 8);
+ DM_Add_To_List_Never_Repeat_Once_Selected(730, 3, 4, 8); // SECURITY
}
- Dialogue_Menu_Add_DONE_To_List(100);
+
+ Dialogue_Menu_Add_DONE_To_List(100); // DONE
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
+
switch (answer) {
- case 100:
+ case 100: // DONE
Actor_Says(kActorMcCoy, 5145, 13);
Actor_Says(kActorTyrellGuard, 50, 15);
break;
- case 730:
- Actor_Says(kActorMcCoy, 5180, 16);
- Actor_Says(kActorTyrellGuard, 240, 12);
- Actor_Says(kActorMcCoy, 5215, 18);
- Actor_Says(kActorTyrellGuard, 250, 13);
- Actor_Says(kActorMcCoy, 5220, 16);
- break;
- case 720:
- Actor_Says(kActorMcCoy, 5175, 12);
- Actor_Says(kActorTyrellGuard, 210, 14);
- Actor_Says(kActorMcCoy, 5200, 13);
- Actor_Says(kActorTyrellGuard, 220, 13);
- Actor_Says(kActorMcCoy, 5205, 15);
- Actor_Says(kActorTyrellGuard, 230, 12);
- Actor_Says(kActorMcCoy, 5210, 12);
- break;
- case 710:
- Actor_Says(kActorMcCoy, 5170, 12);
- Actor_Says(kActorTyrellGuard, 180, 12);
- Actor_Says(kActorTyrellGuard, 190, 14);
- if (Game_Flag_Query(102)) {
- Actor_Says(kActorMcCoy, 5195, 13);
- Actor_Says(kActorTyrellGuard, 200, 13);
- }
- break;
- case 700:
+
+ case 700: // VICTIM
Actor_Says(kActorMcCoy, 5165, 11);
Actor_Says(kActorTyrellGuard, 100, 13);
Actor_Says(kActorTyrellGuard, 110, 12);
@@ -419,21 +423,57 @@ void SceneScriptTB02::sub_402644() {
Actor_Says(kActorTyrellGuard, 140, 13);
Actor_Says(kActorTyrellGuard, 150, 14);
Actor_Says(kActorTyrellGuard, 170, 12);
- Actor_Clue_Acquire(kActorMcCoy, kClueVictimInformation, 1, kActorTyrellGuard);
+ Actor_Clue_Acquire(kActorMcCoy, kClueVictimInformation, true, kActorTyrellGuard);
+ break;
+
+ case 710: // EARRING
+ Actor_Says(kActorMcCoy, 5170, 12);
+ Actor_Says(kActorTyrellGuard, 180, 12);
+ Actor_Says(kActorTyrellGuard, 190, 14);
+ if (Game_Flag_Query(kFlagTB06Visited)) {
+ Actor_Says(kActorMcCoy, 5195, 13);
+ Actor_Says(kActorTyrellGuard, 200, 13);
+ }
+ break;
+
+ case 720: // TYRELL
+ Actor_Says(kActorMcCoy, 5175, 12);
+ Actor_Says(kActorTyrellGuard, 210, 14);
+ Actor_Says(kActorMcCoy, 5200, 13);
+ Actor_Says(kActorTyrellGuard, 220, 13);
+ Actor_Says(kActorMcCoy, 5205, 15);
+ Actor_Says(kActorTyrellGuard, 230, 12);
+ Actor_Says(kActorMcCoy, 5210, 12);
+ break;
+
+ case 730: // SECURITY
+ Actor_Says(kActorMcCoy, 5180, 16);
+ Actor_Says(kActorTyrellGuard, 240, 12);
+ Actor_Says(kActorMcCoy, 5215, 18);
+ Actor_Says(kActorTyrellGuard, 250, 13);
+ Actor_Says(kActorMcCoy, 5220, 16);
break;
}
}
-void SceneScriptTB02::sub_402B50() {
+void SceneScriptTB02::dialogueWithSteele() {
Dialogue_Menu_Clear_List();
- DM_Add_To_List_Never_Repeat_Once_Selected(740, 4, 5, 6);
- DM_Add_To_List_Never_Repeat_Once_Selected(750, 3, 5, 5);
- Dialogue_Menu_Add_DONE_To_List(100);
+ DM_Add_To_List_Never_Repeat_Once_Selected(740, 4, 5, 6); // HER CASE
+ DM_Add_To_List_Never_Repeat_Once_Selected(750, 3, 5, 5); // MURDER
+ Dialogue_Menu_Add_DONE_To_List(100); // DONE
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
+
switch (answer) {
- case 740:
+ case 100: // DONE
+ Actor_Says(kActorSteele, 2350, 13);
+ Actor_Modify_Friendliness_To_Other(kActorSteele, kActorMcCoy, -5);
+ Game_Flag_Set(kFlagTB02SteeleTalk);
+ break;
+
+ case 740: // HER CASE
Actor_Says(kActorMcCoy, 5250, 15);
if (Game_Flag_Query(kFlagSadikIsReplicant)) {
Actor_Says(kActorSteele, 2250, 12);
@@ -443,9 +483,9 @@ void SceneScriptTB02::sub_402B50() {
Actor_Says(kActorSteele, 2280, 13);
Actor_Says(kActorMcCoy, 5270, 16);
Actor_Says(kActorSteele, 2290, 14);
- Actor_Clue_Acquire(kActorMcCoy, kClueCrystalsCase, 1, kActorSteele);
+ Actor_Clue_Acquire(kActorMcCoy, kClueCrystalsCase, true, kActorSteele);
Actor_Modify_Friendliness_To_Other(kActorSteele, kActorMcCoy, 1);
- Game_Flag_Set(456);
+ Game_Flag_Set(kFlagTB02SteeleTalk);
} else {
Actor_Says(kActorSteele, 2300, 12);
Actor_Says(kActorSteele, 2310, 15);
@@ -453,19 +493,15 @@ void SceneScriptTB02::sub_402B50() {
Actor_Says(kActorSteele, 2320, 12);
Actor_Says(kActorMcCoy, 5280, 13);
Actor_Modify_Friendliness_To_Other(kActorSteele, kActorMcCoy, 1);
- Game_Flag_Set(456);
+ Game_Flag_Set(kFlagTB02SteeleTalk);
}
break;
- case 750:
+
+ case 750: // MURDER
Actor_Says(kActorMcCoy, 5255, 11);
Actor_Says(kActorSteele, 2330, 13);
Actor_Says(kActorSteele, 2340, 14);
- Game_Flag_Set(456);
- break;
- case 100:
- Actor_Says(kActorSteele, 2350, 13);
- Actor_Modify_Friendliness_To_Other(kActorSteele, kActorMcCoy, -5);
- Game_Flag_Set(456);
+ Game_Flag_Set(kFlagTB02SteeleTalk);
break;
}
}
diff --git a/engines/bladerunner/script/scene/tb05.cpp b/engines/bladerunner/script/scene/tb05.cpp
index acdca33535..3b272991c1 100644
--- a/engines/bladerunner/script/scene/tb05.cpp
+++ b/engines/bladerunner/script/scene/tb05.cpp
@@ -27,7 +27,7 @@ namespace BladeRunner {
void SceneScriptTB05::InitializeScene() {
if (Game_Flag_Query(kFlagTB06toTB05)) {
Setup_Scene_Information(23.0f, 151.53f, -205.0f, 450);
- Game_Flag_Set(102);
+ Game_Flag_Set(kFlagTB06Visited);
Game_Flag_Reset(kFlagTB06toTB05);
} else {
Setup_Scene_Information(14.0f, 151.53f, -77.0f, 6);
@@ -52,10 +52,15 @@ void SceneScriptTB05::SceneLoaded() {
Clickable_Object("MONITOR05");
Unclickable_Object("SMUDGE_GLASS01");
if (!Actor_Clue_Query(kActorMcCoy, kClueDragonflyEarring)) {
- Item_Add_To_World(76, 940, 72, 76.16f, 147.36f, -235.15f, 0, 6, 6, false, true, false, true);
+ Item_Add_To_World(kItemDragonflyEarring, 940, 72, 76.16f, 147.36f, -235.15f, 0, 6, 6, false, true, false, true);
}
- if (!Actor_Clue_Query(kActorMcCoy, kClueTyrellSalesPamphlet1) && !Actor_Clue_Query(kActorMcCoy, kClueTyrellSalesPamphlet2) && (Game_Flag_Query(kFlagGordoIsReplicant) || Game_Flag_Query(kFlagLucyIsReplicant))) {
- Item_Add_To_World(119, 972, 72, 129.01f, 147.12f, -162.98f, 0, 8, 8, false, true, false, true);
+ if (!Actor_Clue_Query(kActorMcCoy, kClueTyrellSalesPamphlet1)
+ && !Actor_Clue_Query(kActorMcCoy, kClueTyrellSalesPamphlet2)
+ && (Game_Flag_Query(kFlagGordoIsReplicant)
+ || Game_Flag_Query(kFlagLucyIsReplicant)
+ )
+ ) {
+ Item_Add_To_World(kItemTyrellSalesPamphlet, 972, 72, 129.01f, 147.12f, -162.98f, 0, 8, 8, false, true, false, true);
}
}
@@ -64,54 +69,69 @@ bool SceneScriptTB05::MouseClick(int x, int y) {
}
bool SceneScriptTB05::ClickedOn3DObject(const char *objectName, bool a2) {
- if (Object_Query_Click("MONITOR05", objectName) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 122.54f, 147.12f, -197.17f, 0, 1, false, 0)) {
- Actor_Face_Heading(kActorMcCoy, 38, false);
- if (!Actor_Clue_Query(kActorMcCoy, kClueDNAMarcus) && !Game_Flag_Query(99)) {
- Actor_Clue_Acquire(kActorMcCoy, kClueAttemptedFileAccess, 1, -1);
- Actor_Voice_Over(2170, kActorVoiceOver);
- Actor_Voice_Over(2180, kActorVoiceOver);
- Actor_Voice_Over(2190, kActorVoiceOver);
- Actor_Voice_Over(2200, kActorVoiceOver);
- Game_Flag_Set(99);
- return true;
- }
- if (Game_Flag_Query(99) && !Game_Flag_Query(100) && !Actor_Clue_Query(kActorMcCoy, kClueDNAMarcus)) {
- if (Actor_Clue_Query(kActorMcCoy, kClueDogCollar1) || Actor_Clue_Query(kActorMcCoy, kClueDogCollar2)) {
- Actor_Clue_Acquire(kActorMcCoy, kClueDNAMarcus, 1, -1);
- Actor_Voice_Over(2230, kActorVoiceOver);
- Item_Pickup_Spin_Effect(941, 352, 333);
- Actor_Voice_Over(2240, kActorVoiceOver);
- Actor_Voice_Over(2250, kActorVoiceOver);
- Actor_Voice_Over(2260, kActorVoiceOver);
- Game_Flag_Set(100);
- Game_Flag_Set(101);
- } else {
- Actor_Voice_Over(2270, kActorVoiceOver);
- Game_Flag_Set(100);
+ if (Object_Query_Click("MONITOR05", objectName)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 122.54f, 147.12f, -197.17f, 0, true, false, 0)) {
+ Actor_Face_Heading(kActorMcCoy, 38, false);
+
+ if (!Actor_Clue_Query(kActorMcCoy, kClueDNAMarcus)
+ && !Game_Flag_Query(kFlagTB05MonitorIntro)) {
+ Actor_Clue_Acquire(kActorMcCoy, kClueAttemptedFileAccess, true, -1);
+ Actor_Voice_Over(2170, kActorVoiceOver);
+ Actor_Voice_Over(2180, kActorVoiceOver);
+ Actor_Voice_Over(2190, kActorVoiceOver);
+ Actor_Voice_Over(2200, kActorVoiceOver);
+ Game_Flag_Set(kFlagTB05MonitorIntro);
+ return true;
}
- return true;
- }
- if (Game_Flag_Query(100) && !Game_Flag_Query(101)) {
- if (Actor_Clue_Query(kActorMcCoy, kClueDogCollar1) || Actor_Clue_Query(kActorMcCoy, kClueDogCollar2)) {
- Actor_Clue_Acquire(kActorMcCoy, kClueDNAMarcus, 1, -1);
- Actor_Voice_Over(2230, kActorVoiceOver);
- Item_Pickup_Spin_Effect(941, 352, 333);
- Actor_Voice_Over(2240, kActorVoiceOver);
- Actor_Voice_Over(2250, kActorVoiceOver);
- Actor_Voice_Over(2260, kActorVoiceOver);
- Game_Flag_Set(101);
- } else {
- Actor_Voice_Over(2280, kActorVoiceOver);
- Actor_Voice_Over(2290, kActorVoiceOver);
- Game_Flag_Set(101);
+
+ if ( Game_Flag_Query(kFlagTB05MonitorIntro)
+ && !Game_Flag_Query(kFlagTB05MonitorUnlockAttempt)
+ && !Actor_Clue_Query(kActorMcCoy, kClueDNAMarcus)
+ ) {
+ if (Actor_Clue_Query(kActorMcCoy, kClueDogCollar1)
+ || Actor_Clue_Query(kActorMcCoy, kClueDogCollar2)
+ ) {
+ Actor_Clue_Acquire(kActorMcCoy, kClueDNAMarcus, true, -1);
+ Actor_Voice_Over(2230, kActorVoiceOver);
+ Item_Pickup_Spin_Effect(941, 352, 333);
+ Actor_Voice_Over(2240, kActorVoiceOver);
+ Actor_Voice_Over(2250, kActorVoiceOver);
+ Actor_Voice_Over(2260, kActorVoiceOver);
+ Game_Flag_Set(kFlagTB05MonitorUnlockAttempt);
+ Game_Flag_Set(kFlagTB05MonitorDone);
+ } else {
+ Actor_Voice_Over(2270, kActorVoiceOver);
+ Game_Flag_Set(kFlagTB05MonitorUnlockAttempt);
+ }
+ return true;
+ }
+
+ if ( Game_Flag_Query(kFlagTB05MonitorUnlockAttempt)
+ && !Game_Flag_Query(kFlagTB05MonitorDone)
+ ) {
+ if (Actor_Clue_Query(kActorMcCoy, kClueDogCollar1)
+ || Actor_Clue_Query(kActorMcCoy, kClueDogCollar2)
+ ) {
+ Actor_Clue_Acquire(kActorMcCoy, kClueDNAMarcus, true, -1);
+ Actor_Voice_Over(2230, kActorVoiceOver);
+ Item_Pickup_Spin_Effect(941, 352, 333);
+ Actor_Voice_Over(2240, kActorVoiceOver);
+ Actor_Voice_Over(2250, kActorVoiceOver);
+ Actor_Voice_Over(2260, kActorVoiceOver);
+ Game_Flag_Set(kFlagTB05MonitorDone);
+ } else {
+ Actor_Voice_Over(2280, kActorVoiceOver);
+ Actor_Voice_Over(2290, kActorVoiceOver);
+ Game_Flag_Set(kFlagTB05MonitorDone);
+ }
+ return true;
+ }
+
+ if (Game_Flag_Query(kFlagTB05MonitorDone)) {
+ Actor_Voice_Over(3700, kActorVoiceOver);
+ return true;
}
- return true;
- }
- if (Game_Flag_Query(101)) {
- Actor_Voice_Over(3700, kActorVoiceOver);
- return true;
}
- return false;
}
return false;
}
@@ -121,27 +141,32 @@ bool SceneScriptTB05::ClickedOnActor(int actorId) {
}
bool SceneScriptTB05::ClickedOnItem(int itemId, bool a2) {
- if (itemId == 76 && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 54.0f, 147.12f, -209.0f, 0, 1, false, 0)) {
- Actor_Face_Heading(kActorMcCoy, 126, false);
- Item_Remove_From_World(76);
- Item_Pickup_Spin_Effect(940, 295, 408);
- Actor_Voice_Over(2140, kActorVoiceOver);
- Actor_Voice_Over(2150, kActorVoiceOver);
- Actor_Voice_Over(2160, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueDragonflyEarring, 1, -1);
- return true;
+ if (itemId == kItemDragonflyEarring) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 54.0f, 147.12f, -209.0f, 0, true, false, 0)) {
+ Actor_Face_Heading(kActorMcCoy, 126, false);
+ Item_Remove_From_World(kItemDragonflyEarring);
+ Item_Pickup_Spin_Effect(940, 295, 408);
+ Actor_Voice_Over(2140, kActorVoiceOver);
+ Actor_Voice_Over(2150, kActorVoiceOver);
+ Actor_Voice_Over(2160, kActorVoiceOver);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDragonflyEarring, true, -1);
+ return true;
+ }
}
- if (itemId == 119 && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 107.89f, 147.12f, -156.26f, 0, 1, false, 0)) {
- Actor_Face_Heading(kActorMcCoy, 126, false);
- Item_Remove_From_World(119);
- Item_Pickup_Spin_Effect(972, 449, 431);
- Actor_Voice_Over(4280, kActorVoiceOver);
- if (Game_Flag_Query(kFlagGordoIsReplicant)) {
- Actor_Voice_Over(4290, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueTyrellSalesPamphlet1, 1, -1);
- } else {
- Actor_Voice_Over(4300, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueTyrellSalesPamphlet2, 1, -1);
+
+ if (itemId == kItemTyrellSalesPamphlet) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 107.89f, 147.12f, -156.26f, 0, true, false, 0)) {
+ Actor_Face_Heading(kActorMcCoy, 126, false);
+ Item_Remove_From_World(kItemTyrellSalesPamphlet);
+ Item_Pickup_Spin_Effect(972, 449, 431);
+ Actor_Voice_Over(4280, kActorVoiceOver);
+ if (Game_Flag_Query(kFlagGordoIsReplicant)) {
+ Actor_Voice_Over(4290, kActorVoiceOver);
+ Actor_Clue_Acquire(kActorMcCoy, kClueTyrellSalesPamphlet1, true, -1);
+ } else {
+ Actor_Voice_Over(4300, kActorVoiceOver);
+ Actor_Clue_Acquire(kActorMcCoy, kClueTyrellSalesPamphlet2, true, -1);
+ }
}
}
return false;
@@ -149,7 +174,7 @@ bool SceneScriptTB05::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptTB05::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.0f, 151.53f, -205.0f, 12, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.0f, 151.53f, -205.0f, 12, true, false, 0)) {
Game_Flag_Set(kFlagTB05toTB06);
Set_Enter(kSetTB06, kSceneTB06);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 2, 1);
@@ -157,7 +182,7 @@ bool SceneScriptTB05::ClickedOnExit(int exitId) {
return true;
}
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 14.0f, 147.12f, 123.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 14.0f, 147.12f, 123.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagTB05toTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
}
diff --git a/engines/bladerunner/script/scene/tb06.cpp b/engines/bladerunner/script/scene/tb06.cpp
index acd539b381..1c71196af4 100644
--- a/engines/bladerunner/script/scene/tb06.cpp
+++ b/engines/bladerunner/script/scene/tb06.cpp
@@ -30,17 +30,15 @@ void SceneScriptTB06::InitializeScene() {
Ambient_Sounds_Add_Looping_Sound(236, 50, 0, 1);
Ambient_Sounds_Add_Looping_Sound(237, 50, 0, 1);
Ambient_Sounds_Add_Looping_Sound(285, 66, 0, 1);
- if (Game_Flag_Query(103)) {
- Scene_Loop_Set_Default(0);
- //return false;
- return;
- } else {
+ if (!Game_Flag_Query(kFlagNotUsed103)) {
Actor_Put_In_Set(kActorMarcus, kSetTB06);
Actor_Set_At_XYZ(kActorMarcus, 135.0f, 151.0f, -671.0f, 800);
Actor_Retired_Here(kActorMarcus, 60, 32, 1, -1);
//return true;
return;
}
+ Scene_Loop_Set_Default(0);
+ //return false;
}
void SceneScriptTB06::SceneLoaded() {
@@ -48,16 +46,21 @@ void SceneScriptTB06::SceneLoaded() {
Unobstacle_Object("GLASS01", true);
Clickable_Object("DOOR");
Unclickable_Object("SMUDGE_GLASS01");
- if (!Game_Flag_Query(519) && Actor_Query_Goal_Number(kActorPhotographer) != 199) {
- Item_Add_To_World(84, 942, 73, 36.54f, 149.48f, -565.67f, 0, 6, 6, false, true, false, true);
+
+ if (!Game_Flag_Query(kFlagTB06DogCollarTaken)
+ && Actor_Query_Goal_Number(kActorPhotographer) != 199
+ ) {
+ Item_Add_To_World(kItemDogCollar, 942, 73, 36.54f, 149.48f, -565.67f, 0, 6, 6, false, true, false, true);
}
- if (!Game_Flag_Query(520)) {
- Item_Add_To_World(108, 955, 73, 18.0f, 149.65f, -599.0f, 0, 6, 6, false, true, false, true);
+
+ if (!Game_Flag_Query(kFlagTB06KitchenBoxTaken)) {
+ Item_Add_To_World(kItemKitchenBox, 955, 73, 18.0f, 149.65f, -599.0f, 0, 6, 6, false, true, false, true);
}
+
if (Actor_Query_Goal_Number(kActorPhotographer) != 199) {
- Item_Add_To_World(103, 978, 73, -46.82f, 149.6f, -666.88f, 0, 12, 12, false, true, false, true);
- Item_Add_To_World(104, 979, 73, -30.27f, 149.6f, -610.7f, 0, 15, 45, false, true, false, true);
- Item_Add_To_World(105, 980, 73, 9.87f, 149.6f, -683.5f, 0, 12, 12, false, true, false, true);
+ Item_Add_To_World(kItemDeadDogA, 978, 73, -46.82f, 149.6f, -666.88f, 0, 12, 12, false, true, false, true);
+ Item_Add_To_World(kItemDeadDogB, 979, 73, -30.27f, 149.6f, -610.7f, 0, 15, 45, false, true, false, true);
+ Item_Add_To_World(kItemDeadDogC, 980, 73, 9.87f, 149.6f, -683.5f, 0, 12, 12, false, true, false, true);
}
}
@@ -70,66 +73,80 @@ bool SceneScriptTB06::ClickedOn3DObject(const char *objectName, bool a2) {
}
bool SceneScriptTB06::ClickedOnActor(int actorId) {
- if (actorId == 21 && !Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorMarcus, 24, 1, false)) {
- if (Actor_Clue_Query(kActorMcCoy, kClueDetonatorWire)) {
+ if (actorId == kActorMarcus) {
+ if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorMarcus, 24, true, false)) {
+ if (!Actor_Clue_Query(kActorMcCoy, kClueDetonatorWire)) {
+ Actor_Voice_Over(2300, kActorVoiceOver);
+ Actor_Voice_Over(2310, kActorVoiceOver);
+ Item_Pickup_Spin_Effect(974, 66, 397);
+ Actor_Voice_Over(2320, kActorVoiceOver);
+ if (Game_Flag_Query(kFlagSadikIsReplicant)) {
+ Actor_Voice_Over(2330, kActorVoiceOver);
+ Actor_Voice_Over(2340, kActorVoiceOver);
+ }
+ Actor_Voice_Over(2350, kActorVoiceOver);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDetonatorWire, true, -1);
+ return true;
+ }
Actor_Says(kActorMcCoy, 8665, 13);
return false;
}
- Actor_Voice_Over(2300, kActorVoiceOver);
- Actor_Voice_Over(2310, kActorVoiceOver);
- Item_Pickup_Spin_Effect(974, 66, 397);
- Actor_Voice_Over(2320, kActorVoiceOver);
- if (Game_Flag_Query(kFlagSadikIsReplicant)) {
- Actor_Voice_Over(2330, kActorVoiceOver);
- Actor_Voice_Over(2340, kActorVoiceOver);
- }
- Actor_Voice_Over(2350, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueDetonatorWire, 1, -1);
- return true;
}
return false;
}
bool SceneScriptTB06::ClickedOnItem(int itemId, bool a2) {
- if (itemId == 84 && !Loop_Actor_Walk_To_Item(kActorMcCoy, 84, 12, 1, false)) {
- Actor_Face_Item(kActorMcCoy, 84, true);
- Actor_Clue_Acquire(kActorMcCoy, kClueDogCollar1, 1, -1);
- Item_Pickup_Spin_Effect(942, 341, 368);
- Item_Remove_From_World(84);
- Actor_Voice_Over(4160, kActorVoiceOver);
- Game_Flag_Set(519);
- return true;
+ if (itemId == kItemDogCollar) {
+ if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemDogCollar, 12, true, false)) {
+ Actor_Face_Item(kActorMcCoy, kItemDogCollar, true);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDogCollar1, true, -1);
+ Item_Pickup_Spin_Effect(942, 341, 368);
+ Item_Remove_From_World(kItemDogCollar);
+ Actor_Voice_Over(4160, kActorVoiceOver);
+ Game_Flag_Set(kFlagTB06DogCollarTaken);
+ return true;
+ }
}
- if (itemId == 108 && !Loop_Actor_Walk_To_Item(kActorMcCoy, 108, 12, 1, false)) {
- Actor_Face_Item(kActorMcCoy, 108, true);
- Actor_Clue_Acquire(kActorMcCoy, kClueKingstonKitchenBox1, 1, -1);
- Item_Remove_From_World(108);
- Item_Pickup_Spin_Effect(955, 390, 368);
- Actor_Says(kActorMcCoy, 8775, 3);
- Game_Flag_Set(520);
- return true;
+ if (itemId == kItemKitchenBox) {
+ if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemKitchenBox, 12, true, false)) {
+ Actor_Face_Item(kActorMcCoy, kItemKitchenBox, true);
+ Actor_Clue_Acquire(kActorMcCoy, kClueKingstonKitchenBox1, true, -1);
+ Item_Remove_From_World(kItemKitchenBox);
+ Item_Pickup_Spin_Effect(955, 390, 368);
+ Actor_Says(kActorMcCoy, 8775, kAnimationModeTalk);
+ Game_Flag_Set(kFlagTB06KitchenBoxTaken);
+ return true;
+ }
}
- if (itemId == 82 && !Loop_Actor_Walk_To_Item(kActorMcCoy, 82, 12, 1, false)) {
- Actor_Face_Item(kActorMcCoy, 82, true);
- Actor_Says(kActorMcCoy, 5285, 3);
- return true;
+ if (itemId == kItemChopstickWrapper) { // this item is not here, it is in RC51
+ if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemChopstickWrapper, 12, true, false)) {
+ Actor_Face_Item(kActorMcCoy, kItemChopstickWrapper, true);
+ Actor_Says(kActorMcCoy, 5285, kAnimationModeTalk);
+ return true;
+ }
}
- if ((itemId == 103 || itemId == 104 || itemId == 105) && !Loop_Actor_Walk_To_Item(kActorMcCoy, 103, 24, 1, false)) {
- Actor_Face_Item(kActorMcCoy, 103, true);
- Actor_Voice_Over(2380, kActorVoiceOver);
- Actor_Voice_Over(2390, kActorVoiceOver);
- Actor_Voice_Over(2400, kActorVoiceOver);
- return true;
+
+ if (itemId == kItemDeadDogA
+ || itemId == kItemDeadDogB
+ || itemId == kItemDeadDogC
+ ) {
+ if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemDeadDogA, 24, true, false)) {
+ Actor_Face_Item(kActorMcCoy, kItemDeadDogA, true);
+ Actor_Voice_Over(2380, kActorVoiceOver);
+ Actor_Voice_Over(2390, kActorVoiceOver);
+ Actor_Voice_Over(2400, kActorVoiceOver);
+ return true;
+ }
}
return false;
}
bool SceneScriptTB06::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -16.0f, 149.0f, -427.0f, 12, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -16.0f, 149.0f, -427.0f, 12, true, false, 0)) {
Game_Flag_Set(kFlagTB06toTB05);
Set_Enter(kSetTB05, kSceneTB05);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 2, 1);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 2, true);
}
return true;
}
@@ -154,26 +171,28 @@ void SceneScriptTB06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptTB06::PlayerWalkedIn() {
- if (!Game_Flag_Query(102) && !Game_Flag_Query(483)) {
+ if (!Game_Flag_Query(kFlagTB06Visited)
+ && !Game_Flag_Query(kFlagTB06Introduction)
+ ) {
Actor_Face_Actor(kActorMcCoy, kActorMarcus, true);
- Actor_Says(kActorMcCoy, 5290, 3);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.0f, 149.0f, -631.0f, 0, 0, false, 0);
+ Actor_Says(kActorMcCoy, 5290, kAnimationModeTalk);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.0f, 149.0f, -631.0f, 0, false, false, 0);
AI_Movement_Track_Pause(kActorPhotographer);
Actor_Face_Actor(kActorMcCoy, kActorPhotographer, true);
Actor_Face_Actor(kActorPhotographer, kActorMcCoy, true);
- Actor_Says(kActorPhotographer, 0, 3);
- Actor_Says(kActorMcCoy, 5295, 3);
+ Actor_Says(kActorPhotographer, 0, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 5295, kAnimationModeTalk);
Actor_Face_Actor(kActorPhotographer, kActorMarcus, true);
- Actor_Says(kActorPhotographer, 10, 3);
+ Actor_Says(kActorPhotographer, 10, kAnimationModeTalk);
AI_Movement_Track_Unpause(kActorPhotographer);
- Game_Flag_Set(483);
+ Game_Flag_Set(kFlagTB06Introduction);
//return true;
return;
}
- if (Game_Flag_Query(103)) {
- Item_Remove_From_World(84);
- Item_Remove_From_World(82);
- Item_Remove_From_World(98);
+ if (Game_Flag_Query(kFlagNotUsed103)) {
+ Item_Remove_From_World(kItemDogCollar);
+ Item_Remove_From_World(kItemChopstickWrapper);
+ Item_Remove_From_World(kItemToyDog); // why? some unused branch
//return true;
return;
}
@@ -182,7 +201,7 @@ void SceneScriptTB06::PlayerWalkedIn() {
}
void SceneScriptTB06::PlayerWalkedOut() {
- Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
+ Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
}
diff --git a/engines/bladerunner/script/scene/tb07.cpp b/engines/bladerunner/script/scene/tb07.cpp
index e09b41277f..ee8e8fc2bb 100644
--- a/engines/bladerunner/script/scene/tb07.cpp
+++ b/engines/bladerunner/script/scene/tb07.cpp
@@ -69,7 +69,7 @@ bool SceneScriptTB07::ClickedOnItem(int itemId, bool a2) {
Actor_Face_Item(kActorMcCoy, itemId, true);
if (itemId == 83) {
Item_Pickup_Spin_Effect(941, 331, 296);
- Actor_Clue_Acquire(kActorMcCoy, kClueDNATyrell, 0, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDNATyrell, false, -1);
}
Item_Remove_From_World(itemId);
}
@@ -92,7 +92,7 @@ bool SceneScriptTB07::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagMcCoyAtBBxx);
Game_Flag_Reset(kFlagMcCoyAtHFxx);
Game_Flag_Reset(kFlagMcCoyAtTBxx);
- Game_Flag_Reset(450);
+ Game_Flag_Reset(kFlagTB02ElevatorToTB05);
switch (Spinner_Interface_Choose_Dest(-1, false)) {
case kSpinnerDestinationPoliceStation:
Game_Flag_Set(kFlagMcCoyAtPSxx);
@@ -282,8 +282,8 @@ void SceneScriptTB07::sub_401B0C() {
Actor_Says_With_Pause(kActorMcCoy, 5450, 1.0f, 15);
Actor_Says(kActorMcCoy, 5455, 12);
Actor_Says(kActorTyrell, 100, 14);
- Actor_Clue_Acquire(kActorMcCoy, kClueRachaelInterview, 0, kActorRachael);
- Actor_Clue_Acquire(kActorMcCoy, kClueTyrellInterview, 0, kActorTyrell);
+ Actor_Clue_Acquire(kActorMcCoy, kClueRachaelInterview, false, kActorRachael);
+ Actor_Clue_Acquire(kActorMcCoy, kClueTyrellInterview, false, kActorTyrell);
Loop_Actor_Walk_To_XYZ(kActorTyrell, -260.15f, 12.0f, -19.16f, 0, 0, false, 0);
}
diff --git a/engines/bladerunner/script/scene/ug02.cpp b/engines/bladerunner/script/scene/ug02.cpp
index 600279170f..b196e7c997 100644
--- a/engines/bladerunner/script/scene/ug02.cpp
+++ b/engines/bladerunner/script/scene/ug02.cpp
@@ -97,7 +97,7 @@ bool SceneScriptUG02::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Voice_Over(2450, kActorVoiceOver);
Actor_Voice_Over(2460, kActorVoiceOver);
Game_Flag_Set(449);
- Actor_Clue_Acquire(kActorMcCoy, kClueWeaponsCache, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueWeaponsCache, true, -1);
return true;
}
if (Global_Variable_Query(kVariableChapter) <= 3) {
@@ -109,7 +109,7 @@ bool SceneScriptUG02::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Voice_Over(2480, kActorVoiceOver);
Actor_Voice_Over(2490, kActorVoiceOver);
Actor_Voice_Over(2500, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueIzosStashRaided, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueIzosStashRaided, true, -1);
} else if (!Actor_Clue_Query(kActorMcCoy, kClueWeaponsCache)) {
Actor_Voice_Over(2510, kActorVoiceOver);
Actor_Voice_Over(2520, kActorVoiceOver);
@@ -134,7 +134,7 @@ bool SceneScriptUG02::ClickedOnActor(int actorId) {
bool SceneScriptUG02::ClickedOnItem(int itemId, bool a2) {
if (itemId == 88) {
Actor_Face_Item(kActorMcCoy, 88, true);
- Actor_Clue_Acquire(kActorMcCoy, kClueRadiationGoggles, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueRadiationGoggles, true, -1);
Game_Flag_Set(656);
Item_Remove_From_World(88);
Item_Pickup_Spin_Effect(963, 426, 316);
@@ -150,7 +150,7 @@ bool SceneScriptUG02::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -202.0f, 120.16f, -74.0f, 0, 1, v2, 0)) {
Actor_Face_Heading(kActorMcCoy, 270, false);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 0, kAnimationModeIdle);
Footstep_Sound_Override_Off();
int v3 = Player_Query_Combat_Mode();
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -96.57f, 74.87f, -271.28f, 0, 0, v3, 0);
@@ -175,7 +175,7 @@ bool SceneScriptUG02::ClickedOnExit(int exitId) {
Loop_Actor_Travel_Ladder(kActorMcCoy, 9, 1, 0);
Game_Flag_Set(kFlagUG02toHC03);
Game_Flag_Reset(kFlagMcCoyAtUGxx);
- Game_Flag_Set(479);
+ Game_Flag_Set(kFlagMcCoyAtHCxx);
if (!Game_Flag_Query(403)) {
Game_Flag_Set(388);
Game_Flag_Set(403);
@@ -204,7 +204,7 @@ void SceneScriptUG02::PlayerWalkedIn() {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -148.0f, 84.13f, -67.0f, 0, 0, false, 0);
Actor_Face_Heading(kActorMcCoy, 761, false);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 4, true, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 4, true, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Game_Flag_Reset(kFlagUG01toUG02);
Game_Flag_Set(498);
@@ -237,7 +237,7 @@ bool SceneScriptUG02::sub_402354() {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -365.0f, 155.65f, -19.0f, 0, 0, v0, 0);
Actor_Face_Heading(kActorMcCoy, 318, false);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 0, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Game_Flag_Set(498);
return false;
@@ -245,7 +245,7 @@ bool SceneScriptUG02::sub_402354() {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -312.75f, 120.16f, 1.01f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 830, false);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 1, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Game_Flag_Reset(498);
return false;
diff --git a/engines/bladerunner/script/scene/ug03.cpp b/engines/bladerunner/script/scene/ug03.cpp
index 01d6848ba5..81e9b967e8 100644
--- a/engines/bladerunner/script/scene/ug03.cpp
+++ b/engines/bladerunner/script/scene/ug03.cpp
@@ -83,7 +83,7 @@ bool SceneScriptUG03::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Voice_Over(2570, kActorVoiceOver);
Actor_Voice_Over(2580, kActorVoiceOver);
Actor_Voice_Over(2590, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueScaryChair, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueScaryChair, true, -1);
}
}
return false;
diff --git a/engines/bladerunner/script/scene/ug05.cpp b/engines/bladerunner/script/scene/ug05.cpp
index 73101f29bb..da1cb2fd90 100644
--- a/engines/bladerunner/script/scene/ug05.cpp
+++ b/engines/bladerunner/script/scene/ug05.cpp
@@ -119,7 +119,7 @@ bool SceneScriptUG05::ClickedOnExit(int exitId) {
Set_Enter(kSetHF07, kSceneHF07);
} else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -156.72f, 3.03f, -1118.17f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 760, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 1, kAnimationModeIdle);
Game_Flag_Set(361);
Set_Enter(kSetHF07, kSceneHF07);
}
@@ -204,7 +204,7 @@ void SceneScriptUG05::PlayerWalkedIn() {
if (Game_Flag_Query(663) && !Game_Flag_Query(368)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -288.35f, 132.77f, -1092.36f, 0, 1, false, 0);
} else {
- Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 0, kAnimationModeIdle);
}
}
if (Game_Flag_Query(663)) {
diff --git a/engines/bladerunner/script/scene/ug06.cpp b/engines/bladerunner/script/scene/ug06.cpp
index 1f0124d6ad..e13e720ead 100644
--- a/engines/bladerunner/script/scene/ug06.cpp
+++ b/engines/bladerunner/script/scene/ug06.cpp
@@ -102,7 +102,7 @@ bool SceneScriptUG06::ClickedOnExit(int exitId) {
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 66.0f, 0.0f, -90.0f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 0, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 17, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 17, 1, kAnimationModeIdle);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 66.0f, 153.0f, -446.0f, 0, 0, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
@@ -130,7 +130,7 @@ void SceneScriptUG06::PlayerWalkedIn() {
Game_Flag_Reset(340);
}
if (Game_Flag_Query(343)) {
- Loop_Actor_Travel_Stairs(kActorMcCoy, 17, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 17, 0, kAnimationModeIdle);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 66.0f, 0.0f, -36.91f, 0, 0, false, 0);
Game_Flag_Reset(343);
}
diff --git a/engines/bladerunner/script/scene/ug08.cpp b/engines/bladerunner/script/scene/ug08.cpp
index 9b4306e980..2c5cc613cf 100644
--- a/engines/bladerunner/script/scene/ug08.cpp
+++ b/engines/bladerunner/script/scene/ug08.cpp
@@ -95,7 +95,7 @@ bool SceneScriptUG08::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -312.0f, -2.0f, 152.0f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 240, false);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 1, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -118.02f, 93.02f, 52.76f, 0, 0, false, 0);
Player_Loses_Control();
@@ -128,7 +128,7 @@ void SceneScriptUG08::PlayerWalkedIn() {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -180.0f, 93.18f, 134.0f, 0, 0, false, 0);
Actor_Face_Heading(kActorMcCoy, 745, false);
Footstep_Sound_Override_On(2);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 0, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Player_Gains_Control();
}
diff --git a/engines/bladerunner/script/scene/ug10.cpp b/engines/bladerunner/script/scene/ug10.cpp
index 98629b194f..e95f57b237 100644
--- a/engines/bladerunner/script/scene/ug10.cpp
+++ b/engines/bladerunner/script/scene/ug10.cpp
@@ -114,7 +114,7 @@ bool SceneScriptUG10::ClickedOnExit(int exitId) {
if ((!Game_Flag_Query(474) && x < 120.0f) || Game_Flag_Query(474)) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1.83f, 1.15f, -410.8f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 0, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 9, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 9, 1, kAnimationModeIdle);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -92.0f, 81.83f, -652.0f, 0, 0, false, 0);
Game_Flag_Set(337);
Set_Enter(kSetUG03, kSceneUG03);
@@ -214,7 +214,7 @@ void SceneScriptUG10::PlayerWalkedIn() {
Game_Flag_Reset(336);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1.83f, 81.33f, -518.8f, 0, 0, false, 0);
Actor_Face_Heading(kActorMcCoy, 506, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 9, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 9, 0, kAnimationModeIdle);
}
if (Game_Flag_Query(474)) {
Unobstacle_Object("BOX01 BRIDGE", true);
diff --git a/engines/bladerunner/script/scene/ug13.cpp b/engines/bladerunner/script/scene/ug13.cpp
index 9520fbace5..a0acf7fe82 100644
--- a/engines/bladerunner/script/scene/ug13.cpp
+++ b/engines/bladerunner/script/scene/ug13.cpp
@@ -72,8 +72,14 @@ void SceneScriptUG13::SceneLoaded() {
Clickable_Object("BASKET");
Clickable_Object("BOLLARD");
Unclickable_Object("BASKET");
- if (Global_Variable_Query(kVariableChapter) >= 3 && !Actor_Clue_Query(kActorMcCoy, kClueOriginalRequisitionForm) && Game_Flag_Query(kFlagMcCoyKilledHomeless) && (Actor_Clue_Query(kActorMcCoy, kClueShippingForm) || Actor_Clue_Query(kActorMcCoy, kClueWeaponsOrderForm))) {
- Item_Add_To_World(111, 958, 85, -209.01f, 70.76f, -351.79f, 0, 16, 12, false, true, false, true);
+ if ( Global_Variable_Query(kVariableChapter) >= 3
+ && !Actor_Clue_Query(kActorMcCoy, kClueOriginalRequisitionForm)
+ && Game_Flag_Query(kFlagMcCoyKilledHomeless)
+ && (Actor_Clue_Query(kActorMcCoy, kClueShippingForm)
+ || Actor_Clue_Query(kActorMcCoy, kClueWeaponsOrderForm)
+ )
+ ) {
+ Item_Add_To_World(kItemWeaponsOrderForm, 958, 85, -209.01f, 70.76f, -351.79f, 0, 16, 12, false, true, false, true);
}
}
@@ -103,40 +109,46 @@ bool SceneScriptUG13::ClickedOn3DObject(const char *objectName, bool a2) {
}
bool SceneScriptUG13::ClickedOnActor(int actorId) {
- if (actorId == 12 && Global_Variable_Query(kVariableChapter) == 4 && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, -248.0f, 44.0f, -390.0f, 12, 1, false, 0)) {
- Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
- if (Actor_Query_Goal_Number(kActorTransient) != 6 && Actor_Query_Goal_Number(kActorTransient) != 599) {
- if (!Game_Flag_Query(554)) {
- sub_40223C();
- } else if (!Actor_Clue_Query(kActorMcCoy, kClueHomelessManInterview1) || !Actor_Clue_Query(kActorMcCoy, kClueHomelessManInterview2)) {
- sub_402AD4();
- } else {
- Actor_Set_Goal_Number(kActorTransient, 391);
- if (Actor_Clue_Query(kActorMcCoy, kClueFlaskOfAbsinthe)) {
+ if (actorId == 12
+ && Global_Variable_Query(kVariableChapter) == 4
+ ) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -248.0f, 44.0f, -390.0f, 12, true, false, 0)) {
+ Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
+ if (Actor_Query_Goal_Number(kActorTransient) != 6 && Actor_Query_Goal_Number(kActorTransient) != 599) {
+ if (!Game_Flag_Query(554)) {
+ sub_40223C();
+ } else if (!Actor_Clue_Query(kActorMcCoy, kClueHomelessManInterview1) || !Actor_Clue_Query(kActorMcCoy, kClueHomelessManInterview2)) {
sub_402AD4();
} else {
- Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
- Actor_Says(kActorMcCoy, 5600, 14);
- Actor_Says(kActorTransient, 100, 53);
- Actor_Says(kActorMcCoy, 5605, 18);
- Actor_Start_Speech_Sample(kActorTransient, 110);
- Actor_Set_Goal_Number(kActorTransient, 395);
+ Actor_Set_Goal_Number(kActorTransient, 391);
+ if (Actor_Clue_Query(kActorMcCoy, kClueFlaskOfAbsinthe)) {
+ sub_402AD4();
+ } else {
+ Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
+ Actor_Says(kActorMcCoy, 5600, 14);
+ Actor_Says(kActorTransient, 100, 53);
+ Actor_Says(kActorMcCoy, 5605, 18);
+ Actor_Start_Speech_Sample(kActorTransient, 110);
+ Actor_Set_Goal_Number(kActorTransient, 395);
+ }
}
+ } else if (Random_Query(0, 1) == 1) {
+ Actor_Says(kActorMcCoy, 8590, 16);
+ } else {
+ Actor_Says(kActorMcCoy, 8655, 15);
}
- } else if (Random_Query(0, 1) == 1) {
- Actor_Says(kActorMcCoy, 8590, 16);
- } else {
- Actor_Says(kActorMcCoy, 8655, 15);
}
}
return false;
}
bool SceneScriptUG13::ClickedOnItem(int itemId, bool a2) {
- if (itemId == 111 && !Loop_Actor_Walk_To_Item(kActorMcCoy, 111, 36, 1, false)) {
- Actor_Face_Item(kActorMcCoy, 111, true);
- Actor_Clue_Acquire(kActorMcCoy, kClueOriginalRequisitionForm, 1, -1);
- Item_Remove_From_World(111);
+ if ( itemId == kItemWeaponsOrderForm
+ && !Loop_Actor_Walk_To_Item(kActorMcCoy, kItemWeaponsOrderForm, 36, true, false)
+ ) {
+ Actor_Face_Item(kActorMcCoy, kItemWeaponsOrderForm, true);
+ Actor_Clue_Acquire(kActorMcCoy, kClueOriginalRequisitionForm, true, -1);
+ Item_Remove_From_World(kItemWeaponsOrderForm);
Item_Pickup_Spin_Effect(958, 426, 316);
Actor_Voice_Over(3950, kActorVoiceOver);
Actor_Voice_Over(3960, kActorVoiceOver);
@@ -172,7 +184,7 @@ bool SceneScriptUG13::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -267.0f, 44.0f, -795.0f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 830, false);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 1, kAnimationModeIdle);
Footstep_Sound_Override_Off();
if (!sub_402AD0()) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -477.0f, 141.9f, -870.0f, 0, 0, false, 0);
@@ -181,7 +193,7 @@ bool SceneScriptUG13::ClickedOnExit(int exitId) {
return true;
}
Actor_Face_Heading(kActorMcCoy, 325, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 0, kAnimationModeIdle);
} else {
return true;
}
@@ -223,7 +235,7 @@ void SceneScriptUG13::PlayerWalkedIn() {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -389.0f, 143.0f, -844.0f, 0, 0, false, 0);
Actor_Face_Heading(kActorMcCoy, 325, false);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 0, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Game_Flag_Reset(435);
} else if (Game_Flag_Query(350)) {
@@ -277,7 +289,7 @@ void SceneScriptUG13::sub_40223C() {
void SceneScriptUG13::sub_4023D8() {
Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
- Actor_Clue_Acquire(kActorMcCoy, kClueHomelessManInterview1, 0, kActorTransient);
+ Actor_Clue_Acquire(kActorMcCoy, kClueHomelessManInterview1, false, kActorTransient);
Actor_Modify_Friendliness_To_Other(kActorTransient, kActorMcCoy, -5);
Actor_Says(kActorMcCoy, 5575, 16);
Actor_Says(kActorTransient, 120, 31);
@@ -296,7 +308,7 @@ void SceneScriptUG13::sub_4023D8() {
}
void SceneScriptUG13::sub_4025E0() {
- Actor_Clue_Acquire(kActorMcCoy, kClueHomelessManInterview2, 0, kActorTransient);
+ Actor_Clue_Acquire(kActorMcCoy, kClueHomelessManInterview2, false, kActorTransient);
Actor_Modify_Friendliness_To_Other(kActorTransient, kActorMcCoy, -10);
Actor_Says(kActorTransient, 220, 30);
Actor_Says(kActorMcCoy, 5640, 19);
@@ -317,7 +329,7 @@ void SceneScriptUG13::sub_402960() {
Actor_Says(kActorTransient, 360, 33);
Actor_Voice_Over(2710, kActorVoiceOver);
Actor_Voice_Over(2730, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueHomelessManKid, 0, kActorTransient);
+ Actor_Clue_Acquire(kActorMcCoy, kClueHomelessManKid, false, kActorTransient);
}
int SceneScriptUG13::sub_402AD0() {
@@ -342,7 +354,7 @@ void SceneScriptUG13::sub_402AD4() {
case 1360:
return;
case 1350:
- Actor_Clue_Acquire(kActorTransient, kClueFlaskOfAbsinthe, 0, kActorMcCoy);
+ Actor_Clue_Acquire(kActorTransient, kClueFlaskOfAbsinthe, false, kActorMcCoy);
Actor_Says_With_Pause(kActorMcCoy, 5595, 1.0f, 23);
Item_Pickup_Spin_Effect(945, 193, 325);
Actor_Says(kActorTransient, 290, 33);
diff --git a/engines/bladerunner/script/scene/ug14.cpp b/engines/bladerunner/script/scene/ug14.cpp
index 3fe534089d..0a391cac43 100644
--- a/engines/bladerunner/script/scene/ug14.cpp
+++ b/engines/bladerunner/script/scene/ug14.cpp
@@ -89,7 +89,7 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) {
}
Actor_Face_XYZ(kActorMcCoy, -14.53f, 12.12f, -150.16f, true);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 13, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 13, 0, kAnimationModeIdle);
Footstep_Sound_Override_Off();
}
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -278.0f, 12.97f, -152.0f, 0, 1, false, 0)) {
@@ -107,7 +107,7 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) {
}
Actor_Face_XYZ(kActorMcCoy, 141.47f, 128.92f, -150.16f, true);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 13, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 13, 1, kAnimationModeIdle);
Footstep_Sound_Override_Off();
}
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -50.0f, 129.0f, -814.0f, 0, 1, false, 0)) {
@@ -126,12 +126,12 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) {
}
Actor_Face_XYZ(kActorMcCoy, 141.47f, 128.92f, -150.16f, true);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 13, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 13, 1, kAnimationModeIdle);
Footstep_Sound_Override_Off();
}
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 157.0f, 128.92f, -108.01f, 0, 1, false, 0)) {
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 6, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 6, 1, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 233.0f, 186.04f, -32.0f, 0, 0, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
@@ -165,7 +165,7 @@ void SceneScriptUG14::PlayerWalkedIn() {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 157.0f, 186.04f, -44.01f, 0, 0, false, 0);
Actor_Face_Heading(kActorMcCoy, 10, false);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 6, 0, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 6, 0, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 157.0f, 128.92f, -148.01f, 0, 0, false, 0);
Actor_Face_Heading(kActorMcCoy, 807, false);
diff --git a/engines/bladerunner/script/scene/ug16.cpp b/engines/bladerunner/script/scene/ug16.cpp
index 8f9fc01e5b..38ce6e439a 100644
--- a/engines/bladerunner/script/scene/ug16.cpp
+++ b/engines/bladerunner/script/scene/ug16.cpp
@@ -89,7 +89,7 @@ bool SceneScriptUG16::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Voice_Over(2750, kActorVoiceOver);
Actor_Voice_Over(2760, kActorVoiceOver);
Actor_Voice_Over(2770, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueFolder, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueFolder, true, -1);
} else {
Actor_Says(kActorMcCoy, 8523, 12);
Actor_Says(kActorMcCoy, 8635, 12);
@@ -109,7 +109,7 @@ bool SceneScriptUG16::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Says(kActorMcCoy, 5725, 14);
Delay(1000);
Item_Pickup_Spin_Effect(941, 418, 305);
- Actor_Clue_Acquire(kActorMcCoy, kClueDNALutherLance, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDNALutherLance, true, -1);
return true;
}
return false;
@@ -149,7 +149,7 @@ bool SceneScriptUG16::ClickedOnExit(int exitId) {
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -316.78f, -34.88f, -533.27f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 0, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 13, 1, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 13, 1, kAnimationModeIdle);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(551);
@@ -289,7 +289,7 @@ void SceneScriptUG16::sub_401D78() {
Actor_Says(kActorMcCoy, 5810, 13);
Actor_Says(kActorLance, 220, 14);
Actor_Says(kActorLance, 230, 17);
- Actor_Clue_Acquire(kActorMcCoy, kClueLutherLanceInterview, 1, kActorLuther);
+ Actor_Clue_Acquire(kActorMcCoy, kClueLutherLanceInterview, true, kActorLuther);
break;
case 1430:
Actor_Says(kActorMcCoy, 5745, 13);
@@ -358,7 +358,7 @@ void SceneScriptUG16::sub_401D78() {
Actor_Says(kActorMcCoy, 5855, 13);
Actor_Says(kActorLuther, 410, 14);
Game_Flag_Set(597);
- Actor_Clue_Acquire(kActorMcCoy, kClueFolder, 1, kActorLuther);
+ Actor_Clue_Acquire(kActorMcCoy, kClueFolder, true, kActorLuther);
break;
case 1480:
Actor_Says(kActorMcCoy, 4595, 14);
diff --git a/engines/bladerunner/script/scene/ug18.cpp b/engines/bladerunner/script/scene/ug18.cpp
index 60d9210bd1..f438d9b030 100644
--- a/engines/bladerunner/script/scene/ug18.cpp
+++ b/engines/bladerunner/script/scene/ug18.cpp
@@ -102,7 +102,7 @@ bool SceneScriptUG18::ClickedOnItem(int itemId, bool a2) {
Item_Pickup_Spin_Effect(987, 368, 243);
Item_Remove_From_World(itemId);
Game_Flag_Set(703);
- Actor_Clue_Acquire(kActorMcCoy, kClueBriefcase, 1, kActorGuzza);
+ Actor_Clue_Acquire(kActorMcCoy, kClueBriefcase, true, kActorGuzza);
}
}
return false;
diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h
index 12c17cedb4..de9cd0dda5 100644
--- a/engines/bladerunner/script/scene_script.h
+++ b/engines/bladerunner/script/scene_script.h
@@ -364,7 +364,7 @@ DECLARE_SCRIPT(PS03)
END_SCRIPT
DECLARE_SCRIPT(PS04)
- void sub_4017E4();
+ void dialogueWithGuzza();
END_SCRIPT
DECLARE_SCRIPT(PS05)
@@ -420,15 +420,15 @@ DECLARE_SCRIPT(RC03)
END_SCRIPT
DECLARE_SCRIPT(RC04)
- void sub_401DF4();
+ void dialogueWithBulletBob();
END_SCRIPT
DECLARE_SCRIPT(RC51)
END_SCRIPT
DECLARE_SCRIPT(TB02)
- void sub_402644();
- void sub_402B50();
+ void dialogueWithTyrellGuard();
+ void dialogueWithSteele();
END_SCRIPT
DECLARE_SCRIPT(TB03)
diff --git a/engines/bladerunner/script/vk_script.cpp b/engines/bladerunner/script/vk_script.cpp
index eef5f5bdaf..2dc2c4b5d4 100644
--- a/engines/bladerunner/script/vk_script.cpp
+++ b/engines/bladerunner/script/vk_script.cpp
@@ -385,19 +385,19 @@ void VKScript::SCRIPT_VK_DLL_Shutdown(int actorId, int humanPercentage, int repl
VK_Play_Speech_Line(kActorAnsweringMachine, 430, 0.5f);
switch (actorId) {
case kActorRunciter:
- Actor_Clue_Acquire(kActorMcCoy, kClueVKRunciterReplicant, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueVKRunciterReplicant, true, -1);
break;
case kActorBulletBob:
- Actor_Clue_Acquire(kActorMcCoy, kClueVKBobGorskyReplicant, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueVKBobGorskyReplicant, true, -1);
break;
case kActorGrigorian:
- Actor_Clue_Acquire(kActorMcCoy, kClueVKGrigorianReplicant, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueVKGrigorianReplicant, true, -1);
break;
case kActorLucy:
- Actor_Clue_Acquire(kActorMcCoy, kClueVKLucyReplicant, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueVKLucyReplicant, true, -1);
break;
case kActorDektora:
- Actor_Clue_Acquire(kActorMcCoy, kClueVKDektoraReplicant, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueVKDektoraReplicant, true, -1);
break;
}
} else if (humanPercentage > 79) {
@@ -405,19 +405,19 @@ void VKScript::SCRIPT_VK_DLL_Shutdown(int actorId, int humanPercentage, int repl
VK_Play_Speech_Line(kActorAnsweringMachine, 440, 0.5f);
switch (actorId) {
case kActorRunciter:
- Actor_Clue_Acquire(kActorMcCoy, kClueVKRunciterHuman, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueVKRunciterHuman, true, -1);
break;
case kActorBulletBob:
- Actor_Clue_Acquire(kActorMcCoy, kClueVKBobGorskyHuman, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueVKBobGorskyHuman, true, -1);
break;
case kActorGrigorian:
- Actor_Clue_Acquire(kActorMcCoy, kClueVKGrigorianHuman, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueVKGrigorianHuman, true, -1);
break;
case kActorLucy:
- Actor_Clue_Acquire(kActorMcCoy, kClueVKLucyHuman, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueVKLucyHuman, true, -1);
break;
case kActorDektora:
- Actor_Clue_Acquire(kActorMcCoy, kClueVKDektoraHuman, 1, -1);
+ Actor_Clue_Acquire(kActorMcCoy, kClueVKDektoraHuman, true, -1);
break;
}
}