aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner
diff options
context:
space:
mode:
authorPeter Kohaut2019-02-02 15:10:46 +0100
committerPeter Kohaut2019-02-03 00:14:09 +0100
commitce3b7316568b10bcfc21b314b4d2658bc75e29d1 (patch)
treefad12a3d8edbe885568814bd059d3fcc4cbb2d6e /engines/bladerunner
parent1df1eefc3e9584516fec7d7b4f09f5216f84de00 (diff)
downloadscummvm-rg350-ce3b7316568b10bcfc21b314b4d2658bc75e29d1.tar.gz
scummvm-rg350-ce3b7316568b10bcfc21b314b4d2658bc75e29d1.tar.bz2
scummvm-rg350-ce3b7316568b10bcfc21b314b4d2658bc75e29d1.zip
BLADERUNNER: Cleanup Luther & Lance related scripts
Diffstat (limited to 'engines/bladerunner')
-rw-r--r--engines/bladerunner/game_constants.h55
-rw-r--r--engines/bladerunner/script/ai/clovis.cpp2
-rw-r--r--engines/bladerunner/script/ai/luther.cpp203
-rw-r--r--engines/bladerunner/script/ai/tyrell_guard.cpp40
-rw-r--r--engines/bladerunner/script/init_script.cpp2
-rw-r--r--engines/bladerunner/script/scene/dr06.cpp2
-rw-r--r--engines/bladerunner/script/scene/kp07.cpp2
-rw-r--r--engines/bladerunner/script/scene/ps14.cpp3
-rw-r--r--engines/bladerunner/script/scene/tb02.cpp24
-rw-r--r--engines/bladerunner/script/scene/tb03.cpp16
-rw-r--r--engines/bladerunner/script/scene/tb07.cpp4
-rw-r--r--engines/bladerunner/script/scene/ug06.cpp2
-rw-r--r--engines/bladerunner/script/scene/ug16.cpp107
13 files changed, 280 insertions, 182 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 70d0923bd4..b5d21e05a7 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -960,7 +960,10 @@ enum Flags {
kFlagUG16toDR06 = 551, // is never checked
kFlagDR06toUG16 = 552,
kFlagUG13Entered = 553,
+ kFlagUG16LutherLanceTalk1 = 556,
+ kFlagNotUsed557, // is never checked
kFlagDR01toCT11 = 558,
+ kFlagLutherLanceIsReplicant = 560,
kFlagNR02GordoLeaveLighter = 561,
kFlagHF05CrazyLegsTalk1 = 562,
kFlagHF05CrazyLegsTalk2 = 563,
@@ -968,6 +971,7 @@ enum Flags {
kFlagNotUsed565 = 565, // has no use
kFlagHF03toHF04 = 566, // is never checked
kFlagHF04toHF03 = 567,
+ kFlagUG16ComputerOff = 568,
kFlagNR04EarlyQWalkedIn = 569,
// 570 is never used
// 571 is never used
@@ -979,6 +983,7 @@ enum Flags {
kFlagHF04DoorsClosed = 584,
kFlagHF04CloseDoors = 585,
kFlagHF04OpenDoors = 586,
+ kFlagUG15LutherLanceStartedDying = 587,
kFlagNR05BartenderTalk1 = 588,
kFlagNR05BartenderTalk2 = 589,
kFlagNR05EarlyQTalk = 590,
@@ -986,12 +991,18 @@ enum Flags {
kFlagGordoRanAway = 592,
kFlagLucyRanAway = 593,
kFlagNR02GordoJumpDown = 594,
+ kFlagLutherLanceAreDead = 595,
+ kFlagUG16PulledGun = 596,
+ kFlagUG16FolderFound = 597,
kFlagKIAPrivacyAddonIntro = 599,
+ kFlagUG16LutherLanceTalkReplicants1 = 600,
+ kFlagUG16LutherLanceTalkReplicants2 = 601,
// 602 is never used
kFlagSteeleAimingAtGordo = 603,
kFlagNR03McCoyThrownOut = 604,
kFlagNR04DiscFound = 605,
kFlagNR04EarlyQStungByScorpions = 606,
+
kFlagTB07toTB02 = 608,
kFlagNR04McCoyAimedAtEarlyQ = 609,
kFlagUG08Entered = 610,
@@ -1053,6 +1064,7 @@ enum Flags {
kFlagPS05TV4 = 692,
kFlagUG03DeadHomeless = 693,
kFlagUG14DeadHomeless = 694,
+ kFlagUG15LanceLuthorTrade = 698,
kFlagBulletBobDead = 702,
kFlagRC02EnteredChapter4 = 704,
kFlagRC02RunciterTalkWithGun = 705,
@@ -1064,6 +1076,7 @@ enum Flags {
kFlagMA04WatchedTV = 711,
kFlagMcCoyShotAtZuben = 712,
kFlagDR04McCoyShotMoraji = 713,
+ kFlagDR06UnlockedToUG16 = 715,
kFlagRC04BobTalk3 = 717,
kflagPS01toPS02 = 718,
kFlagCT02McCoyFell = 719,
@@ -1094,7 +1107,7 @@ enum Variables {
kVariableBobShot = 24, // has no use
kVariableGeneralDollShot = 25, // has no use
// variables 26 - 28 are not used
-
+ kVariableLutherLanceShot = 29,
// variables 30 - 31 are not used
kVariableGenericWalkerAModel = 32,
kVariableGenericWalkerBModel = 33,
@@ -1509,12 +1522,23 @@ enum GameItems {
kItemCandy = 79,
kItemCheese = 81,
kItemChopstickWrapper = 82,
+ kItemDNATyrell = 83,
kItemDogCollar = 84,
kItemRagDoll = 85,
+ // 86 is never used
+ // 87 is never used
kItemRadiationGoogles = 88,
kItemGordosLighter1 = 89,
kItemGordosLighter2 = 90,
+
+ // 92 is never used
+ // 93 is never used
+ // 94 is never used
+ // 95 is never used
+ // 96 is never used
+ // 97 is never used
kItemToyDog = 98,
+ // 99 is never used
kItemShellCasingA = 100,
kItemShellCasingB = 101,
kItemShellCasingC = 102,
@@ -1527,7 +1551,13 @@ enum GameItems {
kItemChair = 109,
kItemWeaponsCrate = 110,
kItemWeaponsOrderForm = 111,
+ // 112 is never used
+ // 113 is never used
+ // 114 is never used
kItemDogWrapper = 115,
+ // 116 is never used
+ // 117 is never used
+
kItemTyrellSalesPamphlet = 119,
kItemMoonbusPhoto = 120,
kItemGreenPawnLock = 121,
@@ -1870,6 +1900,20 @@ enum GoalSadik {
kGoalSadikBB11TalkWithClovis = 107
};
+enum GoalLuther {
+ kGoalLutherDefault = 400,
+ kGoalLutherMoveAround = 401,
+ kGoalLutherMoveAroundRestart = 402,
+ kGoalLutherStop = 403,
+ kGoalLutherShot = 494,
+ kGoalLutherDyingStarted = 495,
+ kGoalLutherDyingWait = 496,
+ kGoalLutherDyingCheck = 497,
+ kGoalLutherDie = 498,
+ kGoalLutherDead = 499,
+ kGoalLutherGone = 599
+};
+
enum GoalTransient {
kGoalTransientDefault = 0,
kGoalTransientCT04Leave = 2
@@ -1893,10 +1937,17 @@ enum GoalRunciter {
kGoalRunciterDead = 599
};
+enum GoalTyrellGuard {
+ kGoalTyrellGuardSleeping = 300,
+ kGoalTyrellGuardWakeUpAndArrestMcCoy = 301,
+ kGoalTyrellGuardWakeUp = 302,
+ kGoalTyrellGuardArrestMcCoy = 303,
+ kGoalTyrellGuardWait = 304
+};
+
enum GoalEarlyQ {
// cut feature? goals 0 - 200 has no use as EarlyQ is walking around NR which is not accessible
kGoalEarlyQWalkAround = 200,
-
kGoalEarlyQNR04Enter = 201,
kGoalEarlyQNR04Talk1 = 202,
kGoalEarlyQNR04GoToBar = 203,
diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp
index 41d188e3bd..c8a57eed98 100644
--- a/engines/bladerunner/script/ai/clovis.cpp
+++ b/engines/bladerunner/script/ai/clovis.cpp
@@ -453,7 +453,7 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Global_Variable_Decrement(kVariableReplicants, 1);
}
if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorLuther, kSetKP07)) {
- Actor_Set_Goal_Number(kActorLuther, 599);
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherGone);
Global_Variable_Decrement(kVariableReplicants, 1);
}
if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorDektora, kSetKP07)) {
diff --git a/engines/bladerunner/script/ai/luther.cpp b/engines/bladerunner/script/ai/luther.cpp
index 21df880d64..696bfc078d 100644
--- a/engines/bladerunner/script/ai/luther.cpp
+++ b/engines/bladerunner/script/ai/luther.cpp
@@ -38,84 +38,98 @@ void AIScriptLuther::Initialize() {
Actor_Put_In_Set(kActorLuther, kSetUG16);
Actor_Set_At_XYZ(kActorLuther, 176.91f, -40.67f, 225.92f, 486);
- Actor_Set_Goal_Number(kActorLuther, 400);
- Actor_Set_Targetable(kActorLuther, 1);
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherDefault);
+ Actor_Set_Targetable(kActorLuther, true);
}
bool AIScriptLuther::Update() {
- if (!Actor_Query_Is_In_Current_Set(kActorLuther)
- || Player_Query_Combat_Mode() != 1
- || Global_Variable_Query(29)
- || Game_Flag_Query(596)
- || Global_Variable_Query(kVariableChapter) != 4) {
- if (Actor_Query_Goal_Number(kActorLuther) == 400 && Actor_Query_Goal_Number(kActorLuther) != 499) {
- Actor_Set_Goal_Number(kActorLuther, 401);
- } else if (Actor_Query_Goal_Number(kActorLuther) == 494) {
- Actor_Set_Goal_Number(kActorLuther, 495);
- ChangeAnimationMode(48);
- } else if (Actor_Query_Goal_Number(kActorLuther) != 495 || Game_Flag_Query(587)) {
- if (Actor_Query_Goal_Number(kActorLuther) != 497
- || Global_Variable_Query(29) >= 2
- || Game_Flag_Query(568)) {
- if (Actor_Query_Goal_Number(kActorLuther) != 497
- || Global_Variable_Query(29) <= 1
- || Game_Flag_Query(568)) {
- if (Actor_Query_Goal_Number(kActorLuther) == 498) {
- Game_Flag_Set(595);
- Actor_Set_Goal_Number(kActorLuther, 499);
- Actor_Set_Targetable(kActorLuther, 0);
- } else {
- return false;
- }
- } else {
- Actor_Set_Targetable(kActorLuther, 0);
- Actor_Set_Goal_Number(kActorLuther, 498);
- Actor_Set_Targetable(kActorLuther, 0);
- }
- } else {
- Game_Flag_Set(568);
- ChangeAnimationMode(50);
- ChangeAnimationMode(48);
- Actor_Set_Goal_Number(kActorLuther, 498);
- Actor_Set_Targetable(kActorLuther, 0);
- Scene_Loop_Set_Default(5);
- Scene_Loop_Start_Special(2, 4, 1);
- Ambient_Sounds_Play_Sound(559, 50, 0, 0, 99);
- Ambient_Sounds_Remove_Looping_Sound(516, 1);
- }
- } else {
- AI_Countdown_Timer_Reset(kActorLuther, 2);
- AI_Countdown_Timer_Start(kActorLuther, 2, 5);
- Actor_Set_Goal_Number(kActorLuther, 496);
- Game_Flag_Set(587);
- }
- } else {
+ if ( Actor_Query_Is_In_Current_Set(kActorLuther)
+ && Player_Query_Combat_Mode()
+ && Global_Variable_Query(kVariableLutherLanceShot) == 0
+ && !Game_Flag_Query(kFlagUG16PulledGun)
+ && Global_Variable_Query(kVariableChapter) == 4
+ ) {
Actor_Says(kActorMcCoy, 5720, 12);
Actor_Says(kActorLuther, 80, 13);
Actor_Says(kActorLance, 40, 12);
- Game_Flag_Set(596);
+ Game_Flag_Set(kFlagUG16PulledGun);
+ return false;
+ }
+
+ if (Actor_Query_Goal_Number(kActorLuther) == kGoalLutherDefault
+ && Actor_Query_Goal_Number(kActorLuther) != kGoalLutherDead
+ ) {
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherMoveAround);
+ return false;
+ }
+
+ if (Actor_Query_Goal_Number(kActorLuther) == kGoalLutherShot) {
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherDyingStarted);
+ ChangeAnimationMode(kAnimationModeDie);
+ return false;
+ }
+
+ if ( Actor_Query_Goal_Number(kActorLuther) == kGoalLutherDyingStarted
+ && !Game_Flag_Query(kFlagUG15LutherLanceStartedDying)
+ ) {
+ AI_Countdown_Timer_Reset(kActorLuther, 2);
+ AI_Countdown_Timer_Start(kActorLuther, 2, 5);
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherDyingWait);
+ Game_Flag_Set(kFlagUG15LutherLanceStartedDying);
+ return false;
+ }
+
+ if ( Actor_Query_Goal_Number(kActorLuther) == kGoalLutherDyingCheck
+ && Global_Variable_Query(kVariableLutherLanceShot) < 2
+ && !Game_Flag_Query(kFlagUG16ComputerOff)
+ ) {
+ Game_Flag_Set(kFlagUG16ComputerOff);
+ ChangeAnimationMode(50);
+ ChangeAnimationMode(kAnimationModeDie);
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherDie);
+ Actor_Set_Targetable(kActorLuther, false);
+ Scene_Loop_Set_Default(5); // UG16MainLoopNoComputerLight
+ Scene_Loop_Start_Special(kSceneLoopModeOnce, 4, true); // UG16SparkLoop
+ Ambient_Sounds_Play_Sound(559, 50, 0, 0, 99);
+ Ambient_Sounds_Remove_Looping_Sound(516, 1);
+ return false;
+ }
+
+ if ( Actor_Query_Goal_Number(kActorLuther) == kGoalLutherDyingCheck
+ && Global_Variable_Query(kVariableLutherLanceShot) > 1
+ && !Game_Flag_Query(kFlagUG16ComputerOff)
+ ) {
+ Actor_Set_Targetable(kActorLuther, false);
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherDie);
+ Actor_Set_Targetable(kActorLuther, false);
+ return false;
+ }
+
+ if (Actor_Query_Goal_Number(kActorLuther) == kGoalLutherDie) {
+ Game_Flag_Set(kFlagLutherLanceAreDead);
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherDead);
+ Actor_Set_Targetable(kActorLuther, false);
+ return false;
}
return false;
}
void AIScriptLuther::TimerExpired(int timer) {
- if (timer != 2)
- return; //false;
-
- AI_Countdown_Timer_Reset(kActorLuther, 2);
- Actor_Set_Goal_Number(kActorLuther, 497);
-
- return; //true;
+ if (timer == 2) {
+ AI_Countdown_Timer_Reset(kActorLuther, 2);
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherDyingCheck);
+ // return true;
+ }
+ // return false;
}
void AIScriptLuther::CompletedMovementTrack() {
- if (Actor_Query_Goal_Number(kActorLuther) != 401)
- return; //false;
-
- Actor_Set_Goal_Number(kActorLuther, 402);
-
- return; //true;
+ if (Actor_Query_Goal_Number(kActorLuther) == kGoalLutherMoveAround) {
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherMoveAroundRestart);
+ // return true;
+ }
+ //return false;
}
void AIScriptLuther::ReceivedClue(int clueId, int fromActorId) {
@@ -147,24 +161,26 @@ void AIScriptLuther::ShotAtAndMissed() {
}
bool AIScriptLuther::ShotAtAndHit() {
- if (Actor_Query_Which_Set_In(kActorLuther) == 19) {
+ if (Actor_Query_Which_Set_In(kActorLuther) == kSetUG16) {
Actor_Set_Health(kActorLuther, 50, 50);
}
- Global_Variable_Increment(29, 1);
+
+ Global_Variable_Increment(kVariableLutherLanceShot, 1);
Music_Stop(2);
- if (Global_Variable_Query(29) <= 0) {
- return false;
- }
- if (!Game_Flag_Query(560)) {
- Game_Flag_Set(557);
+
+ if (Global_Variable_Query(kVariableLutherLanceShot) > 0) {
+ if (!Game_Flag_Query(kFlagLutherLanceIsReplicant)) {
+ Game_Flag_Set(kFlagNotUsed557);
+ }
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherShot);
+ return true;
}
- Actor_Set_Goal_Number(kActorLuther, 494);
- return true;
+ return false;
}
void AIScriptLuther::Retired(int byActorId) {
- Actor_Set_Goal_Number(kActorLuther, 599);
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherGone);
}
int AIScriptLuther::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) {
@@ -173,7 +189,7 @@ int AIScriptLuther::GetFriendlinessModifierIfGetsClue(int otherActorId, int clue
bool AIScriptLuther::GoalChanged(int currentGoalNumber, int newGoalNumber) {
switch (newGoalNumber) {
- case 401:
+ case kGoalLutherMoveAround:
AI_Movement_Track_Flush(kActorLuther);
AI_Movement_Track_Append(kActorLuther, 39, 20);
AI_Movement_Track_Append_With_Facing(kActorLuther, 368, 120, 486);
@@ -181,16 +197,16 @@ bool AIScriptLuther::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorLuther);
break;
- case 402:
- Actor_Set_Goal_Number(kActorLuther, 401);
+ case kGoalLutherMoveAroundRestart:
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherMoveAround);
break;
- case 403:
+ case kGoalLutherStop:
AI_Movement_Track_Flush(kActorLuther);
break;
case 499:
- Actor_Set_Goal_Number(kActorLuther, 599);
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherGone);
break;
}
@@ -202,7 +218,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
case 0:
*animation = 346;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(346) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
}
break;
@@ -210,7 +226,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
case 1:
*animation = 348;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(348) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
*animation = 346;
_animationFrame = 0;
_animationState = 0;
@@ -219,13 +235,15 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
break;
case 2:
- if (!_animationFrame && _flag) {
+ if (_animationFrame == 0
+ && _flag
+ ) {
*animation = 346;
_animationState = 0;
} else {
*animation = 349;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(349) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
}
}
@@ -234,7 +252,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
case 3:
*animation = 350;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(350) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 2;
*animation = 349;
@@ -244,7 +262,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
case 4:
*animation = 351;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(351) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 2;
*animation = 349;
@@ -254,7 +272,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
case 5:
*animation = 352;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(352) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 2;
*animation = 349;
@@ -264,7 +282,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
case 6:
*animation = 353;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(353) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 2;
*animation = 349;
@@ -274,7 +292,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
case 7:
*animation = 354;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(354) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 2;
*animation = 349;
@@ -284,7 +302,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
case 8:
*animation = 355;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(355) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 2;
*animation = 349;
@@ -294,7 +312,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
case 9:
*animation = 356;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(356) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
*animation = 346;
_animationFrame = 0;
_animationState = 0;
@@ -305,7 +323,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
case 10:
*animation = 357;
_animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(357) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
Actor_Change_Animation_Mode(kActorLuther, 50);
*animation = 358;
_animationFrame = 0;
@@ -314,7 +332,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
case 11:
*animation = 358;
- if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(358) - 1) {
+ if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame++;
}
break;
@@ -329,8 +347,6 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
}
break;
- default:
- break;
}
*frame = _animationFrame;
@@ -338,6 +354,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
}
bool AIScriptLuther::ChangeAnimationMode(int mode) {
+ // these modes are differnent that other actors
switch (mode) {
case 0:
if ((unsigned int)(_animationState - 2) > 6) {
diff --git a/engines/bladerunner/script/ai/tyrell_guard.cpp b/engines/bladerunner/script/ai/tyrell_guard.cpp
index 5e40453730..a7b9e31db3 100644
--- a/engines/bladerunner/script/ai/tyrell_guard.cpp
+++ b/engines/bladerunner/script/ai/tyrell_guard.cpp
@@ -49,12 +49,13 @@ void AIScriptTyrellGuard::TimerExpired(int timer) {
case 0:
AI_Countdown_Timer_Reset(kActorTyrellGuard, 0);
if (Actor_Query_Which_Set_In(kActorMcCoy) == kSetTB02_TB03) {
- Actor_Set_Goal_Number(kActorTyrellGuard, 301);
+ Actor_Set_Goal_Number(kActorTyrellGuard, kGoalTyrellGuardWakeUpAndArrestMcCoy);
}
break;
+
case 1:
AI_Countdown_Timer_Reset(kActorTyrellGuard, 1);
- Actor_Set_Goal_Number(kActorTyrellGuard, 303);
+ Actor_Set_Goal_Number(kActorTyrellGuard, kGoalTyrellGuardArrestMcCoy);
break;
}
}
@@ -105,13 +106,14 @@ int AIScriptTyrellGuard::GetFriendlinessModifierIfGetsClue(int otherActorId, int
bool AIScriptTyrellGuard::GoalChanged(int currentGoalNumber, int newGoalNumber) {
switch (newGoalNumber) {
- case 300:
+ case kGoalTyrellGuardSleeping:
if (currentGoalNumber != newGoalNumber) {
Actor_Change_Animation_Mode(kActorTyrellGuard, 55);
AI_Countdown_Timer_Start(kActorTyrellGuard, 0, 30);
}
return true;
- case 301:
+
+ case kGoalTyrellGuardWakeUpAndArrestMcCoy:
Actor_Change_Animation_Mode(kActorTyrellGuard, kAnimationModeIdle);
Delay(1000);
Actor_Says(kActorTyrellGuard, 320, 14);
@@ -121,19 +123,22 @@ bool AIScriptTyrellGuard::GoalChanged(int currentGoalNumber, int newGoalNumber)
Actor_Force_Stop_Walking(kActorMcCoy);
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
return true;
- case 302:
+
+ case kGoalTyrellGuardWakeUp:
AI_Countdown_Timer_Reset(kActorTyrellGuard, 0);
Actor_Says(kActorTyrellGuard, 310, 14);
AI_Countdown_Timer_Start(kActorTyrellGuard, 1, 20);
return true;
- case 303:
+
+ case kGoalTyrellGuardArrestMcCoy:
Actor_Change_Animation_Mode(kActorTyrellGuard, 50);
Ambient_Sounds_Play_Sound(590, 100, 0, 0, 0);
Delay(1000);
Actor_Force_Stop_Walking(kActorMcCoy);
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
return true;
- case 304:
+
+ case kGoalTyrellGuardWait:
AI_Countdown_Timer_Reset(kActorTyrellGuard, 1);
return true;
}
@@ -149,6 +154,7 @@ bool AIScriptTyrellGuard::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 1:
*animation = 564;
if (_animationFrame <= 5) {
@@ -158,6 +164,7 @@ bool AIScriptTyrellGuard::UpdateAnimation(int *animation, int *frame) {
}
_animationFrame += _frameDelta;
break;
+
case 2:
*animation = 564;
_animationFrame++;
@@ -166,9 +173,12 @@ bool AIScriptTyrellGuard::UpdateAnimation(int *animation, int *frame) {
_animationState = 0;
}
break;
+
case 3:
*animation = 558;
- if (_animationFrame == 0 && _flag1) {
+ if (_animationFrame == 0
+ && _flag1
+ ) {
*animation = 555;
_animationState = 0;
} else {
@@ -178,6 +188,7 @@ bool AIScriptTyrellGuard::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 4:
*animation = 559;
_animationFrame++;
@@ -187,6 +198,7 @@ bool AIScriptTyrellGuard::UpdateAnimation(int *animation, int *frame) {
_animationState = 3;
}
break;
+
case 5:
*animation = 560;
_animationFrame++;
@@ -196,6 +208,7 @@ bool AIScriptTyrellGuard::UpdateAnimation(int *animation, int *frame) {
_animationState = 3;
}
break;
+
case 6:
*animation = 561;
_animationFrame++;
@@ -205,6 +218,7 @@ bool AIScriptTyrellGuard::UpdateAnimation(int *animation, int *frame) {
_animationState = 3;
}
break;
+
case 7:
*animation = 562;
_animationFrame++;
@@ -232,6 +246,7 @@ bool AIScriptTyrellGuard::UpdateAnimation(int *animation, int *frame) {
_animationState = 0;
}
break;
+
case 10:
*animation = 564;
_animationFrame++;
@@ -241,6 +256,7 @@ bool AIScriptTyrellGuard::UpdateAnimation(int *animation, int *frame) {
_animationState = 0;
}
break;
+
case 11:
*animation = 565;
_animationFrame++;
@@ -282,6 +298,7 @@ bool AIScriptTyrellGuard::ChangeAnimationMode(int mode) {
break;
}
break;
+
case kAnimationModeTalk:
if (_animationState == 1) {
_animationState = 2;
@@ -291,6 +308,7 @@ bool AIScriptTyrellGuard::ChangeAnimationMode(int mode) {
_flag1 = false;
}
break;
+
case 12:
if (_animationState == 1) {
_animationState = 2;
@@ -300,6 +318,7 @@ bool AIScriptTyrellGuard::ChangeAnimationMode(int mode) {
_flag1 = false;
}
break;
+
case 13:
if (_animationState == 1) {
_animationState = 2;
@@ -309,6 +328,7 @@ bool AIScriptTyrellGuard::ChangeAnimationMode(int mode) {
_flag1 = false;
}
break;
+
case 14:
if (_animationState == 1) {
_animationState = 2;
@@ -318,6 +338,7 @@ bool AIScriptTyrellGuard::ChangeAnimationMode(int mode) {
_flag1 = false;
}
break;
+
case 15:
if (_animationState == 1) {
_animationState = 2;
@@ -327,14 +348,17 @@ bool AIScriptTyrellGuard::ChangeAnimationMode(int mode) {
_flag1 = false;
}
break;
+
case 23:
_animationState = 8;
_animationFrame = 0;
break;
+
case 50:
_animationState = 11;
_animationFrame = 0;
break;
+
case 43:
case 55:
if (_animationState != 1) {
diff --git a/engines/bladerunner/script/init_script.cpp b/engines/bladerunner/script/init_script.cpp
index 91338738df..4cd634eb69 100644
--- a/engines/bladerunner/script/init_script.cpp
+++ b/engines/bladerunner/script/init_script.cpp
@@ -97,7 +97,7 @@ void InitScript::Init_Game_Flags() {
}
if (Random_Query(1, 2) == 1) {
- Game_Flag_Set(560);
+ Game_Flag_Set(kFlagLutherLanceIsReplicant);
}
if (!Game_Flag_Query(kFlagGordoIsReplicant)
diff --git a/engines/bladerunner/script/scene/dr06.cpp b/engines/bladerunner/script/scene/dr06.cpp
index d2317b2481..0d549f57e3 100644
--- a/engines/bladerunner/script/scene/dr06.cpp
+++ b/engines/bladerunner/script/scene/dr06.cpp
@@ -33,7 +33,7 @@ void SceneScriptDR06::InitializeScene() {
Scene_Exit_Add_2D_Exit(0, 601, 11, 639, 479, 1);
if (Global_Variable_Query(kVariableChapter) > 3
- && Game_Flag_Query(715)
+ && Game_Flag_Query(kFlagDR06UnlockedToUG16)
) {
Scene_Exit_Add_2D_Exit(1, 0, 272, 46, 477, 2);
}
diff --git a/engines/bladerunner/script/scene/kp07.cpp b/engines/bladerunner/script/scene/kp07.cpp
index 486120f0ea..d6d1a8888f 100644
--- a/engines/bladerunner/script/scene/kp07.cpp
+++ b/engines/bladerunner/script/scene/kp07.cpp
@@ -71,7 +71,7 @@ void SceneScriptKP07::InitializeScene() {
Actor_Set_At_XYZ(kActorLucy, 78.0f, -41.52f, -119.0f, 659);
}
- if (Actor_Query_Goal_Number(kActorLuther) < 599) {
+ if (Actor_Query_Goal_Number(kActorLuther) < kGoalLutherGone) {
Global_Variable_Increment(kVariableReplicants, 1);
Actor_Put_In_Set(kActorLuther, kSetKP07);
Actor_Set_At_XYZ(kActorLuther, -47.0f, 0.0f, 151.0f, 531);
diff --git a/engines/bladerunner/script/scene/ps14.cpp b/engines/bladerunner/script/scene/ps14.cpp
index 73b87e7c83..bd22dffafd 100644
--- a/engines/bladerunner/script/scene/ps14.cpp
+++ b/engines/bladerunner/script/scene/ps14.cpp
@@ -69,9 +69,10 @@ bool SceneScriptPS14::ClickedOnItem(int itemId, bool a2) {
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)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -2101.0f, 508.14f, -1361.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 819, false);
Loop_Actor_Travel_Stairs(kActorMcCoy, 3, true, kAnimationModeIdle);
+
if (Global_Variable_Query(kVariableChapter) == 4
&& Game_Flag_Query(671)
) {
diff --git a/engines/bladerunner/script/scene/tb02.cpp b/engines/bladerunner/script/scene/tb02.cpp
index 7a68812a50..a82f88de0b 100644
--- a/engines/bladerunner/script/scene/tb02.cpp
+++ b/engines/bladerunner/script/scene/tb02.cpp
@@ -40,6 +40,7 @@ void SceneScriptTB02::InitializeScene() {
if (Global_Variable_Query(kVariableChapter) > 3) {
Scene_Exit_Add_2D_Exit(0, 0, 455, 639, 479, 2);
}
+
Ambient_Sounds_Add_Looping_Sound(211, 20, 0, 1);
Ambient_Sounds_Add_Sound(212, 2, 15, 16, 20, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(213, 2, 15, 16, 20, 0, 0, -101, -101, 0, 0);
@@ -63,22 +64,25 @@ 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
) {
Scene_Exit_Add_2D_Exit(2, 67, 0, 233, 362, 3);
}
+
if (Game_Flag_Query(kFlagTB03toTB02)) {
- Scene_Loop_Start_Special(0, 0, 0);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
Scene_Loop_Set_Default(1);
} else {
Scene_Loop_Set_Default(1);
}
+
Actor_Put_In_Set(kActorTyrellGuard, kSetTB02_TB03);
Actor_Set_At_XYZ(kActorTyrellGuard, -38.53f, 2.93f, 1475.97f, 673);
if (Global_Variable_Query(kVariableChapter) == 4) {
- if (Actor_Query_Goal_Number(kActorTyrellGuard) < 300) {
- Actor_Set_Goal_Number(kActorTyrellGuard, 300);
+ if (Actor_Query_Goal_Number(kActorTyrellGuard) < kGoalTyrellGuardSleeping) {
+ Actor_Set_Goal_Number(kActorTyrellGuard, kGoalTyrellGuardSleeping);
}
Scene_Exit_Add_2D_Exit(1, 430, 235, 487, 396, 0);
}
@@ -148,8 +152,8 @@ bool SceneScriptTB02::ClickedOnActor(int actorId) {
}
if (chapter == 4) {
- if (Actor_Query_Goal_Number(kActorTyrellGuard) == 300) {
- Actor_Set_Goal_Number(kActorTyrellGuard, 301);
+ if (Actor_Query_Goal_Number(kActorTyrellGuard) == kGoalTyrellGuardSleeping) {
+ Actor_Set_Goal_Number(kActorTyrellGuard, kGoalTyrellGuardWakeUpAndArrestMcCoy);
}
}
}
@@ -173,6 +177,7 @@ bool SceneScriptTB02::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -32.0f, 0.0f, 1578.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
@@ -187,12 +192,13 @@ bool SceneScriptTB02::ClickedOnExit(int exitId) {
}
return true;
}
+
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, kAnimationModeIdle);
- if (Actor_Query_Goal_Number(kActorTyrellGuard) == 300) {
- Actor_Set_Goal_Number(kActorTyrellGuard, 301);
+ if (Actor_Query_Goal_Number(kActorTyrellGuard) == kGoalTyrellGuardSleeping) {
+ Actor_Set_Goal_Number(kActorTyrellGuard, kGoalTyrellGuardWakeUpAndArrestMcCoy);
} else {
Game_Flag_Reset(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagMcCoyInRunciters);
@@ -295,8 +301,8 @@ void SceneScriptTB02::PlayerWalkedIn() {
Game_Flag_Reset(kFlagTB05toTB02);
} else if (Game_Flag_Query(kFlagTB07toTB02)) {
Game_Flag_Reset(kFlagTB07toTB02);
- if (Actor_Query_Goal_Number(kActorTyrellGuard) == 300) {
- Actor_Set_Goal_Number(kActorTyrellGuard, 302);
+ if (Actor_Query_Goal_Number(kActorTyrellGuard) == kGoalTyrellGuardSleeping) {
+ Actor_Set_Goal_Number(kActorTyrellGuard, kGoalTyrellGuardWakeUp);
}
Music_Play(1, 50, 0, 2, -1, 0, 0);
} else {
diff --git a/engines/bladerunner/script/scene/tb03.cpp b/engines/bladerunner/script/scene/tb03.cpp
index fb26584f3c..27ac0f01b3 100644
--- a/engines/bladerunner/script/scene/tb03.cpp
+++ b/engines/bladerunner/script/scene/tb03.cpp
@@ -62,11 +62,11 @@ void SceneScriptTB03::InitializeScene() {
Actor_Set_At_XYZ(kActorTyrellGuard, -38.53f, 2.93f, 1475.97f, 673);
if (Global_Variable_Query(kVariableChapter) == 4) {
int goal = Actor_Query_Goal_Number(kActorTyrellGuard);
- if (goal == 304) {
- Actor_Change_Animation_Mode(kActorTyrellGuard, 0);
+ if (goal == kGoalTyrellGuardWait) {
+ Actor_Change_Animation_Mode(kActorTyrellGuard, kAnimationModeIdle);
Actor_Set_Goal_Number(kActorOfficerGrayford, 399);
- } else if (goal != 302) {
- Actor_Set_Goal_Number(kActorTyrellGuard, 300);
+ } else if (goal != kGoalTyrellGuardWakeUp) {
+ Actor_Set_Goal_Number(kActorTyrellGuard, kGoalTyrellGuardSleeping);
}
}
@@ -107,8 +107,8 @@ bool SceneScriptTB03::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptTB03::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -260.0f, 0.15f, 2014.0f, 0, 1, false, 0)) {
- Actor_Set_Goal_Number(kActorTyrellGuard, 304);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -260.0f, 0.15f, 2014.0f, 0, true, false, 0)) {
+ Actor_Set_Goal_Number(kActorTyrellGuard, kGoalTyrellGuardWait);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagTB03toUG17);
@@ -118,7 +118,7 @@ bool SceneScriptTB03::ClickedOnExit(int exitId) {
}
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -152.0f, 0.0f, 1774.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -152.0f, 0.0f, 1774.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagTB03toTB02);
@@ -141,7 +141,7 @@ void SceneScriptTB03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptTB03::PlayerWalkedIn() {
- if (Actor_Query_Goal_Number(kActorTyrellGuard) == 304) {
+ if (Actor_Query_Goal_Number(kActorTyrellGuard) == kGoalTyrellGuardWait) {
Player_Set_Combat_Mode(false);
Actor_Says(kActorOfficerGrayford, 260, -1);
Actor_Says(kActorMcCoy, 170, 14);
diff --git a/engines/bladerunner/script/scene/tb07.cpp b/engines/bladerunner/script/scene/tb07.cpp
index cc14203864..6290ad74ed 100644
--- a/engines/bladerunner/script/scene/tb07.cpp
+++ b/engines/bladerunner/script/scene/tb07.cpp
@@ -49,7 +49,7 @@ void SceneScriptTB07::InitializeScene() {
if ( Global_Variable_Query(kVariableChapter) == 4
&& !Actor_Clue_Query(kActorMcCoy, kClueDNATyrell)
) {
- Item_Add_To_World(83, 941, kSetTB07, 9.7f, 48.7f, -174.22f, 0, 12, 12, false, true, false, true);
+ Item_Add_To_World(kItemDNATyrell, 941, kSetTB07, 9.7f, 48.7f, -174.22f, 0, 12, 12, false, true, false, true);
}
if (Game_Flag_Query(kFlagTB07ShadeDown)) {
Scene_Loop_Set_Default(kTB07LoopMainShadeDown);
@@ -78,7 +78,7 @@ bool SceneScriptTB07::ClickedOnActor(int actorId) {
bool SceneScriptTB07::ClickedOnItem(int itemId, bool a2) {
if (!Loop_Actor_Walk_To_Item(kActorMcCoy, itemId, 36, true, false)) {
Actor_Face_Item(kActorMcCoy, itemId, true);
- if (itemId == 83) {
+ if (itemId == kItemDNATyrell) {
Item_Pickup_Spin_Effect(941, 331, 296);
Actor_Clue_Acquire(kActorMcCoy, kClueDNATyrell, false, -1);
}
diff --git a/engines/bladerunner/script/scene/ug06.cpp b/engines/bladerunner/script/scene/ug06.cpp
index 9ac5bcab88..3209d4b707 100644
--- a/engines/bladerunner/script/scene/ug06.cpp
+++ b/engines/bladerunner/script/scene/ug06.cpp
@@ -29,7 +29,7 @@ void SceneScriptUG06::InitializeScene() {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Outtake_Play(kOuttakeMovieC1, false, -1);
- if (Game_Flag_Query(560)) {
+ if (Game_Flag_Query(kFlagLutherLanceIsReplicant)) {
Outtake_Play(kOuttakeMovieC3, false, -1);
} else {
Outtake_Play(kOuttakeMovieC2, false, -1);
diff --git a/engines/bladerunner/script/scene/ug16.cpp b/engines/bladerunner/script/scene/ug16.cpp
index dc2f5da8a9..ff14e4bb0e 100644
--- a/engines/bladerunner/script/scene/ug16.cpp
+++ b/engines/bladerunner/script/scene/ug16.cpp
@@ -44,7 +44,7 @@ void SceneScriptUG16::InitializeScene() {
Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1);
Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1);
- if (Game_Flag_Query(568)) {
+ if (Game_Flag_Query(kFlagUG16ComputerOff)) {
Scene_Loop_Set_Default(5);
} else {
Scene_Loop_Set_Default(0);
@@ -81,10 +81,10 @@ bool SceneScriptUG16::ClickedOn3DObject(const char *objectName, bool a2) {
if (Object_Query_Click("QUADPATCH05", objectName)) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 194.0f, -35.0f, 160.8f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 870, false);
- if (!Game_Flag_Query(597)
- && Game_Flag_Query(595)
+ if (!Game_Flag_Query(kFlagUG16FolderFound)
+ && Game_Flag_Query(kFlagLutherLanceAreDead)
) {
- Game_Flag_Set(597);
+ Game_Flag_Set(kFlagUG16FolderFound);
Delay(1000);
Actor_Voice_Over(3480, kActorVoiceOver);
Actor_Change_Animation_Mode(kActorMcCoy, 38);
@@ -109,32 +109,31 @@ bool SceneScriptUG16::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Face_Heading(kActorMcCoy, 870, false);
- if ((!Game_Flag_Query(595)
- && Actor_Query_Is_In_Current_Set(kActorLuther)
+ if (( Game_Flag_Query(kFlagLutherLanceAreDead)
+ || !Actor_Query_Is_In_Current_Set(kActorLuther)
)
- || Actor_Clue_Query(kActorMcCoy, kClueDNALutherLance)
- || Game_Flag_Query(568)
+ && !Actor_Clue_Query(kActorMcCoy, kClueDNALutherLance)
+ && !Game_Flag_Query(kFlagUG16ComputerOff)
) {
- Actor_Says(kActorMcCoy, 8525, 12);
- Actor_Says(kActorMcCoy, 8526, 12);
- return false;
+ Delay(2000);
+ Actor_Face_Heading(kActorMcCoy, 1016, false);
+ Delay(2000);
+ Actor_Says(kActorMcCoy, 5725, 14);
+ Delay(1000);
+ Item_Pickup_Spin_Effect(941, 418, 305);
+ Actor_Clue_Acquire(kActorMcCoy, kClueDNALutherLance, true, -1);
+ return true;
}
- Delay(2000);
- Actor_Face_Heading(kActorMcCoy, 1016, false);
- Delay(2000);
- Actor_Says(kActorMcCoy, 5725, 14);
- Delay(1000);
- Item_Pickup_Spin_Effect(941, 418, 305);
- Actor_Clue_Acquire(kActorMcCoy, kClueDNALutherLance, true, -1);
- return true;
+ Actor_Says(kActorMcCoy, 8525, 12);
+ Actor_Says(kActorMcCoy, 8526, 12);
}
}
return false;
}
bool SceneScriptUG16::ClickedOnActor(int actorId) {
- if (Actor_Query_Goal_Number(kActorLuther) < 490) {
+ if (Actor_Query_Goal_Number(kActorLuther) < 490) { // Luther & Lance are alive
dialogueWithLuther();
return true;
}
@@ -194,17 +193,17 @@ void SceneScriptUG16::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptUG16::PlayerWalkedIn() {
- Game_Flag_Set(715);
+ Game_Flag_Set(kFlagDR06UnlockedToUG16);
- if (!Game_Flag_Query(595)) {
- Actor_Set_Goal_Number(kActorLuther, 403);
+ if (!Game_Flag_Query(kFlagLutherLanceAreDead)) {
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherStop);
}
- if (!Game_Flag_Query(556)
+ if (!Game_Flag_Query(kFlagUG16LutherLanceTalk1)
&& Actor_Query_Is_In_Current_Set(kActorLuther)
) {
Player_Loses_Control();
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 120.29f, -35.67f, 214.8f, 310, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 120.29f, -35.67f, 214.8f, 310, false, false, 0);
Actor_Face_Actor(kActorMcCoy, kActorLuther, true);
Actor_Says(kActorLuther, 0, 6);
Actor_Says(kActorLuther, 30, 13);
@@ -219,13 +218,13 @@ void SceneScriptUG16::PlayerWalkedIn() {
Actor_Says(kActorLance, 30, 16);
Actor_Says(kActorLuther, 70, 6);
Player_Gains_Control();
- Game_Flag_Set(556);
+ Game_Flag_Set(kFlagUG16LutherLanceTalk1);
}
}
void SceneScriptUG16::PlayerWalkedOut() {
- if (!Game_Flag_Query(595)) {
- Actor_Set_Goal_Number(kActorLuther, 401);
+ if (!Game_Flag_Query(kFlagLutherLanceAreDead)) {
+ Actor_Set_Goal_Number(kActorLuther, kGoalLutherMoveAround);
//return true;
}
//return false;
@@ -236,37 +235,37 @@ void SceneScriptUG16::DialogueQueueFlushed(int a1) {
void SceneScriptUG16::dialogueWithLuther() {
Dialogue_Menu_Clear_List();
- DM_Add_To_List_Never_Repeat_Once_Selected(1400, 5, 6, 2);
- DM_Add_To_List_Never_Repeat_Once_Selected(1410, 5, 4, 8);
- if (Game_Flag_Query(600)
- || Game_Flag_Query(601)
+ DM_Add_To_List_Never_Repeat_Once_Selected(1400, 5, 6, 2); // REPLICANTS
+ DM_Add_To_List_Never_Repeat_Once_Selected(1410, 5, 4, 8); // WORK
+ if (Game_Flag_Query(kFlagUG16LutherLanceTalkReplicants1)
+ || Game_Flag_Query(kFlagUG16LutherLanceTalkReplicants2)
) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1420, 6, 4, 5);
- DM_Add_To_List_Never_Repeat_Once_Selected(1430, 6, 4, 5);
- DM_Add_To_List_Never_Repeat_Once_Selected(1440, 6, 4, 5);
+ DM_Add_To_List_Never_Repeat_Once_Selected(1420, 6, 4, 5); // LIFESPAN
+ DM_Add_To_List_Never_Repeat_Once_Selected(1430, 6, 4, 5); // CLOVIS
+ DM_Add_To_List_Never_Repeat_Once_Selected(1440, 6, 4, 5); // VOIGT-KAMPFF
}
if ( Global_Variable_Query(kVariableCorruptedGuzzaEvidence) > 1
&& !Actor_Clue_Query(kActorMcCoy, kClueFolder)
) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1450, 6, 4, 5);
+ DM_Add_To_List_Never_Repeat_Once_Selected(1450, 6, 4, 5); // GUZZA
}
if (Actor_Clue_Query(kActorMcCoy, kClueEnvelope)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1460, 6, 4, 5);
+ DM_Add_To_List_Never_Repeat_Once_Selected(1460, 6, 4, 5); // RUNCITER
}
if ( Actor_Clue_Query(kActorMcCoy, kClueDNATyrell)
&& !Actor_Clue_Query(kActorMcCoy, kClueFolder)
- && Game_Flag_Query(698)
+ && Game_Flag_Query(kFlagUG15LanceLuthorTrade)
) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1470, 6, 4, 5);
+ DM_Add_To_List_Never_Repeat_Once_Selected(1470, 6, 4, 5); // TRADE
}
- Dialogue_Menu_Add_DONE_To_List(1480);
+ Dialogue_Menu_Add_DONE_To_List(1480); // DONE
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
switch (answer) {
- case 1400:
+ case 1400: // REPLICANTS
Actor_Says(kActorMcCoy, 5730, 13);
Actor_Face_Actor(kActorMcCoy, kActorLuther, true);
Actor_Says(kActorLuther, 100, 18);
@@ -281,14 +280,14 @@ void SceneScriptUG16::dialogueWithLuther() {
Actor_Says(kActorLuther, 130, 6);
Actor_Says(kActorMcCoy, 5825, 13);
Actor_Modify_Friendliness_To_Other(kActorLuther, kActorMcCoy, -5);
- if (Game_Flag_Query(560)) {
+ if (Game_Flag_Query(kFlagLutherLanceIsReplicant)) {
Actor_Says(kActorLuther, 140, 13);
Actor_Says(kActorLuther, 150, 14);
Actor_Says(kActorLuther, 160, 13);
Actor_Says(kActorLance, 140, 16);
Actor_Says(kActorMcCoy, 5790, 13);
Actor_Says(kActorLuther, 170, 14);
- Game_Flag_Set(600);
+ Game_Flag_Set(kFlagUG16LutherLanceTalkReplicants1);
Actor_Modify_Friendliness_To_Other(kActorLuther, kActorMcCoy, 5);
} else {
Actor_Says(kActorLuther, 180, 14);
@@ -296,19 +295,19 @@ void SceneScriptUG16::dialogueWithLuther() {
Actor_Says(kActorLance, 150, 17);
Actor_Says(kActorMcCoy, 5800, 13);
Actor_Says(kActorLuther, 190, 15);
- Game_Flag_Set(601);
+ Game_Flag_Set(kFlagUG16LutherLanceTalkReplicants2);
Actor_Modify_Friendliness_To_Other(kActorLuther, kActorMcCoy, -10);
}
break;
- case 1410:
+ case 1410: // WORK
Actor_Says(kActorMcCoy, 5735, 13);
Actor_Face_Actor(kActorMcCoy, kActorLuther, true);
Actor_Says(kActorLance, 160, 17);
Actor_Says(kActorLuther, 200, 14);
break;
- case 1420:
+ case 1420: // LIFESPAN
Actor_Says(kActorMcCoy, 5740, 13);
Actor_Face_Actor(kActorMcCoy, kActorLuther, true);
Actor_Says(kActorLance, 180, 15);
@@ -327,7 +326,7 @@ void SceneScriptUG16::dialogueWithLuther() {
Actor_Clue_Acquire(kActorMcCoy, kClueLutherLanceInterview, true, kActorLuther);
break;
- case 1430:
+ case 1430: // CLOVIS
Actor_Says(kActorMcCoy, 5745, 13);
Actor_Face_Actor(kActorMcCoy, kActorLuther, true);
Actor_Says(kActorLance, 240, 15);
@@ -337,7 +336,7 @@ void SceneScriptUG16::dialogueWithLuther() {
Actor_Says(kActorLance, 260, 15);
break;
- case 1440:
+ case 1440: // VOIGT-KAMPFF
Actor_Says(kActorMcCoy, 5750, 13);
Actor_Face_Actor(kActorMcCoy, kActorLuther, true);
Actor_Says(kActorLance, 280, 6);
@@ -346,7 +345,7 @@ void SceneScriptUG16::dialogueWithLuther() {
Actor_Modify_Friendliness_To_Other(kActorLuther, kActorMcCoy, -5);
break;
- case 1450:
+ case 1450: // GUZZA
Actor_Says(kActorMcCoy, 5755, 13);
Actor_Face_Actor(kActorMcCoy, kActorLuther, true);
Actor_Says(kActorLance, 290, 17);
@@ -362,10 +361,10 @@ void SceneScriptUG16::dialogueWithLuther() {
Actor_Says(kActorMcCoy, 5830, 13);
Actor_Says(kActorLance, 320, 16);
Actor_Says(kActorLance, 330, 15);
- Game_Flag_Set(698);
+ Game_Flag_Set(kFlagUG15LanceLuthorTrade);
break;
- case 1460:
+ case 1460: // RUNCITER
Actor_Says(kActorMcCoy, 5760, 13);
Actor_Face_Actor(kActorMcCoy, kActorLuther, true);
Actor_Says(kActorLuther, 370, 15);
@@ -377,7 +376,7 @@ void SceneScriptUG16::dialogueWithLuther() {
Actor_Says(kActorLance, 380, 13);
break;
- case 1470:
+ case 1470: // TRADE
Actor_Says(kActorMcCoy, 5765, 13);
Actor_Face_Actor(kActorMcCoy, kActorLuther, true);
Actor_Says(kActorLance, 400, 15);
@@ -397,11 +396,11 @@ void SceneScriptUG16::dialogueWithLuther() {
Actor_Says(kActorLance, 430, 6);
Actor_Says(kActorMcCoy, 5855, 13);
Actor_Says(kActorLuther, 410, 14);
- Game_Flag_Set(597);
+ Game_Flag_Set(kFlagUG16FolderFound);
Actor_Clue_Acquire(kActorMcCoy, kClueFolder, true, kActorLuther);
break;
- case 1480:
+ case 1480: // DONE
Actor_Says(kActorMcCoy, 4595, 14);
break;
}