diff options
author | Peter Kohaut | 2019-02-02 19:37:31 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-02-03 00:14:09 +0100 |
commit | f2d76c2d7162d8b3e514c6cb6f865ef527e037a2 (patch) | |
tree | af13f714f4277ee29b19fb8ab89db6939ad25713 /engines | |
parent | cee294137a95742a7be711c23bc4a3dcc7a6465e (diff) | |
download | scummvm-rg350-f2d76c2d7162d8b3e514c6cb6f865ef527e037a2.tar.gz scummvm-rg350-f2d76c2d7162d8b3e514c6cb6f865ef527e037a2.tar.bz2 scummvm-rg350-f2d76c2d7162d8b3e514c6cb6f865ef527e037a2.zip |
BLADERUNNER: Cleanup of scripts at start of chapter 5
Diffstat (limited to 'engines')
29 files changed, 253 insertions, 153 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h index f775b078ae..70afd44039 100644 --- a/engines/bladerunner/game_constants.h +++ b/engines/bladerunner/game_constants.h @@ -811,7 +811,7 @@ enum Flags { kFlagNotUsed370 = 370, // is never checked // 371 is never used // 372 is never used - + kFlagKP02Available = 373, kFlagAR02DektoraBoughtScorpions = 374, kFlagBB11SadikPunchedMcCoy = 375, // 376 is never used @@ -865,6 +865,7 @@ enum Flags { kFlagCT12ToUG09 = 433, kFlagUG13toUG18 = 434, // is never checked kFlagUG18toUG13 = 435, + kFlagUG13CallElevator = 436, kFlagNR04toNR03 = 437, kFlagNR03toNR04 = 438, kFlagNR06toNR08 = 439, @@ -873,15 +874,21 @@ enum Flags { kFlagNR07toNR06 = 442, kFlagGenericWalkerWaiting = 443, kFlagIzoShot = 444, + // 445 is never used + // 446 is never used kFlagTB03toUG17 = 447, kFlagUG17toTB03 = 448, kFlagUG02WeaponsChecked = 449, kFlagTB02ElevatorToTB05 = 450, kFlagTB05Entered = 451, + // 452 is never used kFlagTB02GuardTalk1 = 453, + // 454 is never used kFlagTB02GuardTalk2 = 455, kFlagTB02SteeleTalk = 456, kFlagTB02SteeleEnter = 457, + // 458 is never used + // 459 is never used kFlagSteeleWalkingAround = 460, kFlagMaggieIsHurt = 461, kFlagPS04GuzzaLeft = 462, @@ -906,9 +913,11 @@ enum Flags { // 481 is never used kFlagSteeleSmoking = 482, kFlagTB06Introduction = 483, + kFlagTB06Photographer = 485, kFlagDNARowAvailable = 486, kFlagKIAPrivacyAddon = 487, + // 488 is never used kFlagDektoraChapter2Started = 489, kFlagEarlyQStartedChapter1 = 490, kFlagEarlyQStartedChapter2 = 491, @@ -920,6 +929,10 @@ enum Flags { kFlagBB12Entered = 497, kFlagUG02FromUG01 = 498, kFlagUG02Interactive = 499, + // 500 is never used + // 501 is never used + // 502 is never used + // 503 is never used kFlagAR02DektoraWillBuyScorpions = 504, kFlagDR03ChewTalkExplosion = 505, kFlagBB08toBB12 = 506, @@ -928,13 +941,20 @@ enum Flags { kFlagBB11SadikFight = 509, kFlagNotUsed510 = 510, // is never set kFlagDR05ExplodedEntered = 511, + // 512 is never used + // 513 is never used + // 514 is never used kFlagDR05ViewExplosion = 515, kFlagCT07ZubenAttack = 516, + // 517 is never used + // 518 is never used kFlagTB06DogCollarTaken = 519, kFlagTB06KitchenBoxTaken = 520, kFlagHC03TrapDoorOpened = 521, + kFlagUG06Chapter4Started = 524, kFlagCT10Entered = 525, + // 526 is never used kFlagHF02toHF03 = 527, kFlagHF03toHF02 = 528, kFlagHF05toHF06 = 529, // is never checked @@ -949,6 +969,8 @@ enum Flags { kFlagCT09Entered = 538, kFlagCT09LeonInterrupted = 539, kFlagCT09DeskClerkTalk = 540, + // 541 is never used + kFlagClovisChapter4Started = 542, kFlagGordoTalk1 = 543, kFlagGordoTalk2 = 544, kFlagNotUsed545 = 545, // is never set @@ -960,9 +982,12 @@ enum Flags { kFlagUG16toDR06 = 551, // is never checked kFlagDR06toUG16 = 552, kFlagUG13Entered = 553, + kFlagUG13HomelessTalk1 = 554, + // 555 is never used kFlagUG16LutherLanceTalk1 = 556, kFlagNotUsed557, // is never checked kFlagDR01toCT11 = 558, + kFlagLutherLanceIsReplicant = 560, kFlagNR02GordoLeaveLighter = 561, kFlagHF05CrazyLegsTalk1 = 562, @@ -994,6 +1019,7 @@ enum Flags { kFlagLutherLanceAreDead = 595, kFlagUG16PulledGun = 596, kFlagUG16FolderFound = 597, + kFlagUG07ClovisCaughtMcCoy = 598, kFlagKIAPrivacyAddonIntro = 599, kFlagUG16LutherLanceTalkReplicants1 = 600, kFlagUG16LutherLanceTalkReplicants2 = 601, @@ -1019,8 +1045,13 @@ enum Flags { // 621 is never used kFlagNR08TouchedDektora = 622, kFlagUG07Empty = 623, + // 624 is never used kFlagTB07TyrellMeeting = 625, + // 626 is never used kFlagNR01McCoyIsDrugged = 627, + // 628 is never used + kFlagUnpaseGenWalkers = 629, + kFlagRatWalkingAround = 631, kFlagNR01DektoraFall = 632, kFlagNR11DektoraBurning = 633, @@ -1034,30 +1065,45 @@ enum Flags { kFlagNR10toNR11 = 641, // is never checked kFlagNR10McCoyBlinded = 642, kFlagSteeleKnowsBulletBobIsDead = 643, + kFlagNotUsed644 = 644, // is never checked kFlagCT11DogWrapperTaken = 645, kFlagSteeleDead = 646, // is never checked kFlagMA04McCoySleeping = 647, + kFlagMA04PhoneMessageFromClovis = 649, kFlagMA04PhoneMessageFromLucy = 650, kFlagNR08McCoyWatchingShow = 651, kFlagCrazylegsArrestedTalk = 652, + kFlagMcCoyIsNotHelpingReplicants = 653, + kFlagMA02RajifTalk = 655, kFlagUG02RagiationGooglesTaken = 656, + kFlagNR11BreakWindow = 659, kFlagDNARowAvailableTalk = 660, kFlagTB07ShadeDown = 661, // is never set + kFlagUG19Available = 665, + kFlagMcCoyFreedOfAccusations = 666, + // 667 is never used + // 668 is never used + // 669 is never used kFlagCallWithGuzza = 670, kFlagUG18GuzzaScene = 671, kFlagMA07toPS14 = 672, kFlagPS14toMA07 = 673, + + // 675 is never used kFlagUG15RatShot = 676, kFlagUG15BridgeWillBreak = 677, kFlagChapter2Intro = 678, kFlagChapter3Intro = 679, kFlagChapter4Intro = 680, + // 681 is never used kFlagUG15BridgeBroken = 682, + kFlagNotUsed686 = 686, + // 687 is never used kFlagPS05TV0 = 688, kFlagPS05TV1 = 689, kFlagPS05TV2 = 690, @@ -1065,7 +1111,12 @@ enum Flags { kFlagPS05TV4 = 692, kFlagUG03DeadHomeless = 693, kFlagUG14DeadHomeless = 694, + // 695 is never used + kFlagUG15LanceLuthorTrade = 698, + + // 700 is never used + kFlagBulletBobDead = 702, kFlagUG18BriefcaseTaken = 703, kFlagRC02EnteredChapter4 = 704, @@ -1078,17 +1129,21 @@ enum Flags { kFlagMA04WatchedTV = 711, kFlagMcCoyShotAtZuben = 712, kFlagDR04McCoyShotMoraji = 713, + kFlagDR06UnlockedToUG16 = 715, + kFlagRC04BobTalk3 = 717, kflagPS01toPS02 = 718, kFlagCT02McCoyFell = 719, kFlagCT02McCoyCombatReady = 720, + kFlagNotUsed721 = 721, kFlagChapter4Starting = 722, kFlagZubenBountyPaid = 723, kFlagUG15BridgeBreaks = 724, kFlagCT11DogWrapperAvailable = 725, kFlagAR02Entered = 726, kFlagPS04WeaponsOrderForm = 727, + // 728 is never used kFlagNR08DektoraShow = 729 }; @@ -1669,9 +1724,13 @@ enum GoalMcCoy { kGoalMcCoyNR04PassOut = 221, kGoalMcCoyNR11Shoot = 230, kGoalMcCoyNR10Fall = 231, + kGoalMcCoyUG07Caught = 301, + kGoalMcCoyUG07BrokenFinger = 302, + kGoalMcCoyUG07Released = 303, kGoalMcCoyCallWithGuzza = 350, kGoalMcCoyUG15Fall = 390, kGoalMcCoyUG15Die = 391, + kGoalMcCoyStartChapter5 = 400, kGoalMcCoyArrested = 500, kGoalMcCoyGone = 599 }; @@ -1855,7 +1914,10 @@ enum GoalClovis { kGoalClovisUG18SadikWillShootGuzza = 301, kGoalClovisUG18SadikIsShootingGuzza = 302, kGoalClovisUG18GuzzaDied = 303, - kGoalClovisUG18Leave = 310 + kGoalClovisUG18Leave = 310, + kGoalClovisStartChapter4 = 400, + kGoalClovisUG07ChaseMcCoy = 401, + kGoalClovisUG07KillMcCoy = 402 }; enum GoalLucy { diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp index 653dd3ee3c..a2d8cf3e16 100644 --- a/engines/bladerunner/script/ai/clovis.cpp +++ b/engines/bladerunner/script/ai/clovis.cpp @@ -63,10 +63,10 @@ bool AIScriptClovis::Update() { } if ( Global_Variable_Query(kVariableChapter) == 4 - && !Game_Flag_Query(542) + && !Game_Flag_Query(kFlagClovisChapter4Started) ) { - Game_Flag_Set(542); - Actor_Set_Goal_Number(kActorClovis, 400); + Game_Flag_Set(kFlagClovisChapter4Started); + Actor_Set_Goal_Number(kActorClovis, kGoalClovisStartChapter4); return true; } @@ -82,7 +82,7 @@ bool AIScriptClovis::Update() { Actor_Set_Goal_Number(kActorClovis, 512); } - if ( Game_Flag_Query(653) + if ( Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && !Game_Flag_Query(696) && Game_Flag_Query(697) ) { @@ -108,13 +108,13 @@ void AIScriptClovis::CompletedMovementTrack() { Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11TalkWithSadik); break; - case 401: + case kGoalClovisUG07ChaseMcCoy: AI_Movement_Track_Flush(kActorClovis); - if (Player_Query_Current_Scene() == 92) { - Actor_Set_Goal_Number(kActorClovis, 402); + if (Player_Query_Current_Scene() == kSceneUG07) { + Actor_Set_Goal_Number(kActorClovis, kGoalClovisUG07KillMcCoy); } else { - Actor_Set_Goal_Number(kActorClovis, 400); + Actor_Set_Goal_Number(kActorClovis, kGoalClovisStartChapter4); } break; @@ -149,7 +149,7 @@ void AIScriptClovis::OtherAgentExitedThisScene(int otherActorId) { } void AIScriptClovis::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) { - if (Game_Flag_Query(653) && Actor_Query_In_Set(kActorMcCoy, kSetKP07)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && Actor_Query_In_Set(kActorMcCoy, kSetKP07)) { Game_Flag_Set(697); Game_Flag_Set(714); // return true; @@ -182,7 +182,7 @@ bool AIScriptClovis::ShotAtAndHit() { } void AIScriptClovis::Retired(int byActorId) { - if (Game_Flag_Query(653)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { if (Actor_Query_In_Set(kActorClovis, kSetKP07)) { Global_Variable_Decrement(kVariableReplicants, 1); Actor_Set_Goal_Number(kActorClovis, 599); @@ -195,7 +195,7 @@ void AIScriptClovis::Retired(int byActorId) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); - Game_Flag_Reset(653); + Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); } } @@ -313,7 +313,7 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) { case kGoalClovisUG18SadikWillShootGuzza: case kGoalClovisUG18SadikIsShootingGuzza: - case 303: + case kGoalClovisUG18GuzzaDied: case kGoalClovisUG18Leave: return true; @@ -322,33 +322,33 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Set_At_Waypoint(kActorClovis, 33, 0); return true; - case 400: + case kGoalClovisStartChapter4: AI_Movement_Track_Flush(kActorClovis); Actor_Put_In_Set(kActorClovis, kSetFreeSlotA); Actor_Set_At_Waypoint(kActorClovis, 33, 0); return true; - case 401: + case kGoalClovisUG07ChaseMcCoy: AI_Movement_Track_Flush(kActorClovis); AI_Movement_Track_Append(kActorClovis, 341, 0); AI_Movement_Track_Append(kActorClovis, 342, 0); AI_Movement_Track_Repeat(kActorClovis); return true; - case 402: + case kGoalClovisUG07KillMcCoy: Player_Loses_Control(); Actor_Force_Stop_Walking(kActorMcCoy); - Actor_Face_Actor(kActorMcCoy, kActorClovis, 1); - Loop_Actor_Walk_To_Actor(kActorClovis, kActorMcCoy, 48, 0, 1); - Actor_Face_Actor(kActorClovis, kActorMcCoy, 1); - Actor_Change_Animation_Mode(kActorClovis, 6); + Actor_Face_Actor(kActorMcCoy, kActorClovis, true); + Loop_Actor_Walk_To_Actor(kActorClovis, kActorMcCoy, 48, false, true); + Actor_Face_Actor(kActorClovis, kActorMcCoy, true); + Actor_Change_Animation_Mode(kActorClovis, kAnimationModeCombatAttack); if (Player_Query_Combat_Mode()) { - Actor_Change_Animation_Mode(kActorMcCoy, 49); + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatDie); } else { - Actor_Change_Animation_Mode(kActorMcCoy, 48); + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie); } Delay(3000); - Actor_Retired_Here(kActorMcCoy, 12, 48, 1, kActorClovis); + Actor_Retired_Here(kActorMcCoy, 12, 48, true, kActorClovis); return true; case 500: @@ -356,7 +356,7 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 510: - if (Game_Flag_Query(653)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { Actor_Set_Goal_Number(kActorClovis, 513); } else { Actor_Set_Goal_Number(kActorClovis, 511); @@ -383,7 +383,7 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 513: Actor_Put_In_Set(kActorClovis, kSetKP07); Actor_Set_Targetable(kActorClovis, true); - if (Game_Flag_Query(653)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { Global_Variable_Set(kVariableReplicants, 0); Global_Variable_Increment(kVariableReplicants, 1); Actor_Set_At_XYZ(kActorClovis, 45.0f, -41.52f, -85.0f, 750); diff --git a/engines/bladerunner/script/ai/dektora.cpp b/engines/bladerunner/script/ai/dektora.cpp index 8ec974082a..3f58af389f 100644 --- a/engines/bladerunner/script/ai/dektora.cpp +++ b/engines/bladerunner/script/ai/dektora.cpp @@ -305,7 +305,7 @@ void AIScriptDektora::Retired(int byActorId) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); - Game_Flag_Reset(653); + Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); return; //true; diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp index 742e818dbd..0aab3d2665 100644 --- a/engines/bladerunner/script/ai/gordo.cpp +++ b/engines/bladerunner/script/ai/gordo.cpp @@ -299,7 +299,7 @@ void AIScriptGordo::Retired(int byActorId) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); - Game_Flag_Reset(653); + Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); return;// true; } diff --git a/engines/bladerunner/script/ai/izo.cpp b/engines/bladerunner/script/ai/izo.cpp index f7bbfce855..2717db6ad7 100644 --- a/engines/bladerunner/script/ai/izo.cpp +++ b/engines/bladerunner/script/ai/izo.cpp @@ -249,7 +249,7 @@ void AIScriptIzo::Retired(int byActorId) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); - Game_Flag_Reset(653); + Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); return; //true; } diff --git a/engines/bladerunner/script/ai/maggie.cpp b/engines/bladerunner/script/ai/maggie.cpp index 7d56e12a2e..5b045d526b 100644 --- a/engines/bladerunner/script/ai/maggie.cpp +++ b/engines/bladerunner/script/ai/maggie.cpp @@ -142,7 +142,7 @@ void AIScriptMaggie::ReceivedClue(int clueId, int fromActorId) { } void AIScriptMaggie::ClickedByPlayer() { - if (!Game_Flag_Query(653) && Global_Variable_Query(kVariableChapter) == 5) { + if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && Global_Variable_Query(kVariableChapter) == 5) { if (Actor_Query_Goal_Number(kActorMaggie) == 413) { Actor_Set_Targetable(kActorMaggie, true); AI_Movement_Track_Flush(kActorMaggie); diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp index d5fb581cf5..866ee654ea 100644 --- a/engines/bladerunner/script/ai/mccoy.cpp +++ b/engines/bladerunner/script/ai/mccoy.cpp @@ -413,17 +413,17 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { _fallSpeed = -6.0f; return true; - case 301: + case kGoalMcCoyUG07Caught: _animationState = 62; _animationFrame = 0; return true; - case 302: + case kGoalMcCoyUG07BrokenFinger: _animationState = 64; _animationFrame = 0; return true; - case 303: + case kGoalMcCoyUG07Released: _animationState = 65; _animationFrame = 0; return true; @@ -482,7 +482,7 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 400: Actor_Set_Health(kActorMcCoy, 50, 50); - Game_Flag_Set(373); + Game_Flag_Set(kFlagKP02Available); affectionTowards = Global_Variable_Query(kVariableAffectionTowards); if (affectionTowards == kAffectionTowardsSteele) { Actor_Modify_Friendliness_To_Other(kActorSteele, kActorMcCoy, 3); @@ -493,32 +493,38 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Modify_Friendliness_To_Other(kActorSteele, kActorMcCoy, -5); Actor_Modify_Friendliness_To_Other(kActorClovis, kActorMcCoy, 5); } - if (Game_Flag_Query(666)) { + + if (Game_Flag_Query(kFlagMcCoyFreedOfAccusations)) { Actor_Modify_Friendliness_To_Other(kActorSteele, kActorMcCoy, 3); } + if (Actor_Query_Friendliness_To_Other(kActorSteele, kActorMcCoy) < Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy)) { - Game_Flag_Set(653); + Game_Flag_Set(kFlagMcCoyIsNotHelpingReplicants); } + affectionTowards = Global_Variable_Query(kVariableAffectionTowards); if (affectionTowards == kAffectionTowardsSteele) { - if (Game_Flag_Query(653)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { Global_Variable_Set(kVariableAffectionTowards, kAffectionTowardsNone); } } else if (affectionTowards == kAffectionTowardsDektora || affectionTowards == kAffectionTowardsLucy ) { - if (!Game_Flag_Query(653)) { + if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { Global_Variable_Set(kVariableAffectionTowards, kAffectionTowardsNone); } } - if (!Game_Flag_Query(653)) { + + if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { Game_Flag_Set(kFlagMaggieIsHurt); } + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Global_Variable_Set(kVariableChapter, 5); Outtake_Play(kOuttakeMovieD, false, -1); - if (Game_Flag_Query(666)) { + + if (Game_Flag_Query(kFlagMcCoyFreedOfAccusations)) { Chapter_Enter(5, kSetMA07, kSceneMA07); } else { Game_Flag_Set(kFlagMA06ToMA02); @@ -1804,7 +1810,7 @@ void AIScriptMcCoy::UG15fall() { && -210.0f < x && -70.0f > x ) { - Game_Flag_Set(kFlagUG15BridgeBroken); + Game_Flag_Set(kFlagUG15BridgeBroken); Scene_Loop_Set_Default(3); // kUG15LoopMainLoopBridgeBroken Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true); // kUG15LoopBridgeBreaks Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyUG15Fall); diff --git a/engines/bladerunner/script/ai/officer_grayford.cpp b/engines/bladerunner/script/ai/officer_grayford.cpp index a4680c4389..1e7484cb92 100644 --- a/engines/bladerunner/script/ai/officer_grayford.cpp +++ b/engines/bladerunner/script/ai/officer_grayford.cpp @@ -46,36 +46,69 @@ void AIScriptOfficerGrayford::Initialize() { } bool AIScriptOfficerGrayford::Update() { - if (Global_Variable_Query(kVariableChapter) == 4 && Actor_Query_Goal_Number(kActorOfficerGrayford) < 300) { + if (Global_Variable_Query(kVariableChapter) == 4 + && Actor_Query_Goal_Number(kActorOfficerGrayford) < 300) { AI_Movement_Track_Flush(kActorOfficerGrayford); Actor_Set_Goal_Number(kActorOfficerGrayford, 300); - } else if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorOfficerGrayford) < 400) { + return false; + } + + if (Global_Variable_Query(kVariableChapter) == 5 + && Actor_Query_Goal_Number(kActorOfficerGrayford) < 400 + ) { AI_Movement_Track_Flush(kActorOfficerGrayford); Actor_Set_Goal_Number(kActorOfficerGrayford, 400); - } else if (!Game_Flag_Query(kFlagMcCoyInDNARow) - && Actor_Query_Goal_Number(kActorOfficerGrayford) > 102 - && Actor_Query_Goal_Number(kActorOfficerGrayford) < 110) { + return false; + } + + if (!Game_Flag_Query(kFlagMcCoyInDNARow) + && Actor_Query_Goal_Number(kActorOfficerGrayford) > 102 + && Actor_Query_Goal_Number(kActorOfficerGrayford) < 110 + ) { Actor_Set_Goal_Number(kActorOfficerGrayford, 110); - } else if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 0) { + return false; + } + + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 0) { Actor_Set_Goal_Number(kActorOfficerGrayford, 1); - } else if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 10) { + return false; + } + + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 10) { AI_Movement_Track_Flush(kActorOfficerGrayford); Actor_Set_Goal_Number(kActorOfficerGrayford, 0); - } else if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 102) { + return false; + } + + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 102) { Actor_Set_Goal_Number(kActorOfficerGrayford, 103); - } else if (Game_Flag_Query(629)) { + return false; + } + + if (Game_Flag_Query(kFlagUnpaseGenWalkers)) { AI_Movement_Track_Unpause(kActorGenwalkerA); AI_Movement_Track_Unpause(kActorGenwalkerB); AI_Movement_Track_Unpause(kActorGenwalkerC); - } else if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 310 - && Actor_Query_Which_Set_In(kActorOfficerGrayford) != Player_Query_Current_Set()) { + return false; + } + + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 310 + && Actor_Query_Which_Set_In(kActorOfficerGrayford) != Player_Query_Current_Set() + ) { Non_Player_Actor_Combat_Mode_Off(kActorOfficerGrayford); Actor_Set_Goal_Number(kActorOfficerGrayford, 305); - } else if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 599 - && Actor_Query_Which_Set_In(kActorOfficerGrayford) != Player_Query_Current_Set()) { + return false; + } + + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 599 + && Actor_Query_Which_Set_In(kActorOfficerGrayford) != Player_Query_Current_Set() + ) { Actor_Set_Health(kActorOfficerGrayford, 50, 50); Actor_Set_Goal_Number(kActorOfficerGrayford, 305); - } else if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 305) { + return false; + } + + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 305) { switch (Actor_Query_Which_Set_In(kActorOfficerGrayford)) { case kSetRC03: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { @@ -164,6 +197,7 @@ bool AIScriptOfficerGrayford::Update() { break; } + return false; } return false; } @@ -534,7 +568,9 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Countdown_Timer_Reset(kActorOfficerGrayford, 2); - if (_animationState == 35 || _animationState == 34) { + if (_animationState == 35 + || _animationState == 34 + ) { _animationState = 37; _animationFrame = 0; } diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp index 2aa3fecd77..ad94d2eeda 100644 --- a/engines/bladerunner/script/ai/officer_leary.cpp +++ b/engines/bladerunner/script/ai/officer_leary.cpp @@ -86,8 +86,8 @@ bool AIScriptOfficerLeary::Update() { return false; } - if (Game_Flag_Query(629)) { - Game_Flag_Reset(629); + if (Game_Flag_Query(kFlagUnpaseGenWalkers)) { + Game_Flag_Reset(kFlagUnpaseGenWalkers); return false; } diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp index 109f8d05c7..4747d79dc3 100644 --- a/engines/bladerunner/script/ai/sadik.cpp +++ b/engines/bladerunner/script/ai/sadik.cpp @@ -214,7 +214,7 @@ void AIScriptSadik::Retired(int byActorId) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); - Game_Flag_Reset(653); + Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); return; //true; } @@ -347,7 +347,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 410: - if (Game_Flag_Query(653) == 1) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) == 1) { Actor_Set_Goal_Number(kActorSadik, 414); } else { Actor_Set_Goal_Number(kActorSadik, 411); @@ -430,7 +430,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 418: - Game_Flag_Reset(653); + Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); Actor_Set_Goal_Number(kActorClovis, 518); Non_Player_Actor_Combat_Mode_On(kActorSadik, kActorCombatStateIdle, true, kActorMcCoy, 9, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, false); return true; diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp index b07a0397c5..2d6ce66fd5 100644 --- a/engines/bladerunner/script/ai/steele.cpp +++ b/engines/bladerunner/script/ai/steele.cpp @@ -165,7 +165,7 @@ bool AIScriptSteele::Update() { break; case 5: - if (Game_Flag_Query(653) + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && Actor_Query_Goal_Number(kActorSteele) < 400 ) { Actor_Set_Goal_Number(kActorSteele, 400); @@ -1363,7 +1363,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Set_At_XYZ(kActorSteele, -48.83f, -36.55f, 69.98f, 280); Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 36, false, true); Actor_Face_Actor(kActorMcCoy, kActorSteele, true); - if (Game_Flag_Query(653) == 1) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) == 1) { Actor_Says(kActorSteele, 400, 3); Actor_Says(kActorMcCoy, 2165, 14); Actor_Says(kActorSteele, 410, 3); diff --git a/engines/bladerunner/script/ai/zuben.cpp b/engines/bladerunner/script/ai/zuben.cpp index 1cc2a541d2..5e7ca2d549 100644 --- a/engines/bladerunner/script/ai/zuben.cpp +++ b/engines/bladerunner/script/ai/zuben.cpp @@ -161,7 +161,7 @@ void AIScriptZuben::CompletedMovementTrack() { AI_Countdown_Timer_Reset(kActorZuben, 0); Game_Flag_Reset(kFlagCT02McCoyFell); Game_Flag_Set(kFlagCT02McCoyCombatReady); - Game_Flag_Set(721); // not used anywhere + Game_Flag_Set(kFlagNotUsed721); Music_Stop(2); Actor_Set_Goal_Number(kActorZuben, kGoalZubenFled); Set_Enter(kSetCT02, kSceneCT02); @@ -298,7 +298,7 @@ void AIScriptZuben::Retired(int byActorId) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); - Game_Flag_Reset(653); + Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); // return true; return; diff --git a/engines/bladerunner/script/scene/ct12.cpp b/engines/bladerunner/script/scene/ct12.cpp index cab008d97a..e7171b96ec 100644 --- a/engines/bladerunner/script/scene/ct12.cpp +++ b/engines/bladerunner/script/scene/ct12.cpp @@ -126,6 +126,7 @@ bool SceneScriptCT12::ClickedOnActor(int actorId) { Actor_Says(kActorMcCoy, 8910, 16); } + // cut off feature? grayford never visit CT12 as goal 308 is never triggered if (actorId == kActorOfficerGrayford && Global_Variable_Query(kVariableChapter) == 4 && Game_Flag_Query(kFlagUG18GuzzaScene) @@ -147,9 +148,9 @@ bool SceneScriptCT12::ClickedOnActor(int actorId) { 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); + Game_Flag_Set(kFlagUnpaseGenWalkers); + Game_Flag_Set(kFlagMcCoyFreedOfAccusations); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyStartChapter5); } return false; } @@ -201,7 +202,7 @@ bool SceneScriptCT12::ClickedOnExit(int exitId) { if (exitId == 4) { 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); + Game_Flag_Set(kFlagUnpaseGenWalkers); } Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); diff --git a/engines/bladerunner/script/scene/hf01.cpp b/engines/bladerunner/script/scene/hf01.cpp index c0e5530e69..d01d6d8514 100644 --- a/engines/bladerunner/script/scene/hf01.cpp +++ b/engines/bladerunner/script/scene/hf01.cpp @@ -158,7 +158,7 @@ bool SceneScriptHF01::ClickedOnActor(int actorId) { ) && !Game_Flag_Query(kFlagCrazylegsArrested) && Actor_Query_Goal_Number(kActorCrazylegs) != 2 - && Game_Flag_Query(653) + && Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && !Game_Flag_Query(662) ) { Game_Flag_Set(662); diff --git a/engines/bladerunner/script/scene/hf06.cpp b/engines/bladerunner/script/scene/hf06.cpp index 83d96a5d3f..19c10480e4 100644 --- a/engines/bladerunner/script/scene/hf06.cpp +++ b/engines/bladerunner/script/scene/hf06.cpp @@ -294,7 +294,7 @@ void SceneScriptHF06::sub_401EF4() { Actor_Says(kActorSteele, 340, 58); Actor_Says(kActorSteele, 350, 58); Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); - Game_Flag_Set(644); + Game_Flag_Set(kFlagNotUsed644); Actor_Set_Goal_Number(kActorSteele, 402); Actor_Face_Actor(kActorSteele, actorId, true); Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack); diff --git a/engines/bladerunner/script/scene/kp01.cpp b/engines/bladerunner/script/scene/kp01.cpp index 273fa58608..e0f2dbd40b 100644 --- a/engines/bladerunner/script/scene/kp01.cpp +++ b/engines/bladerunner/script/scene/kp01.cpp @@ -32,7 +32,7 @@ void SceneScriptKP01::InitializeScene() { } else { Setup_Scene_Information(239.0f, -12.2f, -146.0f, 820); Game_Flag_Reset(413); - if (!Game_Flag_Query(674) && !Game_Flag_Query(653)) { + if (!Game_Flag_Query(674) && !Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { Game_Flag_Set(674); Actor_Set_Goal_Number(kActorSteele, 420); } @@ -152,7 +152,7 @@ void SceneScriptKP01::PlayerWalkedIn() { Game_Flag_Reset(418); } else { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 211.0f, -12.2f, -146.0f, 0, 0, false, 0); - if (!Game_Flag_Query(653) + if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && !Game_Flag_Query(714) && Actor_Query_Goal_Number(kActorSteele) == 420 && Actor_Query_Goal_Number(kActorSteele) != 599) { diff --git a/engines/bladerunner/script/scene/kp02.cpp b/engines/bladerunner/script/scene/kp02.cpp index 3db4056197..a19f0e8e88 100644 --- a/engines/bladerunner/script/scene/kp02.cpp +++ b/engines/bladerunner/script/scene/kp02.cpp @@ -132,7 +132,7 @@ void SceneScriptKP02::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -884.0f, -615.49f, 3035.0f, 0, 0, false, 0); Game_Flag_Reset(414); } - if (Game_Flag_Query(653) + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && Actor_Query_Goal_Number(kActorSteele) != 599 ) { Actor_Set_Goal_Number(kActorSteele, 450); diff --git a/engines/bladerunner/script/scene/kp03.cpp b/engines/bladerunner/script/scene/kp03.cpp index ca4e665b54..fca41a02e5 100644 --- a/engines/bladerunner/script/scene/kp03.cpp +++ b/engines/bladerunner/script/scene/kp03.cpp @@ -52,10 +52,10 @@ void SceneScriptKP03::InitializeScene() { && !Game_Flag_Query(422) && !Game_Flag_Query(484) ) - && ((Game_Flag_Query(653) + && ((Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && Game_Flag_Query(420) ) - || (!Game_Flag_Query(653) + || (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && Game_Flag_Query(417) ) ) @@ -183,7 +183,7 @@ void SceneScriptKP03::SceneFrameAdvanced(int frame) { } if (!Game_Flag_Query(422)) { //todo ? same condition as before Actor_Query_XYZ(kActorSteele, &x, &y, &z); - if (Game_Flag_Query(653) && Actor_Query_Which_Set_In(kActorSteele) == 46) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && Actor_Query_Which_Set_In(kActorSteele) == 46) { if ((Game_Flag_Query(417) && -130.0f > x) || (Game_Flag_Query(420) && -130.0f < x)) { v1 = 1; } @@ -224,7 +224,7 @@ void SceneScriptKP03::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1.0f, -36.55f, 87.0f, 0, 0, false, 0); } if (Actor_Query_Is_In_Current_Set(kActorSteele) && Actor_Query_Goal_Number(kActorSteele) != 419) { - if (Game_Flag_Query(653)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { if (Game_Flag_Query(420)) { Actor_Set_Goal_Number(kActorSteele, 410); } diff --git a/engines/bladerunner/script/scene/kp05.cpp b/engines/bladerunner/script/scene/kp05.cpp index c46b739e53..d2726060a2 100644 --- a/engines/bladerunner/script/scene/kp05.cpp +++ b/engines/bladerunner/script/scene/kp05.cpp @@ -53,7 +53,7 @@ void SceneScriptKP05::SceneLoaded() { Unobstacle_Object("OBSTACLEBOX20", true); Clickable_Object("BRIDGE02"); Unclickable_Object("BRIDGE02"); - if (!Actor_Clue_Query(kActorMcCoy, kCluePowerSource) && Game_Flag_Query(653)) { + if (!Actor_Clue_Query(kActorMcCoy, kCluePowerSource) && Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { Item_Add_To_World(118, 960, 9, -1095.0f, 0.0f, 770.0f, 256, 24, 24, false, true, false, true); } } diff --git a/engines/bladerunner/script/scene/kp06.cpp b/engines/bladerunner/script/scene/kp06.cpp index ad0bb9966d..e1a1e56b17 100644 --- a/engines/bladerunner/script/scene/kp06.cpp +++ b/engines/bladerunner/script/scene/kp06.cpp @@ -108,7 +108,7 @@ bool SceneScriptKP06::ClickedOnExit(int exitId) { if (exitId == 1) { if (Actor_Clue_Query(kActorSadik, kCluePowerSource) || Actor_Query_Goal_Number(kActorSadik) != 416) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -731.0f, 8.26f, -657.0f, 0, 1, false, 0)) { - if (Game_Flag_Query(653)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { if (!Game_Flag_Query(714)) { Player_Set_Combat_Mode(false); } @@ -151,7 +151,7 @@ void SceneScriptKP06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptKP06::PlayerWalkedIn() { - if (!Game_Flag_Query(653) && Game_Flag_Query(579)) { + if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && Game_Flag_Query(579)) { Game_Flag_Reset(579); if (Actor_Query_Goal_Number(kActorSteele) == 499) { Actor_Face_Actor(kActorSteele, kActorMcCoy, true); diff --git a/engines/bladerunner/script/scene/kp07.cpp b/engines/bladerunner/script/scene/kp07.cpp index d6d1a8888f..a4ed0ceaad 100644 --- a/engines/bladerunner/script/scene/kp07.cpp +++ b/engines/bladerunner/script/scene/kp07.cpp @@ -28,7 +28,7 @@ void SceneScriptKP07::InitializeScene() { Setup_Scene_Information(-12.0f, -41.58f, 72.0f, 0); Game_Flag_Reset(578); Scene_Exit_Add_2D_Exit(0, 315, 185, 381, 285, 0); - if (Game_Flag_Query(653)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { if (Game_Flag_Query(kFlagDektoraIsReplicant) && Actor_Query_Goal_Number(kActorDektora) < kGoalDektoraGone ) { @@ -88,12 +88,12 @@ void SceneScriptKP07::InitializeScene() { } void SceneScriptKP07::SceneLoaded() { - if (!Game_Flag_Query(653)) { + if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { Music_Play(19, 25, 0, 0, -1, 1, 0); } Obstacle_Object("BUNK_TRAY01", true); Unobstacle_Object("BUNK_TRAY01", true); - if (Game_Flag_Query(653)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { Player_Set_Combat_Mode(false); Scene_Exits_Disable(); } @@ -112,7 +112,7 @@ bool SceneScriptKP07::ClickedOnActor(int actorId) { if (Game_Flag_Query(697) || actorId != kActorClovis || Actor_Query_Goal_Number(kActorClovis) == 599 || Actor_Query_Goal_Number(kActorClovis) == 515) { return false; } - if (Game_Flag_Query(653)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { Actor_Set_Goal_Number(kActorClovis, 516); } else { Music_Play(20, 31, 0, 0, -1, 1, 0); @@ -155,7 +155,7 @@ void SceneScriptKP07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptKP07::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 9.0f, -41.88f, -81.0f, 0, 0, false, 0); if (!Game_Flag_Query(658)) { - if (Game_Flag_Query(653)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { Actor_Face_Actor(kActorMcCoy, kActorClovis, true); Actor_Says(kActorClovis, 1240, 3); Actor_Says(kActorMcCoy, 8500, 3); diff --git a/engines/bladerunner/script/scene/ma02.cpp b/engines/bladerunner/script/scene/ma02.cpp index 74eaedbaad..29a14a9bb1 100644 --- a/engines/bladerunner/script/scene/ma02.cpp +++ b/engines/bladerunner/script/scene/ma02.cpp @@ -44,7 +44,7 @@ void SceneScriptMA02::InitializeScene() { if (Global_Variable_Query(kVariableChapter) >= 4 && Global_Variable_Query(kVariableChapter) == 5 - && Game_Flag_Query(653) + && Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) ) { Actor_Set_Goal_Number(kActorMaggie, 599); Actor_Change_Animation_Mode(kActorMaggie, 88); @@ -68,7 +68,7 @@ void SceneScriptMA02::InitializeScene() { } if ( Global_Variable_Query(kVariableChapter) == 5 - && Game_Flag_Query(653) + && Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && !Actor_Clue_Query(kActorMcCoy, kClueCrystalsCigarette) ) { Overlay_Play("MA02OVER", 0, 1, 0, 0); @@ -98,7 +98,7 @@ bool SceneScriptMA02::ClickedOn3DObject(const char *objectName, bool a2) { Actor_Face_Object(kActorMcCoy, "BAR-MAIN", true); if (Global_Variable_Query(kVariableChapter) < 4) { Actor_Set_Goal_Number(kActorMaggie, 3); - } else if (Global_Variable_Query(kVariableChapter) == 5 && Game_Flag_Query(653) && !Actor_Clue_Query(kActorMcCoy, kClueCrystalsCigarette)) { + } else if (Global_Variable_Query(kVariableChapter) == 5 && Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && !Actor_Clue_Query(kActorMcCoy, kClueCrystalsCigarette)) { Overlay_Remove("MA02OVER"); Item_Pickup_Spin_Effect(985, 480, 240); Actor_Voice_Over(1150, kActorVoiceOver); @@ -188,7 +188,7 @@ void SceneScriptMA02::PlayerWalkedIn() { if ( Global_Variable_Query(kVariableChapter) == 5 && !Game_Flag_Query(654) ) { - if (Game_Flag_Query(653)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { Actor_Says(kActorMcCoy, 2390, kAnimationModeIdle); Music_Play(2, 25, 0, 3, -1, 0, 0); } else { diff --git a/engines/bladerunner/script/scene/ma04.cpp b/engines/bladerunner/script/scene/ma04.cpp index c3c26f6166..d750d8894a 100644 --- a/engines/bladerunner/script/scene/ma04.cpp +++ b/engines/bladerunner/script/scene/ma04.cpp @@ -175,7 +175,7 @@ bool SceneScriptMA04::ClickedOn2DRegion(int region) { Sound_Play(123, 100, 0, 0, 50); Overlay_Remove("MA04OVER"); Delay(500); - if (Game_Flag_Query(653)) { + if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsDektora) { phoneCallWithDektora(); } else if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy) { diff --git a/engines/bladerunner/script/scene/ma07.cpp b/engines/bladerunner/script/scene/ma07.cpp index f943f46dd6..2b5c0f43cc 100644 --- a/engines/bladerunner/script/scene/ma07.cpp +++ b/engines/bladerunner/script/scene/ma07.cpp @@ -78,7 +78,7 @@ bool SceneScriptMA07::ClickedOnExit(int exitId) { if (Global_Variable_Query(kVariableChapter) == 4 && Game_Flag_Query(kFlagUG18GuzzaScene) ) { - Actor_Set_Goal_Number(kActorMcCoy, 400); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyStartChapter5); } else { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); @@ -148,14 +148,14 @@ void SceneScriptMA07::PlayerWalkedIn() { Actor_Set_Goal_Number(kActorGaff, 300); } - if (Game_Flag_Query(666)) { + if (Game_Flag_Query(kFlagMcCoyFreedOfAccusations)) { Actor_Voice_Over(1360, kActorVoiceOver); Actor_Voice_Over(1370, kActorVoiceOver); Actor_Voice_Over(1380, kActorVoiceOver); Actor_Voice_Over(1390, kActorVoiceOver); Actor_Voice_Over(1400, kActorVoiceOver); Delay(1000); - Game_Flag_Reset(666); + Game_Flag_Reset(kFlagMcCoyFreedOfAccusations); Game_Flag_Set(kFlagMA06ToMA02); Set_Enter(kSetMA02_MA04, kSceneMA02); } diff --git a/engines/bladerunner/script/scene/ps14.cpp b/engines/bladerunner/script/scene/ps14.cpp index 392776a635..4bbfa3ad78 100644 --- a/engines/bladerunner/script/scene/ps14.cpp +++ b/engines/bladerunner/script/scene/ps14.cpp @@ -77,8 +77,8 @@ bool SceneScriptPS14::ClickedOnExit(int exitId) { && Game_Flag_Query(kFlagUG18GuzzaScene) ) { if (Actor_Clue_Query(kActorMcCoy, kClueBriefcase)) { - Game_Flag_Set(666); - Actor_Set_Goal_Number(kActorMcCoy, 400); + Game_Flag_Set(kFlagMcCoyFreedOfAccusations); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyStartChapter5); } else { Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested); } diff --git a/engines/bladerunner/script/scene/ug07.cpp b/engines/bladerunner/script/scene/ug07.cpp index 795ab2f2d6..7683437b83 100644 --- a/engines/bladerunner/script/scene/ug07.cpp +++ b/engines/bladerunner/script/scene/ug07.cpp @@ -119,33 +119,33 @@ bool SceneScriptUG07::ClickedOnExit(int exitId) { if (!Game_Flag_Query(kFlagMcCoyRetiredHuman) && Game_Flag_Query(kFlagUG18GuzzaScene) && Global_Variable_Query(kVariableChapter) == 4 - && !Game_Flag_Query(598) + && !Game_Flag_Query(kFlagUG07ClovisCaughtMcCoy) ) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 49.0f, -12.21f, -130.0f, 0, true, false, 0)) { - Game_Flag_Set(598); + Game_Flag_Set(kFlagUG07ClovisCaughtMcCoy); Actor_Put_In_Set(kActorClovis, kSetUG07); Actor_Set_At_XYZ(kActorClovis, 118.02f, -12.21f, -154.0f, 768); Player_Set_Combat_Mode(true); Actor_Face_Actor(kActorMcCoy, kActorClovis, true); Loop_Actor_Walk_To_XYZ(kActorClovis, 98.02f, -12.21f, -154.0f, 0, false, false, 0); Actor_Face_Actor(kActorClovis, kActorMcCoy, true); - Actor_Set_Goal_Number(kActorMcCoy, 301); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyUG07Caught); Actor_Face_Heading(kActorMcCoy, 0, true); Delay(1500); Actor_Says_With_Pause(kActorClovis, 550, 1.0f, 3); if (Actor_Clue_Query(kActorClovis, kClueMcCoyRetiredDektora)) { Actor_Says(kActorClovis, 560, 3); - Actor_Set_Goal_Number(kActorMcCoy, 302); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyUG07BrokenFinger); Sound_Play(561, 100, 0, 0, 50); Delay(2000); } if (Actor_Clue_Query(kActorClovis, kClueMcCoyRetiredLucy)) { Actor_Says(kActorClovis, 570, 3); - Actor_Set_Goal_Number(kActorMcCoy, 302); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyUG07BrokenFinger); Sound_Play(561, 100, 0, 0, 50); Delay(2000); } - Actor_Set_Goal_Number(kActorMcCoy, 303); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyUG07Released); Delay(1000); Actor_Set_Goal_Number(kActorClovis, 401); } diff --git a/engines/bladerunner/script/scene/ug12.cpp b/engines/bladerunner/script/scene/ug12.cpp index f30f56c740..58d2e8e7f4 100644 --- a/engines/bladerunner/script/scene/ug12.cpp +++ b/engines/bladerunner/script/scene/ug12.cpp @@ -34,7 +34,7 @@ void SceneScriptUG12::InitializeScene() { } Scene_Exit_Add_2D_Exit(0, 538, 222, 615, 346, 1); - if (Game_Flag_Query(373)) { + if (Game_Flag_Query(kFlagKP02Available)) { Scene_Exit_Add_2D_Exit(1, 334, 176, 426, 266, 0); } @@ -53,7 +53,7 @@ void SceneScriptUG12::InitializeScene() { Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); - if (Game_Flag_Query(373)) { + if (Game_Flag_Query(kFlagKP02Available)) { Scene_Loop_Set_Default(2); } else { Scene_Loop_Set_Default(0); diff --git a/engines/bladerunner/script/scene/ug13.cpp b/engines/bladerunner/script/scene/ug13.cpp index da212b74a7..63eb767e4d 100644 --- a/engines/bladerunner/script/scene/ug13.cpp +++ b/engines/bladerunner/script/scene/ug13.cpp @@ -102,7 +102,7 @@ bool SceneScriptUG13::ClickedOn3DObject(const char *objectName, bool a2) { Scene_Loop_Set_Default(1); Scene_Loop_Start_Special(kSceneLoopModeOnce, 0, false); Game_Flag_Reset(kFlagUB08ElevatorUp); - Game_Flag_Set(436); + Game_Flag_Set(kFlagUG13CallElevator); return true; } else { Scene_Loop_Set_Default(4); @@ -125,9 +125,9 @@ bool SceneScriptUG13::ClickedOnActor(int actorId) { if (Actor_Query_Goal_Number(kActorTransient) != 6 && Actor_Query_Goal_Number(kActorTransient) != 599 ) { - if (!Game_Flag_Query(554)) { + if (!Game_Flag_Query(kFlagUG13HomelessTalk1)) { Actor_Face_Actor(kActorMcCoy, kActorTransient, true); - Game_Flag_Set(554); + Game_Flag_Set(kFlagUG13HomelessTalk1); Actor_Says(kActorMcCoy, 5560, 13); Actor_Says_With_Pause(kActorMcCoy, 5565, 3.0f, 18); Actor_Says(kActorTransient, 70, 31); @@ -204,17 +204,16 @@ bool SceneScriptUG13::ClickedOnExit(int exitId) { Footstep_Sound_Override_On(3); Loop_Actor_Travel_Stairs(kActorMcCoy, 11, true, kAnimationModeIdle); Footstep_Sound_Override_Off(); - if (!sub_402AD0()) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -477.0f, 141.9f, -870.0f, 0, false, false, 0); - Game_Flag_Set(kFlagUG13toUG18); - Set_Enter(kSetUG18, kSceneUG18); - return true; - } - Actor_Face_Heading(kActorMcCoy, 325, false); - Loop_Actor_Travel_Stairs(kActorMcCoy, 11, true, kAnimationModeIdle); - } else { - return true; + // This is path in unreachable in the orginal game + // if (false) { + // Actor_Face_Heading(kActorMcCoy, 325, false); + // Loop_Actor_Travel_Stairs(kActorMcCoy, 11, true, kAnimationModeIdle); + // } + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -477.0f, 141.9f, -870.0f, 0, false, false, 0); + Game_Flag_Set(kFlagUG13toUG18); + Set_Enter(kSetUG18, kSceneUG18); } + return true; } return false; @@ -229,12 +228,12 @@ void SceneScriptUG13::SceneFrameAdvanced(int frame) { Ambient_Sounds_Play_Sound(372, 90, 0, 0, 100); } - if (Game_Flag_Query(436) + if (Game_Flag_Query(kFlagUG13CallElevator) && frame > 29 && frame < 91 ) { Scene_Exit_Add_2D_Exit(0, 394, 205, 464, 281, 0); - Game_Flag_Reset(436); + Game_Flag_Reset(kFlagUG13CallElevator); //return true; return; } @@ -307,27 +306,7 @@ void SceneScriptUG13::PlayerWalkedOut() { void SceneScriptUG13::DialogueQueueFlushed(int a1) { } -void SceneScriptUG13::sub_4023D8() { - Actor_Face_Actor(kActorMcCoy, kActorTransient, true); - 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); - Actor_Says(kActorMcCoy, 5610, 15); - Actor_Says(kActorTransient, 140, 32); - Actor_Says(kActorMcCoy, 5615, 18); - Actor_Says(kActorTransient, 160, 33); - Actor_Says(kActorMcCoy, 5620, 9); - Actor_Says(kActorTransient, 170, 30); - Actor_Says(kActorMcCoy, 5625, 12); - Actor_Says(kActorTransient, 180, 32); - Actor_Says(kActorMcCoy, 5630, 18); - Actor_Says(kActorTransient, 190, 32); - Actor_Says(kActorMcCoy, 5635, 15); - Actor_Says(kActorTransient, 200, 31); -} - -void SceneScriptUG13::sub_4025E0() { +void SceneScriptUG13::talkAboutGuzza() { Actor_Clue_Acquire(kActorMcCoy, kClueHomelessManInterview2, false, kActorTransient); Actor_Modify_Friendliness_To_Other(kActorTransient, kActorMcCoy, -10); Actor_Says(kActorTransient, 220, 30); @@ -340,10 +319,6 @@ void SceneScriptUG13::sub_4025E0() { Actor_Says(kActorTransient, 260, 32); } -int SceneScriptUG13::sub_402AD0() { - return 0; -} - void SceneScriptUG13::dialogueWithHomeless1() { Dialogue_Menu_Clear_List(); DM_Add_To_List_Never_Repeat_Once_Selected(1320, 6, 3, 1); // OTHERS @@ -362,12 +337,28 @@ void SceneScriptUG13::dialogueWithHomeless1() { switch (answer) { case 1320: // OTHERS - sub_4023D8(); + Actor_Face_Actor(kActorMcCoy, kActorTransient, true); + 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); + Actor_Says(kActorMcCoy, 5610, 15); + Actor_Says(kActorTransient, 140, 32); + Actor_Says(kActorMcCoy, 5615, 18); + Actor_Says(kActorTransient, 160, 33); + Actor_Says(kActorMcCoy, 5620, 9); + Actor_Says(kActorTransient, 170, 30); + Actor_Says(kActorMcCoy, 5625, 12); + Actor_Says(kActorTransient, 180, 32); + Actor_Says(kActorMcCoy, 5630, 18); + Actor_Says(kActorTransient, 190, 32); + Actor_Says(kActorMcCoy, 5635, 15); + Actor_Says(kActorTransient, 200, 31); break; case 1330: // FAT MAN Actor_Says(kActorMcCoy, 5585, 16); - sub_4025E0(); + talkAboutGuzza(); break; case 1340: // SEWERS @@ -413,7 +404,8 @@ void SceneScriptUG13::dialogueWithHomeless2() { int answer = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); - if (answer == 1370) { // DIRECTIONS + switch (answer) { + case 1370: // DIRECTIONS Actor_Says(kActorMcCoy, 5665, 16); Actor_Says(kActorTransient, 300, 32); Actor_Says(kActorMcCoy, 5680, 19); @@ -422,7 +414,9 @@ void SceneScriptUG13::dialogueWithHomeless2() { Actor_Start_Speech_Sample(kActorTransient, 110); Actor_Set_Goal_Number(kActorTransient, 395); Actor_Says(kActorMcCoy, 5685, 18); - } else if (answer == 1380) { // FAT MAN + break; + + case 1380: // FAT MAN if (Actor_Clue_Query(kActorMcCoy, kClueHomelessManInterview2)) { Actor_Says(kActorMcCoy, 5670, 9); Actor_Says(kActorTransient, 340, 31); @@ -435,12 +429,15 @@ void SceneScriptUG13::dialogueWithHomeless2() { Actor_Clue_Acquire(kActorMcCoy, kClueHomelessManKid, false, kActorTransient); } else { Actor_Says(kActorMcCoy, 5700, 15); - sub_4025E0(); + talkAboutGuzza(); } - } else if (answer == 1390) { // REPLICANTS + break; + + case 1390: // REPLICANTS Actor_Says(kActorMcCoy, 5675, 9); Actor_Says(kActorTransient, 370, 32); Actor_Says(kActorMcCoy, 5705, 10); + break; } } diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h index ca6f416367..1212371c12 100644 --- a/engines/bladerunner/script/scene_script.h +++ b/engines/bladerunner/script/scene_script.h @@ -483,9 +483,7 @@ DECLARE_SCRIPT(UG12) END_SCRIPT DECLARE_SCRIPT(UG13) - void sub_4023D8(); - void sub_4025E0(); - int sub_402AD0(); + void talkAboutGuzza(); void dialogueWithHomeless1(); void dialogueWithHomeless2(); END_SCRIPT |