diff options
115 files changed, 2332 insertions, 1913 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp index 66f2e7a6bb..c9528cf2ef 100644 --- a/engines/bladerunner/actor.cpp +++ b/engines/bladerunner/actor.cpp @@ -562,9 +562,7 @@ 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); - } + assert(newFrame >= 0); if (_animationId != newAnimation) { if (_fps != 0 && _fps != -1) { diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h index 31851c91f3..52ef19ce58 100644 --- a/engines/bladerunner/game_constants.h +++ b/engines/bladerunner/game_constants.h @@ -440,7 +440,7 @@ enum SpinnerDestinations { enum Flags { kFlagNotUsed0 = 0, // is never checked - kFlagRC02Discovered = 1, + kFlagRC02Entered = 1, // 2 is never used kFlagGotOfficersStatement = 3, kFlagRC02FirstLeave = 4, @@ -545,7 +545,7 @@ enum Flags { kFlagNotUsed103 = 103, // is never set kFlagKleinTalkPaintTransfer = 104, kFlagKleinTalkChromeDebris = 105, - kFlagIsabellaIntroduced = 105, + kFlagIsabellaIntroduced = 106, kFlagHC04toRC03 = 107, kFlagRC03toHC04 = 108, kFlagHC04toHC02 = 109, @@ -580,7 +580,7 @@ enum Flags { kFlagKleinInsulted = 138, // 139 is never used // 140 is never used - kFlagRC02LucyDeskAvailable = 141, + kFlagRC51Available = 141, kFlagNotUsed142 = 142, // is never checked // 143 is never used kFlagCT07toCT06 = 144, @@ -736,8 +736,14 @@ enum Flags { kFlagGaffSpinnerCT12 = 294, kFlagRC04BobShootMcCoy = 295, kFlagRC04McCoyCombatMode = 296, - + kFlagBB05toBB06 = 297, + kFlagBB06toBB05 = 298, + kFlagBB05toBB07 = 299, + kFlagBB07toBB05 = 300, + kFlagBB05toBB12 = 301, // is never checked + kFlagBB12toBB05 = 302, kFlagRC04McCoyWarned = 303, + kFlagCT11toCT09 = 304, // is never checked kFlagRC04BobTalkAmmo = 305, kFlagNotUsed306 = 306, // is never set kFlagSpinnerAtTB02 = 307, @@ -757,12 +763,47 @@ enum Flags { kFlagAR02toAR01 = 321, kFlagAR01toHC01 = 322, kFlagHC01toAR01 = 323, + kFlagUG01SteamOff = 324, + + kFlagFishDealerTalk = 328, + kFlagInsectDealerInterviewed = 329, + kFlagHassanTalk = 330, + kFlagScorpionsChecked = 331, + + kFlagInsectDealerTalk = 366, + kFlagStungByScorpion = 367, + + kFlagNotUsed370 = 370, // is never checked + kFlagDirectorsCut = 378, + + kFlagHC01toHC02 = 384, + kFlagHC02toHC01 = 385, + kFlagHC01toHC03 = 386, // is never checked + kFlagHC03toHC01 = 387, + kFlagHC03TrapDoorOpen = 388, + // 389 is never used + // 390 is never used + KFlagMcCoyAndOfficerLearyTalking = 392, + KFlagMcCoyAndOfficerLearyArtMetaphor = 397, + + kFlagIzoTalk1 = 400, + kFlagIzoTalk2 = 401, + kFlagHC03Available = 402, + kFlagHC03CageOpen = 403, + kFlagHawkersBarkeepIntroduction = 404, + kFlagHawkersBarkeepBraceletTalk = 405, + + kFlagUnused407 = 407, // is never checked + kFlagUG09toCT12 = 432, kFlagCT12ToUG09 = 433, kFlagGenericWalkerWaiting = 443, + kFlagIzoShot = 444, + + kFlagUG02WeaponsChecked = 449, kFlagTB02ElevatorToTB05 = 450, kFlagTB05Entered = 451, kFlagTB02GuardTalk1 = 453, @@ -773,12 +814,17 @@ enum Flags { kFlagMaggieIsHurt = 461, kFlagPS04GuzzaLeft = 462, kFlagMcCoyArrested = 465, + kFlagUG10GateOpen = 474, kFlagMcCoyAtPS03 = 478, // has no use kFlagMcCoyAtHCxx = 479, kFlagTB06Introduction = 483, kFlagPhotographerToTB06 = 485, + kFlagDNARowAvailable = 486, kFlagKIAPrivacyAddon = 487, kFlagCT04HomelessTrashFinish = 492, + kFlagUG02FromUG01 = 498, + kFlagUG02Interactive = 499, + kFlagDR05ExplodedEntered = 511, kFlagDR05BombExplosionView = 515, kFlagCT07ZubenAttack = 516, @@ -789,21 +835,27 @@ enum Flags { kFlagMcCoySleeping = 647, kFlagPhoneMessageFromClovis = 649, kFlagPhoneMessageFromLucy = 650, + kFlagRagiationGooglesTaken = 656, + kFlagDNARowAvailableTalk = 660, kFlagChapter2Intro = 678, kFlagPS05TV0 = 688, kFlagPS05TV1 = 689, kFlagPS05TV2 = 690, kFlagPS05TV3 = 691, kFlagPS05TV4 = 692, + kFlagUG03DeadHomeless = 693, kFlagRC04Locked = 702, kFlagTB06PhotographTalk1 = 707, + kFlagUG02AmmoTaken = 708, kFlagRC51Discovered = 709, + kFlagAR01Entered = 710, kFlagMA04WatchedTV = 711, kFlagMcCoyShotAtZuben = 712, kFlagRC04BobTalk3 = 717, kFlagCT02McCoyFell = 719, kFlagCT02McCoyCombatReady = 720, kFlagZubenBountyPaid = 723, + kFlagAR02Entered = 726, kFlagPS04WeaponsOrderForm = 727 }; @@ -812,13 +864,18 @@ enum Variables { kVariableChinyen = 2, kVariablePoliceMazeScore = 9, kVariablePoliceMazePS10TargetCounter = 10, + kVariablePoliceMazePS11TargetCounter = 11, + kVariablePoliceMazePS12TargetCounter = 12, + kVariablePoliceMazePS13TargetCounter = 13, kVariableMcCoyEvidenceMissed = 14, + kVariableIzoShot = 19, // has no use kVariableBobShot = 24, // has no use kVariableGenericWalkerAModel = 32, kVariableGenericWalkerBModel = 33, kVariableGenericWalkerCModel = 34, kVariableWalkLoopActor = 37, kVariableWalkLoopRun = 38, + kVariableMcCoyDrinks = 42, // is never checked kVariableAffectionTowards = 45, // 0 none, 1 steele, 2 dektora, 3 lucy kVariableDNAEvidences = 48, kVariableReplicants = 51, @@ -924,7 +981,7 @@ enum Scenes { kSceneCT01 = 13, // Chinatown - Howie Lee Restaurant kSceneCT02 = 14, // Chinatown - Kitchen kSceneCT03 = 15, // Chinatown - Back alley - kSceneCT04 = 16, // Chinatown - Back alley - dumpster + kSceneCT04 = 16, // Chinatown - Back alley - Dumpster kSceneCT05 = 17, // Chinatown - Warehouse - Inside kSceneCT06 = 18, // Chinatown - Passage kSceneCT07 = 19, // Chinatown - Passage form back @@ -939,9 +996,9 @@ enum Scenes { kSceneDR04 = 28, kSceneDR05 = 29, kSceneDR06 = 30, - kSceneHC01 = 31, // Hawker's circle - Green pawn + kSceneHC01 = 31, // Hawker's circle - Green pawn - Outside kSceneHC02 = 32, // Hawker's circle - China bar - kSceneHC03 = 33, // Hawker's circle - + kSceneHC03 = 33, // Hawker's circle - Green pawn - Inside kSceneHF01 = 34, kSceneHF02 = 35, kSceneHF03 = 36, @@ -994,8 +1051,8 @@ enum Scenes { kSceneTB03 = 83, kSceneTB05 = 84, // Tyrell Building - Grav Test Lab - outside kSceneTB06 = 85, // Tyrell Building - Grav Test Lab - inside - kSceneUG01 = 86, - kSceneUG02 = 87, + kSceneUG01 = 86, // Underground - Under Bullet Bob entrance + kSceneUG02 = 87, // Underground - Under Green pawn kSceneUG03 = 88, kSceneUG04 = 89, kSceneUG05 = 90, @@ -1129,20 +1186,88 @@ enum Sets }; enum GameItems { - kItemPoliceMazeTarget1 = 0, - kItemPoliceMazeTarget2 = 1, - kItemPoliceMazeTarget3 = 2, - kItemPoliceMazeTarget4 = 3, - kItemPoliceMazeTarget5 = 4, - kItemPoliceMazeTarget6 = 5, - kItemPoliceMazeTarget7 = 6, - kItemPoliceMazeTarget8 = 7, - kItemPoliceMazeTarget9 = 8, + kItemPS10Target1 = 0, + kItemPS10Target2 = 1, + kItemPS10Target3 = 2, + kItemPS10Target4 = 3, + kItemPS10Target5 = 4, + kItemPS10Target6 = 5, + kItemPS10Target7 = 6, + kItemPS10Target8 = 7, + kItemPS10Target9 = 8, + kItemPS11Target1 = 9, + kItemPS11Target2 = 10, + kItemPS11Target3 = 11, + kItemPS11Target4 = 12, + kItemPS11Target5 = 13, + kItemPS11Target6 = 14, + kItemPS11Target7 = 15, + kItemPS11Target8 = 16, + kItemPS11Target9 = 17, + kItemPS11Target10 = 18, + kItemPS11Target11 = 19, + kItemPS11Target12 = 20, + kItemPS11Target13 = 21, + kItemPS11Target14 = 22, + kItemPS11Target15 = 23, + // 24 is never used + // 25 is never used + // 26 is never used + kItemPS11Target16 = 27, + // 28 is never used + kItemPS12Target1 = 29, + kItemPS12Target2 = 30, + kItemPS12Target3 = 31, + kItemPS12Target4 = 32, + kItemPS12Target5 = 33, + kItemPS12Target6 = 34, + kItemPS12Target7 = 35, + kItemPS12Target8 = 36, + kItemPS12Target9 = 37, + kItemPS12Target10 = 38, + kItemPS12Target11 = 39, + kItemPS12Target12 = 40, + kItemPS12Target13 = 41, + kItemPS12Target14 = 42, + kItemPS12Target15 = 43, + kItemPS12Target16 = 44, + kItemPS12Target17 = 45, + kItemPS13Target1 = 46, + kItemPS13Target2 = 47, + kItemPS13Target3 = 48, + kItemPS13Target4 = 49, + kItemPS13Target5 = 50, + kItemPS13Target6 = 51, + kItemPS13Target7 = 52, + kItemPS13Target8 = 53, + kItemPS13Target9 = 54, + kItemPS13Target10 = 55, + kItemPS13Target11 = 56, + kItemPS13Target12 = 57, + kItemPS13Target13 = 58, + // 59 is never used + // 60 is never used + // 61 is never used + kItemPS13Target14 = 62, + kItemPS13Target15 = 63, + // 64 is never used + // 65 is never used kItemChromeDebris = 66, + // 67 is never used + // 68 is never used + // 69 is never used + // 70 is never used + // 71 is never used + // 72 is never used + // 73 is never used + // 74 is never used + // 75 is never used + // 76 is never used kItemDragonflyEarring = 76, kItemCandy = 79, kItemChopstickWrapper = 82, kItemDogCollar = 84, + kItemRadiationGoogles = 88, kItemToyDog = 98, kItemShellCasingA = 100, kItemShellCasingB = 101, @@ -1150,10 +1275,13 @@ enum GameItems { kItemDeadDogA = 103, kItemDeadDogB = 104, kItemDeadDogC = 105, + kItemScrorpions = 106, + kItemCamera = 107, kItemKitchenBox = 108, kItemWeaponsCrate = 110, kItemWeaponsOrderForm = 111, - kItemTyrellSalesPamphlet = 119 + kItemTyrellSalesPamphlet = 119, + kItemHC03Lock = 121 }; enum Elevators { @@ -1226,16 +1354,29 @@ enum PlayerAgenda { kPlayerAgendaUserChoice = 4 }; +enum AffectionTowards { + kAffectionTowardsNone = 0, + kAffectionTowardsSteele = 1, + kAffectionTowardsDektora = 2, + kAffectionTowardsLucy = 3 +}; + enum GoalMcCoy { kGoalMcCoyDefault = 0, kGoalMcCoyDodge = 1 }; enum GoalSteele { + kGoalSteeleDefault = 0, + kGoalSteeleApprehendIzo = 100, kGoalSteeleGoToTB02 = 110, kGoalSteeleLeaveTB02 = 111, kGoalSteeleGoToPoliceStation = 112, kGoalSteeleWalkAround = 113, + kGoalSteeleShootIzo = 120, + kGoalSteeleArrestIzo = 121, + kGoalSteeleIzoBlockedByMcCoy = 125, + kGoalSteeleLeaveRC03 = 130, kGoalSteeleWalkAroundRestart = 190 }; @@ -1245,6 +1386,28 @@ enum GoalGuzza { kGoalGuzzaGoToOffice = 102 }; +enum GoalIzo { + kGoalIzoDefault = 0, + kGoalIzoPrepareCamera = 1, + kGoalIzoTakePhoto = 2, + kGoalIzoRunToUG02 = 3, + kGoalIzoStopRunning = 100, + kGoalIzoRunToRC03 = 101, + kGoalIzoWaitingAtRC03 = 102, + kGoalIzoEscape = 103, // how can this happen? can mccoy catch izo in ug02? + kGoalIzoRC03Walk = 110, + kGoalIzoRC03Run = 111, + kGoalIzoRC03RunAway = 114, + kGoalIzoGetArrested = 120, + kGoalIzoGotArrested = 180, + kGoalIzoGoToHC01 = 150, + kGoalIzoGoToHC03 = 155, + kGoalIzoDieHidden = 198, + kGoalIzoDie = 199, + + kGoalIzoDead = 599 +}; + enum GoalTransient { kGoalTransientDefault = 0, kGoalTransientCT04Leave = 2 @@ -1258,6 +1421,14 @@ enum GoalBulletBob { kGoalBulletBobDead = 4 }; +enum GoalRunciter { + kGoalRunciterDefault = 0, + kGoalRunciterWalkAround = 1, + kGoalRunciterHide = 2, + kGoalRunciterAtShop = 300, + kGoalRunciterDead = 599 +}; + enum GoalZuben { kGoalZubenDefault = 0, kGoalZubenCT01Leave = 1, diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp index a47a4bb7dd..d5043280a1 100644 --- a/engines/bladerunner/script/ai/clovis.cpp +++ b/engines/bladerunner/script/ai/clovis.cpp @@ -174,7 +174,7 @@ void AIScriptClovis::Retired(int byActorId) { Delay(2000); Player_Set_Combat_Mode(false); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); Game_Flag_Reset(653); @@ -413,15 +413,19 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Says(kActorMcCoy, 8505, kAnimationModeTalk); Actor_Says(kActorClovis, 1300, kAnimationModeTalk); Actor_Says(kActorClovis, 1310, kAnimationModeTalk); - 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(20, 0, -1); - if (Global_Variable_Query(kVariableAffectionTowards) == 3 && Game_Flag_Query(46)) { - Outtake_Play(21, 0, -1); - } else if (Global_Variable_Query(kVariableAffectionTowards) == 2 && Game_Flag_Query(47)) { - Outtake_Play(22, 0, -1); - } - Outtake_Play(23, 0, -1); + Outtake_Play(kOuttakeEnd4A, 0, -1); + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy + && Game_Flag_Query(kFlagLucyIsReplicant) + ) { + Outtake_Play(kOuttakeEnd4B, 0, -1); + } else if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsDektora + && Game_Flag_Query(kFlagDektoraIsReplicant) + ) { + Outtake_Play(kOuttakeEnd4C, 0, -1); + } + Outtake_Play(kOuttakeEnd4D, 0, -1); Game_Over(); return true; diff --git a/engines/bladerunner/script/ai/dektora.cpp b/engines/bladerunner/script/ai/dektora.cpp index b7268c0daa..e6203132e7 100644 --- a/engines/bladerunner/script/ai/dektora.cpp +++ b/engines/bladerunner/script/ai/dektora.cpp @@ -87,12 +87,13 @@ bool AIScriptDektora::Update() { Actor_Set_Goal_Number(kActorDektora, 300); } } else if (Game_Flag_Query(489)) { - if (Game_Flag_Query(504) == 1 - && !Game_Flag_Query(374) - && Player_Query_Current_Scene() - && Player_Query_Current_Scene() != 1) { - if (Game_Flag_Query(726)) { - Item_Remove_From_World(106); + if ( Game_Flag_Query(504) == 1 + && !Game_Flag_Query(374) + && Player_Query_Current_Scene() + && Player_Query_Current_Scene() != 1 + ) { + if (Game_Flag_Query(kFlagAR02Entered)) { + Item_Remove_From_World(kItemScrorpions); } Game_Flag_Set(374); } @@ -292,7 +293,7 @@ void AIScriptDektora::Retired(int byActorId) { Delay(2000); Player_Set_Combat_Mode(false); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); Game_Flag_Reset(653); @@ -1095,8 +1096,8 @@ void AIScriptDektora::checkCombat() { && Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorDektora) != 450 ) { - if (Global_Variable_Query(kVariableAffectionTowards) == 2) { - Global_Variable_Set(kVariableAffectionTowards, 0); + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsDektora) { + Global_Variable_Set(kVariableAffectionTowards, kAffectionTowardsNone); } Actor_Set_Goal_Number(kActorDektora, 450); diff --git a/engines/bladerunner/script/ai/hawkers_barkeep.cpp b/engines/bladerunner/script/ai/hawkers_barkeep.cpp index 8e82ecc63c..5f77eb91c6 100644 --- a/engines/bladerunner/script/ai/hawkers_barkeep.cpp +++ b/engines/bladerunner/script/ai/hawkers_barkeep.cpp @@ -119,61 +119,15 @@ bool AIScriptHawkersBarkeep::GoalChanged(int currentGoalNumber, int newGoalNumbe bool AIScriptHawkersBarkeep::UpdateAnimation(int *animation, int *frame) { switch (_animationState) { case 0: - if (_var1 == 1) { - if (_var1 == 1) { - *animation = 706; - if (_animationFrame <= 3) - _var3 = 1; - - if (_animationFrame == 11) { - if (Random_Query(0, 2)) - _var3 = -1; - } - - _animationFrame += _var3; - - if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(706)) { - *animation = 705; - _animationFrame = 0; - _var1 = 0; - } - } else { - *animation = 707; - - if (_var2) { - _var2--; - - if (_var2 == 0) - _var3 = 2 * Random_Query(0, 1) - 1; - } else { - if (_animationFrame <= 11) - _var3 = 1; - - if (_animationFrame == 14) { - if (Random_Query(0, 2)) - _var3 = -1; - } - - if (_animationFrame == 18) - _var2 = Random_Query(5, 15); - - _animationFrame++; - if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(707)) { - *animation = 705; - _animationFrame = 0; - _var1 = 0; - _var2 = 0; - } - } - } - } else if (_var1 == 0) { + if (_var1 == 0) { *animation = 705; if (_var2) { _var2--; - if (!Random_Query(0, 6)) + if (Random_Query(0, 6) == 0) { _var3 = -_var3; + } } else { _animationFrame += _var3; @@ -203,48 +157,95 @@ bool AIScriptHawkersBarkeep::UpdateAnimation(int *animation, int *frame) { } } } - } - break; + } else if (_var1 == 1) { + *animation = 706; + if (_animationFrame <= 3) + _var3 = 1; + + if (_animationFrame == 11) { + if (Random_Query(0, 2)) + _var3 = -1; + } - case 1: - if (_var1 == 1) { - if (_var1 == 1) { - *animation = 706; - _animationFrame++; + _animationFrame += _var3; - if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(706)) { - _animationFrame = 0; - _animationState = _animationStateNext; - *animation = _animationNext; - } + if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(706)) { + *animation = 705; + _animationFrame = 0; + _var1 = 0; + } + } else if (_var1 == 2) { + *animation = 707; + + if (_var2) { + _var2--; + + if (_var2 == 0) + _var3 = 2 * Random_Query(0, 1) - 1; } else { - *animation = 707; - _animationFrame += 2; + if (_animationFrame <= 11) + _var3 = 1; + if (_animationFrame == 14) { + if (Random_Query(0, 2) != 0) { + _var3 = -1; + } + } + + if (_animationFrame == 18) { + _var2 = Random_Query(5, 15); + } + + _animationFrame++; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(707)) { + *animation = 705; _animationFrame = 0; - _animationState = _animationStateNext; - *animation = _animationNext; + _var1 = 0; + _var2 = 0; } } - } else if (_var1 == 0) { + } + break; + + case 1: + if (_var1 == 0) { _animationFrame = 0; _animationState = _animationStateNext; *animation = _animationNext; + } else if (_var1 == 1) { + *animation = 706; + _animationFrame++; + + if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(706)) { + _animationFrame = 0; + _animationState = _animationStateNext; + *animation = _animationNext; + } + } else if (_var1 == 2) { + *animation = 707; + _animationFrame += 2; + + if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(707)) { + _animationFrame = 0; + _animationState = _animationStateNext; + *animation = _animationNext; + } } + break; case 2: *animation = 710; - if (!_animationFrame && _flag) { + if (_animationFrame == 0 && _flag) { _animationState = 0; _var1 = 0; } else { _animationFrame++; - if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(710)) + if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(710)) { _animationFrame = 0; + } } break; diff --git a/engines/bladerunner/script/ai/holloway.cpp b/engines/bladerunner/script/ai/holloway.cpp index 7b5fd1dde8..ed4453ec60 100644 --- a/engines/bladerunner/script/ai/holloway.cpp +++ b/engines/bladerunner/script/ai/holloway.cpp @@ -165,10 +165,10 @@ bool AIScriptHolloway::GoalChanged(int currentGoalNumber, int newGoalNumber) { break; case 257: - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Player_Gains_Control(); - Outtake_Play(11, 0, 1); + Outtake_Play(kOuttakeInterrogation, 0, 1); if (Global_Variable_Query(40) == 1) { Actor_Set_Goal_Number(kActorDektora, 245); Actor_Change_Animation_Mode(kActorDektora, kAnimationModeIdle); diff --git a/engines/bladerunner/script/ai/insect_dealer.cpp b/engines/bladerunner/script/ai/insect_dealer.cpp index db957f99e3..fb0924a066 100644 --- a/engines/bladerunner/script/ai/insect_dealer.cpp +++ b/engines/bladerunner/script/ai/insect_dealer.cpp @@ -50,7 +50,9 @@ void AIScriptInsectDealer::Initialize() { } bool AIScriptInsectDealer::Update() { - if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorInsectDealer) < 400) + if (Global_Variable_Query(kVariableChapter) == 5 + && Actor_Query_Goal_Number(kActorInsectDealer) < 400 + ) Actor_Set_Goal_Number(kActorInsectDealer, 400); return false; @@ -111,7 +113,7 @@ bool AIScriptInsectDealer::GoalChanged(int currentGoalNumber, int newGoalNumber) if (!Game_Flag_Query(374)) { Game_Flag_Set(374); - Item_Remove_From_World(106); + Item_Remove_From_World(kItemScrorpions); } } diff --git a/engines/bladerunner/script/ai/izo.cpp b/engines/bladerunner/script/ai/izo.cpp index 06966ef101..3f2715ac78 100644 --- a/engines/bladerunner/script/ai/izo.cpp +++ b/engines/bladerunner/script/ai/izo.cpp @@ -51,28 +51,39 @@ void AIScriptIzo::Initialize() { } bool AIScriptIzo::Update() { - if (Actor_Query_Goal_Number(kActorIzo) == 100 && Player_Query_Current_Scene() == kSceneUG02) { - Actor_Set_Targetable(kActorIzo, 1); - Actor_Set_Goal_Number(kActorIzo, 101); + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoStopRunning + && Player_Query_Current_Scene() == kSceneUG02 + ) { + Actor_Set_Targetable(kActorIzo, true); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoRunToRC03); return true; } - if (Global_Variable_Query(kVariableChapter) == 3 - && Actor_Query_Goal_Number(kActorIzo) == 599 - && Actor_Query_Which_Set_In(kActorIzo) == 70) { + if (Global_Variable_Query(kVariableChapter) == 1 + && Actor_Query_Goal_Number(kActorIzo) == kGoalIzoDead + && Actor_Query_Which_Set_In(kActorIzo) == kSetRC03 + ) { Actor_Put_In_Set(kActorIzo, kSetFreeSlotI); Actor_Set_At_Waypoint(kActorIzo, 41, 0); } - if (!Actor_Query_Goal_Number(kActorIzo) && Player_Query_Current_Scene() == kSceneTB02) { - Actor_Set_Goal_Number(kActorIzo, 155); + + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoDefault + && Player_Query_Current_Scene() == kSceneTB02 + ) { + Actor_Set_Goal_Number(kActorIzo, kGoalIzoGoToHC03); } + if (Global_Variable_Query(kVariableChapter) == 4 - && Actor_Query_Goal_Number(kActorIzo) < 599 - && Actor_Query_Goal_Number(kActorIzo) < 300 - && Actor_Query_Goal_Number(kActorIzo) != 180) { + && Actor_Query_Goal_Number(kActorIzo) < kGoalIzoDead + && Actor_Query_Goal_Number(kActorIzo) < 300 + && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoGotArrested + ) { Actor_Set_Goal_Number(kActorIzo, 300); } - if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorIzo) < 400) { + + if (Global_Variable_Query(kVariableChapter) == 5 + && Actor_Query_Goal_Number(kActorIzo) < 400 + ) { Actor_Set_Goal_Number(kActorIzo, 400); } @@ -85,38 +96,38 @@ void AIScriptIzo::TimerExpired(int timer) { void AIScriptIzo::CompletedMovementTrack() { switch (Actor_Query_Goal_Number(kActorIzo)) { - case 3: - Actor_Set_Goal_Number(kActorIzo, 101); + case kGoalIzoRunToUG02: + Actor_Set_Goal_Number(kActorIzo, kGoalIzoRunToRC03); Player_Gains_Control(); return; //true; - case 101: - Actor_Set_Goal_Number(kActorIzo, 102); + case kGoalIzoRunToRC03: + Actor_Set_Goal_Number(kActorIzo, kGoalIzoWaitingAtRC03); return; //true; - case 110: - case 111: - Actor_Set_Goal_Number(kActorIzo, 114); - Actor_Set_Goal_Number(kActorSteele, 100); + case kGoalIzoRC03Walk: + case kGoalIzoRC03Run: + Actor_Set_Goal_Number(kActorIzo, kGoalIzoRC03RunAway); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleApprehendIzo); Scene_Exits_Enable(); return; //true; - case 114: + case kGoalIzoRC03RunAway: Scene_Exits_Enable(); return; //true; - case 120: + case kGoalIzoGetArrested: Game_Flag_Set(kFlagIzoArrested); - Actor_Set_Goal_Number(kActorIzo, 180); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoGotArrested); Scene_Exits_Enable(); return; //true; - case 150: - Actor_Set_Goal_Number(kActorIzo, 155); + case kGoalIzoGoToHC01: + Actor_Set_Goal_Number(kActorIzo, kGoalIzoGoToHC03); return; //true; - case 155: - Actor_Set_Goal_Number(kActorIzo, 150); + case kGoalIzoGoToHC03: + Actor_Set_Goal_Number(kActorIzo, kGoalIzoGoToHC01); return; //true; case 300: @@ -136,29 +147,31 @@ void AIScriptIzo::ReceivedClue(int clueId, int fromActorId) { } void AIScriptIzo::ClickedByPlayer() { - if (Actor_Query_Goal_Number(kActorIzo) > 500) { - Actor_Face_Actor(kActorMcCoy, kActorIzo, 1); + if (Actor_Query_Goal_Number(kActorIzo) > 500) { // Dead + Actor_Face_Actor(kActorMcCoy, kActorIzo, true); Actor_Says(kActorMcCoy, 8585, 13); return; //true; } - if (Actor_Query_Goal_Number(kActorIzo) == 101 && Player_Query_Current_Set() == kSetUG02) { + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoRunToRC03 + && Player_Query_Current_Set() == kSetUG02 + ) { Player_Loses_Control(); - Actor_Set_Goal_Number(kActorIzo, 100); - Actor_Face_Actor(kActorMcCoy, kActorIzo, 1); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoStopRunning); + Actor_Face_Actor(kActorMcCoy, kActorIzo, true); Actor_Says(kActorMcCoy, 5460, 16); - Actor_Face_Actor(kActorIzo, kActorMcCoy, 1); + Actor_Face_Actor(kActorIzo, kActorMcCoy, true); Actor_Says(kActorIzo, 700, 17); Actor_Says(kActorMcCoy, 5465, 14); someDialog(); } - if (Actor_Query_Goal_Number(kActorIzo) == 110) { - Actor_Face_Actor(kActorMcCoy, kActorIzo, 1); + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoRC03Walk) { + Actor_Face_Actor(kActorMcCoy, kActorIzo, true); Actor_Says(kActorMcCoy, 2715, 14); - Actor_Set_Goal_Number(kActorIzo, 111); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoRC03Run); Actor_Says(kActorMcCoy, 1800, 14); - Actor_Set_Goal_Number(kActorSteele, 100); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleApprehendIzo); return; //true; } @@ -178,41 +191,43 @@ void AIScriptIzo::OtherAgentExitedThisScene(int otherActorId) { } void AIScriptIzo::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) { - if (Actor_Query_Goal_Number(kActorIzo) == 110) { + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoRC03Walk) { Game_Flag_Query(kFlagIzoIsReplicant); } return; //false; } void AIScriptIzo::ShotAtAndMissed() { - if (Actor_Query_Goal_Number(kActorIzo) != 110) { - return; //false; + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoRC03Walk) { + Actor_Set_Goal_Number(kActorIzo, kGoalIzoRC03Run); + return; //true; } - Actor_Set_Goal_Number(kActorIzo, 111); - - return; //true; + return; //false; } bool AIScriptIzo::ShotAtAndHit() { - if (Actor_Query_Goal_Number(kActorIzo) == 110 - || Actor_Query_Goal_Number(kActorIzo) == 111 - || Actor_Query_Goal_Number(kActorIzo) == 114) { + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoRC03Walk + || Actor_Query_Goal_Number(kActorIzo) == kGoalIzoRC03Run + || Actor_Query_Goal_Number(kActorIzo) == kGoalIzoRC03RunAway + ) { Actor_Set_Health(kActorIzo, 50, 50); - if (Actor_Query_Goal_Number(kActorIzo) == 110) { - Actor_Set_Goal_Number(kActorIzo, 111); + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoRC03Walk) { + Actor_Set_Goal_Number(kActorIzo, kGoalIzoRC03Run); } return true; } else { AI_Movement_Track_Flush(kActorIzo); - Global_Variable_Increment(19, 1); - if (!Game_Flag_Query(444) && Global_Variable_Query(19) == 1) { - Game_Flag_Set(444); + Global_Variable_Increment(kVariableIzoShot, 1); + if (!Game_Flag_Query(kFlagIzoShot) + && Global_Variable_Query(kVariableIzoShot) == 1 + ) { + Game_Flag_Set(kFlagIzoShot); _animationFrame = 0; _animationState = 19; - Actor_Retired_Here(kActorIzo, 36, 12, 1, -1); - Actor_Set_Goal_Number(kActorIzo, 199); + Actor_Retired_Here(kActorIzo, 36, 12, true, -1); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoDie); } return false; } @@ -224,14 +239,14 @@ void AIScriptIzo::Retired(int byActorId) { } Global_Variable_Decrement(kVariableReplicants, 1); - Actor_Set_Goal_Number(kActorIzo, 599); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoDead); if (Global_Variable_Query(kVariableReplicants) == 0) { Player_Loses_Control(); Delay(2000); Player_Set_Combat_Mode(0); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, 1, 0, 0); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); Game_Flag_Reset(653); @@ -248,78 +263,79 @@ int AIScriptIzo::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) bool AIScriptIzo::GoalChanged(int currentGoalNumber, int newGoalNumber) { if (newGoalNumber == 200 - || newGoalNumber == 199 - || newGoalNumber == 198 - || newGoalNumber == 180 - || newGoalNumber == 103) { - Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationDNARow, true); - } + || newGoalNumber == kGoalIzoDie + || newGoalNumber == kGoalIzoDieHidden + || newGoalNumber == kGoalIzoGotArrested + || newGoalNumber == kGoalIzoEscape + ) { + Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationDNARow, true); + } switch (newGoalNumber) { - case 0: + case kGoalIzoDefault: AI_Movement_Track_Flush(kActorIzo); return true; - case 1: + case kGoalIzoPrepareCamera: AI_Movement_Track_Flush(kActorIzo); - Actor_Face_Heading(kActorIzo, 520, 0); + Actor_Face_Heading(kActorIzo, 520, false); _animationState = 32; _animationFrame = -1; return true; - case 2: + case kGoalIzoTakePhoto: _animationState = 34; _animationFrame = -1; return true; - case 3: + case kGoalIzoRunToUG02: AI_Movement_Track_Flush(kActorIzo); AI_Movement_Track_Append_Run(kActorIzo, 149, 0); AI_Movement_Track_Append_Run(kActorIzo, 152, 0); AI_Movement_Track_Repeat(kActorIzo); Scene_Exit_Add_2D_Exit(1, 394, 229, 485, 371, 1); - Game_Flag_Set(402); + Game_Flag_Set(kFlagHC03Available); return true; - case 100: + case kGoalIzoStopRunning: AI_Movement_Track_Flush(kActorIzo); AI_Movement_Track_Repeat(kActorIzo); return true; - case 101: + case kGoalIzoRunToRC03: AI_Movement_Track_Flush(kActorIzo); AI_Movement_Track_Append_Run(kActorIzo, 153, 0); AI_Movement_Track_Append(kActorIzo, 154, 0); AI_Movement_Track_Repeat(kActorIzo); return true; - case 102: + case kGoalIzoWaitingAtRC03: return true; - case 103: + case kGoalIzoEscape: AI_Movement_Track_Flush(kActorIzo); AI_Movement_Track_Append(kActorIzo, 153, 0); AI_Movement_Track_Append(kActorIzo, 39, 120); AI_Movement_Track_Append(kActorIzo, 33, 0); AI_Movement_Track_Repeat(kActorIzo); - return 1; + return true; - case 110: - Game_Flag_Set(486); + case kGoalIzoRC03Walk: + Game_Flag_Set(kFlagDNARowAvailable); AI_Movement_Track_Flush(kActorIzo); AI_Movement_Track_Append(kActorIzo, 349, 0); AI_Movement_Track_Repeat(kActorIzo); return true; - case 111: - Game_Flag_Set(486); + case kGoalIzoRC03Run: + Game_Flag_Set(kFlagDNARowAvailable); AI_Movement_Track_Flush(kActorIzo); AI_Movement_Track_Append_Run(kActorIzo, 349, 0); AI_Movement_Track_Repeat(kActorIzo); return true; - case 114: - Game_Flag_Set(486); + case kGoalIzoRC03RunAway: + Game_Flag_Set(kFlagDNARowAvailable); AI_Movement_Track_Flush(kActorIzo); AI_Movement_Track_Append_Run(kActorIzo, 174, 0); AI_Movement_Track_Repeat(kActorIzo); @@ -334,18 +350,18 @@ bool AIScriptIzo::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Append(kActorIzo, 34, 0); } AI_Movement_Track_Repeat(kActorIzo); - Game_Flag_Set(486); + Game_Flag_Set(kFlagDNARowAvailable); return true; - case 120: - Actor_Set_Targetable(kActorIzo, 0); + case kGoalIzoGetArrested: + Actor_Set_Targetable(kActorIzo, false); AI_Movement_Track_Flush(kActorIzo); AI_Movement_Track_Append(kActorIzo, 174, 0); AI_Movement_Track_Append(kActorIzo, 33, 0); AI_Movement_Track_Repeat(kActorIzo); return true; - case 150: + case kGoalIzoGoToHC01: AI_Movement_Track_Flush(kActorIzo); AI_Movement_Track_Append(kActorIzo, 39, Random_Query(15, 30)); AI_Movement_Track_Append(kActorIzo, 149, 0); @@ -353,7 +369,7 @@ bool AIScriptIzo::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorIzo); return true; - case 155: + case kGoalIzoGoToHC03: AI_Movement_Track_Flush(kActorIzo); AI_Movement_Track_Append(kActorIzo, 149, 0); if (Game_Flag_Query(kFlagIzoIsReplicant)) { @@ -372,31 +388,31 @@ bool AIScriptIzo::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Flush(kActorIzo); return true; - case 180: - Game_Flag_Set(486); + case kGoalIzoGotArrested: + Game_Flag_Set(kFlagDNARowAvailable); Actor_Put_In_Set(kActorIzo, kSetFreeSlotA); Actor_Set_At_Waypoint(kActorIzo, 33, 0); return true; - case 198: + case kGoalIzoDieHidden: AI_Movement_Track_Flush(kActorIzo); AI_Movement_Track_Append(kActorIzo, 41, 0); AI_Movement_Track_Repeat(kActorIzo); Actor_Set_Goal_Number(kActorIzo, 999); return true; - case 199: - Game_Flag_Set(486); + case kGoalIzoDie: + Game_Flag_Set(kFlagDNARowAvailable); AI_Movement_Track_Flush(kActorIzo); Ambient_Sounds_Play_Speech_Sound(kActorIzo, 9000, 100, 0, 0, 0); - Actor_Change_Animation_Mode(kActorIzo, 48); + Actor_Change_Animation_Mode(kActorIzo, kAnimationModeDie); Actor_Set_Goal_Number(kActorIzo, 999); Scene_Exits_Enable(); - Actor_Retired_Here(kActorIzo, 36, 12, 1, -1); + Actor_Retired_Here(kActorIzo, 36, 12, true, -1); return true; case 200: - Game_Flag_Set(486); + Game_Flag_Set(kFlagDNARowAvailable); return true; case 300: @@ -418,7 +434,7 @@ bool AIScriptIzo::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 999: - Actor_Set_Goal_Number(kActorIzo, 599); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoDead); return true; case 9999: @@ -539,8 +555,10 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) { if (_animationFrame == 9) { Actor_Combat_AI_Hit_Attempt(7); } - if (Actor_Query_Goal_Number(kActorIzo) == 102 && _animationFrame == 6) { - Actor_Change_Animation_Mode(0, 20); + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoWaitingAtRC03 + && _animationFrame == 6 + ) { + Actor_Change_Animation_Mode(kActorMcCoy, 20); } Actor_Query_Goal_Number(kActorIzo); if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) { @@ -579,14 +597,18 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) { case 14: case 15: *animation = _animationFrame + 280; - if (++_animationFrame >= 2 - && (Actor_Query_Goal_Number(kActorIzo) == 110 || Actor_Query_Goal_Number(kActorIzo) == 111)) { + _animationFrame++; + if (_animationFrame >= 2 + && (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoRC03Walk + || Actor_Query_Goal_Number(kActorIzo) == kGoalIzoRC03Run + ) + ) { *animation = 297; _animationFrame = 0; _animationState = 0; _var4 = 0; - Actor_Change_Animation_Mode(kActorIzo, 0); - Actor_Set_Goal_Number(kActorIzo, 111); + Actor_Change_Animation_Mode(kActorIzo, kAnimationModeIdle); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoRC03Run); } else { if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) { *animation = 297; @@ -700,17 +722,17 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) { *animation = 311; _animationFrame++; if (_animationFrame == 6) { - Scene_Loop_Set_Default(0); - Scene_Loop_Start_Special(2, 2, 1); + Scene_Loop_Set_Default(0); // // HC01 - MainLoop + Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true); // HC01 - IzoFlashLoop Player_Set_Combat_Mode(kActorSteele); } if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(311)) { *animation = 297; _animationFrame = 0; _animationState = 0; - Game_Flag_Set(407); - Item_Add_To_World(107, 977, 8, 597.46f, 0.14f, 49.92f, 0, 12, 12, 0, 1, 0, 0); - Actor_Set_Goal_Number(kActorIzo, 3); + Game_Flag_Set(kFlagUnused407); + Item_Add_To_World(kItemCamera, 977, kSetHC01_HC02_HC03_HC04, 597.46f, 0.14f, 49.92f, 0, 12, 12, false, true, false, false); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoRunToUG02); } break; @@ -784,7 +806,7 @@ bool AIScriptIzo::ChangeAnimationMode(int mode) { return true; case 1: - if (Actor_Query_Goal_Number(kActorIzo) == 102) { + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoWaitingAtRC03) { _animationState = 22; } else { _animationState = 20; @@ -987,32 +1009,29 @@ void AIScriptIzo::FledCombat() { } void AIScriptIzo::someDialog() { - int input; - Dialogue_Menu_Clear_List(); - DM_Add_To_List_Never_Repeat_Once_Selected(0, 7, 4, -1); + DM_Add_To_List_Never_Repeat_Once_Selected(0, 7, 4, -1); // MOTIVES - if (Actor_Clue_Query(0, 179)) { - DM_Add_To_List_Never_Repeat_Once_Selected(10, 8, -1, -1); + if (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewA)) { + DM_Add_To_List_Never_Repeat_Once_Selected(10, 8, -1, -1); // LUCY } - DM_Add_To_List_Never_Repeat_Once_Selected(20, 3, 7, 4); + DM_Add_To_List_Never_Repeat_Once_Selected(20, 3, 7, 4); // REFERENCE DM_Add_To_List_Never_Repeat_Once_Selected(30, -1, 3, 7); - Dialogue_Menu_Appear(320, 240); - - input = Dialogue_Menu_Query_Input(); + Dialogue_Menu_Appear(320, 240); + int input = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); switch (input) { - case 0: + case 0: // MOTIVES Actor_Says(kActorMcCoy, 5470, 15); Actor_Says(kActorMcCoy, 710, 13); - Actor_Set_Goal_Number(kActorIzo, 103); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoEscape); Player_Gains_Control(); break; - case 10: + case 10: // LUCY if (Game_Flag_Query(kFlagIzoIsReplicant)) { Actor_Says(kActorMcCoy, 5475, 18); Actor_Says(kActorIzo, 720, 12); @@ -1033,19 +1052,19 @@ void AIScriptIzo::someDialog() { Actor_Says(kActorIzo, 830, 13); Actor_Says(kActorIzo, 840, 13); } - Actor_Set_Goal_Number(kActorIzo, 103); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoEscape); Player_Gains_Control(); break; - case 20: + case 20: // REFERENCE Actor_Says(kActorMcCoy, 5480, 18); - Actor_Set_Goal_Number(kActorIzo, 103); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoEscape); Player_Gains_Control(); break; - case 30: - Player_Set_Combat_Mode(kActorSteele); - Actor_Set_Goal_Number(kActorIzo, 103); + case 30: // DONE + Player_Set_Combat_Mode(true); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoEscape); Player_Gains_Control(); break; } diff --git a/engines/bladerunner/script/ai/lucy.cpp b/engines/bladerunner/script/ai/lucy.cpp index 72cb959a53..0f53758b28 100644 --- a/engines/bladerunner/script/ai/lucy.cpp +++ b/engines/bladerunner/script/ai/lucy.cpp @@ -363,7 +363,7 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Says(kActorLucy, 360, 13); Actor_Says(kActorMcCoy, 1710, 13); - if (Global_Variable_Query(kVariableAffectionTowards) == 3) { + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy) { Actor_Says(kActorLucy, 940, 13); Actor_Says(kActorMcCoy, 6780, 12); Actor_Says(kActorLucy, 950, 12); @@ -371,11 +371,13 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Says(kActorMcCoy, 6785, 13); Actor_Says(kActorLucy, 970, 16); Actor_Says(kActorLucy, 980, 13); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { Actor_Says(kActorLucy, 990, 15); } Actor_Says(kActorMcCoy, 6790, 13); - if (Game_Flag_Query(47) && Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant) + && Game_Flag_Query(kFlagLucyIsReplicant) + ) { Actor_Says(kActorLucy, 1000, 12); } Actor_Says(kActorLucy, 1010, 15); @@ -450,7 +452,7 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 300: Actor_Put_In_Set(kActorLucy, kSetFreeSlotA); Actor_Set_At_Waypoint(kActorLucy, 33, 0); - if (Global_Variable_Query(kVariableAffectionTowards) == 3) { + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy) { Actor_Set_Goal_Number(kActorLucy, 310); } break; @@ -861,8 +863,8 @@ void AIScriptLucy::checkCombat() { && Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorLucy) != 450 ) { - if (Global_Variable_Query(kVariableAffectionTowards) == 3) { - Global_Variable_Set(kVariableAffectionTowards, 0); + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy) { + Global_Variable_Set(kVariableAffectionTowards, kAffectionTowardsNone); } Actor_Set_Goal_Number(kActorLucy, 450); Non_Player_Actor_Combat_Mode_On(kActorLucy, kActorCombatStateIdle, false, kActorMcCoy, 4, kAnimationModeIdle, kAnimationModeWalk, kAnimationModeRun, -1, 0, 0, 10, 300, false); diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp index 2f514ca51f..48a8e8b698 100644 --- a/engines/bladerunner/script/ai/mccoy.cpp +++ b/engines/bladerunner/script/ai/mccoy.cpp @@ -266,8 +266,7 @@ int AIScriptMcCoy::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueI } bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { - unsigned int v5; - unsigned int v7; + unsigned int affectionTowards; switch (newGoalNumber) { case 0: @@ -412,13 +411,13 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 400: Actor_Set_Health(kActorMcCoy, 50, 50); Game_Flag_Set(373); - v5 = Global_Variable_Query(kVariableAffectionTowards); - if (v5 == 1) { + affectionTowards = Global_Variable_Query(kVariableAffectionTowards); + if (affectionTowards == kAffectionTowardsSteele) { Actor_Modify_Friendliness_To_Other(kActorSteele, kActorMcCoy, 3); - } else if (v5 == 2) { + } else if (affectionTowards == kAffectionTowardsDektora) { Actor_Modify_Friendliness_To_Other(kActorSteele, kActorMcCoy, -5); Actor_Modify_Friendliness_To_Other(kActorClovis, kActorMcCoy, 3); - } else if (v5 == 3) { + } else if (affectionTowards == kAffectionTowardsLucy) { Actor_Modify_Friendliness_To_Other(kActorSteele, kActorMcCoy, -5); Actor_Modify_Friendliness_To_Other(kActorClovis, kActorMcCoy, 5); } @@ -428,20 +427,22 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { if (Actor_Query_Friendliness_To_Other(kActorSteele, kActorMcCoy) < Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy)) { Game_Flag_Set(653); } - v7 = Global_Variable_Query(kVariableAffectionTowards); - if (v7 == 1) { + affectionTowards = Global_Variable_Query(kVariableAffectionTowards); + if (affectionTowards == kAffectionTowardsSteele) { if (Game_Flag_Query(653)) { - Global_Variable_Set(kVariableAffectionTowards, 0); + Global_Variable_Set(kVariableAffectionTowards, kAffectionTowardsNone); } - } else if (v7 == 2 || v7 == 3) { + } else if (affectionTowards == kAffectionTowardsDektora + || affectionTowards == kAffectionTowardsLucy + ) { if (!Game_Flag_Query(653)) { - Global_Variable_Set(kVariableAffectionTowards, 0); + Global_Variable_Set(kVariableAffectionTowards, kAffectionTowardsNone); } } if (!Game_Flag_Query(653)) { Game_Flag_Set(kFlagMaggieIsHurt); } - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + 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); @@ -598,7 +599,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) { dword_45A0DC = 0; _animationState = 0; Player_Gains_Control(); - Item_Add_To_World(109, 982, 6, -110.0, 0.0, -192.0, 0, 48, 32, false, true, false, false); + Item_Add_To_World(109, 982, kSetCT08_CT51_UG12, -110.0, 0.0, -192.0, 0, 48, 32, false, true, false, false); } break; case 58: diff --git a/engines/bladerunner/script/ai/runciter.cpp b/engines/bladerunner/script/ai/runciter.cpp index 19e15989a7..e4625f1159 100644 --- a/engines/bladerunner/script/ai/runciter.cpp +++ b/engines/bladerunner/script/ai/runciter.cpp @@ -48,14 +48,18 @@ void AIScriptRunciter::Initialize() { var_45CD80 = 1; var_45CD84 = 0; var_45CD88 = 0; - Actor_Set_Goal_Number(kActorRunciter, 0); + Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterDefault); } bool AIScriptRunciter::Update() { - if (Actor_Query_Goal_Number(kActorRunciter) == 0 && Game_Flag_Query(kFlagRC01PoliceDone)) { - Actor_Set_Goal_Number(kActorRunciter, 2); + if (Actor_Query_Goal_Number(kActorRunciter) == kGoalRunciterDefault + && Game_Flag_Query(kFlagRC01PoliceDone) + ) { + Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterHide); } - if (Global_Variable_Query(kVariableChapter) == 4 && Actor_Query_Goal_Number(kActorRunciter) < 300) { + if (Global_Variable_Query(kVariableChapter) == 4 + && Actor_Query_Goal_Number(kActorRunciter) < 300 + ) { Actor_Set_Goal_Number(kActorRunciter, 300); } return false; @@ -149,8 +153,8 @@ void AIScriptRunciter::ShotAtAndMissed() {} bool AIScriptRunciter::ShotAtAndHit() { Actor_Set_Targetable(kActorRunciter, false); - Actor_Change_Animation_Mode(kActorRunciter, 48); - Actor_Set_Goal_Number(kActorRunciter, 599); + Actor_Change_Animation_Mode(kActorRunciter, kAnimationModeDie); + Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterDead); Delay(2000); if (Actor_Clue_Query(kActorMcCoy, kClueZubensMotive)) { Actor_Voice_Over(2050, kActorVoiceOver); @@ -171,12 +175,12 @@ int AIScriptRunciter::GetFriendlinessModifierIfGetsClue(int otherActorId, int cl } bool AIScriptRunciter::GoalChanged(int currentGoalNumber, int newGoalNumber) { - if (newGoalNumber == 0) { + if (newGoalNumber == kGoalRunciterDefault) { Actor_Put_In_Set(kActorRunciter, kSetRC02_RC51); Actor_Set_At_Waypoint(kActorRunciter, 92, 567); return false; } - if (newGoalNumber == 1) { + if (newGoalNumber == kGoalRunciterWalkAround) { AI_Movement_Track_Flush(kActorRunciter); if (Random_Query(0, 1) == 1) { if (Random_Query(0, 1) == 0) { @@ -194,14 +198,14 @@ bool AIScriptRunciter::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorRunciter); return true; } - if (newGoalNumber == 2) { + if (newGoalNumber == kGoalRunciterHide) { AI_Movement_Track_Flush(kActorRunciter); AI_Movement_Track_Append(kActorRunciter, 39, 120); AI_Movement_Track_Append(kActorRunciter, 40, 0); AI_Movement_Track_Repeat(kActorRunciter); return false; } - if (newGoalNumber == 300) { + if (newGoalNumber == kGoalRunciterAtShop) { Actor_Put_In_Set(kActorRunciter, kSetRC02_RC51); Actor_Set_At_Waypoint(kActorRunciter, 93, 1007); return false; diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp index d66609f71d..0684de914c 100644 --- a/engines/bladerunner/script/ai/sadik.cpp +++ b/engines/bladerunner/script/ai/sadik.cpp @@ -50,30 +50,33 @@ void AIScriptSadik::Initialize() { } bool AIScriptSadik::Update() { - if (Global_Variable_Query(kVariableChapter) != 2 || Player_Query_Current_Scene() != 10 || Game_Flag_Query(391)) { - if (_var1) { - Sound_Play(_var1, 100, 0, 0, 50); - _var1 = 0; - } - if (Global_Variable_Query(kVariableChapter) == 3 && Actor_Query_Goal_Number(kActorSadik) < 200) { - Actor_Set_Goal_Number(kActorSadik, 200); - } - if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorSadik) < 400) { - Actor_Set_Goal_Number(kActorSadik, 400); - } - if (Actor_Query_Goal_Number(kActorSadik) == 411) { - if (Game_Flag_Query(657)) { - Actor_Set_Goal_Number(kActorSadik, 412); - } - } - return false; - } else { + if (Global_Variable_Query(kVariableChapter) == 2 + && Player_Query_Current_Scene() == kSceneBB09 + && !Game_Flag_Query(391) + ) { Actor_Set_Goal_Number(kActorSadik, 101); - Actor_Set_Targetable(kActorSadik, 1); + Actor_Set_Targetable(kActorSadik, true); Game_Flag_Set(391); Game_Flag_Set(406); return true; } + + if (_var1) { + Sound_Play(_var1, 100, 0, 0, 50); + _var1 = 0; + } + if (Global_Variable_Query(kVariableChapter) == 3 && Actor_Query_Goal_Number(kActorSadik) < 200) { + Actor_Set_Goal_Number(kActorSadik, 200); + } + if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorSadik) < 400) { + Actor_Set_Goal_Number(kActorSadik, 400); + } + if (Actor_Query_Goal_Number(kActorSadik) == 411) { + if (Game_Flag_Query(657)) { + Actor_Set_Goal_Number(kActorSadik, 412); + } + } + return false; } void AIScriptSadik::TimerExpired(int timer) { @@ -192,7 +195,7 @@ void AIScriptSadik::Retired(int byActorId) { Delay(2000); Player_Set_Combat_Mode(0); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, 1, 0, 0); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); Game_Flag_Reset(653); diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp index e1f8feed19..c5c5b0cb3c 100644 --- a/engines/bladerunner/script/ai/steele.cpp +++ b/engines/bladerunner/script/ai/steele.cpp @@ -42,7 +42,7 @@ void AIScriptSteele::Initialize() { Actor_Put_In_Set(kActorSteele, kSetFreeSlotG); Actor_Set_At_Waypoint(kActorSteele, 39, 0); - Actor_Set_Goal_Number(kActorSteele, 0); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleDefault); Actor_Clue_Acquire(kActorSteele, kClueCrimeSceneNotes, true, -1); } @@ -87,7 +87,7 @@ bool AIScriptSteele::Update() { } if (Actor_Query_Goal_Number(kActorSteele) == 11) { - Actor_Set_Goal_Number(kActorSteele, 0); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleDefault); return true; } @@ -278,17 +278,17 @@ void AIScriptSteele::CompletedMovementTrack() { Actor_Set_Goal_Number(kActorSteele, 11); break; - case 100: - if (Actor_Query_Goal_Number(kActorSteele) == 100) { //why is this here? double check? + case kGoalSteeleApprehendIzo: + if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleApprehendIzo) { //why is this here? double check? Player_Set_Combat_Mode(kActorMcCoy); - if (Actor_Query_Goal_Number(kActorIzo) != 199) { + if (Actor_Query_Goal_Number(kActorIzo) != kGoalIzoDie) { if (Actor_Query_In_Between_Two_Actors(kActorMcCoy, kActorSteele, kActorIzo)) { - Actor_Set_Goal_Number(kActorSteele, 125); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleIzoBlockedByMcCoy); } else if (Game_Flag_Query(kFlagIzoIsReplicant)) { - Actor_Set_Goal_Number(kActorSteele, 120); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleShootIzo); } else { - Actor_Set_Goal_Number(kActorSteele, 121); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleArrestIzo); } } } @@ -332,7 +332,7 @@ void AIScriptSteele::CompletedMovementTrack() { Actor_Set_Goal_Number(kActorSteele, 433); Player_Set_Combat_Mode(kActorSteele); 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_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(578); Set_Enter(kSetKP07, kSceneKP07); @@ -634,10 +634,10 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { } else { Actor_Clue_Acquire(kActorSteele, kClueGrigorianInterviewB2, true, kActorGrigorian); } - Actor_Set_Goal_Number(kActorSteele, 0); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleDefault); return true; - case 100: + case kGoalSteeleApprehendIzo: AI_Movement_Track_Flush(kActorSteele); if (Game_Flag_Query(kFlagIzoIsReplicant)) { AI_Movement_Track_Append_Run(kActorSteele, 202, 0); @@ -727,92 +727,92 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { } return true; - case 120: + case kGoalSteeleShootIzo: Actor_Force_Stop_Walking(kActorMcCoy); Sound_Play(27, 100, 0, 0, 50); - Actor_Set_Goal_Number(kActorIzo, 199); - Actor_Change_Animation_Mode(kActorMcCoy, 0); - Actor_Face_Actor(kActorMcCoy, kActorSteele, 1); - Loop_Actor_Walk_To_Actor(kActorSteele, 0, 48, 0, 1); - Actor_Says(kActorSteele, 1860, 3); - Actor_Face_Actor(kActorMcCoy, kActorSteele, 1); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoDie); + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle); + Actor_Face_Actor(kActorMcCoy, kActorSteele, true); + Loop_Actor_Walk_To_Actor(kActorSteele, 0, 48, false, true); + Actor_Says(kActorSteele, 1860, kAnimationModeTalk); + Actor_Face_Actor(kActorMcCoy, kActorSteele, true); Actor_Says(kActorMcCoy, 4825, 18); - Actor_Face_Actor(kActorSteele, kActorMcCoy, 1); - Actor_Says(kActorSteele, 1870, 3); - Actor_Says(kActorSteele, 1880, 3); + Actor_Face_Actor(kActorSteele, kActorMcCoy, true); + Actor_Says(kActorSteele, 1870, kAnimationModeTalk); + Actor_Says(kActorSteele, 1880, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4830, 13); - Actor_Says(kActorSteele, 1890, 3); - Actor_Says(kActorSteele, 1900, 3); - Actor_Face_Actor(kActorSteele, kActorIzo, 1); - Actor_Says(kActorSteele, 1910, 3); - Actor_Says(kActorSteele, 1920, 3); - Actor_Face_Actor(kActorMcCoy, kActorSteele, 1); - Actor_Face_Actor(kActorSteele, kActorMcCoy, 1); - Actor_Says(kActorSteele, 1930, 3); - Actor_Set_Goal_Number(kActorSteele, 130); + Actor_Says(kActorSteele, 1890, kAnimationModeTalk); + Actor_Says(kActorSteele, 1900, kAnimationModeTalk); + Actor_Face_Actor(kActorSteele, kActorIzo, true); + Actor_Says(kActorSteele, 1910, kAnimationModeTalk); + Actor_Says(kActorSteele, 1920, kAnimationModeTalk); + Actor_Face_Actor(kActorMcCoy, kActorSteele, true); + Actor_Face_Actor(kActorSteele, kActorMcCoy, true); + Actor_Says(kActorSteele, 1930, kAnimationModeTalk); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleLeaveRC03); Player_Gains_Control(); return true; - case 121: + case kGoalSteeleArrestIzo: Actor_Force_Stop_Walking(kActorMcCoy); - Actor_Face_Actor(kActorSteele, kActorIzo, 1); - Actor_Change_Animation_Mode(kActorIzo, 0); - Actor_Face_Actor(kActorIzo, kActorSteele, 1); - Actor_Says_With_Pause(kActorSteele, 2010, 0.0, 4); - Actor_Change_Animation_Mode(kActorSteele, 4); - Loop_Actor_Walk_To_Actor(kActorSteele, kActorIzo, 60, 0, 0); - Actor_Change_Animation_Mode(kActorSteele, 4); + Actor_Face_Actor(kActorSteele, kActorIzo, true); + Actor_Change_Animation_Mode(kActorIzo, kAnimationModeIdle); + Actor_Face_Actor(kActorIzo, kActorSteele, true); + Actor_Says_With_Pause(kActorSteele, 2010, 0.0, kAnimationModeCombatIdle); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); + Loop_Actor_Walk_To_Actor(kActorSteele, kActorIzo, 60, false, false); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); _animationState = 23; _animationFrame = 0; - Actor_Says(kActorIzo, 660, 3); - Actor_Says_With_Pause(kActorSteele, 2020, 0.0f, 4); - Actor_Says_With_Pause(kActorSteele, 2030, 0.0f, 4); - Actor_Change_Animation_Mode(kActorSteele, 4); - Actor_Says(kActorIzo, 670, 3); - Actor_Says(kActorSteele, 2040, 4); - Actor_Says(kActorIzo, 680, 3); - Actor_Says(kActorSteele, 2050, 3); - Actor_Face_Actor(kActorSteele, kActorMcCoy, 1); - Actor_Says(kActorSteele, 2060, 3); - Actor_Says(kActorMcCoy, 4845, 3); - Actor_Says(kActorSteele, 2070, 3); - Actor_Says(kActorSteele, 2080, 3); - Actor_Face_Actor(kActorSteele, kActorIzo, 1); - Actor_Says(kActorSteele, 2090, 3); - Actor_Says_With_Pause(kActorSteele, 2100, 1.0f, 3); - Actor_Says(kActorIzo, 690, 3); - Actor_Says(kActorSteele, 2110, 3); - Actor_Says(kActorSteele, 2120, 3); - Actor_Face_Actor(kActorSteele, kActorMcCoy, 1); - Actor_Says(kActorSteele, 2140, 3); - Actor_Says(kActorMcCoy, 4850, 3); - Actor_Says(kActorSteele, 2150, 3); - Actor_Set_Goal_Number(kActorIzo, 120); - Actor_Set_Goal_Number(kActorSteele, 130); - Actor_Set_Goal_Number(kActorSteele, 0); - return true; - - case 125: + Actor_Says(kActorIzo, 660, kAnimationModeTalk); + Actor_Says_With_Pause(kActorSteele, 2020, 0.0f, kAnimationModeCombatIdle); + Actor_Says_With_Pause(kActorSteele, 2030, 0.0f, kAnimationModeCombatIdle); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); + Actor_Says(kActorIzo, 670, kAnimationModeTalk); + Actor_Says(kActorSteele, 2040, kAnimationModeCombatIdle); + Actor_Says(kActorIzo, 680, kAnimationModeTalk); + Actor_Says(kActorSteele, 2050, kAnimationModeTalk); + Actor_Face_Actor(kActorSteele, kActorMcCoy, true); + Actor_Says(kActorSteele, 2060, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 4845, kAnimationModeTalk); + Actor_Says(kActorSteele, 2070, kAnimationModeTalk); + Actor_Says(kActorSteele, 2080, kAnimationModeTalk); + Actor_Face_Actor(kActorSteele, kActorIzo, true); + Actor_Says(kActorSteele, 2090, kAnimationModeTalk); + Actor_Says_With_Pause(kActorSteele, 2100, 1.0f, kAnimationModeTalk); + Actor_Says(kActorIzo, 690, kAnimationModeTalk); + Actor_Says(kActorSteele, 2110, kAnimationModeTalk); + Actor_Says(kActorSteele, 2120, kAnimationModeTalk); + Actor_Face_Actor(kActorSteele, kActorMcCoy, true); + Actor_Says(kActorSteele, 2140, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 4850, kAnimationModeTalk); + Actor_Says(kActorSteele, 2150, kAnimationModeTalk); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoGetArrested); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleLeaveRC03); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleDefault); + return true; + + case kGoalSteeleIzoBlockedByMcCoy: Actor_Force_Stop_Walking(kActorMcCoy); - Actor_Set_Goal_Number(kActorIzo, 114); - Actor_Says(kActorSteele, 1940, 3); - Loop_Actor_Walk_To_Actor(kActorSteele, 0, 60, 0, 1); - Actor_Face_Actor(kActorSteele, kActorMcCoy, 1); - Actor_Face_Actor(kActorMcCoy, kActorSteele, 1); - Actor_Says(kActorSteele, 1950, 3); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoRC03RunAway); + Actor_Says(kActorSteele, 1940, kAnimationModeTalk); + Loop_Actor_Walk_To_Actor(kActorSteele, 0, 60, false, true); + Actor_Face_Actor(kActorSteele, kActorMcCoy, true); + Actor_Face_Actor(kActorMcCoy, kActorSteele, true); + Actor_Says(kActorSteele, 1950, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4835, 14); - Actor_Says(kActorSteele, 1980, 3); + Actor_Says(kActorSteele, 1980, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4840, 15); - Actor_Says(kActorSteele, 1990, 3); - Actor_Says(kActorSteele, 2000, 3); - Actor_Set_Goal_Number(kActorSteele, 130); + Actor_Says(kActorSteele, 1990, kAnimationModeTalk); + Actor_Says(kActorSteele, 2000, kAnimationModeTalk); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleLeaveRC03); Scene_Exits_Enable(); return true; case 126: return true; - case 130: + case kGoalSteeleLeaveRC03: AI_Movement_Track_Flush(kActorSteele); AI_Movement_Track_Append(kActorSteele, 174, 0); AI_Movement_Track_Append(kActorSteele, 35, 0); @@ -1899,7 +1899,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { bool AIScriptSteele::ChangeAnimationMode(int mode) { switch (mode) { - case 0: + case kGoalSteeleDefault: if (Game_Flag_Query(603)) { _var1 = 3; } else { @@ -1951,7 +1951,9 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { case 1: if ((_animationState != 4 && _animationState != 23 && _animationState != 25 && _animationState != 26) || _animationState > 26) { - if (Actor_Query_Goal_Number(kActorSteele) != 100 && Actor_Query_Goal_Number(kActorSteele) != 121) { + if (Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleApprehendIzo + && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleArrestIzo + ) { _animationState = 2; _animationFrame = 0; } else { @@ -1964,9 +1966,10 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { } break; case 2: - if (Actor_Query_Goal_Number(kActorSteele) != 100 - && Actor_Query_Goal_Number(kActorSteele) != 121 - && _animationState != 23) { + if (Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleApprehendIzo + && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleArrestIzo + && _animationState != 23 + ) { _animationState = 3; _animationFrame = 0; } else { @@ -2187,7 +2190,7 @@ void AIScriptSteele::SetAnimationState(int animationState, int animationFrame, i bool AIScriptSteele::ReachedMovementTrackWaypoint(int waypointId) { if (waypointId == 174 - && Actor_Query_Goal_Number(kActorSteele) == 130 + && Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleLeaveRC03 ) Actor_Set_Goal_Number(kActorSteele, kGoalSteeleGoToPoliceStation); diff --git a/engines/bladerunner/script/scene/ar01.cpp b/engines/bladerunner/script/scene/ar01.cpp index adef4d4894..ed4a96b086 100644 --- a/engines/bladerunner/script/scene/ar01.cpp +++ b/engines/bladerunner/script/scene/ar01.cpp @@ -50,13 +50,13 @@ void SceneScriptAR01::InitializeScene() { Setup_Scene_Information(-152.0f, 0.0f, 332.0f, 545); } Scene_Exit_Add_2D_Exit(kAR01ExitHC01, 134, 165, 177, 290, 3); - Scene_Exit_Add_2D_Exit(kAR01ExitAR02, 319, 0, 639, 207, 0); + Scene_Exit_Add_2D_Exit(kAR01ExitAR02, 319, 0, 639, 207, 0); if (Game_Flag_Query(kFlagSpinnerAtAR01)) { 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); - Ambient_Sounds_Add_Looping_Sound(241, 50, 1, 1); + Ambient_Sounds_Add_Looping_Sound( 54, 50, 1, 1); + Ambient_Sounds_Add_Looping_Sound( 81, 60, 100, 1); + Ambient_Sounds_Add_Looping_Sound(241, 50, 1, 1); Ambient_Sounds_Add_Sound(182, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(184, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(185, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); @@ -66,20 +66,20 @@ void SceneScriptAR01::InitializeScene() { Ambient_Sounds_Add_Sound(191, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(192, 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); - Ambient_Sounds_Add_Sound(242, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(243, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(244, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(245, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(246, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(247, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(248, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(249, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); + Ambient_Sounds_Add_Sound(242, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(243, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(244, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(245, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(246, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(247, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(248, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(249, 3, 30, 11, 11, 50, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); - Ambient_Sounds_Add_Sound(68, 10, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(69, 10, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 68, 10, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 69, 10, 180, 16, 25, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(375, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(376, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); @@ -130,18 +130,41 @@ bool SceneScriptAR01::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptAR01::ClickedOnActor(int actorId) { - if (actorId == kActorInsectDealer || actorId == kActorHasan) { + if (actorId == kActorInsectDealer + || actorId == kActorHasan + ) { Actor_Face_Actor(kActorMcCoy, actorId, true); Actor_Says(kActorMcCoy, 8910, 14); return true; } + if (actorId == kActorFishDealer) { Actor_Set_Goal_Number(kActorFishDealer, 2); if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -120.73f, 0.0f, 219.17f, 12, 1, false, 0)) { Actor_Face_Actor(kActorMcCoy, kActorFishDealer, true); Actor_Face_Actor(kActorFishDealer, kActorMcCoy, true); - if (Game_Flag_Query(328)) { - if (Actor_Clue_Query(kActorMcCoy, kClueStrangeScale1) && !Actor_Clue_Query(kActorMcCoy, kClueFishLadyInterview)) { + if (!Game_Flag_Query(kFlagFishDealerTalk)) { + Actor_Says(kActorMcCoy, 0, 18); + Actor_Says(kActorFishDealer, 0, 14); + Actor_Says(kActorFishDealer, 10, 14); + Actor_Says(kActorFishDealer, 20, 14); + Actor_Says(kActorFishDealer, 30, 14); + Actor_Says(kActorMcCoy, 5, 17); + Actor_Says(kActorFishDealer, 40, 14); + Actor_Says(kActorMcCoy, 10, 13); + Actor_Says(kActorFishDealer, 50, 14); + Actor_Says(kActorMcCoy, 15, 17); + Actor_Says(kActorFishDealer, 60, 14); + Actor_Says(kActorFishDealer, 70, 14); + Actor_Says(kActorFishDealer, 80, 14); + Actor_Says(kActorFishDealer, 90, 14); + Actor_Says(kActorMcCoy, 25, 13); + Game_Flag_Set(kFlagFishDealerTalk); + Actor_Set_Goal_Number(kActorFishDealer, 1); + } else { + if ( Actor_Clue_Query(kActorMcCoy, kClueStrangeScale1) + && !Actor_Clue_Query(kActorMcCoy, kClueFishLadyInterview) + ) { Actor_Says(kActorMcCoy, 40, 11); Actor_Says(kActorFishDealer, 120, 14); Actor_Says(kActorMcCoy, 45, 17); @@ -162,24 +185,6 @@ bool SceneScriptAR01::ClickedOnActor(int actorId) { } } Actor_Set_Goal_Number(kActorFishDealer, 1); - } else { - Actor_Says(kActorMcCoy, 0, 18); - Actor_Says(kActorFishDealer, 0, 14); - Actor_Says(kActorFishDealer, 10, 14); - Actor_Says(kActorFishDealer, 20, 14); - Actor_Says(kActorFishDealer, 30, 14); - Actor_Says(kActorMcCoy, 5, 17); - Actor_Says(kActorFishDealer, 40, 14); - Actor_Says(kActorMcCoy, 10, 13); - Actor_Says(kActorFishDealer, 50, 14); - Actor_Says(kActorMcCoy, 15, 17); - Actor_Says(kActorFishDealer, 60, 14); - Actor_Says(kActorFishDealer, 70, 14); - Actor_Says(kActorFishDealer, 80, 14); - Actor_Says(kActorFishDealer, 90, 14); - Actor_Says(kActorMcCoy, 25, 13); - Game_Flag_Set(328); - Actor_Set_Goal_Number(kActorFishDealer, 1); } return true; } @@ -193,8 +198,8 @@ bool SceneScriptAR01::ClickedOnItem(int itemId, bool a2) { bool SceneScriptAR01::ClickedOnExit(int exitId) { 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); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -358.0, 0.0, -149.0, 0, true, false, 0)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -477.0, 0.0, -149.0, 0, false, false, 0); Game_Flag_Set(kFlagAR01toHC01); Game_Flag_Set(464); Game_Flag_Reset(kFlagMcCoyAtARxx); @@ -204,8 +209,9 @@ bool SceneScriptAR01::ClickedOnExit(int exitId) { } return true; } + if (exitId == kAR01ExitAR02) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -182.0, 0.0, -551.0, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -182.0, 0.0, -551.0, 0, true, false, 0)) { Game_Flag_Set(kFlagAR01toAR02); Async_Actor_Walk_To_XYZ(kActorMcCoy, -222.0, 0.0, -690.0, 0, false); Set_Enter(kSetAR01_AR02, kSceneAR02); @@ -213,32 +219,37 @@ bool SceneScriptAR01::ClickedOnExit(int exitId) { } return true; } + if (exitId == kAR01ExitSpinner) { - if (Game_Flag_Query(486) == 1) { + if (Game_Flag_Query(kFlagDNARowAvailable)) { Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationDNARow, true); } - int v1 = Loop_Actor_Walk_To_XYZ(kActorMcCoy, -164.0f, 0.0f, 332.0f, 0, 1, false, 0); + int v1 = Loop_Actor_Walk_To_XYZ(kActorMcCoy, -164.0f, 0.0f, 332.0f, 0, true, false, 0); Actor_Face_Heading(kActorMcCoy, 545, false); - if (Actor_Query_Goal_Number(kActorIzo) >= 2 && Actor_Query_Goal_Number(kActorIzo) <= 103) { + if (Actor_Query_Goal_Number(kActorIzo) >= kGoalIzoTakePhoto + && Actor_Query_Goal_Number(kActorIzo) <= kGoalIzoEscape + ) { Player_Loses_Control(); Actor_Put_In_Set(kActorIzo, kSetAR01_AR02); Actor_Set_At_XYZ(kActorIzo, -448.0, 0.0, 130.0, 0); - Loop_Actor_Walk_To_XYZ(kActorIzo, -323.0f, 0.64f, 101.74f, 48, 0, true, 0); + Loop_Actor_Walk_To_XYZ(kActorIzo, -323.0f, 0.64f, 101.74f, 48, false, true, 0); Loop_Actor_Walk_To_Actor(kActorIzo, kActorMcCoy, 48, 0, true); Actor_Face_Actor(kActorIzo, kActorMcCoy, true); - Actor_Change_Animation_Mode(kActorIzo, 6); + Actor_Change_Animation_Mode(kActorIzo, kAnimationModeCombatAttack); Actor_Says(kActorMcCoy, 1800, 21); Actor_Change_Animation_Mode(kActorMcCoy, 48); Player_Gains_Control(); Actor_Retired_Here(kActorMcCoy, 12, 48, 1, kActorIzo); } else if (!v1) { - if (Game_Flag_Query(486) && !Game_Flag_Query(660)) { + if ( Game_Flag_Query(kFlagDNARowAvailable) + && !Game_Flag_Query(kFlagDNARowAvailableTalk) + ) { Actor_Voice_Over(4310, kActorVoiceOver); Actor_Voice_Over(4320, kActorVoiceOver); Actor_Voice_Over(4330, kActorVoiceOver); Actor_Voice_Over(4340, kActorVoiceOver); Actor_Voice_Over(4350, kActorVoiceOver); - Game_Flag_Set(660); + Game_Flag_Set(kFlagDNARowAvailableTalk); } Game_Flag_Reset(kFlagMcCoyAtCTxx); Game_Flag_Reset(kFlagMcCoyAtRCxx); @@ -349,12 +360,12 @@ void SceneScriptAR01::SceneFrameAdvanced(int frame) { && Game_Flag_Query(kFlagArrivedFromSpinner2) ) { Actor_Face_Heading(kActorMcCoy, 545, false); - Actor_Change_Animation_Mode(kActorMcCoy, 42); + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeSpinnerGetOut); Game_Flag_Reset(kFlagArrivedFromSpinner2); } else if ( frame == 196 && !Game_Flag_Query(kFlagArrivedFromSpinner2 )) { - Actor_Change_Animation_Mode(kActorMcCoy, 41); + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeSpinnerGetIn); } } @@ -362,8 +373,8 @@ void SceneScriptAR01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptAR01::PlayerWalkedIn() { - if (!Game_Flag_Query(710)) { - Game_Flag_Set(710); + if (!Game_Flag_Query(kFlagAR01Entered)) { + Game_Flag_Set(kFlagAR01Entered); } if (Game_Flag_Query(kFlagHC01toAR01)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -358.0f, 0.0f, -149.0f, 0, true, false, 0); @@ -376,7 +387,7 @@ void SceneScriptAR01::PlayerWalkedIn() { void SceneScriptAR01::PlayerWalkedOut() { Actor_Set_Invisible(kActorMcCoy, false); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (!Game_Flag_Query(kFlagMcCoyAtHCxx)) { Music_Stop(2); @@ -384,7 +395,7 @@ void SceneScriptAR01::PlayerWalkedOut() { if (!Game_Flag_Query(kFlagAR01toHC01) && !Game_Flag_Query(kFlagAR01toAR02) ) { - 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(kOuttakeTowards3, true, -1); } diff --git a/engines/bladerunner/script/scene/ar02.cpp b/engines/bladerunner/script/scene/ar02.cpp index ea95e7d60f..a53aee8016 100644 --- a/engines/bladerunner/script/scene/ar02.cpp +++ b/engines/bladerunner/script/scene/ar02.cpp @@ -31,11 +31,11 @@ void SceneScriptAR02::InitializeScene() { } else { Setup_Scene_Information(-182.0f, 0.0f, -551.0f, 973); } - Scene_Exit_Add_2D_Exit(0, 0, 439, 212, 479, 2); + Scene_Exit_Add_2D_Exit(0, 0, 439, 212, 479, 2); Scene_Exit_Add_2D_Exit(1, 81, 202, 215, 406, 3); - Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1); + Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1); Ambient_Sounds_Add_Looping_Sound(81, 60, 100, 1); - Ambient_Sounds_Add_Looping_Sound(241, 50, 1, 1); + Ambient_Sounds_Add_Looping_Sound(241, 50, 1, 1); Ambient_Sounds_Add_Sound(182, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(184, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(185, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); @@ -53,12 +53,12 @@ void SceneScriptAR02::InitializeScene() { Ambient_Sounds_Add_Sound(247, 3, 30, 16, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(248, 3, 30, 16, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(249, 3, 30, 16, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); + Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); - Ambient_Sounds_Add_Sound(68, 10, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(69, 10, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 68, 10, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 69, 10, 180, 16, 25, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(375, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(376, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); @@ -80,11 +80,13 @@ void SceneScriptAR02::InitializeScene() { void SceneScriptAR02::SceneLoaded() { Obstacle_Object("DF_BOOTH", true); if (!Game_Flag_Query(374)) { - Item_Add_To_World(106, 976, 0, -442.84f, 36.77f, -1144.51f, 360, 36, 36, false, true, false, true); + Item_Add_To_World(kItemScrorpions, 976, kSetAR01_AR02, -442.84f, 36.77f, -1144.51f, 360, 36, 36, false, true, false, true); } - if (Global_Variable_Query(kVariableChapter) == 4 && !Game_Flag_Query(374)) { + if ( Global_Variable_Query(kVariableChapter) == 4 + && !Game_Flag_Query(374) + ) { Game_Flag_Set(kFlagNotUsed0); - Item_Remove_From_World(106); + Item_Remove_From_World(kItemScrorpions); } } @@ -97,17 +99,19 @@ bool SceneScriptAR02::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptAR02::ClickedOnActor(int actorId) { - if (actorId == 16) { + if (actorId == kActorInsectDealer) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -386.96f, 0.0f, -1078.45f, 12, 1, false, 0)) { Actor_Face_Actor(kActorMcCoy, kActorInsectDealer, true); Actor_Face_Actor(kActorInsectDealer, kActorMcCoy, true); if (Global_Variable_Query(kVariableChapter) == 2) { - if (Game_Flag_Query(329) && !Game_Flag_Query(366)) { - Game_Flag_Set(366); + if ( Game_Flag_Query(kFlagInsectDealerInterviewed) + && !Game_Flag_Query(kFlagInsectDealerTalk) + ) { + Game_Flag_Set(kFlagInsectDealerTalk); Player_Loses_Control(); ADQ_Flush(); ADQ_Add(kActorInsectDealer, 210, 14); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -350.66f, 0.0f, -1117.19f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -350.66f, 0.0f, -1117.19f, 0, false, false, 0); Actor_Face_Actor(kActorMcCoy, kActorInsectDealer, true); Actor_Says(kActorMcCoy, 110, 18); Actor_Says(kActorInsectDealer, 230, 14); @@ -116,16 +120,18 @@ bool SceneScriptAR02::ClickedOnActor(int actorId) { Item_Pickup_Spin_Effect(956, 288, 257); Actor_Says(kActorInsectDealer, 250, 14); Player_Gains_Control(); - sub_402AE0(); - } else if (Game_Flag_Query(329)) { + dialogueWithInsectDealer2(); + } else if (Game_Flag_Query(kFlagInsectDealerInterviewed)) { Actor_Says(kActorMcCoy, 75, 18); Actor_Says(kActorInsectDealer, 60, 12); Actor_Says(kActorInsectDealer, 70, 14); } else { - sub_402694(); + dialogueWithInsectDealer1(); } } else if (Global_Variable_Query(kVariableChapter) > 2) { - if (Actor_Clue_Query(kActorMcCoy, kCluePeruvianLadyInterview) && !Actor_Clue_Query(kActorMcCoy, kClueDragonflyCollection)) { + if ( Actor_Clue_Query(kActorMcCoy, kCluePeruvianLadyInterview) + && !Actor_Clue_Query(kActorMcCoy, kClueDragonflyCollection) + ) { Actor_Says(kActorMcCoy, 205, 16); Actor_Says(kActorInsectDealer, 290, 12); Actor_Says(kActorInsectDealer, 300, 13); @@ -154,41 +160,45 @@ bool SceneScriptAR02::ClickedOnActor(int actorId) { return true; } } - if (actorId == 20 && Global_Variable_Query(kVariableChapter) == 2) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -240.79f, 0.0f, -1328.89f, 12, 1, false, 0)) { + + if (actorId == kActorHasan + && Global_Variable_Query(kVariableChapter) == 2 + ) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -240.79f, 0.0f, -1328.89f, 12, true, false, 0)) { Actor_Face_Actor(kActorMcCoy, kActorHasan, true); Actor_Face_Actor(kActorHasan, kActorMcCoy, true); - if (Game_Flag_Query(330)) { - sub_402CE4(); - return false; + if (!Game_Flag_Query(kFlagHassanTalk)) { + Actor_Says(kActorHasan, 0, 14); + Actor_Says(kActorMcCoy, 140, 18); + Game_Flag_Set(kFlagHassanTalk); + return true; } - Actor_Says(kActorHasan, 0, 14); - Actor_Says(kActorMcCoy, 140, 18); - Game_Flag_Set(330); - return true; + dialogueWithHassan(); } } return false; } bool SceneScriptAR02::ClickedOnItem(int itemId, bool a2) { - if (itemId == 106) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -386.96f, 0.0f, -1078.45f, 12, 1, false, 0)) { + if (itemId == kItemScrorpions) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -386.96f, 0.0f, -1078.45f, 12, true, false, 0)) { Actor_Face_Actor(kActorMcCoy, kActorInsectDealer, true); - if (!Game_Flag_Query(331)) { + if (!Game_Flag_Query(kFlagScorpionsChecked)) { Actor_Says(kActorInsectDealer, 0, 14); Actor_Says(kActorMcCoy, 55, 18); Actor_Says(kActorInsectDealer, 10, 14); Actor_Says(kActorMcCoy, 60, 18); Actor_Says(kActorInsectDealer, 20, 14); - Game_Flag_Set(331); - } else if (Game_Flag_Query(331) && !Game_Flag_Query(367)) { + Game_Flag_Set(kFlagScorpionsChecked); + } else if ( Game_Flag_Query(kFlagScorpionsChecked) + && !Game_Flag_Query(kFlagStungByScorpion) + ) { Actor_Says(kActorMcCoy, 65, 21); Actor_Says(kActorInsectDealer, 30, 14); Actor_Says(kActorInsectDealer, 40, 14); Actor_Says(kActorMcCoy, 70, 18); Actor_Says(kActorInsectDealer, 50, 14); - Game_Flag_Set(367); + Game_Flag_Set(kFlagStungByScorpion); } else { Actor_Says(kActorMcCoy, 8527, 14); } @@ -207,6 +217,7 @@ bool SceneScriptAR02::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -465.0f, 0.0f, -799.0f, 0, 1, false, 0)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -560.0f, 0.0f, -799.0f, 0, 0, false, 0); @@ -236,36 +247,43 @@ void SceneScriptAR02::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -465.0f, 0.0f, -799.0f, 0, 0, false, 0); Game_Flag_Reset(kFlagRC03toAR02); } - Game_Flag_Set(726); + Game_Flag_Set(kFlagAR02Entered); } void SceneScriptAR02::PlayerWalkedOut() { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); } void SceneScriptAR02::DialogueQueueFlushed(int a1) { } -void SceneScriptAR02::sub_402694() { +void SceneScriptAR02::dialogueWithInsectDealer1() { Dialogue_Menu_Clear_List(); - if (Actor_Clue_Query(kActorMcCoy, kClueDragonflyEarring) || Actor_Clue_Query(kActorMcCoy, kClueBombingSuspect)) { - DM_Add_To_List_Never_Repeat_Once_Selected(490, 3, 5, 5); + if (Actor_Clue_Query(kActorMcCoy, kClueDragonflyEarring) + || Actor_Clue_Query(kActorMcCoy, kClueBombingSuspect) + ) { + DM_Add_To_List_Never_Repeat_Once_Selected(490, 3, 5, 5); // EARRING } - if (Actor_Clue_Query(kActorMcCoy, kClueDragonflyAnklet) && !Actor_Clue_Query(kActorMcCoy, kClueDragonflyEarring) && !Actor_Clue_Query(kActorMcCoy, kClueBombingSuspect)) { - DM_Add_To_List_Never_Repeat_Once_Selected(500, 3, 5, 5); + if ( Actor_Clue_Query(kActorMcCoy, kClueDragonflyAnklet) + && !Actor_Clue_Query(kActorMcCoy, kClueDragonflyEarring) + && !Actor_Clue_Query(kActorMcCoy, kClueBombingSuspect) + ) { + DM_Add_To_List_Never_Repeat_Once_Selected(500, 3, 5, 5); // ANKLET } - DM_Add_To_List_Never_Repeat_Once_Selected(510, 8, 3, -1); - Dialogue_Menu_Add_DONE_To_List(520); + DM_Add_To_List_Never_Repeat_Once_Selected(510, 8, 3, -1); // MERCHANDISE + Dialogue_Menu_Add_DONE_To_List(520); // DONE + Dialogue_Menu_Appear(320, 240); int answerValue = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); + switch (answerValue) { - case 490: - case 500: - if (answerValue == 490) { + case 490: // EARRING + case 500: // ANKLET + if (answerValue == 490) { // EARRING Actor_Says(kActorMcCoy, 145, 15); - } else { + } else { // ANKLET Actor_Says(kActorMcCoy, 150, 15); } Actor_Says(kActorInsectDealer, 80, 14); @@ -284,62 +302,71 @@ void SceneScriptAR02::sub_402694() { Actor_Says(kActorInsectDealer, 170, 14); Actor_Says(kActorMcCoy, 100, 16); Actor_Says(kActorInsectDealer, 180, 13); - Game_Flag_Set(329); + Game_Flag_Set(kFlagInsectDealerInterviewed); Actor_Clue_Acquire(kActorMcCoy, kCluePeruvianLadyInterview, true, kActorInsectDealer); break; - case 510: + + case 510: // MERCHANDISE Actor_Says(kActorMcCoy, 8475, 12); Actor_Says(kActorInsectDealer, 190, 12); Actor_Says(kActorMcCoy, 105, 15); Actor_Says(kActorInsectDealer, 200, 14); break; - case 520: + + case 520: // DONE Actor_Says(kActorMcCoy, 215, 16); break; } } -void SceneScriptAR02::sub_402AE0() { +void SceneScriptAR02::dialogueWithInsectDealer2() { Dialogue_Menu_Clear_List(); - if (Global_Variable_Query(2) >= 15 || Query_Difficulty_Level() == 0) { - DM_Add_To_List_Never_Repeat_Once_Selected(530, 7, 5, 3); + + if (Global_Variable_Query(kVariableChinyen) >= 15 + || Query_Difficulty_Level() == 0 + ) { + DM_Add_To_List_Never_Repeat_Once_Selected(530, 7, 5, 3); // BUY } - DM_Add_To_List_Never_Repeat_Once_Selected(540, 3, 5, 7); + DM_Add_To_List_Never_Repeat_Once_Selected(540, 3, 5, 7); // NO THANKS + Dialogue_Menu_Appear(320, 240); int answerValue = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); - if (answerValue == 530) { + + if (answerValue == 530) { // BUY Actor_Says(kActorMcCoy, 120, 12); if (Query_Difficulty_Level() != 0) { - Global_Variable_Decrement(2, 15); + Global_Variable_Decrement(kVariableChinyen, 15); } Actor_Clue_Acquire(kActorMcCoy, kClueMaggieBracelet, true, kActorInsectDealer); Actor_Modify_Friendliness_To_Other(kActorInsectDealer, kActorMcCoy, 5); - } else if (answerValue == 540) { + } else if (answerValue == 540) { // NO THANKS Actor_Says(kActorMcCoy, 125, 13); - Actor_Says(kActorInsectDealer, 260, 3); + Actor_Says(kActorInsectDealer, 260, kAnimationModeTalk); Actor_Says(kActorMcCoy, 130, 15); - Actor_Says(kActorInsectDealer, 270, 3); - Actor_Says(kActorInsectDealer, 280, 3); + Actor_Says(kActorInsectDealer, 270, kAnimationModeTalk); + Actor_Says(kActorInsectDealer, 280, kAnimationModeTalk); Actor_Says(kActorMcCoy, 135, 11); Actor_Modify_Friendliness_To_Other(kActorInsectDealer, kActorMcCoy, -5); } } -void SceneScriptAR02::sub_402CE4() { +void SceneScriptAR02::dialogueWithHassan() { Dialogue_Menu_Clear_List(); if (Actor_Clue_Query(kActorMcCoy, kClueStrangeScale1)) { - DM_Add_To_List_Never_Repeat_Once_Selected(550, 8, 5, 2); + DM_Add_To_List_Never_Repeat_Once_Selected(550, 8, 5, 2); // SCALE } if (Actor_Clue_Query(kActorMcCoy, kClueDragonflyEarring)) { - DM_Add_To_List_Never_Repeat_Once_Selected(560, 6, 5, 7); + DM_Add_To_List_Never_Repeat_Once_Selected(560, 6, 5, 7); // EARRING } - Dialogue_Menu_Add_DONE_To_List(570); + Dialogue_Menu_Add_DONE_To_List(570); // DONE + Dialogue_Menu_Appear(320, 240); int answerValue = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); + switch (answerValue) { - case 550: + case 550: // SCALE Actor_Says(kActorMcCoy, 145, 11); Actor_Says(kActorHasan, 30, 11); Actor_Says(kActorMcCoy, 160, 11); @@ -349,9 +376,10 @@ void SceneScriptAR02::sub_402CE4() { Actor_Says(kActorMcCoy, 170, 11); Actor_Says(kActorHasan, 60, 11); Actor_Says(kActorMcCoy, 175, 11); - Game_Flag_Set(370); + Game_Flag_Set(kFlagNotUsed370); break; - case 560: + + case 560: // EARRING Actor_Says(kActorMcCoy, 150, 11); Actor_Says(kActorHasan, 140, 11); Actor_Says(kActorMcCoy, 185, 11); @@ -367,12 +395,11 @@ void SceneScriptAR02::sub_402CE4() { Actor_Says(kActorHasan, 210, 11); Actor_Says(kActorHasan, 220, 11); Actor_Says(kActorHasan, 230, 11); - Game_Flag_Set(370); + Game_Flag_Set(kFlagNotUsed370); break; - case 570: - if (Actor_Clue_Query(kActorMcCoy, kClueHasanInterview)) { - Actor_Says(kActorMcCoy, 1315, 11); - } else { + + case 570: // DONE + if (!Actor_Clue_Query(kActorMcCoy, kClueHasanInterview)) { Actor_Says(kActorMcCoy, 940, 13); Actor_Says(kActorHasan, 70, 12); Actor_Says(kActorHasan, 90, 12); @@ -382,6 +409,8 @@ void SceneScriptAR02::sub_402CE4() { Actor_Says(kActorHasan, 120, 13); Actor_Modify_Friendliness_To_Other(kActorHasan, kActorMcCoy, -1); Actor_Clue_Acquire(kActorMcCoy, kClueHasanInterview, false, kActorHasan); + } else { + Actor_Says(kActorMcCoy, 1315, 11); } break; } diff --git a/engines/bladerunner/script/scene/bb01.cpp b/engines/bladerunner/script/scene/bb01.cpp index ea1afcf6e9..6aa24e283d 100644 --- a/engines/bladerunner/script/scene/bb01.cpp +++ b/engines/bladerunner/script/scene/bb01.cpp @@ -228,7 +228,7 @@ void SceneScriptBB01::PlayerWalkedIn() { } void SceneScriptBB01::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/bb02.cpp b/engines/bladerunner/script/scene/bb02.cpp index fa988790c3..2eb92516eb 100644 --- a/engines/bladerunner/script/scene/bb02.cpp +++ b/engines/bladerunner/script/scene/bb02.cpp @@ -89,7 +89,7 @@ bool SceneScriptBB02::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 98.0f, -415.06f, -593.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB02toBB01); Set_Enter(kSetBB01, kSceneBB01); @@ -149,7 +149,7 @@ void SceneScriptBB02::PlayerWalkedIn() { } void SceneScriptBB02::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/bb03.cpp b/engines/bladerunner/script/scene/bb03.cpp index 118fa22d5a..9ecbb953be 100644 --- a/engines/bladerunner/script/scene/bb03.cpp +++ b/engines/bladerunner/script/scene/bb03.cpp @@ -87,7 +87,7 @@ bool SceneScriptBB03::ClickedOnExit(int exitId) { 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(kFlagBB03toBB04); - 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(kSetBB02_BB04_BB06_BB51, kSceneBB04); } @@ -96,7 +96,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(kFlagBB03toBB02); - 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(kSetBB02_BB04_BB06_BB51, kSceneBB02); } @@ -119,7 +119,7 @@ bool SceneScriptBB03::ClickedOnExit(int exitId) { Actor_Set_Targetable(kActorGeneralDoll, false); } Game_Flag_Set(kFlagBB03toBB05); - 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(kSetBB05, kSceneBB05); } else { diff --git a/engines/bladerunner/script/scene/bb04.cpp b/engines/bladerunner/script/scene/bb04.cpp index 270e28d254..1bf12cb7f2 100644 --- a/engines/bladerunner/script/scene/bb04.cpp +++ b/engines/bladerunner/script/scene/bb04.cpp @@ -83,7 +83,7 @@ bool SceneScriptBB04::ClickedOnExit(int exitId) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -92.0f, -26.6f, 45.0f, 0, 1, false, 0)) { Player_Loses_Control(); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -15.0f, -25.17f, 45.0f, 0, 0, false, 0); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(333); Game_Flag_Set(493); @@ -93,7 +93,7 @@ bool SceneScriptBB04::ClickedOnExit(int exitId) { } if (exitId == 1) { 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_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB04toBB03); Set_Enter(kSetBB03, kSceneBB03); diff --git a/engines/bladerunner/script/scene/bb05.cpp b/engines/bladerunner/script/scene/bb05.cpp index 1241a60e7b..95e3975b11 100644 --- a/engines/bladerunner/script/scene/bb05.cpp +++ b/engines/bladerunner/script/scene/bb05.cpp @@ -25,11 +25,11 @@ namespace BladeRunner { void SceneScriptBB05::InitializeScene() { - if (Game_Flag_Query(298)) { + if (Game_Flag_Query(kFlagBB06toBB05)) { Setup_Scene_Information(95.0f, -60.31f, 331.0f, 0); - } else if (Game_Flag_Query(302)) { + } else if (Game_Flag_Query(kFlagBB12toBB05)) { Setup_Scene_Information(87.0f, -60.34f, -96.0f, 0); - } else if (Game_Flag_Query(300)) { + } else if (Game_Flag_Query(kFlagBB07toBB05)) { Setup_Scene_Information(271.0f, -60.31f, 203.0f, 0); } else { Setup_Scene_Information(-212.0f, -60.31f, 131.0f, 0); @@ -98,7 +98,7 @@ bool SceneScriptBB05::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB05::ClickedOnExit(int exitId) { if (exitId == 0) { 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_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB05toBB03); Set_Enter(kSetBB03, kSceneBB03); @@ -107,27 +107,27 @@ bool SceneScriptBB05::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 95.0f, -60.31f, 331.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(297); + Game_Flag_Set(kFlagBB05toBB06); Set_Enter(kSetBB06_BB07, kSceneBB06); } return true; } if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 271.0f, -60.31f, 203.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(299); + Game_Flag_Set(kFlagBB05toBB07); Set_Enter(kSetBB07, kSceneBB07); } return true; } if (exitId == 3) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 151.0f, -60.34f, -108.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(301); + Game_Flag_Set(kFlagBB05toBB12); Set_Enter(kSetBB12, kSceneBB12); } return true; @@ -146,15 +146,15 @@ void SceneScriptBB05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptBB05::PlayerWalkedIn() { - if (Game_Flag_Query(298)) { + if (Game_Flag_Query(kFlagBB06toBB05)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 95.0f, -60.31f, 303.0f, 0, 0, false, 0); - Game_Flag_Reset(298); - } else if (Game_Flag_Query(300)) { + Game_Flag_Reset(kFlagBB06toBB05); + } else if (Game_Flag_Query(kFlagBB07toBB05)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 231.0f, -60.31f, 203.0f, 0, 0, false, 0); - Game_Flag_Reset(300); - } else if (Game_Flag_Query(302)) { + Game_Flag_Reset(kFlagBB07toBB05); + } else if (Game_Flag_Query(kFlagBB12toBB05)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 111.0f, -60.31f, -24.0f, 0, 0, false, 0); - Game_Flag_Reset(302); + Game_Flag_Reset(kFlagBB12toBB05); } else { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -76.0f, -60.31f, 131.0f, 0, 0, false, 0); Game_Flag_Reset(kFlagBB03toBB05); diff --git a/engines/bladerunner/script/scene/bb06.cpp b/engines/bladerunner/script/scene/bb06.cpp index 015a4dfc1a..7821b735e2 100644 --- a/engines/bladerunner/script/scene/bb06.cpp +++ b/engines/bladerunner/script/scene/bb06.cpp @@ -108,16 +108,16 @@ bool SceneScriptBB06::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -37.0f, 0.0f, 178.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(298); + Game_Flag_Set(kFlagBB06toBB05); Set_Enter(kSetBB05, kSceneBB05); } return true; } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 101.0f, 0.0f, -25.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(393); Set_Enter(kSetBB02_BB04_BB06_BB51, kSceneBB51); @@ -126,7 +126,7 @@ bool SceneScriptBB06::ClickedOnExit(int exitId) { } if (exitId == 3) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -115.0f, 0.0f, -103.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(363); Set_Enter(kSetBB06_BB07, kSceneBB07); @@ -162,9 +162,9 @@ void SceneScriptBB06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptBB06::PlayerWalkedIn() { - if (Game_Flag_Query(297)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -36.0f, 0.0f, 145.0f, 0, 0, false, 0); - Game_Flag_Reset(297); + if (Game_Flag_Query(kFlagBB05toBB06)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -36.0f, 0.0f, 145.0f, 0, false, false, 0); + Game_Flag_Reset(kFlagBB05toBB06); } } diff --git a/engines/bladerunner/script/scene/bb07.cpp b/engines/bladerunner/script/scene/bb07.cpp index 12e3219cc9..ba1d7bcd28 100644 --- a/engines/bladerunner/script/scene/bb07.cpp +++ b/engines/bladerunner/script/scene/bb07.cpp @@ -107,17 +107,17 @@ bool SceneScriptBB07::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB07::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -615.0f, 252.59f, -1018.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Overlay_Remove("BB07OVER"); - Game_Flag_Set(300); + Game_Flag_Set(kFlagBB07toBB05); Set_Enter(kSetBB05, kSceneBB05); } return true; } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -619.0f, 252.59f, -1136.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Overlay_Remove("BB07OVER"); Game_Flag_Set(364); @@ -127,7 +127,7 @@ bool SceneScriptBB07::ClickedOnExit(int exitId) { } if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -551.0f, 252.59f, -1004.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Overlay_Remove("BB07OVER"); Game_Flag_Set(362); @@ -165,9 +165,9 @@ void SceneScriptBB07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptBB07::PlayerWalkedIn() { - if (Game_Flag_Query(299)) { + if (Game_Flag_Query(kFlagBB05toBB07)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -594.0f, 252.59f, -1018.0f, 6, 0, false, 0); - Game_Flag_Reset(299); + Game_Flag_Reset(kFlagBB05toBB07); } if (Game_Flag_Query(365)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -602.0f, 252.59f, -1124.0f, 6, 0, false, 0); diff --git a/engines/bladerunner/script/scene/bb08.cpp b/engines/bladerunner/script/scene/bb08.cpp index df51f0766a..7dc951e5b0 100644 --- a/engines/bladerunner/script/scene/bb08.cpp +++ b/engines/bladerunner/script/scene/bb08.cpp @@ -85,7 +85,7 @@ bool SceneScriptBB08::ClickedOnExit(int exitId) { Footstep_Sound_Override_On(2); Loop_Actor_Travel_Ladder(kActorMcCoy, 8, 1, 0); Footstep_Sound_Override_Off(); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB08toBB09); Set_Enter(kSetBB09, kSceneBB09); @@ -94,7 +94,7 @@ bool SceneScriptBB08::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 247.0f, 0.1f, 27.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(506); Set_Enter(kSetBB12, kSceneBB12); diff --git a/engines/bladerunner/script/scene/bb09.cpp b/engines/bladerunner/script/scene/bb09.cpp index 92a20b6349..15d491976d 100644 --- a/engines/bladerunner/script/scene/bb09.cpp +++ b/engines/bladerunner/script/scene/bb09.cpp @@ -82,7 +82,7 @@ bool SceneScriptBB09::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 454.56f, -9.0f, 190.31f, 0, 1, false, 0)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 450.56f, -9.0f, 250.31f, 0, 0, false, 0); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB09toBB10a); Game_Flag_Set(kFlagBB09toBB10b); @@ -92,7 +92,7 @@ bool SceneScriptBB09::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 71.0f, -9.0f, 136.0f, 72, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB09toBB08); Set_Enter(kSetBB08, kSceneBB08); diff --git a/engines/bladerunner/script/scene/bb10.cpp b/engines/bladerunner/script/scene/bb10.cpp index 5a521d6fca..6ae671ceba 100644 --- a/engines/bladerunner/script/scene/bb10.cpp +++ b/engines/bladerunner/script/scene/bb10.cpp @@ -37,7 +37,7 @@ void SceneScriptBB10::InitializeScene() { Scene_Exit_Add_2D_Exit(0, 281, 0, 531, 115, 0); } Scene_Exit_Add_2D_Exit(1, 58, 91, 193, 401, 3); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Add_Looping_Sound(382, 76, 0, 1); Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); @@ -108,7 +108,7 @@ bool SceneScriptBB10::ClickedOnExit(int exitId) { Footstep_Sound_Override_On(2); Loop_Actor_Travel_Ladder(kActorMcCoy, 3, 1, 0); Footstep_Sound_Override_Off(); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB10toBB11); Set_Enter(kSetBB11, kSceneBB11); @@ -117,7 +117,7 @@ bool SceneScriptBB10::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 206.01f, 66.84f, -261.62f, 0, 1, false, 0) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 151.67f, 66.84f, -313.06f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Reset(kFlagBB09toBB10a); Game_Flag_Set(kFlagBB10toBB09); diff --git a/engines/bladerunner/script/scene/bb11.cpp b/engines/bladerunner/script/scene/bb11.cpp index 8c99c525f9..8cb70b7af5 100644 --- a/engines/bladerunner/script/scene/bb11.cpp +++ b/engines/bladerunner/script/scene/bb11.cpp @@ -84,7 +84,7 @@ bool SceneScriptBB11::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB11::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 43.39f, -10.27f, -68.52f, 0, true, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB11toBB10); Set_Enter(kSetBB10, kSceneBB10); @@ -122,7 +122,7 @@ void SceneScriptBB11::PlayerWalkedIn() { } void SceneScriptBB11::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/bb12.cpp b/engines/bladerunner/script/scene/bb12.cpp index d32c7cee5c..8d9f3eeec1 100644 --- a/engines/bladerunner/script/scene/bb12.cpp +++ b/engines/bladerunner/script/scene/bb12.cpp @@ -31,7 +31,7 @@ void SceneScriptBB12::InitializeScene() { Setup_Scene_Information(-129.0f, 0.0f, 64.0f, 307); } else { Setup_Scene_Information(54.0f, 0.0f, 200.0f, 0); - Game_Flag_Reset(301); + Game_Flag_Reset(kFlagBB05toBB12); } Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3); Scene_Exit_Add_2D_Exit(1, 589, 0, 639, 479, 1); @@ -81,7 +81,7 @@ bool SceneScriptBB12::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB12::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -129.0f, 0.0f, 64.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(507); Set_Enter(kSetBB08, kSceneBB08); @@ -90,7 +90,7 @@ bool SceneScriptBB12::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 138.0f, 0.0f, 104.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(365); Set_Enter(kSetBB07, kSceneBB07); @@ -99,9 +99,9 @@ bool SceneScriptBB12::ClickedOnExit(int exitId) { } if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 54.0f, 0.0f, 200.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(302); + Game_Flag_Set(kFlagBB12toBB05); Set_Enter(kSetBB05, kSceneBB05); } return true; diff --git a/engines/bladerunner/script/scene/bb51.cpp b/engines/bladerunner/script/scene/bb51.cpp index 086eaa49dc..ae93dfae70 100644 --- a/engines/bladerunner/script/scene/bb51.cpp +++ b/engines/bladerunner/script/scene/bb51.cpp @@ -82,7 +82,7 @@ bool SceneScriptBB51::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB51::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 76.0f, 0.0f, 79.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(394); Set_Enter(kSetBB02_BB04_BB06_BB51, kSceneBB06); @@ -91,7 +91,7 @@ bool SceneScriptBB51::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 55.0f, 0.0f, -96.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(395); Set_Enter(kSetBB02_BB04_BB06_BB51, kSceneBB06); diff --git a/engines/bladerunner/script/scene/ct01.cpp b/engines/bladerunner/script/scene/ct01.cpp index f00eba02d4..df8986430a 100644 --- a/engines/bladerunner/script/scene/ct01.cpp +++ b/engines/bladerunner/script/scene/ct01.cpp @@ -85,12 +85,12 @@ void SceneScriptCT01::InitializeScene() { Ambient_Sounds_Add_Sound(62, 10, 30, 16, 20, 0, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(63, 10, 30, 16, 20, 0, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(64, 10, 30, 16, 20, 0, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1); + Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1); - Ambient_Sounds_Add_Sound(68, 10, 40, 33, 50, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(69, 10, 40, 33, 50, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(68, 10, 40, 33, 50, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(69, 10, 40, 33, 50, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(375, 20, 40, 33, 50, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(376, 20, 40, 33, 50, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 20, 40, 33, 50, -100, 100, -101, -101, 0, 0); diff --git a/engines/bladerunner/script/scene/ct02.cpp b/engines/bladerunner/script/scene/ct02.cpp index 97d7304b94..da1fcac014 100644 --- a/engines/bladerunner/script/scene/ct02.cpp +++ b/engines/bladerunner/script/scene/ct02.cpp @@ -57,7 +57,7 @@ void SceneScriptCT02::InitializeScene() { Ambient_Sounds_Add_Sound(62, 10, 30, 7, 7, 100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(63, 10, 30, 8, 8, 100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(64, 10, 30, 7, 7, 100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 19, 100, 100, -101, -101, 1, 1); + Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 19, 100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 19, 100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 19, 100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 19, 100, 100, -101, -101, 1, 1); @@ -218,7 +218,7 @@ bool SceneScriptCT02::ClickedOnItem(int itemId, bool a2) { bool SceneScriptCT02::ClickedOnExit(int exitId) { if (exitId == kCT02ExitCT01) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -111.2f, -145.11f, 243.28f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT02toCT01walk); Game_Flag_Set(kFlagCT02toCT01); @@ -234,7 +234,7 @@ bool SceneScriptCT02::ClickedOnExit(int exitId) { v1 = Loop_Actor_Walk_To_XYZ(kActorMcCoy, -154.83f, -145.11f, -82.61f, 0, 1, false, 0); } if (!v1) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT02toCT03); Set_Enter(kSetCT03_CT04, kSceneCT03); diff --git a/engines/bladerunner/script/scene/ct03.cpp b/engines/bladerunner/script/scene/ct03.cpp index ac30a79f9b..506ff1cfdd 100644 --- a/engines/bladerunner/script/scene/ct03.cpp +++ b/engines/bladerunner/script/scene/ct03.cpp @@ -36,19 +36,19 @@ void SceneScriptCT03::InitializeScene() { } else { Setup_Scene_Information(-708.58f, -619.19f, 277.6f, 239); } - Scene_Exit_Add_2D_Exit(0, 0, 460, 639, 479, 2); - Scene_Exit_Add_2D_Exit(1, 40, 40, 134, 302, 3); - Scene_Exit_Add_2D_Exit(2, 390, 0, 539, 230, 1); - Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1); - Ambient_Sounds_Add_Looping_Sound(56, 22, -100, 1); + Scene_Exit_Add_2D_Exit(0, 0, 460, 639, 479, 2); + Scene_Exit_Add_2D_Exit(1, 40, 40, 134, 302, 3); + Scene_Exit_Add_2D_Exit(2, 390, 0, 539, 230, 1); + Ambient_Sounds_Add_Looping_Sound( 54, 50, 1, 1); + Ambient_Sounds_Add_Looping_Sound( 56, 22, -100, 1); Ambient_Sounds_Add_Looping_Sound(105, 34, -100, 1); - Ambient_Sounds_Add_Sound(68, 10, 40, 33, 50, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(69, 10, 40, 33, 50, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(61, 3, 30, 8, 10, -100, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(62, 3, 30, 8, 10, -100, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(63, 3, 30, 8, 10, -100, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(64, 3, 30, 8, 10, -100, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1); + Ambient_Sounds_Add_Sound(68, 10, 40, 33, 50, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(69, 10, 40, 33, 50, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(61, 3, 30, 8, 10, -100, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(62, 3, 30, 8, 10, -100, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(63, 3, 30, 8, 10, -100, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(64, 3, 30, 8, 10, -100, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1); diff --git a/engines/bladerunner/script/scene/ct04.cpp b/engines/bladerunner/script/scene/ct04.cpp index 5f307d476d..24c1d3485e 100644 --- a/engines/bladerunner/script/scene/ct04.cpp +++ b/engines/bladerunner/script/scene/ct04.cpp @@ -38,14 +38,14 @@ void SceneScriptCT04::InitializeScene() { Scene_Loop_Set_Default(kCT03LoopMain); Setup_Scene_Information(-82.86f, -621.3f, 769.03f, 1020); } - Scene_Exit_Add_2D_Exit(0, 590, 0, 639, 479, 1); + Scene_Exit_Add_2D_Exit(0, 590, 0, 639, 479, 1); Scene_Exit_Add_2D_Exit(1, 194, 84, 320, 274, 0); - Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1); + Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1); Ambient_Sounds_Add_Looping_Sound(56, 15, -100, 1); Ambient_Sounds_Add_Looping_Sound(105, 34, 100, 1); Ambient_Sounds_Add_Sound(68, 10, 40, 33, 50, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(69, 10, 40, 33, 50, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); + Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); diff --git a/engines/bladerunner/script/scene/ct05.cpp b/engines/bladerunner/script/scene/ct05.cpp index 0db0b47621..a30e4f99bb 100644 --- a/engines/bladerunner/script/scene/ct05.cpp +++ b/engines/bladerunner/script/scene/ct05.cpp @@ -39,10 +39,10 @@ void SceneScriptCT05::InitializeScene() { Scene_Exit_Add_2D_Exit(1, 320, 458, 639, 479, 2); Scene_Exit_Add_2D_Exit(2, 380, 110, 542, 300, 0); Ambient_Sounds_Add_Looping_Sound(106, 15, -100, 1); - Ambient_Sounds_Add_Looping_Sound(107, 15, 100, 1); - Ambient_Sounds_Add_Looping_Sound(56, 13, -100, 1); - Ambient_Sounds_Add_Sound(90, 5, 20, 8, 10, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(91, 5, 20, 8, 10, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Looping_Sound(107, 15, 100, 1); + Ambient_Sounds_Add_Looping_Sound( 56, 13, -100, 1); + Ambient_Sounds_Add_Sound( 90, 5, 20, 8, 10, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 91, 5, 20, 8, 10, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(205, 5, 30, 18, 30, -100, 100, -101, -101, 0, 0); if (Game_Flag_Query(kFlagWarehouseOpen)) { Scene_Loop_Set_Default(2); @@ -233,7 +233,7 @@ void SceneScriptCT05::PlayerWalkedIn() { } void SceneScriptCT05::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/ct06.cpp b/engines/bladerunner/script/scene/ct06.cpp index 11bd36cd90..a5856b3717 100644 --- a/engines/bladerunner/script/scene/ct06.cpp +++ b/engines/bladerunner/script/scene/ct06.cpp @@ -33,7 +33,7 @@ void SceneScriptCT06::InitializeScene() { } else { Setup_Scene_Information(175.91f, -58.23f, 24.47f, 768); } - Scene_Exit_Add_2D_Exit(0, 0, 440, 639, 479, 2); + Scene_Exit_Add_2D_Exit(0, 0, 440, 639, 479, 2); Scene_Exit_Add_2D_Exit(1, 401, 162, 536, 317, 0); if (Game_Flag_Query(kFlagZubenRetired) && Actor_Query_In_Set(kActorZuben, kSetCT07)) { Actor_Put_In_Set(kActorZuben, kSetCT06); @@ -41,13 +41,13 @@ void SceneScriptCT06::InitializeScene() { Actor_Retired_Here(kActorZuben, 72, 36, 1, kActorMcCoy); } Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1); - Ambient_Sounds_Add_Looping_Sound(205, 20, 1, 1); - Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); + Ambient_Sounds_Add_Looping_Sound(205, 20, 1, 1); + Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); - Ambient_Sounds_Add_Sound(67, 80, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(68, 50, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(67, 80, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(68, 50, 180, 16, 25, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(379, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(380, 70, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 60, 180, 50, 100, 0, 0, -101, -101, 0, 0); @@ -118,7 +118,7 @@ bool SceneScriptCT06::ClickedOnItem(int itemId, bool a2) { bool SceneScriptCT06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 20.41f, -58.23f, -2.17f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT06toCT05); Set_Enter(kSetCT05, kSceneCT05); @@ -144,7 +144,7 @@ bool SceneScriptCT06::ClickedOnExit(int exitId) { Actor_Face_Object(kActorMcCoy, "DOOR", true); Actor_Says(kActorMcCoy, 8522, 12); } else { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT06toCT08); Set_Enter(kSetCT08_CT51_UG12, kSceneCT08); diff --git a/engines/bladerunner/script/scene/ct07.cpp b/engines/bladerunner/script/scene/ct07.cpp index 4dabd293b4..9c922fe56a 100644 --- a/engines/bladerunner/script/scene/ct07.cpp +++ b/engines/bladerunner/script/scene/ct07.cpp @@ -28,22 +28,22 @@ void SceneScriptCT07::InitializeScene() { Setup_Scene_Information(202.32f, -58.23f, -12.86f, 225); Actor_Put_In_Set(kActorZuben, kSetCT07); Actor_Set_At_XYZ(kActorZuben, -9.68f, -58.23f, 11.14f, 250); - Ambient_Sounds_Add_Looping_Sound(54, 30, 90, 1); + Ambient_Sounds_Add_Looping_Sound( 54, 30, 90, 1); Ambient_Sounds_Add_Looping_Sound(205, 20, 1, 1); - Ambient_Sounds_Add_Looping_Sound(56, 40, 100, 1); - Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); + Ambient_Sounds_Add_Looping_Sound( 56, 40, 100, 1); + Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); - Ambient_Sounds_Add_Sound(67, 80, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(68, 50, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(379, 10, 60, 50, 100, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(375, 6, 50, 50, 100, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(377, 10, 70, 50, 100, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(61, 10, 30, 12, 14, 100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(62, 10, 30, 12, 14, 100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(63, 10, 30, 12, 14, 100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(64, 10, 30, 12, 14, 100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 67, 80, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 68, 50, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(379, 10, 60, 50, 100, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(375, 6, 50, 50, 100, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(377, 10, 70, 50, 100, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 61, 10, 30, 12, 14, 100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 62, 10, 30, 12, 14, 100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 63, 10, 30, 12, 14, 100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 64, 10, 30, 12, 14, 100, 100, -101, -101, 0, 0); } void SceneScriptCT07::SceneLoaded() { diff --git a/engines/bladerunner/script/scene/ct08.cpp b/engines/bladerunner/script/scene/ct08.cpp index 6e814c132b..5dc68616e0 100644 --- a/engines/bladerunner/script/scene/ct08.cpp +++ b/engines/bladerunner/script/scene/ct08.cpp @@ -26,7 +26,7 @@ namespace BladeRunner { void SceneScriptCT08::InitializeScene() { if (Game_Flag_Query(679)) { - 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(kOuttakeMovieB1, false, -1); if (Game_Flag_Query(kFlagLucyIsReplicant)) { @@ -113,7 +113,7 @@ bool SceneScriptCT08::ClickedOnItem(int itemId, bool a2) { bool SceneScriptCT08::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -183.0f, 0.0f, 128.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT08toCT09); Set_Enter(kSetCT09, kSceneCT09); @@ -123,7 +123,7 @@ bool SceneScriptCT08::ClickedOnExit(int exitId) { if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -11.0f, 0.0f, -156.0f, 0, 1, false, 0)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, 0.0f, -102.0f, 0, 0, false, 0); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(379); Set_Enter(kSetCT08_CT51_UG12, kSceneCT51); @@ -132,7 +132,7 @@ bool SceneScriptCT08::ClickedOnExit(int exitId) { } if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -143.0f, 0.0f, -92.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT08toCT06); Set_Enter(kSetCT06, kSceneCT06); diff --git a/engines/bladerunner/script/scene/ct09.cpp b/engines/bladerunner/script/scene/ct09.cpp index 1e6918d6de..c9506d54c5 100644 --- a/engines/bladerunner/script/scene/ct09.cpp +++ b/engines/bladerunner/script/scene/ct09.cpp @@ -69,7 +69,7 @@ bool SceneScriptCT09::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptCT09::ClickedOnActor(int actorId) { - if (actorId == 27) { + if (actorId == kActorDeskClerk) { if (!Actor_Query_Goal_Number(kActorDeskClerk) && Actor_Query_Which_Set_In(kActorLeon) != 31) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 270.0f, 348.52f, 846.0f, 12, 1, false, 0)) { Player_Loses_Control(); @@ -109,7 +109,7 @@ bool SceneScriptCT09::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 206.0f, 348.52f, 599.0f, 0, 1, false, 0)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 235.0f, 348.52f, 599.0f, 0, 0, false, 0); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT09toCT08); Set_Enter(kSetCT08_CT51_UG12, kSceneCT08); @@ -118,7 +118,7 @@ bool SceneScriptCT09::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 107.0f, 348.52f, 927.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT09toCT11); Set_Enter(kSetCT11, kSceneCT11); @@ -127,7 +127,7 @@ bool SceneScriptCT09::ClickedOnExit(int exitId) { } if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 159.0f, 349.0f, 570.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT09toCT10); Set_Enter(kSetCT10, kSceneCT10); @@ -172,7 +172,7 @@ void SceneScriptCT09::PlayerWalkedIn() { } else { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 124.0f, 348.52f, 886.0f, 0, 0, false, 0); } - Game_Flag_Reset(304); + Game_Flag_Reset(kFlagCT11toCT09); } if (Actor_Query_Goal_Number(kActorDeskClerk) == 2) { if (Game_Flag_Query(539)) { diff --git a/engines/bladerunner/script/scene/ct10.cpp b/engines/bladerunner/script/scene/ct10.cpp index dbc26d27a9..7b666efbf4 100644 --- a/engines/bladerunner/script/scene/ct10.cpp +++ b/engines/bladerunner/script/scene/ct10.cpp @@ -118,7 +118,7 @@ bool SceneScriptCT10::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -93.0f, 0.0f, -38.0f, 0, 1, false, 0)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -121.0f, 0.0f, -78.0f, 0, 0, false, 0); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT10toCT09); Set_Enter(kSetCT09, kSceneCT09); diff --git a/engines/bladerunner/script/scene/ct11.cpp b/engines/bladerunner/script/scene/ct11.cpp index 50b5a34195..46fc21dc3e 100644 --- a/engines/bladerunner/script/scene/ct11.cpp +++ b/engines/bladerunner/script/scene/ct11.cpp @@ -100,7 +100,7 @@ bool SceneScriptCT11::ClickedOnItem(int itemId, bool a2) { bool SceneScriptCT11::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 121.0f, 9.68f, -42.0f, 0, 1, false, 0)) { - Game_Flag_Set(304); + Game_Flag_Set(kFlagCT11toCT09); Set_Enter(kSetCT09, kSceneCT09); } return true; @@ -203,7 +203,7 @@ void SceneScriptCT11::PlayerWalkedIn() { } void SceneScriptCT11::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/ct12.cpp b/engines/bladerunner/script/scene/ct12.cpp index b303171bbf..fa722f740c 100644 --- a/engines/bladerunner/script/scene/ct12.cpp +++ b/engines/bladerunner/script/scene/ct12.cpp @@ -157,7 +157,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, true, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Game_Flag_Set(kFlagCT12toCT01); Set_Enter(kSetCT01_CT12, kSceneCT01); } @@ -165,7 +165,7 @@ bool SceneScriptCT12::ClickedOnExit(int exitId) { } if (exitId == 1) { 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_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT12toCT03); Set_Enter(kSetCT03_CT04, kSceneCT03); @@ -174,7 +174,7 @@ bool SceneScriptCT12::ClickedOnExit(int exitId) { } if (exitId == 2) { 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_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT12toCT05); Set_Enter(kSetCT05, kSceneCT05); @@ -183,7 +183,7 @@ bool SceneScriptCT12::ClickedOnExit(int exitId) { } if (exitId == 3) { 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_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT12toCT11); Set_Enter(kSetCT11, kSceneCT11); @@ -195,7 +195,7 @@ bool SceneScriptCT12::ClickedOnExit(int exitId) { if (Global_Variable_Query(kVariableChapter) == 4) { Game_Flag_Set(629); } - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT12ToUG09); Set_Enter(kSetUG09, kSceneUG09); diff --git a/engines/bladerunner/script/scene/ct51.cpp b/engines/bladerunner/script/scene/ct51.cpp index f022e04696..6f44fb0b27 100644 --- a/engines/bladerunner/script/scene/ct51.cpp +++ b/engines/bladerunner/script/scene/ct51.cpp @@ -93,7 +93,7 @@ bool SceneScriptCT51::ClickedOnExit(int exitId) { if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, 0.0f, -102.0f, 0, 1, false, 0)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -11.0f, 0.0f, -156.0f, 0, 0, false, 0); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(380); Set_Enter(kSetCT08_CT51_UG12, kSceneCT08); diff --git a/engines/bladerunner/script/scene/dr01.cpp b/engines/bladerunner/script/scene/dr01.cpp index f58ebc6a38..b2b308ce15 100644 --- a/engines/bladerunner/script/scene/dr01.cpp +++ b/engines/bladerunner/script/scene/dr01.cpp @@ -101,7 +101,7 @@ bool SceneScriptDR01::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptDR01::ClickedOnActor(int actorId) { - return actorId == 50; + return actorId == kActorShoeshineMan; } bool SceneScriptDR01::ClickedOnItem(int itemId, bool a2) { @@ -259,7 +259,7 @@ void SceneScriptDR01::PlayerWalkedOut() { && !Game_Flag_Query(kFlagDR01toDR02) && !Game_Flag_Query(558) ) { - 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(kOuttakeInside2, true, -1); } diff --git a/engines/bladerunner/script/scene/dr04.cpp b/engines/bladerunner/script/scene/dr04.cpp index d4aa636a1c..0f3addc3b7 100644 --- a/engines/bladerunner/script/scene/dr04.cpp +++ b/engines/bladerunner/script/scene/dr04.cpp @@ -266,7 +266,7 @@ void SceneScriptDR04::PlayerWalkedIn() { void SceneScriptDR04::PlayerWalkedOut() { Music_Stop(2); - 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/dr05.cpp b/engines/bladerunner/script/scene/dr05.cpp index 6ad6604c23..0204cf5b26 100644 --- a/engines/bladerunner/script/scene/dr05.cpp +++ b/engines/bladerunner/script/scene/dr05.cpp @@ -189,7 +189,7 @@ void SceneScriptDR05::PlayerWalkedIn() { } void SceneScriptDR05::PlayerWalkedOut() { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (Actor_Query_Goal_Number(kActorMoraji) == 10 || Actor_Query_Goal_Number(kActorMoraji) == 18 || Actor_Query_Goal_Number(kActorMoraji) == 19) { Actor_Set_Goal_Number(kActorMoraji, 11); diff --git a/engines/bladerunner/script/scene/hc01.cpp b/engines/bladerunner/script/scene/hc01.cpp index e9ef0a2209..8318130397 100644 --- a/engines/bladerunner/script/scene/hc01.cpp +++ b/engines/bladerunner/script/scene/hc01.cpp @@ -26,15 +26,15 @@ namespace BladeRunner { void SceneScriptHC01::InitializeScene() { Music_Play(0, 31, 0, 2, -1, 1, 2); - if (Game_Flag_Query(385)) { + if (Game_Flag_Query(kFlagHC02toHC01)) { Setup_Scene_Information(64.0f, 0.14f, 83.0f, 266); - } else if (Game_Flag_Query(387)) { + } else if (Game_Flag_Query(kFlagHC03toHC01)) { Setup_Scene_Information(607.0f, 0.14f, 9.0f, 530); } else { Setup_Scene_Information(780.0f, 0.14f, 153.0f, 815); } Scene_Exit_Add_2D_Exit(0, 0, 460, 639, 479, 2); - if (Game_Flag_Query(402)) { + if (Game_Flag_Query(kFlagHC03Available)) { Scene_Exit_Add_2D_Exit(1, 394, 229, 485, 371, 1); } Scene_Exit_Add_2D_Exit(2, 117, 0, 286, 319, 0); @@ -93,14 +93,14 @@ bool SceneScriptHC01::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptHC01::ClickedOnActor(int actorId) { - if (actorId == 7 && (Actor_Query_Goal_Number(kActorIzo) == 150 || Actor_Query_Goal_Number(kActorIzo) == 0)) { + if (actorId == kActorIzo + && (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoGoToHC01 + || Actor_Query_Goal_Number(kActorIzo) == kGoalIzoDefault + ) + ) { AI_Movement_Track_Pause(kActorIzo); if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 624.43f, 0.14f, 83.0f, 0, 1, false, 0)) { - if (Game_Flag_Query(400)) { - Actor_Face_Actor(kActorMcCoy, kActorIzo, true); - Actor_Face_Actor(kActorIzo, kActorMcCoy, true); - sub_402384(); - } else { + if (!Game_Flag_Query(kFlagIzoTalk1)) { Actor_Face_Actor(kActorIzo, kActorMcCoy, true); Actor_Says_With_Pause(kActorIzo, 10, 0.2f, 13); Actor_Face_Actor(kActorMcCoy, kActorIzo, true); @@ -114,7 +114,11 @@ bool SceneScriptHC01::ClickedOnActor(int actorId) { Actor_Says_With_Pause(kActorIzo, 70, 1.0f, 13); Actor_Says_With_Pause(kActorMcCoy, 1045, 0.6f, 14); Actor_Says(kActorIzo, 80, 18); - Game_Flag_Set(400); + Game_Flag_Set(kFlagIzoTalk1); + } else { + Actor_Face_Actor(kActorMcCoy, kActorIzo, true); + Actor_Face_Actor(kActorIzo, kActorMcCoy, true); + dialogueWithIzo(); } } AI_Movement_Track_Unpause(kActorIzo); @@ -123,8 +127,8 @@ bool SceneScriptHC01::ClickedOnActor(int actorId) { } bool SceneScriptHC01::ClickedOnItem(int itemId, bool a2) { - if (itemId == 107) { - Item_Remove_From_World(107); + if (itemId == kItemCamera) { + Item_Remove_From_World(kItemCamera); Item_Pickup_Spin_Effect(977, 361, 381); Delay(1500); Item_Pickup_Spin_Effect(984, 377, 397); @@ -143,7 +147,7 @@ bool SceneScriptHC01::ClickedOnItem(int itemId, bool a2) { bool SceneScriptHC01::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 814.0f, 0.14f, 153.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 814.0f, 0.14f, 153.0f, 0, true, false, 0)) { Music_Adjust(12, 0, 2); Game_Flag_Set(kFlagHC01toAR01); Set_Enter(kSetAR01_AR02, kSceneAR01); @@ -153,15 +157,15 @@ bool SceneScriptHC01::ClickedOnExit(int exitId) { return true; } if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 607.0f, 0.14f, 9.0f, 0, 1, false, 0)) { - Game_Flag_Set(386); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 607.0f, 0.14f, 9.0f, 0, true, false, 0)) { + Game_Flag_Set(kFlagHC01toHC03); Set_Enter(kSetHC01_HC02_HC03_HC04, kSceneHC03); } return true; } if (exitId == 2) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 105.0f, 0.14f, 103.0f, 0, 1, false, 0)) { - Game_Flag_Set(384); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 105.0f, 0.14f, 103.0f, 0, true, false, 0)) { + Game_Flag_Set(kFlagHC01toHC02); Async_Actor_Walk_To_XYZ(kActorMcCoy, -57.0f, 0.14f, 83.0f, 0, false); Set_Enter(kSetHC01_HC02_HC03_HC04, kSceneHC02); } @@ -193,7 +197,7 @@ void SceneScriptHC01::SceneFrameAdvanced(int frame) { } if (frame == 80) { Ambient_Sounds_Play_Sound(316, 40, 100, 100, 0); - Item_Add_To_World(121, 931, 8, 582.0f, 27.0f, -41.0f, 0, 8, 8, true, true, false, true); + Item_Add_To_World(kItemHC03Lock, 931, kSetHC01_HC02_HC03_HC04, 582.0f, 27.0f, -41.0f, 0, 8, 8, true, true, false, true); } } @@ -201,12 +205,12 @@ void SceneScriptHC01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptHC01::PlayerWalkedIn() { - if (Game_Flag_Query(385)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 105.0f, 0.14f, 103.0f, 0, 0, false, 0); - Game_Flag_Reset(385); + if (Game_Flag_Query(kFlagHC02toHC01)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 105.0f, 0.14f, 103.0f, 0, false, false, 0); + Game_Flag_Reset(kFlagHC02toHC01); } - if (Game_Flag_Query(387)) { - Game_Flag_Reset(387); + if (Game_Flag_Query(kFlagHC03toHC01)) { + Game_Flag_Reset(kFlagHC03toHC01); } if (Game_Flag_Query(kFlagAR01toHC01)) { Game_Flag_Reset(kFlagAR01toHC01); @@ -215,69 +219,66 @@ void SceneScriptHC01::PlayerWalkedIn() { void SceneScriptHC01::PlayerWalkedOut() { Set_Fade_Density(0.0f); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); } void SceneScriptHC01::DialogueQueueFlushed(int a1) { } -void SceneScriptHC01::sub_402384() { - if (!Game_Flag_Query(401)) { +void SceneScriptHC01::dialogueWithIzo() { + if (!Game_Flag_Query(kFlagIzoTalk2)) { Actor_Says(kActorMcCoy, 1055, 13); Actor_Says(kActorIzo, 130, 13); Actor_Says_With_Pause(kActorMcCoy, 1060, 0.2f, 13); Actor_Says(kActorIzo, 140, 13); - Game_Flag_Set(401); + Game_Flag_Set(kFlagIzoTalk2); } + Dialogue_Menu_Clear_List(); - if (Actor_Clue_Query(kActorMcCoy, kCluePeruvianLadyInterview) == 1) { - DM_Add_To_List_Never_Repeat_Once_Selected(1020, 6, 7, 3); - } else if (Actor_Clue_Query(kActorMcCoy, kClueDragonflyEarring) || Actor_Clue_Query(kActorMcCoy, kClueBombingSuspect) || Actor_Clue_Query(kActorMcCoy, kClueDragonflyAnklet)) { - DM_Add_To_List_Never_Repeat_Once_Selected(1010, 6, 7, 3); + if (Actor_Clue_Query(kActorMcCoy, kCluePeruvianLadyInterview)) { + DM_Add_To_List_Never_Repeat_Once_Selected(1020, 6, 7, 3); // DRAGONFLY JEWERLY + } else if (Actor_Clue_Query(kActorMcCoy, kClueDragonflyEarring) + || Actor_Clue_Query(kActorMcCoy, kClueBombingSuspect) + || Actor_Clue_Query(kActorMcCoy, kClueDragonflyAnklet) + ) { + DM_Add_To_List_Never_Repeat_Once_Selected(1010, 6, 7, 3); // INSECT JEWELRY } - if (Actor_Clue_Query(kActorMcCoy, kClueBobInterview1) == 1) { - DM_Add_To_List_Never_Repeat_Once_Selected(1030, 1, 5, 7); - } else if (Actor_Clue_Query(kActorMcCoy, kClueShellCasings) == 1) { - DM_Add_To_List_Never_Repeat_Once_Selected(1040, 4, 4, 6); + if (Actor_Clue_Query(kActorMcCoy, kClueBobInterview1)) { + DM_Add_To_List_Never_Repeat_Once_Selected(1030, 1, 5, 7); // WEAPONS + } else if (Actor_Clue_Query(kActorMcCoy, kClueShellCasings)) { + DM_Add_To_List_Never_Repeat_Once_Selected(1040, 4, 4, 6); // SHELL CASINGS } - if (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB2) == 1) { - DM_Add_To_List_Never_Repeat_Once_Selected(1050, -1, 3, 8); - } else if (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB1) == 1) { - DM_Add_To_List_Never_Repeat_Once_Selected(1060, -1, 3, 8); + if (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB2)) { + DM_Add_To_List_Never_Repeat_Once_Selected(1050, -1, 3, 8); // GRIGORIAN 1 + } else if (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB1)) { + DM_Add_To_List_Never_Repeat_Once_Selected(1060, -1, 3, 8); // GRIGORIAN 2 } - if (!Dialogue_Menu_Query_List_Size()) { + + if (Dialogue_Menu_Query_List_Size() == 0) { Actor_Says_With_Pause(kActorMcCoy, 1105, 1.2f, 13); if (Actor_Query_Friendliness_To_Other(kActorIzo, kActorMcCoy) < 50) { Actor_Says(kActorIzo, 550, 15); } else { Actor_Says(kActorIzo, 250, 13); Actor_Modify_Friendliness_To_Other(kActorIzo, kActorMcCoy, -1); - if (Actor_Query_Friendliness_To_Other(kActorIzo, kActorMcCoy) < 47 && Query_Difficulty_Level() == 0) { - sub_40346C(); + if (Actor_Query_Friendliness_To_Other(kActorIzo, kActorMcCoy) < 47 + && Query_Difficulty_Level() == 0 + ) { + takePhotoAndRunAway(); } } return; } - Dialogue_Menu_Add_DONE_To_List(100); + + Dialogue_Menu_Add_DONE_To_List(100); // DONE + bool end = false; do { Dialogue_Menu_Appear(320, 240); int answer = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); - if (answer == 1020) { - Dialogue_Menu_Remove_From_List(1020); - Actor_Says(kActorMcCoy, 1065, 15); - Actor_Says(kActorIzo, 160, 3); - Actor_Says(kActorMcCoy, 1110, 16); - Actor_Says(kActorIzo, 170, 3); - Actor_Says(kActorIzo, 180, 3); - Actor_Says(kActorIzo, 190, 12); - if (Query_Difficulty_Level() < 2) { - Actor_Modify_Friendliness_To_Other(kActorIzo, kActorMcCoy, -2); - } - } - if (answer == 1010) { + if (answer == 1010) { // INSECT JEWELRY Dialogue_Menu_Remove_From_List(1010); Actor_Clue_Acquire(kActorMcCoy, kClueIzoInterview, false, kActorIzo); Actor_Says(kActorMcCoy, 1070, 13); @@ -285,30 +286,36 @@ void SceneScriptHC01::sub_402384() { Actor_Says(kActorIzo, 210, 12); Actor_Says(kActorMcCoy, 1115, 12); Actor_Says(kActorIzo, 220, 16); - Actor_Says(kActorIzo, 230, 3); + Actor_Says(kActorIzo, 230, kAnimationModeTalk); Actor_Says(kActorIzo, 240, 15); if (Query_Difficulty_Level() < 2) { Actor_Modify_Friendliness_To_Other(kActorIzo, kActorMcCoy, -1); } } - if (answer == 1010 || answer == 1020) { + if (answer == 1020) { // DRAGONFLY JEWERLY + Dialogue_Menu_Remove_From_List(1020); + Actor_Says(kActorMcCoy, 1065, 15); + Actor_Says(kActorIzo, 160, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1110, 16); + Actor_Says(kActorIzo, 170, kAnimationModeTalk); + Actor_Says(kActorIzo, 180, kAnimationModeTalk); + Actor_Says(kActorIzo, 190, 12); + if (Query_Difficulty_Level() < 2) { + Actor_Modify_Friendliness_To_Other(kActorIzo, kActorMcCoy, -2); + } + } + if (answer == 1010 // INSECT JEWELRY + || answer == 1020 // DRAGONFLY JEWERLY + ) { Actor_Says_With_Pause(kActorMcCoy, 1120, 0.9f, 17); Actor_Says(kActorIzo, 250, 13); Actor_Says(kActorMcCoy, 1125, 14); if (Actor_Query_Friendliness_To_Other(kActorIzo, kActorMcCoy) < 47) { - Actor_Set_Goal_Number(kActorIzo, 1); - Player_Loses_Control(); - Actor_Says(kActorIzo, 90, 3); - Actor_Face_Actor(kActorIzo, kActorMcCoy, true); - Actor_Says(kActorIzo, 100, 3); - Actor_Says(kActorIzo, 110, 3); - Actor_Says_With_Pause(kActorMcCoy, 1050, 0.2f, 3); - Actor_Says(kActorIzo, 120, 3); - Actor_Set_Goal_Number(kActorIzo, 2); + takePhotoAndRunAway(); } end = true; } - if (answer == 1030) { + if (answer == 1030) { // WEAPONS Dialogue_Menu_Remove_From_List(1030); Actor_Says(kActorMcCoy, 1075, 18); Actor_Says(kActorIzo, 260, 12); @@ -319,24 +326,16 @@ void SceneScriptHC01::sub_402384() { Actor_Says(kActorIzo, 290, 15); Actor_Says(kActorIzo, 300, 12); Actor_Says(kActorIzo, 310, 17); - Actor_Says(kActorMcCoy, 1140, 3); + Actor_Says(kActorMcCoy, 1140, kAnimationModeTalk); if (Query_Difficulty_Level() < 2) { Actor_Modify_Friendliness_To_Other(kActorIzo, kActorMcCoy, -2); } if (Actor_Query_Friendliness_To_Other(kActorIzo, kActorMcCoy) < 47) { - Actor_Set_Goal_Number(kActorIzo, 1); - Player_Loses_Control(); - Actor_Says(kActorIzo, 90, 3); - Actor_Face_Actor(kActorIzo, kActorMcCoy, true); - Actor_Says(kActorIzo, 100, 3); - Actor_Says(kActorIzo, 110, 3); - Actor_Says_With_Pause(kActorMcCoy, 1050, 0.2f, 3); - Actor_Says(kActorIzo, 120, 3); - Actor_Set_Goal_Number(kActorIzo, 2); + takePhotoAndRunAway(); } end = true; } - if (answer == 1040) { + if (answer == 1040) { // SHELL CASINGS Dialogue_Menu_Remove_From_List(1040); Actor_Says(kActorMcCoy, 1080, 15); Actor_Says(kActorMcCoy, 1085, 17); @@ -347,7 +346,7 @@ void SceneScriptHC01::sub_402384() { Actor_Says(kActorIzo, 350, 12); end = true; } - if (answer == 1050) { + if (answer == 1050) { // GRIGORIAN 1 Dialogue_Menu_Remove_From_List(1050); Actor_Says(kActorMcCoy, 1090, 18); Actor_Says(kActorIzo, 360, 14); @@ -367,19 +366,11 @@ void SceneScriptHC01::sub_402384() { Actor_Says(kActorIzo, 440, 13); Actor_Modify_Friendliness_To_Other(kActorIzo, kActorMcCoy, -4); if (Actor_Query_Friendliness_To_Other(kActorIzo, kActorMcCoy) < 47) { - Actor_Set_Goal_Number(kActorIzo, 1); - Player_Loses_Control(); - Actor_Says(kActorIzo, 90, 3); - Actor_Face_Actor(kActorIzo, kActorMcCoy, true); - Actor_Says(kActorIzo, 100, 3); - Actor_Says(kActorIzo, 110, 3); - Actor_Says_With_Pause(kActorMcCoy, 1050, 0.2f, 3); - Actor_Says(kActorIzo, 120, 3); - Actor_Set_Goal_Number(kActorIzo, 2); + takePhotoAndRunAway(); } end = true; } - if (answer == 1060) { + if (answer == 1060) { // GRIGORIAN 2 Dialogue_Menu_Remove_From_List(1060); Actor_Says(kActorMcCoy, 1095, 15); Actor_Says_With_Pause(kActorMcCoy, 1100, 1.2f, 18); @@ -400,34 +391,26 @@ void SceneScriptHC01::sub_402384() { Actor_Says(kActorMcCoy, 1210, 16); Actor_Modify_Friendliness_To_Other(kActorIzo, kActorMcCoy, -4); if (Actor_Query_Friendliness_To_Other(kActorIzo, kActorMcCoy) < 47) { - Actor_Set_Goal_Number(kActorIzo, 1); - Player_Loses_Control(); - Actor_Says(kActorIzo, 90, 3); - Actor_Face_Actor(kActorIzo, kActorMcCoy, true); - Actor_Says(kActorIzo, 100, 3); - Actor_Says(kActorIzo, 110, 3); - Actor_Says_With_Pause(kActorMcCoy, 1050, 0.2f, 3); - Actor_Says(kActorIzo, 120, 3); - Actor_Set_Goal_Number(kActorIzo, 2); + takePhotoAndRunAway(); } end = true; } - if (answer == 100) { + if (answer == 100) { // DONE end = true; } } while (!end); } -void SceneScriptHC01::sub_40346C() { - Actor_Set_Goal_Number(kActorIzo, 1); +void SceneScriptHC01::takePhotoAndRunAway() { + Actor_Set_Goal_Number(kActorIzo, kGoalIzoPrepareCamera); Player_Loses_Control(); - Actor_Says(kActorIzo, 90, 3); + Actor_Says(kActorIzo, 90, kAnimationModeTalk); Actor_Face_Actor(kActorIzo, kActorMcCoy, true); - Actor_Says(kActorIzo, 100, 3); - Actor_Says(kActorIzo, 110, 3); - Actor_Says_With_Pause(kActorMcCoy, 1050, 0.2f, 3); - Actor_Says(kActorIzo, 120, 3); - Actor_Set_Goal_Number(kActorIzo, 2); + Actor_Says(kActorIzo, 100, kAnimationModeTalk); + Actor_Says(kActorIzo, 110, kAnimationModeTalk); + Actor_Says_With_Pause(kActorMcCoy, 1050, 0.2f, kAnimationModeTalk); + Actor_Says(kActorIzo, 120, kAnimationModeTalk); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoTakePhoto); } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/scene/hc02.cpp b/engines/bladerunner/script/scene/hc02.cpp index 4b293612dc..76cf09c6e0 100644 --- a/engines/bladerunner/script/scene/hc02.cpp +++ b/engines/bladerunner/script/scene/hc02.cpp @@ -35,16 +35,16 @@ void SceneScriptHC02::InitializeScene() { Scene_Exit_Add_2D_Exit(1, 505, 0, 639, 170, 0); Ambient_Sounds_Add_Looping_Sound(103, 50, 50, 0); Ambient_Sounds_Add_Looping_Sound(280, 50, 50, 0); - Ambient_Sounds_Add_Sound(252, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(254, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(255, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(256, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(257, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(258, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(259, 3, 60, 33, 33, -100, 20, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(260, 3, 60, 33, 33, -100, 20, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(261, 3, 60, 33, 33, -100, 20, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(262, 3, 60, 33, 33, -100, 20, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(252, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(254, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(255, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(256, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(257, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(258, 3, 60, 33, 33, -60, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(259, 3, 60, 33, 33, -100, 20, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(260, 3, 60, 33, 33, -100, 20, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(261, 3, 60, 33, 33, -100, 20, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(262, 3, 60, 33, 33, -100, 20, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(182, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(184, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(185, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); @@ -54,20 +54,20 @@ void SceneScriptHC02::InitializeScene() { Ambient_Sounds_Add_Sound(191, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(192, 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); - Ambient_Sounds_Add_Sound(242, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(243, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(244, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(245, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(246, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(247, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(248, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(249, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(242, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(243, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(244, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(245, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(246, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(247, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(248, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(249, 3, 30, 14, 14, 30, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(238, 3, 50, 20, 20, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(240, 3, 50, 25, 25, -100, 100, -101, -101, 0, 0); - if (Game_Flag_Query(384)) { + if (Game_Flag_Query(kFlagHC01toHC02)) { Scene_Loop_Start_Special(0, 0, 0); Scene_Loop_Set_Default(1); - Game_Flag_Reset(384); + Game_Flag_Reset(kFlagHC01toHC02); } else { Scene_Loop_Set_Default(1); } @@ -86,10 +86,10 @@ bool SceneScriptHC02::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptHC02::ClickedOnActor(int actorId) { - if (actorId == 32) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -150.51f, 0.14f, 62.74f, 0, 1, false, 0)) { + if (actorId == kActorHawkersBarkeep) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -150.51f, 0.14f, 62.74f, 0, true, false, 0)) { Actor_Face_Actor(kActorMcCoy, kActorHawkersBarkeep, true); - if (!Game_Flag_Query(404)) { + if (!Game_Flag_Query(kFlagHawkersBarkeepIntroduction)) { Actor_Says(kActorMcCoy, 1225, 13); Actor_Says_With_Pause(kActorHawkersBarkeep, 0, 0.0f, 13); Actor_Says(kActorHawkersBarkeep, 10, 16); @@ -98,15 +98,22 @@ bool SceneScriptHC02::ClickedOnActor(int actorId) { Delay(1500); Actor_Change_Animation_Mode(kActorMcCoy, 75); Delay(1500); - Global_Variable_Increment(42, 1); - Game_Flag_Set(404); - } else if (Actor_Clue_Query(kActorMcCoy, kClueChinaBarSecurityCamera) && !Actor_Clue_Query(kActorMcCoy, kClueChinaBarSecurityDisc)) { + Global_Variable_Increment(kVariableMcCoyDrinks, 1); + Game_Flag_Set(kFlagHawkersBarkeepIntroduction); + } else if ( Actor_Clue_Query(kActorMcCoy, kClueChinaBarSecurityCamera) + && !Actor_Clue_Query(kActorMcCoy, kClueChinaBarSecurityDisc) + ) { Actor_Says(kActorMcCoy, 4545, 11); Actor_Says(kActorHawkersBarkeep, 120, 12); Actor_Says(kActorHawkersBarkeep, 180, 13); 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)) { + } else if ( Actor_Clue_Query(kActorMcCoy, kClueHomelessManInterview1) + && !Actor_Clue_Query(kActorMcCoy, kClueFlaskOfAbsinthe) + && (Global_Variable_Query(kVariableChinyen) > 20 + || Query_Difficulty_Level() == 0 + ) + ) { Actor_Clue_Acquire(kActorMcCoy, kClueFlaskOfAbsinthe, true, kActorHawkersBarkeep); Actor_Says(kActorMcCoy, 1230, 13); Actor_Says(kActorHawkersBarkeep, 20, 12); @@ -120,23 +127,25 @@ bool SceneScriptHC02::ClickedOnActor(int actorId) { Delay(1500); Actor_Says_With_Pause(kActorHawkersBarkeep, 50, 1.6f, 17); if (Query_Difficulty_Level() != 0) { - Global_Variable_Decrement(2, 20); + Global_Variable_Decrement(kVariableChinyen, 20); } Actor_Says(kActorMcCoy, 1245, 13); } else { if ( Actor_Clue_Query(kActorMcCoy, kClueMaggieBracelet) - && !Game_Flag_Query(405) + && !Game_Flag_Query(kFlagHawkersBarkeepBraceletTalk) ) { Actor_Says(kActorHawkersBarkeep, 80, 16); Actor_Says(kActorMcCoy, 1265, 13); Actor_Says(kActorHawkersBarkeep, 90, 13); - Game_Flag_Set(405); + Game_Flag_Set(kFlagHawkersBarkeepBraceletTalk); } - if (Global_Variable_Query(2) > 5 || Query_Difficulty_Level() == 0) { + if (Global_Variable_Query(kVariableChinyen) > 5 + || Query_Difficulty_Level() == 0 + ) { if (Query_Difficulty_Level() != 0) { - Global_Variable_Decrement(2, 5); + Global_Variable_Decrement(kVariableChinyen, 5); } - Global_Variable_Increment(42, 1); + Global_Variable_Increment(kVariableMcCoyDrinks, 1); Actor_Says(kActorMcCoy, 1250, 13); Actor_Says_With_Pause(kActorHawkersBarkeep, 60, 0.8f, 14); Actor_Says(kActorMcCoy, 1255, 13); @@ -163,16 +172,16 @@ bool SceneScriptHC02::ClickedOnItem(int itemId, bool a2) { bool SceneScriptHC02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 7.0f, 0.14f, 79.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(385); + Game_Flag_Set(kFlagHC02toHC01); Set_Enter(kSetHC01_HC02_HC03_HC04, kSceneHC01); } return true; } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -76.0f, 0.14f, -339.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagHC02toHC04); Async_Actor_Walk_To_XYZ(kActorMcCoy, -88.0f, 0.14f, -463.0f, 0, false); @@ -204,7 +213,7 @@ void SceneScriptHC02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptHC02::PlayerWalkedIn() { if (Game_Flag_Query(kFlagHC04toHC02)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -76.0f, 0.14f, -339.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -76.0f, 0.14f, -339.0f, 0, false, false, 0); Game_Flag_Reset(kFlagHC04toHC02); } } diff --git a/engines/bladerunner/script/scene/hc03.cpp b/engines/bladerunner/script/scene/hc03.cpp index e8490b5d4d..07016f6c5f 100644 --- a/engines/bladerunner/script/scene/hc03.cpp +++ b/engines/bladerunner/script/scene/hc03.cpp @@ -24,21 +24,33 @@ namespace BladeRunner { +enum kHC03Loops { + kHC03LoopMain = 0, + kHC03LoopCageDoorOpening = 2, + kHC03LoopMainCageOpen = 3, + kHC03LoopTrapDoorOpening = 5, + kHC03LoopMainCageOpenTrapDoorOpen = 6 +}; + void SceneScriptHC03::InitializeScene() { if (Game_Flag_Query(kFlagUG02toHC03)) { Setup_Scene_Information(656.0f, 1.61f, -95.0f, 497); - Game_Flag_Set(388); + Game_Flag_Set(kFlagHC03TrapDoorOpen); Game_Flag_Reset(kFlagUG02toHC03); } else { Setup_Scene_Information(607.0f, 0.14f, 13.0f, 57); - Game_Flag_Reset(386); + Game_Flag_Reset(kFlagHC01toHC03); } Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3); - if (Game_Flag_Query(403) || Global_Variable_Query(kVariableChapter) > 3) { - Item_Remove_From_World(121); - Game_Flag_Set(403); + + if (Game_Flag_Query(kFlagHC03CageOpen) + || Global_Variable_Query(kVariableChapter) > 3 + ) { + Item_Remove_From_World(kItemHC03Lock); + Game_Flag_Set(kFlagHC03CageOpen); Scene_Exit_Add_2D_Exit(1, 400, 275, 515, 375, 2); } + Ambient_Sounds_Add_Looping_Sound(103, 50, 50, 0); Ambient_Sounds_Add_Looping_Sound(241, 50, 50, 0); Ambient_Sounds_Add_Sound(242, 3, 30, 16, 16, -100, -70, -101, -101, 0, 0); @@ -65,18 +77,24 @@ void SceneScriptHC03::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(388)) { - Scene_Loop_Set_Default(6); - } else if (Game_Flag_Query(403) || Global_Variable_Query(kVariableChapter) > 3) { - Scene_Loop_Set_Default(3); + + if (Game_Flag_Query(kFlagHC03TrapDoorOpen)) { + Scene_Loop_Set_Default(kHC03LoopMainCageOpenTrapDoorOpen); + } else if (Game_Flag_Query(kFlagHC03CageOpen) + || Global_Variable_Query(kVariableChapter) > 3 + ) { + Scene_Loop_Set_Default(kHC03LoopMainCageOpen); } else { - Scene_Loop_Set_Default(0); + Scene_Loop_Set_Default(kHC03LoopMain); } } void SceneScriptHC03::SceneLoaded() { Obstacle_Object("GUITAR01", true); - if (Game_Flag_Query(403) || Game_Flag_Query(388) || Global_Variable_Query(kVariableChapter) > 3) { + if (Game_Flag_Query(kFlagHC03CageOpen) + || Game_Flag_Query(kFlagHC03TrapDoorOpen) + || Global_Variable_Query(kVariableChapter) > 3 + ) { Unobstacle_Object("GPscisGate", true); } else { Obstacle_Object("GPscisGate", true); @@ -96,21 +114,22 @@ bool SceneScriptHC03::ClickedOnActor(int actorId) { return false; } -bool SceneScriptHC03::ClickedOnItem(int itemId, bool a2) { - if (itemId == 121) { - if (a2) { - Scene_Loop_Set_Default(3); - Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true); - Game_Flag_Set(403); - Item_Remove_From_World(121); +bool SceneScriptHC03::ClickedOnItem(int itemId, bool combatMode) { + if (itemId == kItemHC03Lock) { + if (combatMode) { + Scene_Loop_Set_Default(kHC03LoopMainCageOpen); + Scene_Loop_Start_Special(kSceneLoopModeOnce, kHC03LoopCageDoorOpening, true); + Game_Flag_Set(kFlagHC03CageOpen); + Item_Remove_From_World(kItemHC03Lock); Unobstacle_Object("GPscisGate", true); } else { Actor_Says(kActorMcCoy, 8522, 12); } return true; } - if (itemId == 107) { - Item_Remove_From_World(107); + + if (itemId == kItemCamera) { + Item_Remove_From_World(kItemCamera); Item_Pickup_Spin_Effect(977, 68, 435); Delay(1500); Item_Pickup_Spin_Effect(984, 78, 435); @@ -129,25 +148,26 @@ bool SceneScriptHC03::ClickedOnItem(int itemId, bool a2) { bool SceneScriptHC03::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 607.0f, 0.14f, 9.0f, 0, 1, false, 0)) { - Game_Flag_Set(387); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 607.0f, 0.14f, 9.0f, 0, true, false, 0)) { + Game_Flag_Set(kFlagHC03toHC01); Set_Enter(kSetHC01_HC02_HC03_HC04, kSceneHC01); } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 628.0f, 2.04f, -123.0f, 0, 1, false, 0)) { - if (Game_Flag_Query(388)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 628.0f, 2.04f, -123.0f, 0, true, false, 0)) { + if (!Game_Flag_Query(kFlagHC03TrapDoorOpen)) { + Scene_Loop_Set_Default(kHC03LoopMainCageOpenTrapDoorOpen); + Scene_Loop_Start_Special(kSceneLoopModeOnce, kHC03LoopTrapDoorOpening, true); + Game_Flag_Set(kFlagHC03TrapDoorOpen); + } else { Game_Flag_Set(kFlagHC03toUG02); Game_Flag_Reset(kFlagMcCoyAtHCxx); Game_Flag_Set(kFlagMcCoyAtUGxx); - Game_Flag_Set(388); + Game_Flag_Set(kFlagHC03TrapDoorOpen); Music_Stop(2); Set_Enter(kSetUG02, kSceneUG02); - } else { - Scene_Loop_Set_Default(6); - Scene_Loop_Start_Special(kSceneLoopModeOnce, 5, true); - Game_Flag_Set(388); } } return true; @@ -160,10 +180,26 @@ bool SceneScriptHC03::ClickedOn2DRegion(int region) { } void SceneScriptHC03::SceneFrameAdvanced(int frame) { - if (frame == 10 || frame == 19 || frame == 29 || frame == 39 || frame == 49 || frame == 59 || frame == 71 || frame == 82 || frame == 91 || frame == 101 || frame == 111 || frame == 121 || frame == 131) { + if (frame == 10 + || frame == 19 + || frame == 29 + || frame == 39 + || frame == 49 + || frame == 59 + || frame == 71 + || frame == 82 + || frame == 91 + || frame == 101 + || frame == 111 + || frame == 121 + || frame == 131 + ) { Sound_Play(281, Random_Query(33, 50), 50, 50, 50); } - if (!Game_Flag_Query(521) && frame == 66) { + + if (!Game_Flag_Query(521) + && frame == 66 + ) { Ambient_Sounds_Play_Sound(328, 90, 0, -40, 99); Sound_Play(201, Random_Query(47, 47), 0, -40, 50); Scene_Exit_Add_2D_Exit(1, 400, 275, 515, 375, 2); @@ -178,7 +214,7 @@ void SceneScriptHC03::PlayerWalkedIn() { } void SceneScriptHC03::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/hc04.cpp b/engines/bladerunner/script/scene/hc04.cpp index a20b65c623..35965ea472 100644 --- a/engines/bladerunner/script/scene/hc04.cpp +++ b/engines/bladerunner/script/scene/hc04.cpp @@ -34,20 +34,20 @@ void SceneScriptHC04::InitializeScene() { Music_Play(4, 14, -90, 1, -1, 1, 2); Actor_Put_In_Set(kActorIsabella, kSetHC01_HC02_HC03_HC04); Actor_Set_At_XYZ(kActorIsabella, -210.0f, 0.0f, -445.0f, 250); - Scene_Exit_Add_2D_Exit(0, 539, 51, 639, 309, 0); - Scene_Exit_Add_2D_Exit(1, 0, 456, 639, 479, 2); + Scene_Exit_Add_2D_Exit(0, 539, 51, 639, 309, 0); + Scene_Exit_Add_2D_Exit(1, 0, 456, 639, 479, 2); Ambient_Sounds_Add_Looping_Sound(103, 50, 50, 0); Ambient_Sounds_Add_Looping_Sound(329, 16, 16, 0); Ambient_Sounds_Add_Looping_Sound(330, 40, 40, 0); - Ambient_Sounds_Add_Sound(182, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(184, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(185, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(186, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(188, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(189, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(191, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(192, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(195, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(182, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(184, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(185, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(186, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(188, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(189, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(191, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(192, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(195, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(252, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(252, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(254, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0); @@ -84,17 +84,17 @@ bool SceneScriptHC04::ClickedOn3DObject(const char *objectName, bool a2) { bool SceneScriptHC04::ClickedOnActor(int actorId) { if (actorId == kActorIsabella) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -155.0f, 0.0f, -475.0f, 12, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -155.0f, 0.0f, -475.0f, 12, true, false, 0)) { Actor_Face_Actor(kActorMcCoy, kActorIsabella, true); Actor_Face_Actor(kActorIsabella, kActorMcCoy, true); - if (Game_Flag_Query(kFlagIsabellaIntroduced)) { - sub_401B90(); + if (!Game_Flag_Query(kFlagIsabellaIntroduced)) { + Actor_Says(kActorIsabella, 0, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1280, kAnimationModeTalk); + Actor_Says(kActorIsabella, 20, kAnimationModeTalk); + Game_Flag_Set(kFlagIsabellaIntroduced); return true; } else { - Actor_Says(kActorIsabella, 0, 3); - Actor_Says(kActorMcCoy, 1280, 3); - Actor_Says(kActorIsabella, 20, 3); - Game_Flag_Set(kFlagIsabellaIntroduced); + dialogueWithIsabella(); return true; } } @@ -108,7 +108,7 @@ bool SceneScriptHC04::ClickedOnItem(int itemId, bool a2) { bool SceneScriptHC04::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -108.0f, 0.14f, -639.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -108.0f, 0.14f, -639.0f, 0, true, false, 0)) { Music_Stop(2); Game_Flag_Set(kFlagHC04toRC03); Game_Flag_Reset(kFlagMcCoyAtHCxx); @@ -118,7 +118,7 @@ bool SceneScriptHC04::ClickedOnExit(int exitId) { return true; } if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -72.0f, 0.14f, -399.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -72.0f, 0.14f, -399.0f, 0, true, false, 0)) { Game_Flag_Set(kFlagHC04toHC02); Set_Enter(kSetHC01_HC02_HC03_HC04, kSceneHC02); } @@ -141,100 +141,113 @@ void SceneScriptHC04::PlayerWalkedIn() { } void SceneScriptHC04::PlayerWalkedOut() { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); } void SceneScriptHC04::DialogueQueueFlushed(int a1) { } -void SceneScriptHC04::sub_401B90() { +void SceneScriptHC04::dialogueWithIsabella() { Dialogue_Menu_Clear_List(); - if (Actor_Clue_Query(kActorMcCoy, kClueKingstonKitchenBox2) || Actor_Clue_Query(kActorMcCoy, kClueKingstonKitchenBox1)) { + if (Actor_Clue_Query(kActorMcCoy, kClueKingstonKitchenBox2) + || Actor_Clue_Query(kActorMcCoy, kClueKingstonKitchenBox1) + ) { if (Actor_Clue_Query(kActorMcCoy, kClueBombingSuspect)) { - DM_Add_To_List_Never_Repeat_Once_Selected(340, 5, 6, 5); + DM_Add_To_List_Never_Repeat_Once_Selected(340, 5, 6, 5); // SADIK PHOTO } else if (Actor_Clue_Query(kActorMcCoy, kClueTyrellSecurityPhoto)) { - DM_Add_To_List_Never_Repeat_Once_Selected(350, 5, 6, 5); + DM_Add_To_List_Never_Repeat_Once_Selected(350, 5, 6, 5); // DELIVERYMEN } - DM_Add_To_List_Never_Repeat_Once_Selected(360, 6, 4, 3); + DM_Add_To_List_Never_Repeat_Once_Selected(360, 6, 4, 3); // MARCUS EISENDULLER } - if (Actor_Clue_Query(kActorMcCoy, kClueCheese) && !Actor_Clue_Query(kActorMcCoy, kClueSpecialIngredient)) { - DM_Add_To_List_Never_Repeat_Once_Selected(370, 3, 4, 7); + if ( Actor_Clue_Query(kActorMcCoy, kClueCheese) + && !Actor_Clue_Query(kActorMcCoy, kClueSpecialIngredient) + ) { + DM_Add_To_List_Never_Repeat_Once_Selected(370, 3, 4, 7); // CHEESE } if (Actor_Clue_Query(kActorMcCoy, kClueSpecialIngredient)) { - DM_Add_To_List_Never_Repeat_Once_Selected(380, -1, 5, 8); + DM_Add_To_List_Never_Repeat_Once_Selected(380, -1, 5, 8); // MIA AND MURRAY INFO } - DM_Add_To_List_Never_Repeat_Once_Selected(390, 7, 5, -1); - Dialogue_Menu_Add_DONE_To_List(400); + DM_Add_To_List_Never_Repeat_Once_Selected(390, 7, 5, -1); // BUY STEW + Dialogue_Menu_Add_DONE_To_List(400); // DONE + Dialogue_Menu_Appear(320, 240); int answer = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); + switch (answer) { - case 340: - Actor_Says(kActorMcCoy, 1285, 3); - Actor_Says(kActorIsabella, 50, 3); - Actor_Says(kActorMcCoy, 1330, 3); - Actor_Says(kActorIsabella, 60, 3); + case 340: // SADIK PHOTO + Actor_Says(kActorMcCoy, 1285, kAnimationModeTalk); + Actor_Says(kActorIsabella, 50, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1330, kAnimationModeTalk); + Actor_Says(kActorIsabella, 60, kAnimationModeTalk); break; - case 350: - Actor_Says(kActorMcCoy, 1290, 3); - Actor_Says(kActorIsabella, 70, 3); - Actor_Says(kActorMcCoy, 1335, 3); - Actor_Says(kActorIsabella, 80, 3); - Actor_Says(kActorMcCoy, 1340, 3); - Actor_Says(kActorIsabella, 90, 3); - Actor_Says(kActorMcCoy, 1345, 3); + + case 350: // DELIVERYMEN + Actor_Says(kActorMcCoy, 1290, kAnimationModeTalk); + Actor_Says(kActorIsabella, 70, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1335, kAnimationModeTalk); + Actor_Says(kActorIsabella, 80, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1340, kAnimationModeTalk); + Actor_Says(kActorIsabella, 90, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1345, kAnimationModeTalk); break; - case 360: - Actor_Says(kActorMcCoy, 1295, 3); - Actor_Says(kActorIsabella, 100, 3); - Actor_Says(kActorMcCoy, 1350, 3); - Actor_Says(kActorIsabella, 110, 3); - Actor_Says(kActorMcCoy, 1355, 3); - Actor_Says(kActorIsabella, 130, 3); - Actor_Says(kActorMcCoy, 1360, 3); + + case 360: // MARCUS EISENDULLER + Actor_Says(kActorMcCoy, 1295, kAnimationModeTalk); + Actor_Says(kActorIsabella, 100, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1350, kAnimationModeTalk); + Actor_Says(kActorIsabella, 110, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1355, kAnimationModeTalk); + Actor_Says(kActorIsabella, 130, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1360, kAnimationModeTalk); break; - case 370: - Actor_Says(kActorMcCoy, 1300, 3); - Actor_Says(kActorIsabella, 140, 3); - Actor_Says(kActorMcCoy, 1365, 3); - Actor_Says(kActorIsabella, 150, 3); + + case 370: // CHEESE + Actor_Says(kActorMcCoy, 1300, kAnimationModeTalk); + Actor_Says(kActorIsabella, 140, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1365, kAnimationModeTalk); + Actor_Says(kActorIsabella, 150, kAnimationModeTalk); break; - case 380: - Actor_Says(kActorMcCoy, 1305, 3); + + case 380: // MIA AND MURRAY INFO + Actor_Says(kActorMcCoy, 1305, kAnimationModeTalk); Actor_Modify_Friendliness_To_Other(kActorIsabella, kActorMcCoy, -2); - Actor_Says(kActorIsabella, 160, 3); - Actor_Says(kActorMcCoy, 1370, 3); - Actor_Says(kActorIsabella, 170, 3); - Actor_Says(kActorMcCoy, 1375, 3); - Actor_Says(kActorIsabella, 180, 3); - Actor_Says(kActorMcCoy, 1380, 3); - Actor_Says(kActorIsabella, 190, 3); - Actor_Says(kActorIsabella, 210, 3); - Actor_Says(kActorIsabella, 240, 3); - Actor_Says(kActorMcCoy, 1385, 3); - Actor_Says(kActorIsabella, 260, 3); - Actor_Says(kActorMcCoy, 1390, 3); - Actor_Says(kActorIsabella, 300, 3); - Actor_Says(kActorIsabella, 310, 3); - Actor_Says(kActorIsabella, 320, 3); - Actor_Says(kActorMcCoy, 1395, 3); - Actor_Says(kActorIsabella, 330, 3); + Actor_Says(kActorIsabella, 160, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1370, kAnimationModeTalk); + Actor_Says(kActorIsabella, 170, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1375, kAnimationModeTalk); + Actor_Says(kActorIsabella, 180, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1380, kAnimationModeTalk); + Actor_Says(kActorIsabella, 190, kAnimationModeTalk); + Actor_Says(kActorIsabella, 210, kAnimationModeTalk); + Actor_Says(kActorIsabella, 240, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1385, kAnimationModeTalk); + Actor_Says(kActorIsabella, 260, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1390, kAnimationModeTalk); + Actor_Says(kActorIsabella, 300, kAnimationModeTalk); + Actor_Says(kActorIsabella, 310, kAnimationModeTalk); + Actor_Says(kActorIsabella, 320, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1395, kAnimationModeTalk); + Actor_Says(kActorIsabella, 330, kAnimationModeTalk); Actor_Clue_Acquire(kActorMcCoy, kClueStolenCheese, false, kActorIsabella); break; - case 390: - Actor_Says(kActorMcCoy, 1310, 3); + + case 390: // BUY STEW + Actor_Says(kActorMcCoy, 1310, kAnimationModeTalk); Actor_Modify_Friendliness_To_Other(kActorIsabella, kActorMcCoy, 2); - Actor_Says(kActorIsabella, 340, 3); + Actor_Says(kActorIsabella, 340, kAnimationModeTalk); break; - case 400: - Actor_Says(kActorMcCoy, 1315, 3); + + case 400: // DONE + Actor_Says(kActorMcCoy, 1315, kAnimationModeTalk); break; - default: - Actor_Says(kActorMcCoy, 1320, 3); - Actor_Says(kActorIsabella, 30, 3); - Actor_Says(kActorMcCoy, 1325, 3); - Actor_Says(kActorMcCoy, 1345, 3); + + default: // never used? + Actor_Says(kActorMcCoy, 1320, kAnimationModeTalk); + Actor_Says(kActorIsabella, 30, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1325, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1345, kAnimationModeTalk); break; } } diff --git a/engines/bladerunner/script/scene/hf01.cpp b/engines/bladerunner/script/scene/hf01.cpp index 9e445ca572..25f663c9c4 100644 --- a/engines/bladerunner/script/scene/hf01.cpp +++ b/engines/bladerunner/script/scene/hf01.cpp @@ -92,13 +92,13 @@ bool SceneScriptHF01::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptHF01::ClickedOnActor(int actorId) { - int v1; - if (Global_Variable_Query(kVariableAffectionTowards) == 2) { - v1 = kActorDektora; - } else if (Global_Variable_Query(kVariableAffectionTowards) == 3) { - v1 = kActorLucy; + int affectionTowardsActor; + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsDektora) { + affectionTowardsActor = kActorDektora; + } else if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy) { + affectionTowardsActor = kActorLucy; } else { - v1 = -1; + affectionTowardsActor = -1; } if (actorId == kActorMia || actorId == kActorMurray) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 504.04f, 8.0f, -242.17f, 12, 1, false, 0)) { @@ -128,9 +128,9 @@ bool SceneScriptHF01::ClickedOnActor(int actorId) { } return false; } - if (v1 != -1 && actorId == v1) { + if (affectionTowardsActor != -1 && actorId == affectionTowardsActor) { if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, actorId, 28, 1, false)) { - if (Actor_Query_Goal_Number(v1) == 599) { + if (Actor_Query_Goal_Number(affectionTowardsActor) == 599) { Actor_Says(kActorMcCoy, 8630, 13); return true; } @@ -144,14 +144,14 @@ bool SceneScriptHF01::ClickedOnActor(int actorId) { && !Game_Flag_Query(662) ) { Game_Flag_Set(662); - Actor_Face_Actor(kActorMcCoy, v1, true); - Actor_Face_Actor(v1, kActorMcCoy, true); - if (v1 == kActorDektora) { + Actor_Face_Actor(kActorMcCoy, affectionTowardsActor, true); + Actor_Face_Actor(affectionTowardsActor, kActorMcCoy, true); + if (affectionTowardsActor == kActorDektora) { sub_4032DC(); - } else if (v1 == kActorLucy) { + } else if (affectionTowardsActor == kActorLucy) { sub_403484(); } - Async_Actor_Walk_To_XYZ(v1, -175.0f, 8.0f, -617.0f, 0, false); + Async_Actor_Walk_To_XYZ(affectionTowardsActor, -175.0f, 8.0f, -617.0f, 0, false); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -137.0f, 8.0f, -577.0f, 0, 0, false, 1); Game_Flag_Set(kFlagHF01toHF05); Set_Enter(kSetHF05, kSceneHF05); @@ -310,11 +310,17 @@ void SceneScriptHF01::PlayerWalkedIn() { Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateUncover, true, kActorMcCoy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 0, 100, 300, false); } if (!Game_Flag_Query(kFlagCrazylegsArrested) && Actor_Query_Goal_Number(kActorCrazylegs) != 2) { - if (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallLucy1) && Global_Variable_Query(kVariableAffectionTowards) == 3 && Actor_Query_Goal_Number(kActorLucy) != 599) { + if (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallLucy1) + && Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy + && Actor_Query_Goal_Number(kActorLucy) != 599 + ) { Actor_Put_In_Set(kActorLucy, kSetHF01); Actor_Set_At_XYZ(kActorLucy, -5.0f, 8.0f, -622.0f, 419); Actor_Set_Targetable(kActorLucy, true); - } else if (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallDektora1) && Global_Variable_Query(kVariableAffectionTowards) == 2 && Actor_Query_Goal_Number(kActorDektora) != 599) { + } else if (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallDektora1) + && Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsDektora + && Actor_Query_Goal_Number(kActorDektora) != 599 + ) { Actor_Put_In_Set(kActorDektora, kSetHF01); Actor_Set_At_XYZ(kActorDektora, -5.0f, 8.0f, -622.0f, 419); Actor_Set_Targetable(kActorDektora, true); @@ -359,14 +365,14 @@ void SceneScriptHF01::PlayerWalkedIn() { } void SceneScriptHF01::PlayerWalkedOut() { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (!Game_Flag_Query(kFlagHF01toHF05) && !Game_Flag_Query(kFlagHF01toHF02) && !Game_Flag_Query(kFlagHF01toHF03) && !Game_Flag_Query(722) ) { - 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(kOuttakeInside2, true, -1); Outtake_Play(kOuttakeTowards3, true, -1); @@ -389,16 +395,18 @@ void SceneScriptHF01::DialogueQueueFlushed(int a1) { void SceneScriptHF01::sub_4026B4() { Dialogue_Menu_Clear_List(); - if (Actor_Clue_Query(kActorMcCoy, kClueLucy) == 1) { + if (Actor_Clue_Query(kActorMcCoy, kClueLucy)) { DM_Add_To_List_Never_Repeat_Once_Selected(440, 8, 6, 3); } - if (!Actor_Clue_Query(kActorMcCoy, kClueLucy) && Actor_Clue_Query(kActorMcCoy, kClueRunciterInterviewA) == 1) { + if (!Actor_Clue_Query(kActorMcCoy, kClueLucy) + && Actor_Clue_Query(kActorMcCoy, kClueRunciterInterviewA) + ) { DM_Add_To_List_Never_Repeat_Once_Selected(450, 7, 6, 3); } - if (Actor_Clue_Query(kActorMcCoy, kClueCheese) == 1) { + if (Actor_Clue_Query(kActorMcCoy, kClueCheese)) { DM_Add_To_List_Never_Repeat_Once_Selected(460, 3, 5, 6); } - if (Actor_Clue_Query(kActorMcCoy, kClueLichenDogWrapper) == 1) { + if (Actor_Clue_Query(kActorMcCoy, kClueLichenDogWrapper)) { DM_Add_To_List_Never_Repeat_Once_Selected(470, -1, 3, 8); } Dialogue_Menu_Add_DONE_To_List(480); diff --git a/engines/bladerunner/script/scene/hf02.cpp b/engines/bladerunner/script/scene/hf02.cpp index 1bc4e9501f..c7a179587c 100644 --- a/engines/bladerunner/script/scene/hf02.cpp +++ b/engines/bladerunner/script/scene/hf02.cpp @@ -85,7 +85,7 @@ bool SceneScriptHF02::ClickedOnItem(int itemId, bool a2) { bool SceneScriptHF02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 42.0f, 47.76f, -296.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagHF02toHF01); Set_Enter(kSetHF01, kSceneHF01); @@ -94,7 +94,7 @@ bool SceneScriptHF02::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 470.0f, 47.76f, -444.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(527); Set_Enter(kSetHF03, kSceneHF03); diff --git a/engines/bladerunner/script/scene/hf03.cpp b/engines/bladerunner/script/scene/hf03.cpp index 4557d0a3d0..c0bdf23183 100644 --- a/engines/bladerunner/script/scene/hf03.cpp +++ b/engines/bladerunner/script/scene/hf03.cpp @@ -96,8 +96,10 @@ void SceneScriptHF03::sub_401C80() { Actor_Says(kActorLucy, 210, 13); Actor_Says(kActorMcCoy, 1655, 15); Actor_Modify_Friendliness_To_Other(kActorLucy, kActorMcCoy, Random_Query(9, 10)); - if (Actor_Query_Friendliness_To_Other(kActorLucy, kActorMcCoy) > 59 && Global_Variable_Query(kVariableAffectionTowards) == 0) { - Global_Variable_Set(kVariableAffectionTowards, 3); + if (Actor_Query_Friendliness_To_Other(kActorLucy, kActorMcCoy) > 59 + && Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsNone + ) { + Global_Variable_Set(kVariableAffectionTowards, kAffectionTowardsLucy); Actor_Says(kActorLucy, 940, 14); Actor_Says(kActorMcCoy, 6780, 11); Actor_Says(kActorLucy, 950, 12); @@ -149,7 +151,7 @@ void SceneScriptHF03::sub_401C80() { } bool SceneScriptHF03::ClickedOnActor(int actorId) { - if (actorId == 6 && Actor_Query_Goal_Number(kActorLucy) == 205) { + if (actorId == kActorLucy && Actor_Query_Goal_Number(kActorLucy) == 205) { if (Game_Flag_Query(kFlagLucyIsReplicant) ? !Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 377, 0, 1, false) : !Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 378, 0, 1, false)) { Actor_Face_Actor(kActorMcCoy, kActorLucy, true); if (!Game_Flag_Query(613)) { @@ -244,7 +246,7 @@ void SceneScriptHF03::PlayerWalkedIn() { } void SceneScriptHF03::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/hf04.cpp b/engines/bladerunner/script/scene/hf04.cpp index 5921f57f0d..c03157fbb4 100644 --- a/engines/bladerunner/script/scene/hf04.cpp +++ b/engines/bladerunner/script/scene/hf04.cpp @@ -83,7 +83,7 @@ bool SceneScriptHF04::ClickedOnItem(int itemId, bool a2) { bool SceneScriptHF04::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1132.27f, -0.31f, -113.46f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(567); Set_Enter(kSetHF02, kSceneHF02); diff --git a/engines/bladerunner/script/scene/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp index 75c9dc1547..9815c91f80 100644 --- a/engines/bladerunner/script/scene/hf05.cpp +++ b/engines/bladerunner/script/scene/hf05.cpp @@ -119,7 +119,7 @@ bool SceneScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) { ADQ_Add(kActorVoiceOver, 940, -1); Ambient_Sounds_Play_Sound(147, 50, 99, 0, 0); Delay(1500); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 181.54f, 40.63f, 388.09f, 0, 0, true, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 181.54f, 40.63f, 388.09f, 0, false, true, 0); Actor_Face_Heading(kActorMcCoy, 0, false); Actor_Change_Animation_Mode(kActorMcCoy, 23); Actor_Clue_Lose(kActorMcCoy, kClueBomb); @@ -133,7 +133,7 @@ bool SceneScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptHF05::ClickedOnActor(int actorId) { - if (actorId == 9) { + if (actorId == kActorCrazylegs) { if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorCrazylegs, 60, true, false)) { Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true); Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true); @@ -149,28 +149,37 @@ bool SceneScriptHF05::ClickedOnItem(int itemId, bool a2) { bool SceneScriptHF05::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 483.0f, 40.63f, -189.0f, 0, 1, false, 0) && !Game_Flag_Query(684)) { - Game_Flag_Set(kFlagHF05toHF01); - Set_Enter(kSetHF01, kSceneHF01); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 483.0f, 40.63f, -189.0f, 0, true, false, 0)) { + if (!Game_Flag_Query(684)) { + Game_Flag_Set(kFlagHF05toHF01); + Set_Enter(kSetHF01, kSceneHF01); + } } return true; } if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 330.0f, 40.63f, -85.0f, 0, 1, false, 0) && !Game_Flag_Query(684)) { - int v2 = sub_404858(); - if (Game_Flag_Query(663) && Game_Flag_Query(368) && v2 != -1) { - Actor_Face_Actor(kActorMcCoy, v2, true); - Actor_Says(kActorMcCoy, 1810, 16); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 330.0f, 40.63f, -85.0f, 0, true, false, 0)) { + if (!Game_Flag_Query(684)) { + int affectionTowardsActor = getAffectionTowardsActor(); + if (Game_Flag_Query(663) + && Game_Flag_Query(368) + && affectionTowardsActor != -1 + ) { + Actor_Face_Actor(kActorMcCoy, affectionTowardsActor, true); + Actor_Says(kActorMcCoy, 1810, 16); + } + Game_Flag_Set(359); + Set_Enter(kSetHF07, kSceneHF07); } - Game_Flag_Set(359); - Set_Enter(kSetHF07, kSceneHF07); } return true; } if (exitId == 2) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 277.0f, 40.63f, 410.0f, 0, 1, false, 0) && !Game_Flag_Query(684)) { - Game_Flag_Set(529); - Set_Enter(kSetHF06, kSceneHF06); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 277.0f, 40.63f, 410.0f, 0, true, false, 0)) { + if (!Game_Flag_Query(684)) { + Game_Flag_Set(529); + Set_Enter(kSetHF06, kSceneHF06); + } } return true; } @@ -228,7 +237,7 @@ void SceneScriptHF05::SceneFrameAdvanced(int frame) { } void SceneScriptHF05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { - if (actorId == 23 && newGoal == 430) { + if (actorId == kActorOfficerLeary && newGoal == 430) { Game_Flag_Set(684); sub_4042E4(); } @@ -237,19 +246,19 @@ void SceneScriptHF05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptHF05::PlayerWalkedIn() { if (Game_Flag_Query(662)) { - int v0 = sub_404858(); - if (Game_Flag_Query(662) && v0 != -1) { - Actor_Put_In_Set(v0, kSetHF05); - Actor_Force_Stop_Walking(v0); + int affectionTowardsActor = getAffectionTowardsActor(); + if (Game_Flag_Query(662) && affectionTowardsActor != -1) { + Actor_Put_In_Set(affectionTowardsActor, kSetHF05); + Actor_Force_Stop_Walking(affectionTowardsActor); if (Game_Flag_Query(kFlagHF01toHF05)) { - Actor_Set_At_XYZ(v0, 506.81f, 40.63f, -140.92f, 0); - Async_Actor_Walk_To_Waypoint(v0, 437, 36, 0); + Actor_Set_At_XYZ(affectionTowardsActor, 506.81f, 40.63f, -140.92f, 0); + Async_Actor_Walk_To_Waypoint(affectionTowardsActor, 437, 36, 0); } else if (Game_Flag_Query(530)) { - Actor_Set_At_XYZ(v0, 288.0f, 40.63f, 410.0f, 909); + Actor_Set_At_XYZ(affectionTowardsActor, 288.0f, 40.63f, 410.0f, 909); } else if (Game_Flag_Query(358)) { - Actor_Set_At_XYZ(v0, 298.0f, 40.63f, -107.0f, 512); + Actor_Set_At_XYZ(affectionTowardsActor, 298.0f, 40.63f, -107.0f, 512); } else { - Actor_Set_At_XYZ(v0, 284.0f, 40.63f, 286.0f, 0); + Actor_Set_At_XYZ(affectionTowardsActor, 284.0f, 40.63f, 286.0f, 0); } } if (Game_Flag_Query(684)) { @@ -268,7 +277,7 @@ void SceneScriptHF05::PlayerWalkedIn() { } } } else { - sub_403A34(v0); + sub_403A34(affectionTowardsActor); } } else if (Game_Flag_Query(kFlagHF01toHF05)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 399.0f, 40.63f, -85.0f, 0, 0, false, 0); @@ -298,7 +307,7 @@ void SceneScriptHF05::PlayerWalkedOut() { if (Actor_Query_Goal_Number(kActorCrazylegs) == 210) { Actor_Set_Goal_Number(kActorCrazylegs, 2); } - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); } @@ -487,11 +496,15 @@ void SceneScriptHF05::sub_403738() { } } -int SceneScriptHF05::sub_404858() { - if (Global_Variable_Query(kVariableAffectionTowards) == 2 && Actor_Query_Goal_Number(kActorDektora) != 599) { +int SceneScriptHF05::getAffectionTowardsActor() { + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsDektora + && Actor_Query_Goal_Number(kActorDektora) != 599 + ) { return kActorDektora; } - if (Global_Variable_Query(kVariableAffectionTowards) == 3 && Actor_Query_Goal_Number(kActorLucy) != 599) { + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy + && Actor_Query_Goal_Number(kActorLucy) != 599 + ) { return kActorLucy; } return -1; @@ -547,13 +560,13 @@ void SceneScriptHF05::sub_40410C() { Actor_Says_With_Pause(kActorMcCoy, 1780, 1.0f, 18); } -void SceneScriptHF05::sub_403A34(int actorId) { - if (actorId != -1 && Actor_Query_In_Set(kActorCrazylegs, kSetHF05)) { - Async_Actor_Walk_To_Waypoint(actorId, 437, 36, 0); +void SceneScriptHF05::sub_403A34(int affectionTowardsActor) { + if (affectionTowardsActor != -1 && Actor_Query_In_Set(kActorCrazylegs, kSetHF05)) { + Async_Actor_Walk_To_Waypoint(affectionTowardsActor, 437, 36, 0); Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 437, 0, 0, false); Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true); Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true); - Actor_Face_Actor(actorId, kActorCrazylegs, true); + Actor_Face_Actor(affectionTowardsActor, kActorCrazylegs, true); Actor_Says(kActorCrazylegs, 0, 3); Actor_Says(kActorCrazylegs, 10, 12); Actor_Says(kActorMcCoy, 1715, 19); @@ -574,8 +587,8 @@ void SceneScriptHF05::sub_403A34(int actorId) { Actor_Says(kActorMcCoy, 1735, 17); Actor_Says(kActorCrazylegs, 100, 16); Actor_Says(kActorCrazylegs, 110, 3); - Actor_Face_Actor(actorId, kActorMcCoy, true); - if (actorId == kActorDektora) { + Actor_Face_Actor(affectionTowardsActor, kActorMcCoy, true); + if (affectionTowardsActor == kActorDektora) { Actor_Says(kActorDektora, 90, 3); } else { Actor_Says(kActorLucy, 380, 3); @@ -583,14 +596,14 @@ void SceneScriptHF05::sub_403A34(int actorId) { Actor_Says(kActorMcCoy, 1740, 14); Actor_Says(kActorCrazylegs, 120, 12); Actor_Set_Goal_Number(kActorCrazylegs, 2); - if (actorId == kActorDektora) { + if (affectionTowardsActor == kActorDektora) { Actor_Says(kActorDektora, 100, 3); } else { Actor_Says(kActorLucy, 390, 3); } - Actor_Face_Actor(kActorMcCoy, actorId, true); + Actor_Face_Actor(kActorMcCoy, affectionTowardsActor, true); Actor_Says(kActorMcCoy, 1745, 3); - Async_Actor_Walk_To_XYZ(actorId, 309.0f, 40.63f, 402.0f, 0, false); + Async_Actor_Walk_To_XYZ(affectionTowardsActor, 309.0f, 40.63f, 402.0f, 0, false); Loop_Actor_Walk_To_XYZ(kActorMcCoy, 277.0f, 40.63f, 410.0f, 0, 0, false, 0); Game_Flag_Set(529); Set_Enter(kSetHF06, kSceneHF06); diff --git a/engines/bladerunner/script/scene/hf06.cpp b/engines/bladerunner/script/scene/hf06.cpp index 3c1eac4807..bb073bcce7 100644 --- a/engines/bladerunner/script/scene/hf06.cpp +++ b/engines/bladerunner/script/scene/hf06.cpp @@ -96,14 +96,14 @@ bool SceneScriptHF06::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptHF06::ClickedOnActor(int actorId) { - if (actorId == 6 && Actor_Query_Goal_Number(kActorLucy) != 599) { + if (actorId == kActorLucy && Actor_Query_Goal_Number(kActorLucy) != 599) { Actor_Face_Actor(kActorLucy, kActorMcCoy, true); Actor_Face_Actor(kActorMcCoy, kActorLucy, true); if (Game_Flag_Query(559)) { Actor_Says(kActorLucy, 390, 18); Actor_Says(kActorMcCoy, 2115, 17); } - } else if (actorId == 3 && Actor_Query_Goal_Number(kActorDektora) != 599) { + } else if (actorId == kActorDektora && Actor_Query_Goal_Number(kActorDektora) != 599) { Actor_Face_Actor(kActorDektora, kActorMcCoy, true); Actor_Face_Actor(kActorMcCoy, kActorDektora, true); if (Game_Flag_Query(559)) { @@ -123,7 +123,7 @@ bool SceneScriptHF06::ClickedOnExit(int exitId) { 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, kAnimationModeIdle); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(530); Set_Enter(kSetHF05, kSceneHF05); @@ -181,11 +181,15 @@ void SceneScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptHF06::PlayerWalkedIn() { if (Game_Flag_Query(662)) { int actorId = -1; - if (Global_Variable_Query(kVariableAffectionTowards) == 3 && Actor_Query_Goal_Number(kActorLucy) != 599) { + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy + && Actor_Query_Goal_Number(kActorLucy) != 599 + ) { actorId = kActorLucy; - } else if (Global_Variable_Query(kVariableAffectionTowards) == 2 && Actor_Query_Goal_Number(kActorDektora) != 599) { + } else if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsDektora + && Actor_Query_Goal_Number(kActorDektora) != 599 + ) { actorId = kActorDektora; - } + } if (actorId != -1) { Actor_Put_In_Set(actorId, kSetHF06); @@ -231,9 +235,9 @@ void SceneScriptHF06::sub_401EF4() { Actor_Set_At_XYZ(kActorSteele, 92.0f, 367.93f, 19.0f, 0); Actor_Set_Targetable(kActorSteele, true); Actor_Face_Actor(actorId, kActorSteele, true); - if (actorId == 3) { + if (actorId == kActorDektora) { Actor_Says(kActorDektora, 90, 13); - } else if (actorId == 6) { + } else if (actorId == kActorLucy) { Actor_Says(kActorLucy, 380, 13); } Actor_Says(kActorMcCoy, 6230, 0); diff --git a/engines/bladerunner/script/scene/hf07.cpp b/engines/bladerunner/script/scene/hf07.cpp index 8194e95359..14da5c20de 100644 --- a/engines/bladerunner/script/scene/hf07.cpp +++ b/engines/bladerunner/script/scene/hf07.cpp @@ -81,7 +81,7 @@ bool SceneScriptHF07::ClickedOnExit(int exitId) { Loop_Actor_Travel_Stairs(kActorMcCoy, 30, true, kAnimationModeIdle); Footstep_Sound_Override_Off(); } - 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(kSetHF05, kSceneHF05); } @@ -94,7 +94,7 @@ bool SceneScriptHF07::ClickedOnExit(int exitId) { Async_Actor_Walk_To_XYZ(kActorLucy, -73.0f, 58.43f, -7.0f, 0, false); } if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -84.0f, 58.43f, -105.0f, 0, true, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(360); Set_Enter(kSetUG05, kSceneUG05); @@ -116,7 +116,7 @@ void SceneScriptHF07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptHF07::PlayerWalkedIn() { if (Game_Flag_Query(662)) { - int actorId = sub_401864(); + int actorId = getAffectionTowardsActor(); if (Game_Flag_Query(662) && actorId != -1) { Actor_Put_In_Set(actorId, kSetHF07); if (Game_Flag_Query(361)) { @@ -141,11 +141,15 @@ void SceneScriptHF07::PlayerWalkedOut() { void SceneScriptHF07::DialogueQueueFlushed(int a1) { } -int SceneScriptHF07::sub_401864() { - if (Global_Variable_Query(kVariableAffectionTowards) == 2 && Actor_Query_Goal_Number(kActorDektora) != 599) { +int SceneScriptHF07::getAffectionTowardsActor() { + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsDektora + && Actor_Query_Goal_Number(kActorDektora) != 599 + ) { return kActorDektora; } - if (Global_Variable_Query(kVariableAffectionTowards) == 3 && Actor_Query_Goal_Number(kActorLucy) != 599) { + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy + && Actor_Query_Goal_Number(kActorLucy) != 599 + ) { return kActorLucy; } return -1; diff --git a/engines/bladerunner/script/scene/kp01.cpp b/engines/bladerunner/script/scene/kp01.cpp index b2daa6b101..273fa58608 100644 --- a/engines/bladerunner/script/scene/kp01.cpp +++ b/engines/bladerunner/script/scene/kp01.cpp @@ -80,7 +80,7 @@ bool SceneScriptKP01::ClickedOnItem(int itemId, bool a2) { bool SceneScriptKP01::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -125.0f, -12.2f, -61.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(415); Set_Enter(kSetKP04, kSceneKP04); @@ -89,7 +89,7 @@ bool SceneScriptKP01::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -284.0f, -12.2f, -789.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(417); Set_Enter(kSetKP03, kSceneKP03); @@ -98,7 +98,7 @@ bool SceneScriptKP01::ClickedOnExit(int exitId) { } if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 239.0f, 12.2f, -146.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(414); Set_Enter(kSetKP02, kSceneKP02); @@ -117,9 +117,9 @@ void SceneScriptKP01::SceneFrameAdvanced(int frame) { } void SceneScriptKP01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { - if (actorId == 1) { + if (actorId == kActorSteele) { if (newGoal == 422) { - if (Game_Flag_Query(kFlagDirectorsCut) == 1) { + if (Game_Flag_Query(kFlagDirectorsCut)) { Delay(500); Actor_Change_Animation_Mode(kActorMcCoy, 75); Delay(4500); @@ -133,7 +133,7 @@ void SceneScriptKP01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } else if (newGoal == 423) { Player_Gains_Control(); Actor_Force_Stop_Walking(kActorMcCoy); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(417); Set_Enter(kSetKP03, kSceneKP03); diff --git a/engines/bladerunner/script/scene/kp02.cpp b/engines/bladerunner/script/scene/kp02.cpp index 4912a88c6f..e249420a8e 100644 --- a/engines/bladerunner/script/scene/kp02.cpp +++ b/engines/bladerunner/script/scene/kp02.cpp @@ -81,12 +81,12 @@ bool SceneScriptKP02::ClickedOnExit(int exitId) { Non_Player_Actor_Combat_Mode_Off(kActorFreeSlotA); Actor_Set_Goal_Number(kActorFreeSlotB, 400); Actor_Set_Goal_Number(kActorFreeSlotA, 400); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(411); Set_Enter(kSetUG12, kSceneUG12); } else { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(411); Set_Enter(kSetUG12, kSceneUG12); @@ -101,12 +101,12 @@ bool SceneScriptKP02::ClickedOnExit(int exitId) { Non_Player_Actor_Combat_Mode_Off(kActorFreeSlotA); Actor_Set_Goal_Number(kActorFreeSlotB, 400); Actor_Set_Goal_Number(kActorFreeSlotA, 400); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(413); Set_Enter(kSetKP01, kSceneKP01); } else { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(413); Set_Enter(kSetKP01, kSceneKP01); diff --git a/engines/bladerunner/script/scene/kp03.cpp b/engines/bladerunner/script/scene/kp03.cpp index 1d810f2fd9..370927b877 100644 --- a/engines/bladerunner/script/scene/kp03.cpp +++ b/engines/bladerunner/script/scene/kp03.cpp @@ -64,10 +64,10 @@ bool SceneScriptKP03::MouseClick(int x, int y) { return false; } -bool SceneScriptKP03::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptKP03::ClickedOn3DObject(const char *objectName, bool combatMode) { Actor_Face_Object(kActorSteele, "BRACK MID", true); if (Object_Query_Click("BRACK MID", objectName) && !Game_Flag_Query(422)) { - if (a2) { + if (combatMode) { Scene_Loop_Set_Default(5); Scene_Loop_Start_Special(kSceneLoopModeOnce, 4, true); Actor_Change_Animation_Mode(kActorMcCoy, 39); @@ -104,7 +104,7 @@ bool SceneScriptKP03::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptKP03::ClickedOnActor(int actorId) { - if (actorId == 1 && Actor_Query_Goal_Number(kActorSteele) == 411) { + if (actorId == kActorSteele && Actor_Query_Goal_Number(kActorSteele) == 411) { Actor_Face_Object(kActorSteele, "BRACK MID", true); sub_401E54(); } @@ -121,7 +121,7 @@ bool SceneScriptKP03::ClickedOnExit(int exitId) { } else { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1.0f, -36.55f, 111.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Music_Stop(2); Game_Flag_Reset(417); @@ -133,7 +133,7 @@ bool SceneScriptKP03::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -321.0f, -36.55f, 26.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Music_Stop(2); Game_Flag_Reset(417); @@ -250,7 +250,7 @@ void SceneScriptKP03::sub_401E54() { Ambient_Sounds_Play_Sound(151, 40, -60, -60, 0); Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1.0f, -36.55f, 111.0f, 0, 0, false, 0); Actor_Set_Goal_Number(kActorSteele, 430); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Reset(417); Game_Flag_Reset(420); diff --git a/engines/bladerunner/script/scene/kp04.cpp b/engines/bladerunner/script/scene/kp04.cpp index ae9e4021c5..4c138a1962 100644 --- a/engines/bladerunner/script/scene/kp04.cpp +++ b/engines/bladerunner/script/scene/kp04.cpp @@ -71,7 +71,7 @@ bool SceneScriptKP04::ClickedOnItem(int itemId, bool a2) { bool SceneScriptKP04::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -905.0f, 94.89f, 1357.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(416); Set_Enter(kSetKP01, kSceneKP01); @@ -80,7 +80,7 @@ bool SceneScriptKP04::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -544.0f, 94.89f, 288.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(574); Set_Enter(kSetKP05_KP06, kSceneKP05); diff --git a/engines/bladerunner/script/scene/kp05.cpp b/engines/bladerunner/script/scene/kp05.cpp index 8d8aa7ffee..c46b739e53 100644 --- a/engines/bladerunner/script/scene/kp05.cpp +++ b/engines/bladerunner/script/scene/kp05.cpp @@ -85,7 +85,7 @@ bool SceneScriptKP05::ClickedOnItem(int itemId, bool a2) { bool SceneScriptKP05::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -802.0f, 0.0f, 972.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(420); Set_Enter(kSetKP03, kSceneKP03); @@ -94,7 +94,7 @@ bool SceneScriptKP05::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1142.0f, 0.0f, 932.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(575); Set_Enter(kSetKP04, kSceneKP04); @@ -103,7 +103,7 @@ bool SceneScriptKP05::ClickedOnExit(int exitId) { } if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -868.0f, 0.0f, -68.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(576); Async_Actor_Walk_To_XYZ(kActorMcCoy, -868.0f, 0.0f, -216.0f, 0, false); diff --git a/engines/bladerunner/script/scene/kp06.cpp b/engines/bladerunner/script/scene/kp06.cpp index f08b6d8b36..ad0bb9966d 100644 --- a/engines/bladerunner/script/scene/kp06.cpp +++ b/engines/bladerunner/script/scene/kp06.cpp @@ -72,7 +72,7 @@ bool SceneScriptKP06::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptKP06::ClickedOnActor(int actorId) { - if (actorId == 8 && !Game_Flag_Query(714)) { + if (actorId == kActorSadik && !Game_Flag_Query(714)) { if (Actor_Clue_Query(kActorSadik, kCluePowerSource)) { Actor_Face_Actor(kActorMcCoy, kActorSadik, true); Actor_Says(kActorMcCoy, 8610, 15); @@ -98,7 +98,7 @@ bool SceneScriptKP06::ClickedOnItem(int itemId, bool a2) { bool SceneScriptKP06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -868.0f, 8.26f, -68.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(577); Set_Enter(kSetKP05_KP06, kSceneKP05); @@ -117,7 +117,7 @@ bool SceneScriptKP06::ClickedOnExit(int exitId) { } else { Actor_Set_Goal_Number(kActorGaff, 499); } - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(578); Set_Enter(kSetKP07, kSceneKP07); @@ -128,7 +128,7 @@ bool SceneScriptKP06::ClickedOnExit(int exitId) { 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); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(578); Set_Enter(kSetKP07, kSceneKP07); @@ -173,7 +173,7 @@ void SceneScriptKP06::PlayerWalkedIn() { Delay(1000); Actor_Says(kActorMcCoy, 6220, -1); Delay(3000); - 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(kOuttakeEnd6, false, -1); Game_Over(); diff --git a/engines/bladerunner/script/scene/kp07.cpp b/engines/bladerunner/script/scene/kp07.cpp index 7a0c0eb535..d0fc730bce 100644 --- a/engines/bladerunner/script/scene/kp07.cpp +++ b/engines/bladerunner/script/scene/kp07.cpp @@ -119,7 +119,7 @@ bool SceneScriptKP07::ClickedOnItem(int itemId, bool a2) { bool SceneScriptKP07::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); Set_Enter(kSetKP05_KP06, kSceneKP06); diff --git a/engines/bladerunner/script/scene/ma04.cpp b/engines/bladerunner/script/scene/ma04.cpp index ed6ee682a9..0484e69db1 100644 --- a/engines/bladerunner/script/scene/ma04.cpp +++ b/engines/bladerunner/script/scene/ma04.cpp @@ -176,9 +176,9 @@ bool SceneScriptMA04::ClickedOn2DRegion(int region) { Overlay_Remove("MA04OVER"); Delay(500); if (Game_Flag_Query(653)) { - if (Global_Variable_Query(kVariableAffectionTowards) == 2) { + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsDektora) { phoneCallWithDektora(); - } else if (Global_Variable_Query(kVariableAffectionTowards) == 3) { + } else if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy) { phoneCallWithLucy(); } else { phoneCallWithClovis(); diff --git a/engines/bladerunner/script/scene/ma07.cpp b/engines/bladerunner/script/scene/ma07.cpp index 62a5187e77..b7b91d9c54 100644 --- a/engines/bladerunner/script/scene/ma07.cpp +++ b/engines/bladerunner/script/scene/ma07.cpp @@ -97,7 +97,7 @@ bool SceneScriptMA07::ClickedOnExit(int exitId) { } if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 8.0f, -172.43f, 356.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(357); Set_Enter(kSetUG19, kSceneUG19); @@ -115,7 +115,7 @@ void SceneScriptMA07::SceneFrameAdvanced(int frame) { } void SceneScriptMA07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { - if (actorId == 53 && newGoal == 302) { + if (actorId == kActorGaff && newGoal == 302) { Scene_Exits_Enable(); } } diff --git a/engines/bladerunner/script/scene/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp index 8be9fe219b..9708d186c5 100644 --- a/engines/bladerunner/script/scene/nr01.cpp +++ b/engines/bladerunner/script/scene/nr01.cpp @@ -113,7 +113,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) { if (Global_Variable_Query(kVariableChapter) > 3) { Actor_Says(kActorMcCoy, 8522, 12); } else { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(535); Set_Enter(kSetNR03, kSceneNR03); @@ -125,7 +125,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) { 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, kAnimationModeIdle); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(343); Set_Enter(kSetUG06, kSceneUG06); @@ -134,7 +134,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) { } if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 312.0f, 31.66f, -901.0f, 0, true, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(532); Set_Enter(kSetNR02, kSceneNR02); @@ -416,10 +416,10 @@ void SceneScriptNR01::PlayerWalkedIn() { } void SceneScriptNR01::PlayerWalkedOut() { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (!Game_Flag_Query(343) && !Game_Flag_Query(532) && !Game_Flag_Query(535) && !Game_Flag_Query(632) && !Game_Flag_Query(722)) { - 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(kOuttakeAway1, true, -1); Outtake_Play(kOuttakeInside2, true, -1); diff --git a/engines/bladerunner/script/scene/nr02.cpp b/engines/bladerunner/script/scene/nr02.cpp index 83c92275c7..97a460032d 100644 --- a/engines/bladerunner/script/scene/nr02.cpp +++ b/engines/bladerunner/script/scene/nr02.cpp @@ -97,14 +97,18 @@ bool SceneScriptNR02::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptNR02::ClickedOnActor(int actorId) { - if (actorId == 2 && Actor_Query_Goal_Number(kActorGordo) == 201 && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 67.37f, -24.0f, 389.32f, 0, 1, false, 0)) { - Actor_Set_Goal_Number(kActorGordo, 215); + if (actorId == kActorGordo + && Actor_Query_Goal_Number(kActorGordo) == 201 + ) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 67.37f, -24.0f, 389.32f, 0, true, false, 0)) { + Actor_Set_Goal_Number(kActorGordo, 215); + } } return false; } bool SceneScriptNR02::ClickedOnItem(int itemId, bool a2) { - if ((itemId == 89 || itemId == 90) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 109.38f, -24.0f, 420.5f, 0, 1, false, 0)) { + if ((itemId == 89 || itemId == 90) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 109.38f, -24.0f, 420.5f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 423, false); if (itemId == 89) { Item_Remove_From_World(89); @@ -126,7 +130,7 @@ bool SceneScriptNR02::ClickedOnExit(int exitId) { if (Actor_Query_Goal_Number(kActorGordo) < 230 || Actor_Query_Goal_Number(kActorGordo) > 250) { Music_Stop(2); } - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(533); Set_Enter(kSetNR01, kSceneNR01); diff --git a/engines/bladerunner/script/scene/nr03.cpp b/engines/bladerunner/script/scene/nr03.cpp index c06b7ed6af..a2a09cbb85 100644 --- a/engines/bladerunner/script/scene/nr03.cpp +++ b/engines/bladerunner/script/scene/nr03.cpp @@ -101,22 +101,24 @@ bool SceneScriptNR03::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptNR03::ClickedOnActor(int actorId) { - if (actorId == 25 && !Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorHanoi, 48, 1, false)) { - AI_Movement_Track_Pause(kActorHanoi); - Actor_Face_Actor(kActorMcCoy, kActorHanoi, true); - if (Game_Flag_Query(611)) { - Actor_Says(kActorMcCoy, 3350, 16); - Actor_Says(kActorHanoi, 50, 17); - } else { - Game_Flag_Set(611); - Actor_Says(kActorMcCoy, 3340, 3); - Actor_Face_Actor(kActorHanoi, kActorMcCoy, true); - Actor_Says(kActorHanoi, 30, 13); - Actor_Says(kActorMcCoy, 3345, 14); - Actor_Says(kActorHanoi, 40, 14); + if (actorId == kActorHanoi) { + if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorHanoi, 48, true, false)) { + AI_Movement_Track_Pause(kActorHanoi); + Actor_Face_Actor(kActorMcCoy, kActorHanoi, true); + if (Game_Flag_Query(611)) { + Actor_Says(kActorMcCoy, 3350, 16); + Actor_Says(kActorHanoi, 50, 17); + } else { + Game_Flag_Set(611); + Actor_Says(kActorMcCoy, 3340, 3); + Actor_Face_Actor(kActorHanoi, kActorMcCoy, true); + Actor_Says(kActorHanoi, 30, 13); + Actor_Says(kActorMcCoy, 3345, 14); + Actor_Says(kActorHanoi, 40, 14); + } + AI_Movement_Track_Unpause(kActorHanoi); + return true; } - AI_Movement_Track_Unpause(kActorHanoi); - return true; } return false; } @@ -128,7 +130,7 @@ bool SceneScriptNR03::ClickedOnItem(int itemId, bool a2) { bool SceneScriptNR03::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 410.0f, -70.19f, -715.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(534); Set_Enter(kSetNR01, kSceneNR01); @@ -154,7 +156,7 @@ bool SceneScriptNR03::ClickedOnExit(int exitId) { } Global_Variable_Increment(44, 1); } else { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(438); Set_Enter(kSetNR04, kSceneNR04); @@ -170,7 +172,7 @@ bool SceneScriptNR03::ClickedOnExit(int exitId) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -229.0f, -70.19f, -469.0f, 0, 0, false, 1); Actor_Face_Heading(kActorMcCoy, 656, false); Actor_Change_Animation_Mode(kActorMcCoy, 53); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(536); Set_Enter(kSetNR05_NR08, kSceneNR05); diff --git a/engines/bladerunner/script/scene/nr04.cpp b/engines/bladerunner/script/scene/nr04.cpp index dc571ed7cc..d6332fe099 100644 --- a/engines/bladerunner/script/scene/nr04.cpp +++ b/engines/bladerunner/script/scene/nr04.cpp @@ -116,7 +116,7 @@ bool SceneScriptNR04::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptNR04::ClickedOnActor(int actorId) { - if (actorId == 18 && Game_Flag_Query(606)) { + if (actorId == kActorEarlyQ && Game_Flag_Query(606)) { Actor_Voice_Over(1640, kActorVoiceOver); Actor_Voice_Over(1650, kActorVoiceOver); Actor_Voice_Over(1660, kActorVoiceOver); @@ -134,7 +134,7 @@ bool SceneScriptNR04::ClickedOnItem(int itemId, bool a2) { bool SceneScriptNR04::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 45.0f, 0.0f, -106.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(437); Set_Enter(kSetNR03, kSceneNR03); @@ -180,7 +180,7 @@ void SceneScriptNR04::SceneFrameAdvanced(int frame) { } void SceneScriptNR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { - if (actorId == 18) { + if (actorId == kActorEarlyQ) { switch (newGoal) { case 214: Actor_Change_Animation_Mode(kActorEarlyQ, 29); diff --git a/engines/bladerunner/script/scene/nr05.cpp b/engines/bladerunner/script/scene/nr05.cpp index 15a626ae2b..96b881b729 100644 --- a/engines/bladerunner/script/scene/nr05.cpp +++ b/engines/bladerunner/script/scene/nr05.cpp @@ -185,7 +185,7 @@ void SceneScriptNR05::PlayerWalkedOut() { if (Game_Flag_Query(537)) { Music_Stop(2); } - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); } @@ -226,13 +226,13 @@ void SceneScriptNR05::sub_4020B4() { Actor_Says(kActorEarlyQBartender, 40, 13); Actor_Change_Animation_Mode(kActorEarlyQBartender, 23); Actor_Change_Animation_Mode(kActorMcCoy, 75); - Global_Variable_Increment(42, 1); + Global_Variable_Increment(kVariableMcCoyDrinks, 1); } else { Actor_Says(kActorMcCoy, 3475, 17); Actor_Says(kActorEarlyQBartender, 20, 23); Game_Flag_Set(589); Actor_Change_Animation_Mode(kActorMcCoy, 75); - Global_Variable_Increment(42, 1); + Global_Variable_Increment(kVariableMcCoyDrinks, 1); } } else { Actor_Says(kActorEarlyQBartender, 0, 13); @@ -240,7 +240,7 @@ void SceneScriptNR05::sub_4020B4() { Actor_Says(kActorEarlyQBartender, 10, 23); Game_Flag_Set(588); Actor_Change_Animation_Mode(kActorMcCoy, 75); - Global_Variable_Increment(42, 1); + Global_Variable_Increment(kVariableMcCoyDrinks, 1); } } diff --git a/engines/bladerunner/script/scene/nr06.cpp b/engines/bladerunner/script/scene/nr06.cpp index acb8bc7525..4d1e7ebf6b 100644 --- a/engines/bladerunner/script/scene/nr06.cpp +++ b/engines/bladerunner/script/scene/nr06.cpp @@ -82,7 +82,7 @@ bool SceneScriptNR06::ClickedOnItem(int itemId, bool a2) { bool SceneScriptNR06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 48.0f, -71.88f, -26.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Game_Flag_Set(441); Set_Enter(kSetNR07, kSceneNR07); } @@ -93,7 +93,7 @@ bool SceneScriptNR06::ClickedOnExit(int exitId) { Actor_Face_Heading(kActorMcCoy, 95, false); 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_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(439); Set_Enter(kSetNR05_NR08, kSceneNR08); diff --git a/engines/bladerunner/script/scene/nr07.cpp b/engines/bladerunner/script/scene/nr07.cpp index 13d3139197..aa70aa3f3a 100644 --- a/engines/bladerunner/script/scene/nr07.cpp +++ b/engines/bladerunner/script/scene/nr07.cpp @@ -118,7 +118,7 @@ bool SceneScriptNR07::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -102.0f, -73.5f, -233.0f, 0, 1, false, 0)) { Actor_Set_Goal_Number(kActorHanoi, 201); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(442); Set_Enter(kSetNR06, kSceneNR06); diff --git a/engines/bladerunner/script/scene/nr08.cpp b/engines/bladerunner/script/scene/nr08.cpp index 5f58e4ce28..9a3e9164f0 100644 --- a/engines/bladerunner/script/scene/nr08.cpp +++ b/engines/bladerunner/script/scene/nr08.cpp @@ -207,7 +207,7 @@ void SceneScriptNR08::PlayerWalkedIn() { } void SceneScriptNR08::PlayerWalkedOut() { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (!Game_Flag_Query(547)) { Music_Stop(2); diff --git a/engines/bladerunner/script/scene/nr09.cpp b/engines/bladerunner/script/scene/nr09.cpp index f924652270..bddf91d037 100644 --- a/engines/bladerunner/script/scene/nr09.cpp +++ b/engines/bladerunner/script/scene/nr09.cpp @@ -81,7 +81,7 @@ bool SceneScriptNR09::ClickedOnExit(int exitId) { } if (exitId == 1) { int v1 = Loop_Actor_Walk_To_XYZ(kActorMcCoy, -704.07f, 0.35f, 663.04f, 0, 1, false, 0); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (!v1) { Game_Flag_Set(615); diff --git a/engines/bladerunner/script/scene/nr10.cpp b/engines/bladerunner/script/scene/nr10.cpp index e5bd41c6e9..1d80283857 100644 --- a/engines/bladerunner/script/scene/nr10.cpp +++ b/engines/bladerunner/script/scene/nr10.cpp @@ -61,8 +61,8 @@ bool SceneScriptNR10::MouseClick(int x, int y) { return Game_Flag_Query(642); } -bool SceneScriptNR10::ClickedOn3DObject(const char *objectName, bool a2) { - if (Object_Query_Click("BOX18", objectName) && a2 && Game_Flag_Query(642)) { +bool SceneScriptNR10::ClickedOn3DObject(const char *objectName, bool combatMode) { + if (Object_Query_Click("BOX18", objectName) && combatMode && Game_Flag_Query(642)) { Actor_Set_Goal_Number(kActorDektora, 250); Game_Flag_Set(640); Game_Flag_Reset(642); diff --git a/engines/bladerunner/script/scene/nr11.cpp b/engines/bladerunner/script/scene/nr11.cpp index 4a48ebeca4..518f4fc436 100644 --- a/engines/bladerunner/script/scene/nr11.cpp +++ b/engines/bladerunner/script/scene/nr11.cpp @@ -109,10 +109,10 @@ bool SceneScriptNR11::MouseClick(int x, int y) { return false; } -bool SceneScriptNR11::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptNR11::ClickedOn3DObject(const char *objectName, bool combatMode) { if (Object_Query_Click("CLOTHING02", objectName) || Object_Query_Click("BOX27", objectName) || Object_Query_Click("BOX39", objectName) || Object_Query_Click("BOX44", objectName) || Object_Query_Click("DRESS", objectName) || Object_Query_Click("COATRACK", objectName) || Object_Query_Click("COLUMN3 DETS", objectName) || Object_Query_Click("COLUMN PIPE01", objectName) || Object_Query_Click("RECTANGLE02", objectName) || Object_Query_Click("COLUMN04", objectName) || Object_Query_Click("COATRACK01", objectName) || Object_Query_Click("SHIRT", objectName) || Object_Query_Click("SKIRT 02", objectName) || Object_Query_Click("CLOTHING B 03", objectName) || Object_Query_Click("BUST BUST", objectName)) { - if (a2) { + if (combatMode) { Actor_Set_Goal_Number(kActorSteele, 211); Scene_Exits_Disable(); sub_4028EC(); @@ -140,7 +140,7 @@ bool SceneScriptNR11::ClickedOn3DObject(const char *objectName, bool a2) { } else { Actor_Says(kActorMcCoy, 3840, 18); Delay(1000); - if (Actor_Query_Friendliness_To_Other(kActorDektora, kActorMcCoy) > 59 && Global_Variable_Query(kVariableAffectionTowards) == 0) { + if (Actor_Query_Friendliness_To_Other(kActorDektora, kActorMcCoy) > 59 && Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsNone) { Music_Play(21, 35, 0, 3, -1, 0, 0); } Loop_Actor_Walk_To_XYZ(kActorDektora, -135.0f, 0.33f, -267.0f, 0, 0, false, 0); @@ -164,8 +164,10 @@ bool SceneScriptNR11::ClickedOn3DObject(const char *objectName, bool a2) { Actor_Says(kActorMcCoy, 3870, 3); Actor_Says(kActorDektora, 1070, 14); Actor_Modify_Friendliness_To_Other(kActorDektora, kActorMcCoy, 5); - if (Actor_Query_Friendliness_To_Other(kActorDektora, kActorMcCoy) > 55 && Global_Variable_Query(kVariableAffectionTowards) == 0) { - Global_Variable_Set(kVariableAffectionTowards, 2); + if (Actor_Query_Friendliness_To_Other(kActorDektora, kActorMcCoy) > 55 + && Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsNone + ) { + Global_Variable_Set(kVariableAffectionTowards, kAffectionTowardsDektora); Actor_Says(kActorDektora, 1130, 17); Actor_Says(kActorMcCoy, 6365, 12); Actor_Says(kActorDektora, 1140, 14); diff --git a/engines/bladerunner/script/scene/ps01.cpp b/engines/bladerunner/script/scene/ps01.cpp index 681f68a1a0..34c7583381 100644 --- a/engines/bladerunner/script/scene/ps01.cpp +++ b/engines/bladerunner/script/scene/ps01.cpp @@ -262,10 +262,10 @@ void SceneScriptPS01::PlayerWalkedIn() { void SceneScriptPS01::PlayerWalkedOut() { Actor_Set_Invisible(kActorMcCoy, false); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (!Game_Flag_Query(718) && Global_Variable_Query(kVariableChapter) == 1) { - 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(kOuttakeTowards3, true, -1); } diff --git a/engines/bladerunner/script/scene/ps02.cpp b/engines/bladerunner/script/scene/ps02.cpp index c577640df1..a358321b10 100644 --- a/engines/bladerunner/script/scene/ps02.cpp +++ b/engines/bladerunner/script/scene/ps02.cpp @@ -144,7 +144,7 @@ void SceneScriptPS02::PlayerWalkedIn() { } void SceneScriptPS02::PlayerWalkedOut() { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Player_Gains_Control(); } diff --git a/engines/bladerunner/script/scene/ps03.cpp b/engines/bladerunner/script/scene/ps03.cpp index d8ccf47133..480f44123e 100644 --- a/engines/bladerunner/script/scene/ps03.cpp +++ b/engines/bladerunner/script/scene/ps03.cpp @@ -77,7 +77,7 @@ bool SceneScriptPS03::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -674.0f, -354.0f, 550.0f, 0, 1, false, 0)) { Game_Flag_Set(kFlagPS03toPS04); - 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(kSetPS04, kScenePS04); } @@ -85,7 +85,7 @@ bool SceneScriptPS03::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -569.54f, -354.62f, -1076.15f, 0, 1, false, 0)) { - 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(kSetPS02, kScenePS02); Game_Flag_Reset(kFlagMcCoyAtPS03); @@ -98,7 +98,7 @@ bool SceneScriptPS03::ClickedOnExit(int exitId) { if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -875.0f, -354.0f, -1241.0f, 0, 1, false, 0)) { Game_Flag_Set(kFlagPS03toPS14); - 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(kSetPS14, kScenePS14); } diff --git a/engines/bladerunner/script/scene/ps04.cpp b/engines/bladerunner/script/scene/ps04.cpp index 605b1d5340..510d596d83 100644 --- a/engines/bladerunner/script/scene/ps04.cpp +++ b/engines/bladerunner/script/scene/ps04.cpp @@ -61,7 +61,7 @@ void SceneScriptPS04::SceneLoaded() { && !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); + Item_Add_To_World(kItemWeaponsOrderForm, 958, kSetPS04, -643.5f, -318.82f, 1148.87f, 525, 16, 12, false, true, false, true); Game_Flag_Set(kFlagPS04WeaponsOrderForm); } @@ -108,7 +108,7 @@ bool SceneScriptPS04::ClickedOnExit(int exitId) { if (exitId == 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_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Set_Enter(kSetPS03, kScenePS03); } diff --git a/engines/bladerunner/script/scene/ps06.cpp b/engines/bladerunner/script/scene/ps06.cpp index 4298f98bf6..0869cf20c8 100644 --- a/engines/bladerunner/script/scene/ps06.cpp +++ b/engines/bladerunner/script/scene/ps06.cpp @@ -104,7 +104,7 @@ bool SceneScriptPS06::ClickedOnItem(int itemId, bool a2) { bool SceneScriptPS06::ClickedOnExit(int exitId) { if (exitId == 0) { Game_Flag_Set(kFlagPS06toPS05); - 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(kSetPS05, kScenePS05); return true; diff --git a/engines/bladerunner/script/scene/ps09.cpp b/engines/bladerunner/script/scene/ps09.cpp index 456a3038ce..46bfac5d03 100644 --- a/engines/bladerunner/script/scene/ps09.cpp +++ b/engines/bladerunner/script/scene/ps09.cpp @@ -145,7 +145,7 @@ bool SceneScriptPS09::ClickedOnActor(int actorId) { if (!Game_Flag_Query(kFlagPS09IzoTalk1)) { Actor_Says(kActorMcCoy, 4200, 14); - Actor_Says(kActorIzo, 570, 3); + Actor_Says(kActorIzo, 570, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4205, 18); Game_Flag_Set(kFlagPS09IzoTalk1); return true; @@ -155,14 +155,14 @@ bool SceneScriptPS09::ClickedOnActor(int actorId) { && !Game_Flag_Query(kFlagPS09IzoTalk2) ) { Actor_Says(kActorMcCoy, 4210, 18); - Actor_Says(kActorIzo, 580, 3); + Actor_Says(kActorIzo, 580, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4215, 14); - Actor_Says(kActorIzo, 590, 3); - Actor_Says(kActorIzo, 600, 3); + Actor_Says(kActorIzo, 590, kAnimationModeTalk); + Actor_Says(kActorIzo, 600, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4220, 18); - Actor_Says(kActorIzo, 610, 3); + Actor_Says(kActorIzo, 610, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4225, 19); - Actor_Says(kActorIzo, 620, 3); + Actor_Says(kActorIzo, 620, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4230, 14); Game_Flag_Set(kFlagPS09IzoTalk2); return true; @@ -180,7 +180,7 @@ bool SceneScriptPS09::ClickedOnActor(int actorId) { if (!Game_Flag_Query(kFlagPS09CrazylegsTalk1)) { Actor_Says(kActorMcCoy, 4415, 18); - Actor_Says(kActorCrazylegs, 1090, 3); + Actor_Says(kActorCrazylegs, 1090, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4420, 18); Game_Flag_Set(kFlagPS09CrazylegsTalk1); } @@ -192,11 +192,11 @@ bool SceneScriptPS09::ClickedOnActor(int actorId) { Actor_Face_Actor(kActorGrigorian, kActorCrazylegs, true); Actor_Says(kActorGrigorian, 420, 14); Actor_Face_Actor(kActorCrazylegs, kActorGrigorian, true); - Actor_Says(kActorCrazylegs, 1120, 3); + Actor_Says(kActorCrazylegs, 1120, kAnimationModeTalk); Actor_Face_Actor(kActorMcCoy, kActorGrigorian, true); Actor_Says(kActorMcCoy, 4435, 14); Actor_Says(kActorGrigorian, 430, 16); - Actor_Says(kActorCrazylegs, 1130, 3); + Actor_Says(kActorCrazylegs, 1130, kAnimationModeTalk); Game_Flag_Set(kFlagPS09CrazylegsGrigorianTalk); return true; } @@ -205,15 +205,15 @@ bool SceneScriptPS09::ClickedOnActor(int actorId) { && !Game_Flag_Query(kFlagGrigorianArrested) && !Game_Flag_Query(kFlagPS09CrazylegsTalk2)) { Actor_Says(kActorMcCoy, 4425, 18); - Actor_Says(kActorCrazylegs, 1100, 3); + Actor_Says(kActorCrazylegs, 1100, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4430, 19); - Actor_Says(kActorCrazylegs, 1110, 3); + Actor_Says(kActorCrazylegs, 1110, kAnimationModeTalk); Game_Flag_Set(kFlagPS09CrazylegsTalk2); return true; } Actor_Says(kActorMcCoy, 4425, 18); - Actor_Says(kActorCrazylegs, 1160, 3); + Actor_Says(kActorCrazylegs, 1160, kAnimationModeTalk); return true; } } @@ -227,7 +227,7 @@ bool SceneScriptPS09::ClickedOnItem(int itemId, bool a2) { bool SceneScriptPS09::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -559.15f, 0.0f, -85.06f, 0, 1, false, 0)) { - 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(kSetPS02, kScenePS02); Game_Flag_Reset(kFlagPS09Entered); @@ -339,7 +339,7 @@ void SceneScriptPS09::dialogueWithGregorian() { case 180: // CARS Actor_Says(kActorMcCoy, 4270, 18); - Actor_Says(kActorMcCoy, 4255, 3); + Actor_Says(kActorMcCoy, 4255, kAnimationModeTalk); Actor_Says(kActorGrigorian, 210, 12); Actor_Says(kActorGrigorian, 220, 13); Actor_Says(kActorGrigorian, 230, 14); @@ -356,24 +356,24 @@ void SceneScriptPS09::dialogueWithGregorian() { if (Game_Flag_Query(kFlagCrazylegsArrested)) { Actor_Says(kActorGrigorian, 300, 12); Actor_Face_Actor(kActorCrazylegs, kActorGrigorian, true); - Actor_Says(kActorCrazylegs, 1010, 3); + Actor_Says(kActorCrazylegs, 1010, kAnimationModeTalk); Actor_Face_Actor(kActorGrigorian, kActorCrazylegs, true); Actor_Says(kActorGrigorian, 310, 16); Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true); Actor_Says(kActorMcCoy, 4345, 14); Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true); - Actor_Says(kActorCrazylegs, 1020, 3); + Actor_Says(kActorCrazylegs, 1020, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4350, 18); - Actor_Says(kActorCrazylegs, 1030, 3); + Actor_Says(kActorCrazylegs, 1030, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4355, 19); - Actor_Says(kActorCrazylegs, 1040, 3); + Actor_Says(kActorCrazylegs, 1040, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4360, 16); Actor_Says(kActorMcCoy, 4365, 14); - Actor_Says(kActorCrazylegs, 1050, 3); - Actor_Says(kActorCrazylegs, 1060, 3); + Actor_Says(kActorCrazylegs, 1050, kAnimationModeTalk); + Actor_Says(kActorCrazylegs, 1060, kAnimationModeTalk); Actor_Says(kActorMcCoy, 4370, 14); - Actor_Says(kActorCrazylegs, 1070, 3); - Actor_Says(kActorCrazylegs, 1080, 3); + Actor_Says(kActorCrazylegs, 1070, kAnimationModeTalk); + Actor_Says(kActorCrazylegs, 1080, kAnimationModeTalk); } else { Actor_Says(kActorGrigorian, 320, 13); Actor_Says(kActorGrigorian, 340, 14); @@ -384,7 +384,7 @@ void SceneScriptPS09::dialogueWithGregorian() { case 190: // NOTE Actor_Says(kActorMcCoy, 4270, 18); - Actor_Says(kActorMcCoy, 4260, 3); + Actor_Says(kActorMcCoy, 4260, kAnimationModeTalk); Actor_Says(kActorGrigorian, 360, 16); Actor_Says(kActorMcCoy, 4380, 19); Actor_Says(kActorMcCoy, 4385, 19); diff --git a/engines/bladerunner/script/scene/ps10.cpp b/engines/bladerunner/script/scene/ps10.cpp index c9da4892d0..de0dc9539b 100644 --- a/engines/bladerunner/script/scene/ps10.cpp +++ b/engines/bladerunner/script/scene/ps10.cpp @@ -42,20 +42,20 @@ static const int *getPoliceMazePS10TrackData1() { static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIObstacleReset, kItemPoliceMazeTarget1, - kPMTIObstacleReset, kItemPoliceMazeTarget2, + kPMTIObstacleReset, kItemPS10Target1, + kPMTIObstacleReset, kItemPS10Target2, kPMTIFacing, 989, kPMTIPosition, 0, - kPMTITargetSet, kItemPoliceMazeTarget1, 1, - kPMTITargetSet, kItemPoliceMazeTarget2, 1, - kPMTIEnemyReset, kItemPoliceMazeTarget1, + kPMTITargetSet, kItemPS10Target1, 1, + kPMTITargetSet, kItemPS10Target2, 1, + kPMTIEnemyReset, kItemPS10Target1, kPMTIWaitRandom, 3000, 5000, - kPMTIObstacleSet, kItemPoliceMazeTarget1, + kPMTIObstacleSet, kItemPS10Target1, kPMTIPlaySound, 159, 100, kPMTIMove, 14, kPMTIWait, 1000, kPMTIRotate, 740, 80, - kPMTIEnemySet, kItemPoliceMazeTarget1, + kPMTIEnemySet, kItemPS10Target1, kPMTIWait, 0, kPMTIRotate, 488, 80, kPMTIWait, 1000, @@ -63,13 +63,12 @@ static const int *getPoliceMazePS10TrackData1() { kPMTIWait, 0, kPMTIRotate, 740, 80, kPMTIPausedReset, kPoliceMazePS10Track2, - kPMTIObstacleReset, kItemPoliceMazeTarget1, - kPMTIObstacleSet, kItemPoliceMazeTarget2, + kPMTIObstacleReset, kItemPS10Target1, + kPMTIObstacleSet, kItemPS10Target2, kPMTIPausedSet, kPoliceMazePS10Track1, kPMTIPosition, 0, kPMTIRestart }; - return trackData; } @@ -77,10 +76,10 @@ static const int *getPoliceMazePS10TrackData2() { static int trackData[] = { kPMTIFacing, 740, kPMTIPosition, 0, - kPMTIEnemySet, kItemPoliceMazeTarget2, + kPMTIEnemySet, kItemPS10Target2, kPMTIMove, 69, kPMTIWait, 500, - kPMTIObstacleReset, kItemPoliceMazeTarget2, + kPMTIObstacleReset, kItemPS10Target2, kPMTIPausedReset, kPoliceMazePS10Track5, kPMTIPausedSet, kPoliceMazePS10Track2, kPMTIPosition, 0, @@ -93,17 +92,17 @@ static const int *getPoliceMazePS10TrackData3() { static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIObstacleReset, kItemPoliceMazeTarget3, + kPMTIObstacleReset, kItemPS10Target3, kPMTIFacing, 993, kPMTIPosition, 0, kPMTIWaitRandom, 3000, 5000, - kPMTIObstacleSet, kItemPoliceMazeTarget3, + kPMTIObstacleSet, kItemPS10Target3, kPMTIPlaySound, 159, 100, - kPMTITargetSet, kItemPoliceMazeTarget3, 1, - kPMTIEnemyReset, kItemPoliceMazeTarget3, + kPMTITargetSet, kItemPS10Target3, 1, + kPMTIEnemyReset, kItemPS10Target3, kPMTIMove, 5, kPMTIWait, 1000, - kPMTIEnemySet, kItemPoliceMazeTarget3, + kPMTIEnemySet, kItemPS10Target3, kPMTIRotate, 233, 80, kPMTIWait, 0, kPMTIRotate, 491, 80, @@ -115,7 +114,7 @@ static const int *getPoliceMazePS10TrackData3() { kPMTIRotate, 993, 80, kPMTIPlaySound, 34, 33, kPMTIMove, 0, - kPMTIObstacleReset, kItemPoliceMazeTarget3, + kPMTIObstacleReset, kItemPS10Target3, kPMTIRestart }; return trackData; @@ -125,20 +124,20 @@ static const int *getPoliceMazePS10TrackData4() { static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIObstacleReset, kItemPoliceMazeTarget4, + kPMTIObstacleReset, kItemPS10Target4, kPMTIFacing, 993, kPMTIPosition, 0, kPMTIWaitRandom, 3000, 6000, - kPMTIObstacleSet, kItemPoliceMazeTarget4, + kPMTIObstacleSet, kItemPS10Target4, kPMTIPlaySound, 159, 100, - kPMTITargetSet, kItemPoliceMazeTarget4, 1, - kPMTIEnemyReset, kItemPoliceMazeTarget4, + kPMTITargetSet, kItemPS10Target4, 1, + kPMTIEnemyReset, kItemPS10Target4, kPMTIMove, 34, kPMTIWait, 500, kPMTIRotate, 491, 80, kPMTIMove, 0, kPMTILeave, - kPMTIObstacleReset, kItemPoliceMazeTarget4, + kPMTIObstacleReset, kItemPS10Target4, kPMTIPausedReset, kPoliceMazePS10Track8, kPMTIPausedSet, kPoliceMazePS10Track4, kPMTIRestart @@ -150,14 +149,14 @@ static const int *getPoliceMazePS10TrackData5() { static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIObstacleReset, kItemPoliceMazeTarget5, + kPMTIObstacleReset, kItemPS10Target5, kPMTIFacing, 0, kPMTIPosition, 0, kPMTIWaitRandom, 4000, 6000, - kPMTIObstacleSet, kItemPoliceMazeTarget5, + kPMTIObstacleSet, kItemPS10Target5, kPMTIPlaySound, 159, 100, - kPMTITargetSet, kItemPoliceMazeTarget5, 1, - kPMTIEnemyReset, kItemPoliceMazeTarget5, + kPMTITargetSet, kItemPS10Target5, 1, + kPMTIEnemyReset, kItemPS10Target5, kPMTIMove, 5, kPMTIWait, 1000, kPMTIRotate, 512, 100, @@ -166,7 +165,7 @@ static const int *getPoliceMazePS10TrackData5() { kPMTIPlaySound, 34, 33, kPMTIMove, 0, kPMTILeave, - kPMTIObstacleReset, kItemPoliceMazeTarget5, + kPMTIObstacleReset, kItemPS10Target5, kPMTIPausedReset, kPoliceMazePS10Track1, kPMTIPausedSet, kPoliceMazePS10Track5, kPMTIRestart @@ -178,17 +177,17 @@ static const int *getPoliceMazePS10TrackData6() { static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIObstacleReset, kItemPoliceMazeTarget6, + kPMTIObstacleReset, kItemPS10Target6, kPMTIFacing, 999, kPMTIPosition, 0, kPMTIWaitRandom, 4000, 6000, - kPMTIObstacleSet, kItemPoliceMazeTarget6, + kPMTIObstacleSet, kItemPS10Target6, kPMTIPlaySound, 159, 100, - kPMTITargetSet, kItemPoliceMazeTarget6, 1, - kPMTIEnemyReset, kItemPoliceMazeTarget6, + kPMTITargetSet, kItemPS10Target6, 1, + kPMTIEnemyReset, kItemPS10Target6, kPMTIMove, 7, kPMTIWait, 500, - kPMTIEnemySet, kItemPoliceMazeTarget6, + kPMTIEnemySet, kItemPS10Target6, kPMTIRotate, 750, 80, kPMTIWait, 0, kPMTIRotate, 500, 80, @@ -200,7 +199,7 @@ static const int *getPoliceMazePS10TrackData6() { kPMTIRotate, 999, 80, kPMTIPlaySound, 34, 33, kPMTIMove, 0, - kPMTIObstacleReset, kItemPoliceMazeTarget6, + kPMTIObstacleReset, kItemPS10Target6, kPMTIPausedReset, kPoliceMazePS10Track7, kPMTIPausedReset, kPoliceMazePS10Track9, kPMTIPausedSet, kPoliceMazePS10Track6, @@ -213,19 +212,19 @@ static const int *getPoliceMazePS10TrackData7() { static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIObstacleReset, kItemPoliceMazeTarget7, + kPMTIObstacleReset, kItemPS10Target7, kPMTIFacing, 264, kPMTIPosition, 0, kPMTIWaitRandom, 3000, 6000, - kPMTITargetSet, kItemPoliceMazeTarget7, 1, - kPMTIEnemyReset, kItemPoliceMazeTarget7, - kPMTIObstacleSet, kItemPoliceMazeTarget7, + kPMTITargetSet, kItemPS10Target7, 1, + kPMTIEnemyReset, kItemPS10Target7, + kPMTIObstacleSet, kItemPS10Target7, kPMTIMove, 89, kPMTIWaitRandom, 4000, 8000, kPMTIFacing, 776, kPMTIMove, 0, kPMTILeave, - kPMTIObstacleReset, kItemPoliceMazeTarget7, + kPMTIObstacleReset, kItemPS10Target7, kPMTIPausedSet, kPoliceMazePS10Track7, kPMTIRestart }; @@ -236,23 +235,23 @@ static const int *getPoliceMazePS10TrackData8() { static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIObstacleReset, kItemPoliceMazeTarget8, + kPMTIObstacleReset, kItemPS10Target8, kPMTIFacing, 993, kPMTIPosition, 0, kPMTIWaitRandom, 4000, 6000, - kPMTIObstacleSet, kItemPoliceMazeTarget8, + kPMTIObstacleSet, kItemPS10Target8, kPMTIPlaySound, 159, 100, - kPMTITargetSet, kItemPoliceMazeTarget8, 1, - kPMTIEnemyReset, kItemPoliceMazeTarget8, + kPMTITargetSet, kItemPS10Target8, 1, + kPMTIEnemyReset, kItemPS10Target8, kPMTIMove, 34, kPMTIWait, 500, - kPMTIEnemySet, kItemPoliceMazeTarget8, + kPMTIEnemySet, kItemPS10Target8, kPMTIRotate, 491, 80, kPMTIMove, 20, kPMTIWait, 0, kPMTIShoot, 27, 33, kPMTIMove, 0, - kPMTIObstacleReset, kItemPoliceMazeTarget8, + kPMTIObstacleReset, kItemPS10Target8, kPMTIPausedReset, kPoliceMazePS10Track4, kPMTIPausedSet, kPoliceMazePS10Track8, kPMTIRestart @@ -264,13 +263,13 @@ static const int *getPoliceMazePS10TrackData9() { static int trackData[] = { kPMTIActivate, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, kPMTIVariableInc, kVariablePoliceMazePS10TargetCounter, kPoliceMazePS10TargetCount, - kPMTIObstacleReset, kItemPoliceMazeTarget9, + kPMTIObstacleReset, kItemPS10Target9, kPMTIFacing, 738, kPMTIPosition, 0, kPMTIWaitRandom, 2000, 5000, - kPMTITargetSet, kItemPoliceMazeTarget9, 1, - kPMTIEnemySet, kItemPoliceMazeTarget9, - kPMTIObstacleSet, kItemPoliceMazeTarget9, + kPMTITargetSet, kItemPS10Target9, 1, + kPMTIEnemySet, kItemPS10Target9, + kPMTIObstacleSet, kItemPS10Target9, kPMTIPlaySound, 0, 33, kPMTIMove, 23, kPMTIPlaySound, 0, 33, @@ -296,8 +295,8 @@ static const int *getPoliceMazePS10TrackData9() { kPMTIMove, 89, kPMTIPlaySound, 0, 33, kPMTIWaitRandom, 4000, 6000, - kPMTITargetSet, kItemPoliceMazeTarget9, 1, - kPMTIEnemySet, kItemPoliceMazeTarget9, + kPMTITargetSet, kItemPS10Target9, 1, + kPMTIEnemySet, kItemPS10Target9, kPMTIFacing, 216, kPMTIPlaySound, 32, 33, kPMTIMove, 69, @@ -310,7 +309,7 @@ static const int *getPoliceMazePS10TrackData9() { kPMTIRotate, 216, 100, kPMTIPlaySound, 32, 33, kPMTIMove, 0, - kPMTIObstacleReset, kItemPoliceMazeTarget9, + kPMTIObstacleReset, kItemPS10Target9, kPMTIPausedSet, kPoliceMazePS10Track9, kPMTIRestart }; @@ -330,8 +329,8 @@ void SceneScriptPS10::InitializeScene() { Scene_Exit_Add_2D_Exit(1, 0, 0, 20, 479, 3); Ambient_Sounds_Remove_All_Non_Looping_Sounds(0); Ambient_Sounds_Add_Looping_Sound(387, 50, 1, 1); - Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1); - Ambient_Sounds_Add_Sound( 1, 10, 50, 16, 25, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Looping_Sound( 54, 50, 1, 1); + Ambient_Sounds_Add_Sound( 1, 10, 50, 16, 25, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(389, 5, 50, 16, 25, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(390, 6, 50, 16, 25, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(443, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); @@ -368,26 +367,26 @@ void SceneScriptPS10::SceneLoaded() { Unclickable_Object("PARKMETR16"); Unobstacle_Object("E.SM.WIRE01", true); if (!Query_System_Currently_Loading_Game()) { - Item_Add_To_World(kItemPoliceMazeTarget1, 443, 14, -240.0f, -80.74f, 145.0f, 989, 72, 36, true, false, false, true); - Item_Add_To_World(kItemPoliceMazeTarget2, 443, 14, -240.0f, -8.74f, 145.0f, 740, 72, 36, true, false, false, true); - Item_Add_To_World(kItemPoliceMazeTarget3, 445, 14, -165.0f, 111.53f, -10.0f, 993, 72, 36, true, false, false, true); - Item_Add_To_World(kItemPoliceMazeTarget4, 447, 14, -125.0f, 160.0f, -10.0f, 993, 72, 36, true, false, false, true); - Item_Add_To_World(kItemPoliceMazeTarget5, 441, 14, -246.71f, 205.51f, -20.0f, 0, 72, 36, true, false, false, true); - Item_Add_To_World(kItemPoliceMazeTarget6, 445, 14, -27.69f, -86.92f, 434.0f, 999, 72, 36, true, false, false, true); - Item_Add_To_World(kItemPoliceMazeTarget7, 441, 14, -347.15f, 7.68f, -20.0f, 264, 72, 36, true, false, false, true); - Item_Add_To_World(kItemPoliceMazeTarget8, 449, 14, -51.0f, 160.0f, -10.0f, 993, 72, 36, true, false, false, true); - Item_Add_To_World(kItemPoliceMazeTarget9, 445, 14, 39.0f, 9.16f, -20.0f, 738, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS10Target1, 443, kSetPS10_PS11_PS12_PS13, -240.0f, -80.74f, 145.0f, 989, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS10Target2, 443, kSetPS10_PS11_PS12_PS13, -240.0f, -8.74f, 145.0f, 740, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS10Target3, 445, kSetPS10_PS11_PS12_PS13, -165.0f, 111.53f, -10.0f, 993, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS10Target4, 447, kSetPS10_PS11_PS12_PS13, -125.0f, 160.0f, -10.0f, 993, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS10Target5, 441, kSetPS10_PS11_PS12_PS13, -246.71f, 205.51f, -20.0f, 0, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS10Target6, 445, kSetPS10_PS11_PS12_PS13, -27.69f, -86.92f, 434.0f, 999, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS10Target7, 441, kSetPS10_PS11_PS12_PS13, -347.15f, 7.68f, -20.0f, 264, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS10Target8, 449, kSetPS10_PS11_PS12_PS13, -51.0f, 160.0f, -10.0f, 993, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS10Target9, 445, kSetPS10_PS11_PS12_PS13, 39.0f, 9.16f, -20.0f, 738, 72, 36, true, false, false, true); } - Police_Maze_Target_Track_Add(kItemPoliceMazeTarget1, -240.0f, -80.74f, 145.0f, -240.0f, -8.74f, 145.0f, 15, getPoliceMazePS10TrackData1(), false); - Police_Maze_Target_Track_Add(kItemPoliceMazeTarget2, -240.0f, -8.74f, 145.0f, -450.0f, -8.74f, 145.0f, 70, getPoliceMazePS10TrackData2(), false); - Police_Maze_Target_Track_Add(kItemPoliceMazeTarget3, -165.0f, 111.53f, -10.0f, -165.0f, 167.53f, -10.0f, 6, getPoliceMazePS10TrackData3(), true); - Police_Maze_Target_Track_Add(kItemPoliceMazeTarget4, -125.0f, 160.0f, -10.0f, -51.0f, 160.0f, -10.0f, 35, getPoliceMazePS10TrackData4(), false); - Police_Maze_Target_Track_Add(kItemPoliceMazeTarget5, -246.71f, 205.51f, -20.0f, -246.71f, 241.51f, -20.0f, 6, getPoliceMazePS10TrackData5(), true); - Police_Maze_Target_Track_Add(kItemPoliceMazeTarget6, -27.69f, -86.92f, 434.0f, -27.69f, -18.92f, 434.0f, 8, getPoliceMazePS10TrackData6(), true); - Police_Maze_Target_Track_Add(kItemPoliceMazeTarget7, -347.15f, 7.68f, -20.0f, 39.0f, 9.16f, -20.0f, 90, getPoliceMazePS10TrackData7(), false); - Police_Maze_Target_Track_Add(kItemPoliceMazeTarget8, -51.0f, 160.0f, -10.0f, -125.0f, 160.0f, -10.0f, 35, getPoliceMazePS10TrackData8(), true); - Police_Maze_Target_Track_Add(kItemPoliceMazeTarget9, 39.0f, 9.16f, -20.0f, -347.15f, 7.68f, -20.0f, 90, getPoliceMazePS10TrackData9(), false); + Police_Maze_Target_Track_Add(kItemPS10Target1, -240.0f, -80.74f, 145.0f, -240.0f, -8.74f, 145.0f, 15, getPoliceMazePS10TrackData1(), false); + Police_Maze_Target_Track_Add(kItemPS10Target2, -240.0f, -8.74f, 145.0f, -450.0f, -8.74f, 145.0f, 70, getPoliceMazePS10TrackData2(), false); + Police_Maze_Target_Track_Add(kItemPS10Target3, -165.0f, 111.53f, -10.0f, -165.0f, 167.53f, -10.0f, 6, getPoliceMazePS10TrackData3(), true); + Police_Maze_Target_Track_Add(kItemPS10Target4, -125.0f, 160.0f, -10.0f, -51.0f, 160.0f, -10.0f, 35, getPoliceMazePS10TrackData4(), false); + Police_Maze_Target_Track_Add(kItemPS10Target5, -246.71f, 205.51f, -20.0f, -246.71f, 241.51f, -20.0f, 6, getPoliceMazePS10TrackData5(), true); + Police_Maze_Target_Track_Add(kItemPS10Target6, -27.69f, -86.92f, 434.0f, -27.69f, -18.92f, 434.0f, 8, getPoliceMazePS10TrackData6(), true); + Police_Maze_Target_Track_Add(kItemPS10Target7, -347.15f, 7.68f, -20.0f, 39.0f, 9.16f, -20.0f, 90, getPoliceMazePS10TrackData7(), false); + Police_Maze_Target_Track_Add(kItemPS10Target8, -51.0f, 160.0f, -10.0f, -125.0f, 160.0f, -10.0f, 35, getPoliceMazePS10TrackData8(), true); + Police_Maze_Target_Track_Add(kItemPS10Target9, 39.0f, 9.16f, -20.0f, -347.15f, 7.68f, -20.0f, 90, getPoliceMazePS10TrackData9(), false); Preload(441); Preload(442); Preload(443); @@ -404,7 +403,7 @@ bool SceneScriptPS10::MouseClick(int x, int y) { return false; } -bool SceneScriptPS10::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS10::ClickedOn3DObject(const char *objectName, bool combatMode) { return false; } @@ -412,16 +411,16 @@ bool SceneScriptPS10::ClickedOnActor(int actorId) { return false; } -bool SceneScriptPS10::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS10::ClickedOnItem(int itemId, bool combatMode) { if (Player_Query_Combat_Mode()) { switch (itemId) { - case kItemPoliceMazeTarget4: + case kItemPS10Target4: Sound_Play(4, 50, 0, 0, 50); break; - case kItemPoliceMazeTarget5: + case kItemPS10Target5: Sound_Play(555, 50, 0, 0, 50); break; - case kItemPoliceMazeTarget7: + case kItemPS10Target7: Sound_Play(555, 50, 0, 0, 50); break; default: @@ -429,34 +428,34 @@ bool SceneScriptPS10::ClickedOnItem(int itemId, bool a2) { break; } Item_Spin_In_World(itemId); - if (itemId == kItemPoliceMazeTarget1) { - Item_Flag_As_Non_Target(kItemPoliceMazeTarget1); - Item_Flag_As_Non_Target(kItemPoliceMazeTarget2); + if (itemId == kItemPS10Target1) { + Item_Flag_As_Non_Target(kItemPS10Target1); + Item_Flag_As_Non_Target(kItemPS10Target2); } - if (itemId == kItemPoliceMazeTarget2) { - Item_Flag_As_Non_Target(kItemPoliceMazeTarget1); - Item_Flag_As_Non_Target(kItemPoliceMazeTarget2); + if (itemId == kItemPS10Target2) { + Item_Flag_As_Non_Target(kItemPS10Target1); + Item_Flag_As_Non_Target(kItemPS10Target2); } - if (itemId == kItemPoliceMazeTarget3) { - Item_Flag_As_Non_Target(kItemPoliceMazeTarget3); + if (itemId == kItemPS10Target3) { + Item_Flag_As_Non_Target(kItemPS10Target3); } - if (itemId == kItemPoliceMazeTarget4) { - Item_Flag_As_Non_Target(kItemPoliceMazeTarget4); + if (itemId == kItemPS10Target4) { + Item_Flag_As_Non_Target(kItemPS10Target4); } - if (itemId == kItemPoliceMazeTarget5) { - Item_Flag_As_Non_Target(kItemPoliceMazeTarget5); + if (itemId == kItemPS10Target5) { + Item_Flag_As_Non_Target(kItemPS10Target5); } - if (itemId == kItemPoliceMazeTarget6) { - Item_Flag_As_Non_Target(kItemPoliceMazeTarget6); + if (itemId == kItemPS10Target6) { + Item_Flag_As_Non_Target(kItemPS10Target6); } - if (itemId == kItemPoliceMazeTarget7) { - Item_Flag_As_Non_Target(kItemPoliceMazeTarget7); + if (itemId == kItemPS10Target7) { + Item_Flag_As_Non_Target(kItemPS10Target7); } - if (itemId == kItemPoliceMazeTarget8) { - Item_Flag_As_Non_Target(kItemPoliceMazeTarget8); + if (itemId == kItemPS10Target8) { + Item_Flag_As_Non_Target(kItemPS10Target8); } - if (itemId == kItemPoliceMazeTarget9) { - Item_Flag_As_Non_Target(kItemPoliceMazeTarget9); + if (itemId == kItemPS10Target9) { + Item_Flag_As_Non_Target(kItemPS10Target9); } else { Item_Flag_As_Non_Target(itemId); } @@ -517,15 +516,15 @@ void SceneScriptPS10::DialogueQueueFlushed(int a1) { } void SceneScriptPS10::removeTargets() { - Item_Remove_From_World(kItemPoliceMazeTarget1); - Item_Remove_From_World(kItemPoliceMazeTarget2); - Item_Remove_From_World(kItemPoliceMazeTarget3); - Item_Remove_From_World(kItemPoliceMazeTarget4); - Item_Remove_From_World(kItemPoliceMazeTarget5); - Item_Remove_From_World(kItemPoliceMazeTarget6); - Item_Remove_From_World(kItemPoliceMazeTarget7); - Item_Remove_From_World(kItemPoliceMazeTarget8); - Item_Remove_From_World(kItemPoliceMazeTarget9); + Item_Remove_From_World(kItemPS10Target1); + Item_Remove_From_World(kItemPS10Target2); + Item_Remove_From_World(kItemPS10Target3); + Item_Remove_From_World(kItemPS10Target4); + Item_Remove_From_World(kItemPS10Target5); + Item_Remove_From_World(kItemPS10Target6); + Item_Remove_From_World(kItemPS10Target7); + Item_Remove_From_World(kItemPS10Target8); + Item_Remove_From_World(kItemPS10Target9); } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/scene/ps11.cpp b/engines/bladerunner/script/scene/ps11.cpp index 01ed9874c3..1e45ddc768 100644 --- a/engines/bladerunner/script/scene/ps11.cpp +++ b/engines/bladerunner/script/scene/ps11.cpp @@ -24,9 +24,11 @@ namespace BladeRunner { +static int kPoliceMazePS11TargetCount = 20; + void SceneScriptPS11::InitializeScene() { if (Game_Flag_Query(kFlagPS10toPS11)) { - Scene_Loop_Start_Special(0, 0, 0); + Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); Scene_Loop_Set_Default(1); Game_Flag_Reset(kFlagPS10toPS11); Setup_Scene_Information(World_Waypoint_Query_X(6), World_Waypoint_Query_Y(6), World_Waypoint_Query_Z(6), 840); @@ -35,7 +37,7 @@ void SceneScriptPS11::InitializeScene() { Setup_Scene_Information(World_Waypoint_Query_X(7), World_Waypoint_Query_Y(7), World_Waypoint_Query_Z(7), 132); } Scene_Exit_Add_2D_Exit(0, 0, 460, 639, 479, 2); - Scene_Exit_Add_2D_Exit(1, 0, 0, 20, 479, 3); + Scene_Exit_Add_2D_Exit(1, 0, 0, 20, 479, 3); } static int track_data_9[] = {-26, 11, 20, -18, 11, 20, -9, 9, -5, 50, -1, 0, -7, 5000, 5000, -8, 9, -10, 31, 33, -15, 9, 1, -22, 9, -2, 7, -3, 1000, -24, 27, 33, -10, 34, 33, -2, 0, -3, 500, -9, 9, -13, 15, 10, -12, 9, -4}; @@ -75,63 +77,63 @@ void SceneScriptPS11::SceneLoaded() { Unclickable_Object("PARKMETR15"); Unclickable_Object("PARKMETR16"); if (!Query_System_Currently_Loading_Game()) { - Item_Add_To_World(9, 449, 14, -450.0f, -7.5f, 335.0f, 50, 72, 36, true, false, false, true); - Item_Add_To_World(10, 449, 14, -740.0f, 27.0f, -30.0f, 860, 72, 36, true, false, false, true); - Item_Add_To_World(11, 449, 14, -740.0f, 99.0f, -30.0f, 860, 72, 36, true, false, false, true); - Item_Add_To_World(12, 441, 14, -400.0f, -9.23f, -75.0f, 725, 72, 36, true, false, false, true); - Item_Add_To_World(13, 443, 14, -803.72f, -72.7f, 60.22f, 340, 72, 36, true, false, false, true); - Item_Add_To_World(14, 443, 14, -853.0f, -70.0f, 195.0f, 900, 72, 36, true, false, false, true); - Item_Add_To_World(15, 447, 14, -740.0f, 27.0f, -30.0f, 860, 72, 36, true, false, false, true); - Item_Add_To_World(16, 447, 14, -740.0f, 99.0f, -30.0f, 860, 72, 36, true, false, false, true); - Item_Add_To_World(17, 445, 14, -888.0f, 155.0f, 100.0f, 310, 72, 36, true, false, false, true); - Item_Add_To_World(18, 443, 14, -430.0f, 164.0f, 11.0f, 900, 72, 36, true, false, false, true); - Item_Add_To_World(19, 443, 14, -430.0f, -0.86f, 11.0f, 512, 72, 36, true, false, false, true); - Item_Add_To_World(20, 443, 14, -891.0f, 3.1f, 90.0f, 280, 72, 36, true, false, false, true); - Item_Add_To_World(21, 447, 14, -891.0f, 3.1f, 90.0f, 280, 72, 36, true, false, false, true); - Item_Add_To_World(22, 445, 14, -891.0f, 171.0f, 190.0f, 255, 72, 36, true, false, false, true); - Item_Add_To_World(23, 441, 14, -888.0f, 155.0f, 30.0f, 310, 72, 36, true, false, false, true); - Item_Add_To_World(27, 445, 14, -800.0f, -9.23f, -75.0f, 346, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target1, 449, kSetPS10_PS11_PS12_PS13, -450.0f, -7.5f, 335.0f, 50, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target2, 449, kSetPS10_PS11_PS12_PS13, -740.0f, 27.0f, -30.0f, 860, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target3, 449, kSetPS10_PS11_PS12_PS13, -740.0f, 99.0f, -30.0f, 860, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target4, 441, kSetPS10_PS11_PS12_PS13, -400.0f, -9.23f, -75.0f, 725, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target5, 443, kSetPS10_PS11_PS12_PS13, -803.72f, -72.7f, 60.22f, 340, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target6, 443, kSetPS10_PS11_PS12_PS13, -853.0f, -70.0f, 195.0f, 900, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target7, 447, kSetPS10_PS11_PS12_PS13, -740.0f, 27.0f, -30.0f, 860, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target8, 447, kSetPS10_PS11_PS12_PS13, -740.0f, 99.0f, -30.0f, 860, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target9, 445, kSetPS10_PS11_PS12_PS13, -888.0f, 155.0f, 100.0f, 310, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target10, 443, kSetPS10_PS11_PS12_PS13, -430.0f, 164.0f, 11.0f, 900, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target11, 443, kSetPS10_PS11_PS12_PS13, -430.0f, -0.86f, 11.0f, 512, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target12, 443, kSetPS10_PS11_PS12_PS13, -891.0f, 3.1f, 90.0f, 280, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target13, 447, kSetPS10_PS11_PS12_PS13, -891.0f, 3.1f, 90.0f, 280, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target14, 445, kSetPS10_PS11_PS12_PS13, -891.0f, 171.0f, 190.0f, 255, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target15, 441, kSetPS10_PS11_PS12_PS13, -888.0f, 155.0f, 30.0f, 310, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS11Target16, 445, kSetPS10_PS11_PS12_PS13, -800.0f, -9.23f, -75.0f, 346, 72, 36, true, false, false, true); } - Police_Maze_Target_Track_Add(9, -450.0f, -7.5f, 335.0f, -450.0f, -7.5f, 295.0f, 8, track_data_9, true); - Police_Maze_Target_Track_Add(10, -740.0f, 27.0f, -30.0f, -740.0f, 99.0f, -30.0f, 15, track_data_10, false); - Police_Maze_Target_Track_Add(11, -740.0f, 99.0f, -30.0f, -200.0f, 99.0f, -30.0f, 80, track_data_11, false); - Police_Maze_Target_Track_Add(12, -400.0f, -9.23f, -75.0f, -800.0f, -9.23f, -75.0f, 100, track_data_12, false); - Police_Maze_Target_Track_Add(13, -803.72f, -72.7f, 60.22f, -803.72f, -0.7f, 60.22f, 6, track_data_13, true); - Police_Maze_Target_Track_Add(14, -853.0f, -70.0f, 195.0f, -853.0f, 2.0f, 195.0f, 6, track_data_14, false); - Police_Maze_Target_Track_Add(15, -740.0f, 27.0f, -30.0f, -740.0f, 99.0f, -30.0f, 15, track_data_15, false); - Police_Maze_Target_Track_Add(16, -740.0f, 99.0f, -30.0f, -200.0f, 99.0f, -30.0f, 80, track_data_16, false); - Police_Maze_Target_Track_Add(17, -888.0f, 155.0f, 100.0f, -888.0f, 155.0f, 30.0f, 25, track_data_17, false); - Police_Maze_Target_Track_Add(18, -430.0f, 164.0f, 11.0f, -430.0f, -0.86f, 11.0f, 6, track_data_18, false); - Police_Maze_Target_Track_Add(19, -430.0f, -0.86f, 11.0f, -300.0f, -0.86f, -80.0f, 20, track_data_19, false); - Police_Maze_Target_Track_Add(20, -891.0f, 3.1f, 90.0f, -891.0f, 3.1f, 105.0f, 10, track_data_20, true); - Police_Maze_Target_Track_Add(21, -891.0f, 3.1f, 90.0f, -891.0f, 3.1f, 105.0f, 6, track_data_21, false); - Police_Maze_Target_Track_Add(22, -891.0f, 171.0f, 190.0f, -891.0f, 171.0f, 147.0f, 8, track_data_22, false); - Police_Maze_Target_Track_Add(23, -888.0f, 155.0f, 30.0f, -888.0f, 155.0f, 100.0f, 25, track_data_23, true); - Police_Maze_Target_Track_Add(27, -800.0f, -9.23f, -75.0f, -740.0f, -9.23f, -75.0f, 15, track_data_27, false); + Police_Maze_Target_Track_Add(kItemPS11Target1, -450.0f, -7.5f, 335.0f, -450.0f, -7.5f, 295.0f, 8, track_data_9, true); + Police_Maze_Target_Track_Add(kItemPS11Target2, -740.0f, 27.0f, -30.0f, -740.0f, 99.0f, -30.0f, 15, track_data_10, false); + Police_Maze_Target_Track_Add(kItemPS11Target3, -740.0f, 99.0f, -30.0f, -200.0f, 99.0f, -30.0f, 80, track_data_11, false); + Police_Maze_Target_Track_Add(kItemPS11Target4, -400.0f, -9.23f, -75.0f, -800.0f, -9.23f, -75.0f, 100, track_data_12, false); + Police_Maze_Target_Track_Add(kItemPS11Target5, -803.72f, -72.7f, 60.22f, -803.72f, -0.7f, 60.22f, 6, track_data_13, true); + Police_Maze_Target_Track_Add(kItemPS11Target6, -853.0f, -70.0f, 195.0f, -853.0f, 2.0f, 195.0f, 6, track_data_14, false); + Police_Maze_Target_Track_Add(kItemPS11Target7, -740.0f, 27.0f, -30.0f, -740.0f, 99.0f, -30.0f, 15, track_data_15, false); + Police_Maze_Target_Track_Add(kItemPS11Target8, -740.0f, 99.0f, -30.0f, -200.0f, 99.0f, -30.0f, 80, track_data_16, false); + Police_Maze_Target_Track_Add(kItemPS11Target9, -888.0f, 155.0f, 100.0f, -888.0f, 155.0f, 30.0f, 25, track_data_17, false); + Police_Maze_Target_Track_Add(kItemPS11Target10, -430.0f, 164.0f, 11.0f, -430.0f, -0.86f, 11.0f, 6, track_data_18, false); + Police_Maze_Target_Track_Add(kItemPS11Target11, -430.0f, -0.86f, 11.0f, -300.0f, -0.86f, -80.0f, 20, track_data_19, false); + Police_Maze_Target_Track_Add(kItemPS11Target12, -891.0f, 3.1f, 90.0f, -891.0f, 3.1f, 105.0f, 10, track_data_20, true); + Police_Maze_Target_Track_Add(kItemPS11Target13, -891.0f, 3.1f, 90.0f, -891.0f, 3.1f, 105.0f, 6, track_data_21, false); + Police_Maze_Target_Track_Add(kItemPS11Target14, -891.0f, 171.0f, 190.0f, -891.0f, 171.0f, 147.0f, 8, track_data_22, false); + Police_Maze_Target_Track_Add(kItemPS11Target15, -888.0f, 155.0f, 30.0f, -888.0f, 155.0f, 100.0f, 25, track_data_23, true); + Police_Maze_Target_Track_Add(kItemPS11Target16, -800.0f, -9.23f, -75.0f, -740.0f, -9.23f, -75.0f, 15, track_data_27, false); Ambient_Sounds_Remove_All_Non_Looping_Sounds(0); Ambient_Sounds_Add_Looping_Sound(387, 50, 1, 1); - Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1); - Ambient_Sounds_Add_Sound(1, 10, 50, 16, 25, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(389, 5, 50, 16, 25, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(390, 6, 50, 16, 25, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(443, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(444, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(445, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(446, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(303, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(305, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(306, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(307, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(308, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Looping_Sound( 54, 50, 1, 1); + Ambient_Sounds_Add_Sound( 1, 10, 50, 16, 25, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(389, 5, 50, 16, 25, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(390, 6, 50, 16, 25, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(443, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(444, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(445, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(446, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(303, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(305, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(306, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(307, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(308, 5, 100, 17, 27, -100, 100, -101, -101, 0, 0); } bool SceneScriptPS11::MouseClick(int x, int y) { return false; } -bool SceneScriptPS11::ClickedOn3DObject(const char *objectName, bool a2) { +bool SceneScriptPS11::ClickedOn3DObject(const char *objectName, bool combatMode) { return false; } @@ -139,22 +141,22 @@ bool SceneScriptPS11::ClickedOnActor(int actorId) { return false; } -bool SceneScriptPS11::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptPS11::ClickedOnItem(int itemId, bool combatMode) { if (Player_Query_Combat_Mode()) { switch (itemId) { - case 15: - Sound_Play(4, 50, 0, 0, 50); + case kItemPS11Target4: + Sound_Play(555, 50, 0, 0, 50); break; - case 16: + case kItemPS11Target7: Sound_Play(4, 50, 0, 0, 50); break; - case 21: + case kItemPS11Target8: Sound_Play(4, 50, 0, 0, 50); break; - case 23: - Sound_Play(555, 50, 0, 0, 50); + case kItemPS11Target13: + Sound_Play(4, 50, 0, 0, 50); break; - case 12: + case kItemPS11Target15: Sound_Play(555, 50, 0, 0, 50); break; default: @@ -162,59 +164,59 @@ bool SceneScriptPS11::ClickedOnItem(int itemId, bool a2) { break; } Item_Spin_In_World(itemId); - if (itemId == 9) { - Item_Flag_As_Non_Target(9); + if (itemId == kItemPS11Target1) { + Item_Flag_As_Non_Target(kItemPS11Target1); } - if (itemId == 10) { - Item_Flag_As_Non_Target(10); - Item_Flag_As_Non_Target(11); + if (itemId == kItemPS11Target2) { + Item_Flag_As_Non_Target(kItemPS11Target2); + Item_Flag_As_Non_Target(kItemPS11Target3); } - if (itemId == 11) { - Item_Flag_As_Non_Target(10); - Item_Flag_As_Non_Target(11); + if (itemId == kItemPS11Target3) { + Item_Flag_As_Non_Target(kItemPS11Target2); + Item_Flag_As_Non_Target(kItemPS11Target3); } - if (itemId == 12) { - Item_Flag_As_Non_Target(12); + if (itemId == kItemPS11Target4) { + Item_Flag_As_Non_Target(kItemPS11Target4); } - if (itemId == 13) { - Item_Flag_As_Non_Target(13); + if (itemId == kItemPS11Target5) { + Item_Flag_As_Non_Target(kItemPS11Target5); } - if (itemId == 14) { - Item_Flag_As_Non_Target(14); + if (itemId == kItemPS11Target6) { + Item_Flag_As_Non_Target(kItemPS11Target6); } - if (itemId == 15) { - Item_Flag_As_Non_Target(15); - Item_Flag_As_Non_Target(16); + if (itemId == kItemPS11Target7) { + Item_Flag_As_Non_Target(kItemPS11Target7); + Item_Flag_As_Non_Target(kItemPS11Target8); } - if (itemId == 16) { - Item_Flag_As_Non_Target(15); - Item_Flag_As_Non_Target(16); + if (itemId == kItemPS11Target8) { + Item_Flag_As_Non_Target(kItemPS11Target7); + Item_Flag_As_Non_Target(kItemPS11Target8); } - if (itemId == 17) { - Item_Flag_As_Non_Target(17); + if (itemId == kItemPS11Target9) { + Item_Flag_As_Non_Target(kItemPS11Target9); } - if (itemId == 18) { - Item_Flag_As_Non_Target(18); - Item_Flag_As_Non_Target(19); + if (itemId == kItemPS11Target10) { + Item_Flag_As_Non_Target(kItemPS11Target10); + Item_Flag_As_Non_Target(kItemPS11Target11); } - if (itemId == 19) { - Item_Flag_As_Non_Target(18); - Item_Flag_As_Non_Target(19); + if (itemId == kItemPS11Target11) { + Item_Flag_As_Non_Target(kItemPS11Target10); + Item_Flag_As_Non_Target(kItemPS11Target11); } - if (itemId == 20) { - Item_Flag_As_Non_Target(20); + if (itemId == kItemPS11Target12) { + Item_Flag_As_Non_Target(kItemPS11Target12); } - if (itemId == 21) { - Item_Flag_As_Non_Target(21); + if (itemId == kItemPS11Target13) { + Item_Flag_As_Non_Target(kItemPS11Target13); } - if (itemId == 22) { - Item_Flag_As_Non_Target(22); + if (itemId == kItemPS11Target14) { + Item_Flag_As_Non_Target(kItemPS11Target14); } - if (itemId == 23) { - Item_Flag_As_Non_Target(23); + if (itemId == kItemPS11Target15) { + Item_Flag_As_Non_Target(kItemPS11Target15); } - if (itemId == 27) { - Item_Flag_As_Non_Target(27); + if (itemId == kItemPS11Target16) { + Item_Flag_As_Non_Target(kItemPS11Target16); } return true; } @@ -223,19 +225,19 @@ bool SceneScriptPS11::ClickedOnItem(int itemId, bool a2) { bool SceneScriptPS11::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 6, 12, 1, false)) { + if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 6, 12, true, false)) { Game_Flag_Set(kFlagPS11toPS10); - sub_402744(); + removeTargets(); Set_Enter(kSetPS10_PS11_PS12_PS13, kScenePS10); } return true; } if (exitId == 1) { - if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 8, 12, 1, false)) { + if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 8, 12, true, false)) { Game_Flag_Set(kFlagPS11toPS12); - sub_402744(); - Global_Variable_Decrement(9, 20 - Global_Variable_Query(11)); - Global_Variable_Set(11, 20); + removeTargets(); + Global_Variable_Decrement(kVariablePoliceMazeScore, kPoliceMazePS11TargetCount - Global_Variable_Query(kVariablePoliceMazePS11TargetCounter)); + Global_Variable_Set(kVariablePoliceMazePS11TargetCounter, kPoliceMazePS11TargetCount); Set_Enter(kSetPS10_PS11_PS12_PS13, kScenePS12); } return true; @@ -263,23 +265,23 @@ void SceneScriptPS11::PlayerWalkedOut() { void SceneScriptPS11::DialogueQueueFlushed(int a1) { } -void SceneScriptPS11::sub_402744() { - Item_Remove_From_World(9); - Item_Remove_From_World(10); - Item_Remove_From_World(11); - Item_Remove_From_World(12); - Item_Remove_From_World(13); - Item_Remove_From_World(14); - Item_Remove_From_World(15); - Item_Remove_From_World(16); - Item_Remove_From_World(17); - Item_Remove_From_World(18); - Item_Remove_From_World(19); - Item_Remove_From_World(20); - Item_Remove_From_World(21); - Item_Remove_From_World(22); - Item_Remove_From_World(23); - Item_Remove_From_World(27); +void SceneScriptPS11::removeTargets() { + Item_Remove_From_World(kItemPS11Target1); + Item_Remove_From_World(kItemPS11Target2); + Item_Remove_From_World(kItemPS11Target3); + Item_Remove_From_World(kItemPS11Target4); + Item_Remove_From_World(kItemPS11Target5); + Item_Remove_From_World(kItemPS11Target6); + Item_Remove_From_World(kItemPS11Target7); + Item_Remove_From_World(kItemPS11Target8); + Item_Remove_From_World(kItemPS11Target9); + Item_Remove_From_World(kItemPS11Target10); + Item_Remove_From_World(kItemPS11Target11); + Item_Remove_From_World(kItemPS11Target12); + Item_Remove_From_World(kItemPS11Target13); + Item_Remove_From_World(kItemPS11Target14); + Item_Remove_From_World(kItemPS11Target15); + Item_Remove_From_World(kItemPS11Target16); } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/scene/ps12.cpp b/engines/bladerunner/script/scene/ps12.cpp index 7a13d1417d..ebccb60b85 100644 --- a/engines/bladerunner/script/scene/ps12.cpp +++ b/engines/bladerunner/script/scene/ps12.cpp @@ -24,10 +24,12 @@ namespace BladeRunner { +static int kPoliceMazePS12TargetCount = 20; + void SceneScriptPS12::InitializeScene() { Police_Maze_Set_Pause_State(true); if (Game_Flag_Query(kFlagPS11toPS12)) { - Scene_Loop_Start_Special(0, 0, 0); + Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); Scene_Loop_Set_Default(1); Setup_Scene_Information(World_Waypoint_Query_X(8), World_Waypoint_Query_Y(8), World_Waypoint_Query_Z(8), 512); } else { @@ -35,7 +37,7 @@ void SceneScriptPS12::InitializeScene() { Setup_Scene_Information(World_Waypoint_Query_X(9), World_Waypoint_Query_Y(9), World_Waypoint_Query_Z(9), 0); } Scene_Exit_Add_2D_Exit(0, 0, 460, 639, 479, 2); - Scene_Exit_Add_2D_Exit(1, 0, 5, 110, 196, 3); + Scene_Exit_Add_2D_Exit(1, 0, 5, 110, 196, 3); } static int track_data_29[] = {-26, 12, 20, -18, 12, 20, -9, 29, -5, 200, -1, 0, -7, 4000, 10000, -8, 29, -10, 33, 33, -15, 29, 1, -22, 29, -2, 5, -3, 500, -24, 27, 33, -10, 34, 33, -2, 0, -9, 29, -13, 44, 42, -12, 29, -4}; @@ -76,47 +78,47 @@ void SceneScriptPS12::SceneLoaded() { Unclickable_Object("PARKMETR15"); Unclickable_Object("PARKMETR16"); if (!Query_System_Currently_Loading_Game()) { - Item_Add_To_World(29, 449, 14, -691.8f, -9.06f, 587.67f, 200, 72, 36, true, false, false, true); - Item_Add_To_World(30, 445, 14, -679.6f, -45.4f, 721.05f, 67, 72, 36, true, false, false, true); - Item_Add_To_World(31, 447, 14, -414.04f, -8.98f, 711.91f, 480, 72, 36, true, false, false, true); - Item_Add_To_World(32, 443, 14, -440.0f, -8.97f, 1137.0f, 1010, 72, 36, true, false, false, true); - Item_Add_To_World(33, 441, 14, -764.92f, -0.84f, 950.22f, 540, 72, 36, true, false, false, true); - Item_Add_To_World(34, 449, 14, -696.0f, -5.7f, 1185.0f, 469, 72, 36, true, false, false, true); - Item_Add_To_World(35, 449, 14, -635.0f, -5.7f, 1165.0f, 198, 72, 36, true, false, false, true); - Item_Add_To_World(36, 449, 14, -620.0f, -8.63f, 1366.0f, 469, 72, 36, true, false, false, true); - Item_Add_To_World(37, 447, 14, -584.0f, -79.4f, 775.0f, 1010, 72, 36, true, false, false, true); - Item_Add_To_World(38, 445, 14, -578.0f, -79.4f, 810.0f, 990, 72, 36, true, false, false, true); - Item_Add_To_World(39, 443, 14, -400.0f, -12.0f, 1110.0f, 513, 72, 36, true, false, false, true); - Item_Add_To_World(40, 449, 14, -414.04f, -8.98f, 711.91f, 480, 72, 36, true, false, false, true); - Item_Add_To_World(41, 447, 14, -400.0f, -12.0f, 1110.0f, 513, 72, 36, true, false, false, true); - Item_Add_To_World(42, 449, 14, -731.0f, 93.66f, 788.0f, 109, 72, 36, true, false, false, true); - Item_Add_To_World(43, 441, 14, -580.0f, -80.0f, 925.0f, 540, 72, 36, true, false, false, true); - Item_Add_To_World(44, 441, 14, -731.0f, 93.66f, 788.0f, 109, 72, 36, true, false, false, true); - Item_Add_To_World(45, 443, 14, -580.0f, -80.0f, 925.0f, 540, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target1, 449, kSetPS10_PS11_PS12_PS13, -691.8f, -9.06f, 587.67f, 200, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target2, 445, kSetPS10_PS11_PS12_PS13, -679.6f, -45.4f, 721.05f, 67, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target3, 447, kSetPS10_PS11_PS12_PS13, -414.04f, -8.98f, 711.91f, 480, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target4, 443, kSetPS10_PS11_PS12_PS13, -440.0f, -8.97f, 1137.0f, 1010, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target5, 441, kSetPS10_PS11_PS12_PS13, -764.92f, -0.84f, 950.22f, 540, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target6, 449, kSetPS10_PS11_PS12_PS13, -696.0f, -5.7f, 1185.0f, 469, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target7, 449, kSetPS10_PS11_PS12_PS13, -635.0f, -5.7f, 1165.0f, 198, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target8, 449, kSetPS10_PS11_PS12_PS13, -620.0f, -8.63f, 1366.0f, 469, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target9, 447, kSetPS10_PS11_PS12_PS13, -584.0f, -79.4f, 775.0f, 1010, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target10, 445, kSetPS10_PS11_PS12_PS13, -578.0f, -79.4f, 810.0f, 990, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target11, 443, kSetPS10_PS11_PS12_PS13, -400.0f, -12.0f, 1110.0f, 513, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target12, 449, kSetPS10_PS11_PS12_PS13, -414.04f, -8.98f, 711.91f, 480, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target13, 447, kSetPS10_PS11_PS12_PS13, -400.0f, -12.0f, 1110.0f, 513, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target14, 449, kSetPS10_PS11_PS12_PS13, -731.0f, 93.66f, 788.0f, 109, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target15, 441, kSetPS10_PS11_PS12_PS13, -580.0f, -80.0f, 925.0f, 540, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target16, 441, kSetPS10_PS11_PS12_PS13, -731.0f, 93.66f, 788.0f, 109, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS12Target17, 443, kSetPS10_PS11_PS12_PS13, -580.0f, -80.0f, 925.0f, 540, 72, 36, true, false, false, true); } - Police_Maze_Target_Track_Add(29, -691.8f, -9.06f, 587.67f, -649.11f, -9.06f, 587.71f, 6, track_data_29, true); - Police_Maze_Target_Track_Add(30, -679.6f, -45.4f, 721.05f, -679.6f, -1.4f, 721.05f, 6, track_data_30, true); - Police_Maze_Target_Track_Add(31, -414.04f, -8.98f, 711.91f, -459.54f, -8.99f, 707.81f, 6, track_data_31, false); - Police_Maze_Target_Track_Add(32, -440.0f, -8.97f, 1137.0f, -430.0f, -8.97f, 921.0f, 6, track_data_32, false); - Police_Maze_Target_Track_Add(33, -764.92f, -0.84f, 950.22f, -722.92f, -0.84f, 950.22f, 6, track_data_33, false); - Police_Maze_Target_Track_Add(34, -696.0f, -5.7f, 1185.0f, -635.0f, -5.7f, 1185.0f, 20, track_data_34, false); - Police_Maze_Target_Track_Add(35, -635.0f, -5.7f, 1165.0f, -620.0f, -8.63f, 1366.0f, 10, track_data_35, false); - Police_Maze_Target_Track_Add(36, -620.0f, -8.63f, 1366.0f, -595.0f, -8.63f, 1366.0f, 10, track_data_36, false); - Police_Maze_Target_Track_Add(37, -584.0f, -79.4f, 775.0f, -584.0f, -27.4f, 775.0f, 10, track_data_37, true); - Police_Maze_Target_Track_Add(38, -578.0f, -79.4f, 810.0f, -578.0f, -27.4f, 810.0f, 10, track_data_38, false); - Police_Maze_Target_Track_Add(39, -400.0f, -12.0f, 1110.0f, -400.0f, 60.0f, 1110.0f, 6, track_data_39, false); - Police_Maze_Target_Track_Add(40, -414.04f, -8.98f, 711.91f, -459.54f, -8.99f, 707.81f, 6, track_data_40, true); - Police_Maze_Target_Track_Add(41, -400.0f, -12.0f, 1110.0f, -400.0f, 60.0f, 1110.0f, 6, track_data_41, false); - Police_Maze_Target_Track_Add(42, -731.0f, 93.66f, 788.0f, -702.0f, 93.66f, 788.0f, 6, track_data_42, false); - Police_Maze_Target_Track_Add(43, -580.0f, -80.0f, 925.0f, -580.0f, -8.0f, 925.0f, 10, track_data_43, true); - Police_Maze_Target_Track_Add(44, -731.0f, 93.66f, 788.0f, -702.0f, 93.66f, 788.0f, 6, track_data_44, false); - Police_Maze_Target_Track_Add(45, -580.0f, -80.0f, 925.0f, -580.0f, -8.0f, 925.0f, 10, track_data_45, false); + Police_Maze_Target_Track_Add(kItemPS12Target1, -691.8f, -9.06f, 587.67f, -649.11f, -9.06f, 587.71f, 6, track_data_29, true); + Police_Maze_Target_Track_Add(kItemPS12Target2, -679.6f, -45.4f, 721.05f, -679.6f, -1.4f, 721.05f, 6, track_data_30, true); + Police_Maze_Target_Track_Add(kItemPS12Target3, -414.04f, -8.98f, 711.91f, -459.54f, -8.99f, 707.81f, 6, track_data_31, false); + Police_Maze_Target_Track_Add(kItemPS12Target4, -440.0f, -8.97f, 1137.0f, -430.0f, -8.97f, 921.0f, 6, track_data_32, false); + Police_Maze_Target_Track_Add(kItemPS12Target5, -764.92f, -0.84f, 950.22f, -722.92f, -0.84f, 950.22f, 6, track_data_33, false); + Police_Maze_Target_Track_Add(kItemPS12Target6, -696.0f, -5.7f, 1185.0f, -635.0f, -5.7f, 1185.0f, 20, track_data_34, false); + Police_Maze_Target_Track_Add(kItemPS12Target7, -635.0f, -5.7f, 1165.0f, -620.0f, -8.63f, 1366.0f, 10, track_data_35, false); + Police_Maze_Target_Track_Add(kItemPS12Target8, -620.0f, -8.63f, 1366.0f, -595.0f, -8.63f, 1366.0f, 10, track_data_36, false); + Police_Maze_Target_Track_Add(kItemPS12Target9, -584.0f, -79.4f, 775.0f, -584.0f, -27.4f, 775.0f, 10, track_data_37, true); + Police_Maze_Target_Track_Add(kItemPS12Target10, -578.0f, -79.4f, 810.0f, -578.0f, -27.4f, 810.0f, 10, track_data_38, false); + Police_Maze_Target_Track_Add(kItemPS12Target11, -400.0f, -12.0f, 1110.0f, -400.0f, 60.0f, 1110.0f, 6, track_data_39, false); + Police_Maze_Target_Track_Add(kItemPS12Target12, -414.04f, -8.98f, 711.91f, -459.54f, -8.99f, 707.81f, 6, track_data_40, true); + Police_Maze_Target_Track_Add(kItemPS12Target13, -400.0f, -12.0f, 1110.0f, -400.0f, 60.0f, 1110.0f, 6, track_data_41, false); + Police_Maze_Target_Track_Add(kItemPS12Target14, -731.0f, 93.66f, 788.0f, -702.0f, 93.66f, 788.0f, 6, track_data_42, false); + Police_Maze_Target_Track_Add(kItemPS12Target15, -580.0f, -80.0f, 925.0f, -580.0f, -8.0f, 925.0f, 10, track_data_43, true); + Police_Maze_Target_Track_Add(kItemPS12Target16, -731.0f, 93.66f, 788.0f, -702.0f, 93.66f, 788.0f, 6, track_data_44, false); + Police_Maze_Target_Track_Add(kItemPS12Target17, -580.0f, -80.0f, 925.0f, -580.0f, -8.0f, 925.0f, 10, track_data_45, false); Ambient_Sounds_Remove_All_Non_Looping_Sounds(0); Ambient_Sounds_Add_Looping_Sound(387, 50, 1, 1); Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1); - Ambient_Sounds_Add_Sound(1, 10, 50, 16, 25, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(389, 5, 50, 16, 25, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(390, 6, 50, 16, 25, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(1, 10, 50, 16, 25, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(389, 5, 50, 16, 25, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(390, 6, 50, 16, 25, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(443, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(444, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(445, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); @@ -144,22 +146,22 @@ bool SceneScriptPS12::ClickedOnActor(int actorId) { bool SceneScriptPS12::ClickedOnItem(int itemId, bool a2) { if (Player_Query_Combat_Mode()) { switch (itemId) { - case 31: + case kItemPS12Target3: Sound_Play(4, 50, 0, 0, 50); break; - case 37: - Sound_Play(4, 50, 0, 0, 50); + case kItemPS12Target5: + Sound_Play(555, 50, 0, 0, 50); break; - case 41: + case kItemPS12Target9: Sound_Play(4, 50, 0, 0, 50); break; - case 33: - Sound_Play(555, 50, 0, 0, 50); + case kItemPS12Target13: + Sound_Play(4, 50, 0, 0, 50); break; - case 43: + case kItemPS12Target15: Sound_Play(555, 50, 0, 0, 50); break; - case 44: + case kItemPS12Target16: Sound_Play(555, 50, 0, 0, 50); break; default: @@ -168,62 +170,62 @@ bool SceneScriptPS12::ClickedOnItem(int itemId, bool a2) { } Item_Spin_In_World(itemId); Item_Flag_As_Non_Target(itemId); - if (itemId == 29) { - Item_Flag_As_Non_Target(29); + if (itemId == kItemPS12Target1) { + Item_Flag_As_Non_Target(kItemPS12Target1); } - if (itemId == 30) { - Item_Flag_As_Non_Target(30); + if (itemId == kItemPS12Target2) { + Item_Flag_As_Non_Target(kItemPS12Target2); } - if (itemId == 31) { - Item_Flag_As_Non_Target(31); + if (itemId == kItemPS12Target3) { + Item_Flag_As_Non_Target(kItemPS12Target3); } - if (itemId == 32) { - Item_Flag_As_Non_Target(32); + if (itemId == kItemPS12Target4) { + Item_Flag_As_Non_Target(kItemPS12Target4); } - if (itemId == 33) { - Item_Flag_As_Non_Target(33); + if (itemId == kItemPS12Target5) { + Item_Flag_As_Non_Target(kItemPS12Target5); } - if (itemId == 34) { - Item_Flag_As_Non_Target(34); - Item_Flag_As_Non_Target(35); - Item_Flag_As_Non_Target(36); + if (itemId == kItemPS12Target6) { + Item_Flag_As_Non_Target(kItemPS12Target6); + Item_Flag_As_Non_Target(kItemPS12Target7); + Item_Flag_As_Non_Target(kItemPS12Target8); } - if (itemId == 35) { - Item_Flag_As_Non_Target(34); - Item_Flag_As_Non_Target(35); - Item_Flag_As_Non_Target(36); + if (itemId == kItemPS12Target7) { + Item_Flag_As_Non_Target(kItemPS12Target6); + Item_Flag_As_Non_Target(kItemPS12Target7); + Item_Flag_As_Non_Target(kItemPS12Target8); } - if (itemId == 36) { - Item_Flag_As_Non_Target(34); - Item_Flag_As_Non_Target(35); - Item_Flag_As_Non_Target(36); + if (itemId == kItemPS12Target8) { + Item_Flag_As_Non_Target(kItemPS12Target6); + Item_Flag_As_Non_Target(kItemPS12Target7); + Item_Flag_As_Non_Target(kItemPS12Target8); } - if (itemId == 37) { - Item_Flag_As_Non_Target(37); + if (itemId == kItemPS12Target9) { + Item_Flag_As_Non_Target(kItemPS12Target9); } - if (itemId == 38) { - Item_Flag_As_Non_Target(38); + if (itemId == kItemPS12Target10) { + Item_Flag_As_Non_Target(kItemPS12Target10); } - if (itemId == 39) { - Item_Flag_As_Non_Target(39); + if (itemId == kItemPS12Target11) { + Item_Flag_As_Non_Target(kItemPS12Target11); } - if (itemId == 40) { - Item_Flag_As_Non_Target(40); + if (itemId == kItemPS12Target12) { + Item_Flag_As_Non_Target(kItemPS12Target12); } - if (itemId == 41) { - Item_Flag_As_Non_Target(41); + if (itemId == kItemPS12Target13) { + Item_Flag_As_Non_Target(kItemPS12Target13); } - if (itemId == 42) { - Item_Flag_As_Non_Target(42); + if (itemId == kItemPS12Target14) { + Item_Flag_As_Non_Target(kItemPS12Target14); } - if (itemId == 43) { - Item_Flag_As_Non_Target(43); + if (itemId == kItemPS12Target15) { + Item_Flag_As_Non_Target(kItemPS12Target15); } - if (itemId == 44) { - Item_Flag_As_Non_Target(44); + if (itemId == kItemPS12Target16) { + Item_Flag_As_Non_Target(kItemPS12Target16); } - if (itemId == 45) { - Item_Flag_As_Non_Target(45); + if (itemId == kItemPS12Target17) { + Item_Flag_As_Non_Target(kItemPS12Target17); } return true; } @@ -232,22 +234,22 @@ bool SceneScriptPS12::ClickedOnItem(int itemId, bool a2) { bool SceneScriptPS12::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 8, 12, 1, false)) { + if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 8, 12, true, false)) { Game_Flag_Set(kFlagPS12toPS11); - sub_4028C4(); + removeTargets(); Set_Enter(kSetPS10_PS11_PS12_PS13, kScenePS11); } return true; } if (exitId == 1) { - if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 9, 12, 1, false)) { + if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 9, 12, true, false)) { Player_Loses_Control(); - Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 10, 12, 0, false); + Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 10, 12, false, false); Player_Gains_Control(); Game_Flag_Set(kFlagPS12toPS13); - sub_4028C4(); - Global_Variable_Decrement(9, 20 - Global_Variable_Query(12)); - Global_Variable_Set(12, 20); + removeTargets(); + Global_Variable_Decrement(kVariablePoliceMazeScore, kPoliceMazePS12TargetCount - Global_Variable_Query(kVariablePoliceMazePS12TargetCounter)); + Global_Variable_Set(kVariablePoliceMazePS12TargetCounter, kPoliceMazePS12TargetCount); Set_Enter(kSetPS10_PS11_PS12_PS13, kScenePS13); } return true; @@ -267,7 +269,7 @@ void SceneScriptPS12::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptPS12::PlayerWalkedIn() { if (Game_Flag_Query(kFlagPS11toPS12)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -546.0f, -9.06f, 570.0f, 0, 1, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -546.0f, -9.06f, 570.0f, 0, true, false, 0); Game_Flag_Reset(kFlagPS11toPS12); } Police_Maze_Set_Pause_State(false); @@ -279,24 +281,24 @@ void SceneScriptPS12::PlayerWalkedOut() { void SceneScriptPS12::DialogueQueueFlushed(int a1) { } -void SceneScriptPS12::sub_4028C4() { - Item_Remove_From_World(29); - Item_Remove_From_World(30); - Item_Remove_From_World(31); - Item_Remove_From_World(32); - Item_Remove_From_World(33); - Item_Remove_From_World(34); - Item_Remove_From_World(35); - Item_Remove_From_World(36); - Item_Remove_From_World(37); - Item_Remove_From_World(38); - Item_Remove_From_World(39); - Item_Remove_From_World(40); - Item_Remove_From_World(41); - Item_Remove_From_World(42); - Item_Remove_From_World(43); - Item_Remove_From_World(44); - Item_Remove_From_World(45); +void SceneScriptPS12::removeTargets() { + Item_Remove_From_World(kItemPS12Target1); + Item_Remove_From_World(kItemPS12Target2); + Item_Remove_From_World(kItemPS12Target3); + Item_Remove_From_World(kItemPS12Target4); + Item_Remove_From_World(kItemPS12Target5); + Item_Remove_From_World(kItemPS12Target6); + Item_Remove_From_World(kItemPS12Target7); + Item_Remove_From_World(kItemPS12Target8); + Item_Remove_From_World(kItemPS12Target9); + Item_Remove_From_World(kItemPS12Target10); + Item_Remove_From_World(kItemPS12Target11); + Item_Remove_From_World(kItemPS12Target12); + Item_Remove_From_World(kItemPS12Target13); + Item_Remove_From_World(kItemPS12Target14); + Item_Remove_From_World(kItemPS12Target15); + Item_Remove_From_World(kItemPS12Target16); + Item_Remove_From_World(kItemPS12Target17); } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/scene/ps13.cpp b/engines/bladerunner/script/scene/ps13.cpp index fc6a9c1736..3a1d906480 100644 --- a/engines/bladerunner/script/scene/ps13.cpp +++ b/engines/bladerunner/script/scene/ps13.cpp @@ -24,10 +24,12 @@ namespace BladeRunner { +static int kPoliceMazePS13TargetCount = 20; + void SceneScriptPS13::InitializeScene() { Police_Maze_Set_Pause_State(true); if (Game_Flag_Query(kFlagPS12toPS13)) { - Scene_Loop_Start_Special(0, 0, 0); + Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); Scene_Loop_Set_Default(1); Game_Flag_Reset(kFlagPS12toPS13); Setup_Scene_Information(World_Waypoint_Query_X(10), World_Waypoint_Query_Y(10), World_Waypoint_Query_Z(10), 200); @@ -36,13 +38,13 @@ void SceneScriptPS13::InitializeScene() { Setup_Scene_Information(World_Waypoint_Query_X(11), World_Waypoint_Query_Y(11), World_Waypoint_Query_Z(11), 840); } Scene_Exit_Add_2D_Exit(0, 0, 460, 639, 479, 2); - Scene_Exit_Add_2D_Exit(1, 0, 0, 20, 479, 3); + Scene_Exit_Add_2D_Exit(1, 0, 0, 20, 479, 3); Ambient_Sounds_Remove_All_Non_Looping_Sounds(0); Ambient_Sounds_Add_Looping_Sound(387, 50, 1, 1); - Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1); - Ambient_Sounds_Add_Sound(1, 10, 50, 16, 25, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(389, 5, 50, 16, 25, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(390, 6, 50, 16, 25, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Looping_Sound( 54, 50, 1, 1); + Ambient_Sounds_Add_Sound(1, 10, 50, 16, 25, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(389, 5, 50, 16, 25, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(390, 6, 50, 16, 25, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(443, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(444, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(445, 2, 100, 14, 16, -100, 100, -101, -101, 0, 0); @@ -91,37 +93,37 @@ void SceneScriptPS13::SceneLoaded() { Unclickable_Object("PARKMETR15"); Unclickable_Object("PARKMETR16"); if (!Query_System_Currently_Loading_Game()) { - Item_Add_To_World(46, 443, 14, -372.0f, -9.0f, 1509.0f, 960, 72, 36, true, false, false, true); - Item_Add_To_World(47, 443, 14, 291.61f, -0.66f, 1610.3f, 823, 72, 36, true, false, false, true); - Item_Add_To_World(48, 447, 14, -25.0f, 102.0f, 1625.0f, 823, 72, 36, true, false, false, true); - Item_Add_To_World(49, 449, 14, -45.51f, -8.8f, 1676.0f, 922, 72, 36, true, false, false, true); - Item_Add_To_World(50, 447, 14, 291.61f, -0.66f, 1610.3f, 823, 72, 36, true, false, false, true); - Item_Add_To_World(51, 443, 14, -24.0f, 102.0f, 1625.0f, 823, 72, 36, true, false, false, true); - Item_Add_To_World(52, 449, 14, 180.0f, -72.7f, 1605.0f, 305, 72, 36, true, false, false, true); - Item_Add_To_World(53, 443, 14, 127.79f, 14.56f, 1703.03f, 356, 72, 36, true, false, false, true); - Item_Add_To_World(54, 443, 14, 136.37f, -6.84f, 1425.43f, 512, 72, 36, true, false, false, true); - Item_Add_To_World(55, 441, 14, 77.83f, -79.8f, 1520.5f, 327, 72, 36, true, false, false, true); - Item_Add_To_World(56, 441, 14, 77.83f, -7.8f, 1520.5f, 327, 72, 36, true, false, false, true); - Item_Add_To_World(57, 443, 14, -88.0f, -8.8f, 1520.5f, 327, 72, 36, true, false, false, true); - Item_Add_To_World(58, 447, 14, -45.51f, -8.8f, 1676.0f, 922, 72, 36, true, false, false, true); - Item_Add_To_World(62, 445, 14, -300.0f, -79.75f, 1543.0f, 465, 72, 36, true, false, false, true); - Item_Add_To_World(63, 449, 14, -325.0f, -7.75f, 1543.0f, 465, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target1, 443, kSetPS10_PS11_PS12_PS13, -372.0f, -9.0f, 1509.0f, 960, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target2, 443, kSetPS10_PS11_PS12_PS13, 291.61f, -0.66f, 1610.3f, 823, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target3, 447, kSetPS10_PS11_PS12_PS13, -25.0f, 102.0f, 1625.0f, 823, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target4, 449, kSetPS10_PS11_PS12_PS13, -45.51f, -8.8f, 1676.0f, 922, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target5, 447, kSetPS10_PS11_PS12_PS13, 291.61f, -0.66f, 1610.3f, 823, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target6, 443, kSetPS10_PS11_PS12_PS13, -24.0f, 102.0f, 1625.0f, 823, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target7, 449, kSetPS10_PS11_PS12_PS13, 180.0f, -72.7f, 1605.0f, 305, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target8, 443, kSetPS10_PS11_PS12_PS13, 127.79f, 14.56f, 1703.03f, 356, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target9, 443, kSetPS10_PS11_PS12_PS13, 136.37f, -6.84f, 1425.43f, 512, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target10, 441, kSetPS10_PS11_PS12_PS13, 77.83f, -79.8f, 1520.5f, 327, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target11, 441, kSetPS10_PS11_PS12_PS13, 77.83f, -7.8f, 1520.5f, 327, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target12, 443, kSetPS10_PS11_PS12_PS13, -88.0f, -8.8f, 1520.5f, 327, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target13, 447, kSetPS10_PS11_PS12_PS13, -45.51f, -8.8f, 1676.0f, 922, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target14, 445, kSetPS10_PS11_PS12_PS13, -300.0f, -79.75f, 1543.0f, 465, 72, 36, true, false, false, true); + Item_Add_To_World(kItemPS13Target15, 449, kSetPS10_PS11_PS12_PS13, -325.0f, -7.75f, 1543.0f, 465, 72, 36, true, false, false, true); } - Police_Maze_Target_Track_Add(46, -372.0f, -9.0f, 1509.0f, -345.0f, -9.0f, 1509.0f, 6, track_data_46, true); - Police_Maze_Target_Track_Add(47, 291.61f, -0.66f, 1610.3f, 238.83f, 1.03f, 1557.03f, 10, track_data_47, true); - Police_Maze_Target_Track_Add(48, -25.0f, 102.0f, 1625.0f, -25.0f, 138.0f, 1625.0f, 10, track_data_48, true); - Police_Maze_Target_Track_Add(49, -45.51f, -8.8f, 1676.0f, 15.51f, -8.8f, 1679.0f, 10, track_data_49, false); - Police_Maze_Target_Track_Add(50, 291.61f, -0.66f, 1610.3f, 238.83f, 1.03f, 1557.03f, 10, track_data_50, false); - Police_Maze_Target_Track_Add(51, -24.0f, 102.0f, 1625.0f, -24.0f, 138.0f, 1625.0f, 10, track_data_51, false); - Police_Maze_Target_Track_Add(52, 180.0f, -72.7f, 1605.0f, 180.0f, -0.7f, 1605.0f, 10, track_data_52, false); - Police_Maze_Target_Track_Add(53, 127.79f, 14.56f, 1703.03f, -56.07f, 1.89f, 1589.04f, 6, track_data_53, false); - Police_Maze_Target_Track_Add(54, 136.37f, -6.84f, 1425.43f, 117.55f, -6.84f, 1442.09f, 4, track_data_54, false); - Police_Maze_Target_Track_Add(55, 77.83f, -79.8f, 1520.5f, 77.83f, -7.8f, 1520.5f, 15, track_data_55, false); - Police_Maze_Target_Track_Add(56, 77.83f, -7.8f, 1520.5f, -88.0f, -8.8f, 1520.5f, 15, track_data_56, false); - Police_Maze_Target_Track_Add(57, -88.0f, -8.8f, 1520.5f, -88.0f, -80.8f, 1520.5f, 15, track_data_57, false); - Police_Maze_Target_Track_Add(58, -45.51f, -8.8f, 1676.0f, 15.51f, -8.8f, 1679.0f, 10, track_data_58, true); - Police_Maze_Target_Track_Add(62, -300.0f, -79.75f, 1543.0f, -300.0f, -14.75f, 1543.0f, 15, track_data_62, false); - Police_Maze_Target_Track_Add(63, -325.0f, -7.75f, 1543.0f, -300.0f, -7.75f, 1543.0f, 10, track_data_63, false); + Police_Maze_Target_Track_Add(kItemPS13Target1, -372.0f, -9.0f, 1509.0f, -345.0f, -9.0f, 1509.0f, 6, track_data_46, true); + Police_Maze_Target_Track_Add(kItemPS13Target2, 291.61f, -0.66f, 1610.3f, 238.83f, 1.03f, 1557.03f, 10, track_data_47, true); + Police_Maze_Target_Track_Add(kItemPS13Target3, -25.0f, 102.0f, 1625.0f, -25.0f, 138.0f, 1625.0f, 10, track_data_48, true); + Police_Maze_Target_Track_Add(kItemPS13Target4, -45.51f, -8.8f, 1676.0f, 15.51f, -8.8f, 1679.0f, 10, track_data_49, false); + Police_Maze_Target_Track_Add(kItemPS13Target5, 291.61f, -0.66f, 1610.3f, 238.83f, 1.03f, 1557.03f, 10, track_data_50, false); + Police_Maze_Target_Track_Add(kItemPS13Target6, -24.0f, 102.0f, 1625.0f, -24.0f, 138.0f, 1625.0f, 10, track_data_51, false); + Police_Maze_Target_Track_Add(kItemPS13Target7, 180.0f, -72.7f, 1605.0f, 180.0f, -0.7f, 1605.0f, 10, track_data_52, false); + Police_Maze_Target_Track_Add(kItemPS13Target8, 127.79f, 14.56f, 1703.03f, -56.07f, 1.89f, 1589.04f, 6, track_data_53, false); + Police_Maze_Target_Track_Add(kItemPS13Target9, 136.37f, -6.84f, 1425.43f, 117.55f, -6.84f, 1442.09f, 4, track_data_54, false); + Police_Maze_Target_Track_Add(kItemPS13Target10, 77.83f, -79.8f, 1520.5f, 77.83f, -7.8f, 1520.5f, 15, track_data_55, false); + Police_Maze_Target_Track_Add(kItemPS13Target11, 77.83f, -7.8f, 1520.5f, -88.0f, -8.8f, 1520.5f, 15, track_data_56, false); + Police_Maze_Target_Track_Add(kItemPS13Target12, -88.0f, -8.8f, 1520.5f, -88.0f, -80.8f, 1520.5f, 15, track_data_57, false); + Police_Maze_Target_Track_Add(kItemPS13Target13, -45.51f, -8.8f, 1676.0f, 15.51f, -8.8f, 1679.0f, 10, track_data_58, true); + Police_Maze_Target_Track_Add(kItemPS13Target14, -300.0f, -79.75f, 1543.0f, -300.0f, -14.75f, 1543.0f, 15, track_data_62, false); + Police_Maze_Target_Track_Add(kItemPS13Target15, -325.0f, -7.75f, 1543.0f, -300.0f, -7.75f, 1543.0f, 10, track_data_63, false); } bool SceneScriptPS13::MouseClick(int x, int y) { @@ -139,16 +141,16 @@ bool SceneScriptPS13::ClickedOnActor(int actorId) { bool SceneScriptPS13::ClickedOnItem(int itemId, bool a2) { if (Player_Query_Combat_Mode()) { switch (itemId) { - case 48: + case kItemPS13Target3: Sound_Play(4, 50, 0, 0, 50); break; - case 50: + case kItemPS13Target5: Sound_Play(4, 50, 0, 0, 50); break; - case 55: + case kItemPS13Target10: Sound_Play(555, 50, 0, 0, 50); break; - case 56: + case kItemPS13Target11: Sound_Play(555, 50, 0, 0, 50); break; default: @@ -157,56 +159,56 @@ bool SceneScriptPS13::ClickedOnItem(int itemId, bool a2) { } Item_Spin_In_World(itemId); Item_Flag_As_Non_Target(itemId); - if (itemId == 46) { - Item_Flag_As_Non_Target(46); + if (itemId == kItemPS13Target1) { + Item_Flag_As_Non_Target(kItemPS13Target1); } - if (itemId == 47) { - Item_Flag_As_Non_Target(47); + if (itemId == kItemPS13Target2) { + Item_Flag_As_Non_Target(kItemPS13Target2); } - if (itemId == 48) { - Item_Flag_As_Non_Target(48); + if (itemId == kItemPS13Target3) { + Item_Flag_As_Non_Target(kItemPS13Target3); } - if (itemId == 49) { - Item_Flag_As_Non_Target(49); + if (itemId == kItemPS13Target4) { + Item_Flag_As_Non_Target(kItemPS13Target4); } - if (itemId == 50) { - Item_Flag_As_Non_Target(50); + if (itemId == kItemPS13Target5) { + Item_Flag_As_Non_Target(kItemPS13Target5); } - if (itemId == 51) { - Item_Flag_As_Non_Target(51); + if (itemId == kItemPS13Target6) { + Item_Flag_As_Non_Target(kItemPS13Target6); } - if (itemId == 52) { - Item_Flag_As_Non_Target(52); + if (itemId == kItemPS13Target7) { + Item_Flag_As_Non_Target(kItemPS13Target7); } - if (itemId == 53) { - Item_Flag_As_Non_Target(53); + if (itemId == kItemPS13Target8) { + Item_Flag_As_Non_Target(kItemPS13Target8); } - if (itemId == 54) { - Item_Flag_As_Non_Target(54); + if (itemId == kItemPS13Target9) { + Item_Flag_As_Non_Target(kItemPS13Target9); } - if (itemId == 55) { - Item_Flag_As_Non_Target(55); - Item_Flag_As_Non_Target(56); - Item_Flag_As_Non_Target(57); + if (itemId == kItemPS13Target10) { + Item_Flag_As_Non_Target(kItemPS13Target10); + Item_Flag_As_Non_Target(kItemPS13Target11); + Item_Flag_As_Non_Target(kItemPS13Target12); } - if (itemId == 56) { - Item_Flag_As_Non_Target(55); - Item_Flag_As_Non_Target(56); - Item_Flag_As_Non_Target(57); + if (itemId == kItemPS13Target11) { + Item_Flag_As_Non_Target(kItemPS13Target10); + Item_Flag_As_Non_Target(kItemPS13Target11); + Item_Flag_As_Non_Target(kItemPS13Target12); } - if (itemId == 57) { - Item_Flag_As_Non_Target(55); - Item_Flag_As_Non_Target(56); - Item_Flag_As_Non_Target(57); + if (itemId == kItemPS13Target12) { + Item_Flag_As_Non_Target(kItemPS13Target10); + Item_Flag_As_Non_Target(kItemPS13Target11); + Item_Flag_As_Non_Target(kItemPS13Target12); } - if (itemId == 58) { - Item_Flag_As_Non_Target(58); + if (itemId == kItemPS13Target13) { + Item_Flag_As_Non_Target(kItemPS13Target13); } - if (itemId == 62) { - Item_Flag_As_Non_Target(62); + if (itemId == kItemPS13Target14) { + Item_Flag_As_Non_Target(kItemPS13Target14); } - if (itemId == 63) { - Item_Flag_As_Non_Target(63); + if (itemId == kItemPS13Target15) { + Item_Flag_As_Non_Target(kItemPS13Target15); } return true; } @@ -218,7 +220,7 @@ bool SceneScriptPS13::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 10, 12, true, false)) { Game_Flag_Set(kFlagPS13toPS12); - sub_40267C(); + removeTargets(); Set_Enter(kSetPS10_PS11_PS12_PS13, kScenePS12); } return true; @@ -227,16 +229,16 @@ bool SceneScriptPS13::ClickedOnExit(int exitId) { if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 11, 12, true, false)) { Game_Flag_Set(kFlagPS13toPS05); Player_Set_Combat_Mode(false); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - sub_40267C(); - Global_Variable_Decrement(9, 20 - Global_Variable_Query(13)); - Set_Score(0, Global_Variable_Query(9)); - Global_Variable_Reset(10); - Global_Variable_Reset(11); - Global_Variable_Reset(12); - Global_Variable_Reset(13); - Global_Variable_Reset(9); + removeTargets(); + Global_Variable_Decrement(kVariablePoliceMazeScore, kPoliceMazePS13TargetCount - Global_Variable_Query(kVariablePoliceMazePS13TargetCounter)); + Set_Score(kActorMcCoy, Global_Variable_Query(kVariablePoliceMazeScore)); + Global_Variable_Reset(kVariablePoliceMazePS10TargetCounter); + Global_Variable_Reset(kVariablePoliceMazePS11TargetCounter); + Global_Variable_Reset(kVariablePoliceMazePS12TargetCounter); + Global_Variable_Reset(kVariablePoliceMazePS13TargetCounter); + Global_Variable_Reset(kVariablePoliceMazeScore); Set_Enter(kSetPS05, kScenePS05); } return true; @@ -264,22 +266,22 @@ void SceneScriptPS13::PlayerWalkedOut() { void SceneScriptPS13::DialogueQueueFlushed(int a1) { } -void SceneScriptPS13::sub_40267C() { - Item_Remove_From_World(46); - Item_Remove_From_World(47); - Item_Remove_From_World(48); - Item_Remove_From_World(49); - Item_Remove_From_World(50); - Item_Remove_From_World(51); - Item_Remove_From_World(52); - Item_Remove_From_World(53); - Item_Remove_From_World(54); - Item_Remove_From_World(55); - Item_Remove_From_World(56); - Item_Remove_From_World(57); - Item_Remove_From_World(58); - Item_Remove_From_World(62); - Item_Remove_From_World(63); +void SceneScriptPS13::removeTargets() { + Item_Remove_From_World(kItemPS13Target1); + Item_Remove_From_World(kItemPS13Target2); + Item_Remove_From_World(kItemPS13Target3); + Item_Remove_From_World(kItemPS13Target4); + Item_Remove_From_World(kItemPS13Target5); + Item_Remove_From_World(kItemPS13Target6); + Item_Remove_From_World(kItemPS13Target7); + Item_Remove_From_World(kItemPS13Target8); + Item_Remove_From_World(kItemPS13Target9); + Item_Remove_From_World(kItemPS13Target10); + Item_Remove_From_World(kItemPS13Target11); + Item_Remove_From_World(kItemPS13Target12); + Item_Remove_From_World(kItemPS13Target13); + Item_Remove_From_World(kItemPS13Target14); + Item_Remove_From_World(kItemPS13Target15); } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/scene/rc01.cpp b/engines/bladerunner/script/scene/rc01.cpp index a347d3e38e..03df5b061a 100644 --- a/engines/bladerunner/script/scene/rc01.cpp +++ b/engines/bladerunner/script/scene/rc01.cpp @@ -97,7 +97,9 @@ void SceneScriptRC01::InitializeScene() { if (Game_Flag_Query(kFlagSpinnerAtRC01)) { Scene_Exit_Add_2D_Exit(kRC01ExitSpinner, 482, 226, 639, 280, 2); } - if (Global_Variable_Query(kVariableChapter) > 1 && Game_Flag_Query(710)) { + if (Global_Variable_Query(kVariableChapter) > 1 + && Game_Flag_Query(kFlagAR01Entered) + ) { Scene_Exit_Add_2D_Exit(kRC01ExitRC03, 0, 0, 10, 479, 3); } if (!Game_Flag_Query(kFlagRC01PoliceDone)) { @@ -125,9 +127,9 @@ void SceneScriptRC01::InitializeScene() { } Ambient_Sounds_Add_Looping_Sound(81, 60, 100, 1); // RCAMBR1.AUD - Ambient_Sounds_Add_Sound(82, 5, 30, 30, 50, -100, 100, -101, -101, 0, 0); // RCCARBY1.AUD - Ambient_Sounds_Add_Sound(83, 5, 30, 30, 55, -100, 100, -101, -101, 0, 0); // RCCARBY2.AUD - Ambient_Sounds_Add_Sound(84, 5, 30, 30, 50, -100, 100, -101, -101, 0, 0); // RCCARBY3.AUD + Ambient_Sounds_Add_Sound(82, 5, 30, 30, 50, -100, 100, -101, -101, 0, 0); // RCCARBY1.AUD + Ambient_Sounds_Add_Sound(83, 5, 30, 30, 55, -100, 100, -101, -101, 0, 0); // RCCARBY2.AUD + Ambient_Sounds_Add_Sound(84, 5, 30, 30, 50, -100, 100, -101, -101, 0, 0); // RCCARBY3.AUD Ambient_Sounds_Add_Sound(67, 10, 50, 30, 50, -100, 100, -101, -101, 0, 0); // SPIN2A.AUD Ambient_Sounds_Add_Sound(87, 20, 80, 20, 40, -100, 100, -101, -101, 0, 0); // SIREN2.AUD @@ -263,7 +265,7 @@ bool SceneScriptRC01::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("HYDRANT02", objectName)) { if (!Loop_Actor_Walk_To_Scene_Object(kActorMcCoy, "HYDRANT02", 60, true, false)) { if (Actor_Clue_Query(kActorMcCoy, kCluePaintTransfer)) { - Actor_Says(kActorMcCoy, 6975, 3); + Actor_Says(kActorMcCoy, 6975, kAnimationModeTalk); } else { Actor_Face_Object(kActorMcCoy, "HYDRANT02", true); Actor_Voice_Over(1880, kActorVoiceOver); @@ -347,7 +349,7 @@ bool SceneScriptRC01::ClickedOnActor(int actorId) { Actor_Says(kActorMcCoy, 4515, 13); Game_Flag_Set(KFlagMcCoyAndOfficerLearyTalking); Actor_Says(kActorOfficerLeary, 40, 13); - if (!Game_Flag_Query(kFlagRC02Discovered)) { + if (!Game_Flag_Query(kFlagRC02Entered)) { Actor_Says(kActorOfficerLeary, 50, 14); Actor_Says(kActorOfficerLeary, 60, 15); I_Sez("MG: It's all fun and games until someone loses a tiger cub."); @@ -425,7 +427,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { return true; } if (exitId == kRC01ExitSpinner) { - if (Game_Flag_Query(486)) { + if (Game_Flag_Query(kFlagDNARowAvailable)) { Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationDNARow, true); } I_Sez("MG: Leaving already? The fun is just beginning!"); @@ -433,13 +435,15 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { Player_Loses_Control(); Actor_Set_Immunity_To_Obstacles(kActorMcCoy, true); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.98f, -0.3f, 318.15f, 0, 0, false, 0); - if (Game_Flag_Query(486) && !Game_Flag_Query(660)) { + if ( Game_Flag_Query(kFlagDNARowAvailable) + && !Game_Flag_Query(kFlagDNARowAvailableTalk) + ) { Actor_Voice_Over(4310, kActorVoiceOver); Actor_Voice_Over(4320, kActorVoiceOver); Actor_Voice_Over(4330, kActorVoiceOver); Actor_Voice_Over(4340, kActorVoiceOver); Actor_Voice_Over(4350, kActorVoiceOver); - Game_Flag_Set(660); + Game_Flag_Set(kFlagDNARowAvailableTalk); } Actor_Set_Immunity_To_Obstacles(kActorMcCoy, false); Player_Gains_Control(); @@ -641,7 +645,7 @@ void SceneScriptRC01::PlayerWalkedIn() { Player_Gains_Control(); Game_Flag_Reset(kFlagRC02toRC01); - if (Game_Flag_Query(kFlagRC02Discovered) && !Game_Flag_Query(kFlagRC02FirstLeave)) { + if (Game_Flag_Query(kFlagRC02Entered) && !Game_Flag_Query(kFlagRC02FirstLeave)) { Actor_Voice_Over(1910, kActorVoiceOver); Actor_Voice_Over(1920, kActorVoiceOver); Actor_Voice_Over(1930, kActorVoiceOver); diff --git a/engines/bladerunner/script/scene/rc02.cpp b/engines/bladerunner/script/scene/rc02.cpp index c4bb775dce..a5ad0ab591 100644 --- a/engines/bladerunner/script/scene/rc02.cpp +++ b/engines/bladerunner/script/scene/rc02.cpp @@ -36,24 +36,24 @@ void SceneScriptRC02::InitializeScene() { Setup_Scene_Information(-20.2f, -1238.89f, 108100.73f, 539); } Scene_Exit_Add_2D_Exit(kRC02ExitRC01, 0, 460, 639, 479, 2); - if (Game_Flag_Query(kFlagRC02LucyDeskAvailable)) { + if (Game_Flag_Query(kFlagRC51Available)) { Scene_Exit_Add_2D_Exit(kRC02ExitRC51, 265, 58, 346, 154, 0); } Ambient_Sounds_Remove_All_Non_Looping_Sounds(0); - Ambient_Sounds_Add_Looping_Sound(71, 50, 1, 1); - Ambient_Sounds_Add_Looping_Sound(75, 75, 1, 1); + Ambient_Sounds_Add_Looping_Sound( 71, 50, 1, 1); + Ambient_Sounds_Add_Looping_Sound( 75, 75, 1, 1); Ambient_Sounds_Add_Looping_Sound(105, 30, 100, 1); Ambient_Sounds_Add_Sound(73, 5, 20, 10, 10, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(74, 5, 20, 10, 10, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(76, 5, 40, 6, 6, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(77, 5, 40, 6, 6, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(78, 5, 40, 6, 6, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(79, 5, 40, 6, 6, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(76, 5, 40, 6, 6, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(77, 5, 40, 6, 6, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(78, 5, 40, 6, 6, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(79, 5, 40, 6, 6, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Speech_Sound(23, 250, 10, 60, 5, 5, 100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(23, 330, 10, 60, 5, 5, 100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(24, 380, 10, 60, 5, 5, 100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(24, 510, 10, 60, 5, 5, 100, 100, -101, -101, 1, 1); - Ambient_Sounds_Add_Speech_Sound(38, 80, 10, 60, 5, 5, 100, 100, -101, -101, 1, 1); + Ambient_Sounds_Add_Speech_Sound(38, 80, 10, 60, 5, 5, 100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(38, 160, 10, 60, 5, 5, 100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Sound(87, 20, 80, 10, 20, 100, 100, -101, -101, 0, 0); } @@ -85,9 +85,9 @@ void SceneScriptRC02::SceneLoaded() { Unclickable_Object("SCRTY CA03"); } if (!Game_Flag_Query(kFlagShellCasingsTaken)) { - Item_Add_To_World(kItemShellCasingA, 966, 16, -52.88f, -1238.89f, 108467.74f, 256, 6, 6, false, true, false, true); - Item_Add_To_World(kItemShellCasingB, 966, 16, -37.16f, -1238.89f, 108456.59f, 512, 6, 6, false, true, false, true); - Item_Add_To_World(kItemShellCasingC, 966, 16, -62.86f, -1238.89f, 108437.52f, 625, 6, 6, false, true, false, true); + Item_Add_To_World(kItemShellCasingA, 966, kSetRC02_RC51, -52.88f, -1238.89f, 108467.74f, 256, 6, 6, false, true, false, true); + Item_Add_To_World(kItemShellCasingB, 966, kSetRC02_RC51, -37.16f, -1238.89f, 108456.59f, 512, 6, 6, false, true, false, true); + Item_Add_To_World(kItemShellCasingC, 966, kSetRC02_RC51, -62.86f, -1238.89f, 108437.52f, 625, 6, 6, false, true, false, true); } } @@ -138,7 +138,7 @@ 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); // MOTIVES + 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) @@ -185,7 +185,7 @@ void SceneScriptRC02::dialogueWithRunciter() { Actor_Says(kActorRunciter, 350, 13); Actor_Face_Actor(kActorRunciter, kActorMcCoy, true); Scene_Exit_Add_2D_Exit(kRC02ExitRC51, 265, 58, 346, 154, 0); - Game_Flag_Set(kFlagRC02LucyDeskAvailable); + Game_Flag_Set(kFlagRC51Available); break; case 20: // REFERENCE @@ -214,105 +214,111 @@ void SceneScriptRC02::dialogueWithRunciter() { } bool SceneScriptRC02::ClickedOnActor(int actorId) { - if (actorId != kActorRunciter) { - return false; - } - - if (Global_Variable_Query(kVariableChapter) == 4) { - Actor_Face_Actor(kActorMcCoy, kActorRunciter, true); - if (Actor_Query_Goal_Number(kActorRunciter) == 599) { - if (Random_Query(1, 2) == 1) { - Actor_Says(kActorMcCoy, 8715, 17); - } else { - Actor_Says(kActorMcCoy, 8720, 17); - } - } else if (Game_Flag_Query(705) || Game_Flag_Query(706)) { - Actor_Says(kActorMcCoy, 4805, 11); - Actor_Face_Actor(kActorRunciter, kActorMcCoy, true); - if (Game_Flag_Query(706)) { - Actor_Says(kActorRunciter, 720, 15); - } else { - Actor_Says(kActorRunciter, 730, 14); - } - Actor_Face_Heading(kActorRunciter, 1007, false); - } else { - Actor_Says(kActorMcCoy, 4690, 11); - Actor_Says(kActorMcCoy, 4695, 13); - Actor_Face_Actor(kActorRunciter, kActorMcCoy, true); - Actor_Says(kActorRunciter, 1610, 14); - if (Actor_Clue_Query(kActorMcCoy, kClueEnvelope)) { - Actor_Says(kActorMcCoy, 4700, 12); - Actor_Says(kActorMcCoy, 4705, 13); - Actor_Says(kActorRunciter, 1620, 12); - Actor_Says(kActorMcCoy, 4710, 15); - Actor_Says(kActorMcCoy, 4715, 11); - Delay(2000); - Actor_Says(kActorMcCoy, 4720, 16); - Actor_Says(kActorMcCoy, 4725, 17); - Actor_Says(kActorRunciter, 430, 16); + if (actorId == kActorRunciter) { + if (Global_Variable_Query(kVariableChapter) == 4) { + Actor_Face_Actor(kActorMcCoy, kActorRunciter, true); + if (Actor_Query_Goal_Number(kActorRunciter) == kGoalRunciterDead) { + if (Random_Query(1, 2) == 1) { + Actor_Says(kActorMcCoy, 8715, 17); + } else { + Actor_Says(kActorMcCoy, 8720, 17); + } + } else if (Game_Flag_Query(705) + || Game_Flag_Query(706) + ) { + Actor_Says(kActorMcCoy, 4805, 11); + Actor_Face_Actor(kActorRunciter, kActorMcCoy, true); + if (Game_Flag_Query(706)) { + Actor_Says(kActorRunciter, 720, 15); + } else { + Actor_Says(kActorRunciter, 730, 14); + } Actor_Face_Heading(kActorRunciter, 1007, false); + } else { + Actor_Says(kActorMcCoy, 4690, 11); + Actor_Says(kActorMcCoy, 4695, 13); + Actor_Face_Actor(kActorRunciter, kActorMcCoy, true); + Actor_Says(kActorRunciter, 1610, 14); + if (Actor_Clue_Query(kActorMcCoy, kClueEnvelope)) { + Actor_Says(kActorMcCoy, 4700, 12); + Actor_Says(kActorMcCoy, 4705, 13); + Actor_Says(kActorRunciter, 1620, 12); + Actor_Says(kActorMcCoy, 4710, 15); + Actor_Says(kActorMcCoy, 4715, 11); + Delay(2000); + Actor_Says(kActorMcCoy, 4720, 16); + Actor_Says(kActorMcCoy, 4725, 17); + Actor_Says(kActorRunciter, 430, 16); + Actor_Face_Heading(kActorRunciter, 1007, false); + } + Game_Flag_Set(706); } - Game_Flag_Set(706); + return true; } - return true; - } - AI_Movement_Track_Pause(kActorRunciter); - Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorRunciter, 48, 1, false); - Actor_Face_Actor(kActorMcCoy, kActorRunciter, true); - if (!Game_Flag_Query(kFlagRunciterInterviewA)) { - Actor_Says(kActorMcCoy, 4560, 13); - Actor_Face_Actor(kActorRunciter, kActorMcCoy, true); - Actor_Says(kActorRunciter, 40, 16); - Actor_Says(kActorRunciter, 50, 15); - Actor_Says(kActorMcCoy, 4565, 13); - Actor_Says(kActorRunciter, 60, 14); - Actor_Says(kActorMcCoy, 4570, 18); - Actor_Says(kActorRunciter, 70, 13); - Game_Flag_Set(kFlagRunciterInterviewA); - Actor_Clue_Acquire(kActorMcCoy, kClueRunciterInterviewA, true, kActorRunciter); - AI_Movement_Track_Unpause(kActorRunciter); - return true; - } - if (Game_Flag_Query(kFlagRC02TalkedToRunciter)) { - if (Player_Query_Agenda() == kPlayerAgendaPolite) { - Game_Flag_Reset(kFlagNotUsed0); - dialogueWithRunciter(); + + AI_Movement_Track_Pause(kActorRunciter); + Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorRunciter, 48, true, false); + Actor_Face_Actor(kActorMcCoy, kActorRunciter, true); + if (!Game_Flag_Query(kFlagRunciterInterviewA)) { + Actor_Says(kActorMcCoy, 4560, 13); + Actor_Face_Actor(kActorRunciter, kActorMcCoy, true); + Actor_Says(kActorRunciter, 40, 16); + Actor_Says(kActorRunciter, 50, 15); + Actor_Says(kActorMcCoy, 4565, 13); + Actor_Says(kActorRunciter, 60, 14); + Actor_Says(kActorMcCoy, 4570, 18); + Actor_Says(kActorRunciter, 70, 13); + Game_Flag_Set(kFlagRunciterInterviewA); + Actor_Clue_Acquire(kActorMcCoy, kClueRunciterInterviewA, true, kActorRunciter); AI_Movement_Track_Unpause(kActorRunciter); return true; } - Actor_Says(kActorMcCoy, 4610, 19); - Actor_Face_Actor(kActorRunciter, kActorMcCoy, true); - Actor_Says(kActorRunciter, 150, 15); - Actor_Says(kActorMcCoy, 4615, 13); - Actor_Says(kActorRunciter, 160, 14); - Actor_Says(kActorRunciter, 170, 15); - Actor_Says(kActorRunciter, 180, 13); + if (Game_Flag_Query(kFlagRC02TalkedToRunciter)) { + if (Player_Query_Agenda() == kPlayerAgendaPolite) { + Game_Flag_Reset(kFlagNotUsed0); + dialogueWithRunciter(); + AI_Movement_Track_Unpause(kActorRunciter); + return true; + } - if (Player_Query_Agenda() == kPlayerAgendaSurly) { - Actor_Says(kActorMcCoy, 4620, 19); - Actor_Says(kActorRunciter, 190, 14); - Actor_Says(kActorMcCoy, 4625, 13); - Actor_Says(kActorRunciter, 210, 13); - Actor_Says(kActorMcCoy, 4630, 18); - Actor_Says(kActorRunciter, 220, 14); - Actor_Says(kActorRunciter, 230, 13); - Actor_Says(kActorMcCoy, 4635, 19); - Actor_Says(kActorRunciter, 240, 16); - Actor_Says(kActorMcCoy, 4640, 17); + Actor_Says(kActorMcCoy, 4610, 19); + Actor_Face_Actor(kActorRunciter, kActorMcCoy, true); + Actor_Says(kActorRunciter, 150, 15); + Actor_Says(kActorMcCoy, 4615, 13); + Actor_Says(kActorRunciter, 160, 14); + Actor_Says(kActorRunciter, 170, 15); + Actor_Says(kActorRunciter, 180, 13); + + if (Player_Query_Agenda() == kPlayerAgendaSurly) { + Actor_Says(kActorMcCoy, 4620, 19); + Actor_Says(kActorRunciter, 190, 14); + Actor_Says(kActorMcCoy, 4625, 13); + Actor_Says(kActorRunciter, 210, 13); + Actor_Says(kActorMcCoy, 4630, 18); + Actor_Says(kActorRunciter, 220, 14); + Actor_Says(kActorRunciter, 230, 13); + Actor_Says(kActorMcCoy, 4635, 19); + Actor_Says(kActorRunciter, 240, 16); + Actor_Says(kActorMcCoy, 4640, 17); + } + Game_Flag_Reset(kFlagRC02TalkedToRunciter); + AI_Movement_Track_Unpause(kActorRunciter); + return true; } - Game_Flag_Reset(kFlagRC02TalkedToRunciter); + dialogueWithRunciter(); AI_Movement_Track_Unpause(kActorRunciter); return true; } - dialogueWithRunciter(); - AI_Movement_Track_Unpause(kActorRunciter); - return true; + return false; } 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)) { + if (itemId == kItemShellCasingA + || itemId == kItemShellCasingB + || itemId == kItemShellCasingC + ) { + if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemShellCasingA, 24, true, false)) { Actor_Face_Item(kActorMcCoy, kItemShellCasingA, true); Actor_Clue_Acquire(kActorMcCoy, kClueShellCasings, true, -1); Game_Flag_Set(kFlagShellCasingsTaken); @@ -331,11 +337,11 @@ bool SceneScriptRC02::ClickedOnExit(int exitId) { if (exitId == kRC02ExitRC01) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -71.51f, -1238.89f, 108587.15f, 0, true, false, 0)) { Game_Flag_Set(kFlagRC02toRC01); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_Looping_Sound(71, true); Ambient_Sounds_Remove_Looping_Sound(75, true); Ambient_Sounds_Adjust_Looping_Sound(85, 100, -101, 1); - Actor_Set_Goal_Number(kActorRunciter, 0); + Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterDefault); Set_Enter(kSetRC01, kSceneRC01); } return true; @@ -367,18 +373,22 @@ void SceneScriptRC02::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -72.2f, -1238.89f, 108496.73f, 0, false, false, 0); Player_Gains_Control(); Game_Flag_Reset(kFlagRC01toRC02); - if (!Game_Flag_Query(kFlagRC02Discovered)) { + if (!Game_Flag_Query(kFlagRC02Entered)) { Actor_Voice_Over(1970, kActorVoiceOver); Actor_Voice_Over(1980, kActorVoiceOver); Actor_Voice_Over(1990, kActorVoiceOver); Actor_Clue_Acquire(kActorMcCoy, kClueLimpingFootprints, true, -1); Actor_Clue_Acquire(kActorMcCoy, kClueGracefulFootprints, true, -1); - Game_Flag_Set(kFlagRC02Discovered); + Game_Flag_Set(kFlagRC02Entered); } - if (Actor_Query_Which_Set_In(kActorRunciter) == kSetRC02_RC51 && Actor_Query_Goal_Number(kActorRunciter) < 300) { - Actor_Set_Goal_Number(kActorRunciter, 1); + if (Actor_Query_Which_Set_In(kActorRunciter) == kSetRC02_RC51 + && Actor_Query_Goal_Number(kActorRunciter) < kGoalRunciterAtShop + ) { + Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterWalkAround); } - if (Actor_Query_Goal_Number(kActorRunciter) == 300 && !Game_Flag_Query(704)) { + if ( Actor_Query_Goal_Number(kActorRunciter) == kGoalRunciterAtShop + && !Game_Flag_Query(704) + ) { Actor_Face_Actor(kActorRunciter, kActorMcCoy, true); Actor_Says(kActorRunciter, 370, 12); Actor_Says(kActorRunciter, 380, 14); @@ -393,7 +403,7 @@ void SceneScriptRC02::PlayerWalkedIn() { } } else { Player_Loses_Control(); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -20.2f, -1238.89f, 108152.73f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -20.2f, -1238.89f, 108152.73f, 0, false, false, 0); Player_Gains_Control(); } } diff --git a/engines/bladerunner/script/scene/rc03.cpp b/engines/bladerunner/script/scene/rc03.cpp index 969d8daf12..8668be8045 100644 --- a/engines/bladerunner/script/scene/rc03.cpp +++ b/engines/bladerunner/script/scene/rc03.cpp @@ -42,42 +42,45 @@ void SceneScriptRC03::InitializeScene() { } else { Setup_Scene_Information(0.0f, 0.0f, 0.0f, 0); } + Scene_Exit_Add_2D_Exit(0, 610, 0, 639, 479, 1); - Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3); + Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3); if (Game_Flag_Query(kFlagRC03UnlockedToUG01)) { Scene_Exit_Add_2D_Exit(2, 524, 350, 573, 359, 2); } - Scene_Exit_Add_2D_Exit(3, 85, 255, 112, 315, 0); + Scene_Exit_Add_2D_Exit(3, 85, 255, 112, 315, 0); Scene_Exit_Add_2D_Exit(4, 428, 260, 453, 324, 0); + Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1); Ambient_Sounds_Add_Sound(82, 5, 30, 40, 70, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(83, 5, 30, 40, 75, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(84, 5, 30, 40, 70, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); + Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); - Ambient_Sounds_Add_Sound(68, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(69, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(375, 60, 180, 50, 100, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(376, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(377, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(181, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(182, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(183, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(184, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(185, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(186, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(188, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(189, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(190, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(191, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(192, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - 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); + Ambient_Sounds_Add_Sound(68, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(69, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(375, 60, 180, 50, 100, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(376, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(377, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(181, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(182, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(183, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(184, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(185, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(186, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(188, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(189, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(190, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(191, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(192, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + 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 + && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoWaitingAtRC03 ) { Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); } @@ -238,9 +241,9 @@ void SceneScriptRC03::sub_402834() { } void SceneScriptRC03::PlayerWalkedIn() { - if (Actor_Query_Goal_Number(kActorIzo) == 102) { + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoWaitingAtRC03) { Scene_Exits_Disable(); - if (Game_Flag_Query(kFlagUG01toRC03) ) { + if (Game_Flag_Query(kFlagUG01toRC03)) { Player_Set_Combat_Mode(false); Player_Loses_Control(); Actor_Set_At_XYZ(kActorMcCoy, 147.51f, -4.0f, 166.48f, 500); @@ -253,23 +256,24 @@ void SceneScriptRC03::PlayerWalkedIn() { Actor_Says_With_Pause(kActorIzo, 640, 0, -1); Actor_Says_With_Pause(kActorIzo, 650, 0, -1); if (Game_Flag_Query(kFlagIzoIsReplicant) ) { - Actor_Set_Goal_Number(kActorSteele, 100); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleApprehendIzo); } Actor_Change_Animation_Mode(kActorMcCoy, 20); 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); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleApprehendIzo); } Player_Gains_Control(); } else { Actor_Put_In_Set(kActorIzo, kSetRC03); Actor_Set_At_XYZ(kActorIzo, -226.0f, 1.72f, 86.0f, 0); Actor_Set_Targetable(kActorIzo, true); - Actor_Set_Goal_Number(kActorIzo, 110); + Actor_Set_Goal_Number(kActorIzo, kGoalIzoRC03Walk); } } - if (Actor_Query_Goal_Number(kActorIzo) == 103) { + + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoEscape) { Player_Loses_Control(); Actor_Set_Goal_Number(kActorSteele, 200); Actor_Put_In_Set(kActorSteele, kSetRC03); @@ -289,6 +293,7 @@ void SceneScriptRC03::PlayerWalkedIn() { Game_Flag_Reset(kFlagAR02toRC03); Game_Flag_Reset(kFlagHC04toRC03); Game_Flag_Reset(kFlagRC04toRC03); + if (Global_Variable_Query(kVariableChapter) == 1 || Global_Variable_Query(kVariableChapter) == 2 ) { @@ -297,8 +302,8 @@ void SceneScriptRC03::PlayerWalkedIn() { } void SceneScriptRC03::PlayerWalkedOut() { - if (Actor_Query_Goal_Number(kActorIzo) == 199) { - Actor_Set_Goal_Number(kActorIzo, 198); + if (Actor_Query_Goal_Number(kActorIzo) == kGoalIzoDie) { + Actor_Set_Goal_Number(kActorIzo, kGoalIzoDieHidden); } Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); diff --git a/engines/bladerunner/script/scene/tb02.cpp b/engines/bladerunner/script/scene/tb02.cpp index 2bb548c51d..ac6f613d59 100644 --- a/engines/bladerunner/script/scene/tb02.cpp +++ b/engines/bladerunner/script/scene/tb02.cpp @@ -164,7 +164,7 @@ bool SceneScriptTB02::ClickedOnItem(int itemId, bool a2) { bool SceneScriptTB02::ClickedOnExit(int exitId) { if (exitId == 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(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagTB02toTB03); Game_Flag_Reset(kFlagTB02ElevatorToTB05); @@ -175,7 +175,7 @@ bool SceneScriptTB02::ClickedOnExit(int exitId) { } 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(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (Global_Variable_Query(kVariableChapter) < 4) { Game_Flag_Set(kFlagTB05Entered); @@ -375,7 +375,7 @@ void SceneScriptTB02::PlayerWalkedIn() { } void SceneScriptTB02::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/tb03.cpp b/engines/bladerunner/script/scene/tb03.cpp index babef94e1e..8a46c8c3c4 100644 --- a/engines/bladerunner/script/scene/tb03.cpp +++ b/engines/bladerunner/script/scene/tb03.cpp @@ -105,7 +105,7 @@ 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); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(447); Set_Enter(kSetUG17, kSceneUG17); @@ -114,7 +114,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)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagTB03toTB02); Set_Enter(kSetTB02_TB03, kSceneTB02); diff --git a/engines/bladerunner/script/scene/tb05.cpp b/engines/bladerunner/script/scene/tb05.cpp index 3b272991c1..ab16bdc317 100644 --- a/engines/bladerunner/script/scene/tb05.cpp +++ b/engines/bladerunner/script/scene/tb05.cpp @@ -33,18 +33,18 @@ void SceneScriptTB05::InitializeScene() { Setup_Scene_Information(14.0f, 151.53f, -77.0f, 6); } Scene_Exit_Add_2D_Exit(0, 62, 193, 206, 419, 0); - Scene_Exit_Add_2D_Exit(1, 0, 455, 639, 479, 2); + Scene_Exit_Add_2D_Exit(1, 0, 455, 639, 479, 2); Ambient_Sounds_Add_Looping_Sound(236, 100, 0, 1); Ambient_Sounds_Add_Looping_Sound(237, 100, 0, 1); Ambient_Sounds_Add_Sound(217, 5, 30, 25, 33, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(218, 5, 30, 25, 33, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(219, 5, 30, 25, 33, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(220, 5, 30, 25, 33, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(146, 2, 30, 20, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(147, 2, 30, 20, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(148, 2, 30, 20, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(149, 2, 30, 20, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(151, 2, 30, 20, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(146, 2, 30, 20, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(147, 2, 30, 20, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(148, 2, 30, 20, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(149, 2, 30, 20, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(151, 2, 30, 20, 25, 0, 0, -101, -101, 0, 0); Scene_Loop_Set_Default(0); } @@ -52,7 +52,7 @@ void SceneScriptTB05::SceneLoaded() { Clickable_Object("MONITOR05"); Unclickable_Object("SMUDGE_GLASS01"); if (!Actor_Clue_Query(kActorMcCoy, kClueDragonflyEarring)) { - Item_Add_To_World(kItemDragonflyEarring, 940, 72, 76.16f, 147.36f, -235.15f, 0, 6, 6, false, true, false, true); + Item_Add_To_World(kItemDragonflyEarring, 940, kSetTB05, 76.16f, 147.36f, -235.15f, 0, 6, 6, false, true, false, true); } if (!Actor_Clue_Query(kActorMcCoy, kClueTyrellSalesPamphlet1) && !Actor_Clue_Query(kActorMcCoy, kClueTyrellSalesPamphlet2) @@ -60,7 +60,7 @@ void SceneScriptTB05::SceneLoaded() { || Game_Flag_Query(kFlagLucyIsReplicant) ) ) { - Item_Add_To_World(kItemTyrellSalesPamphlet, 972, 72, 129.01f, 147.12f, -162.98f, 0, 8, 8, false, true, false, true); + Item_Add_To_World(kItemTyrellSalesPamphlet, 972, kSetTB05, 129.01f, 147.12f, -162.98f, 0, 8, 8, false, true, false, true); } } @@ -212,7 +212,7 @@ void SceneScriptTB05::PlayerWalkedIn() { } void SceneScriptTB05::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/tb06.cpp b/engines/bladerunner/script/scene/tb06.cpp index 1c71196af4..aa20c591dd 100644 --- a/engines/bladerunner/script/scene/tb06.cpp +++ b/engines/bladerunner/script/scene/tb06.cpp @@ -50,17 +50,17 @@ void SceneScriptTB06::SceneLoaded() { 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); + Item_Add_To_World(kItemDogCollar, 942, kSetTB06, 36.54f, 149.48f, -565.67f, 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); + Item_Add_To_World(kItemKitchenBox, 955, kSetTB06, 18.0f, 149.65f, -599.0f, 0, 6, 6, false, true, false, true); } if (Actor_Query_Goal_Number(kActorPhotographer) != 199) { - 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); + Item_Add_To_World(kItemDeadDogA, 978, kSetTB06, -46.82f, 149.6f, -666.88f, 0, 12, 12, false, true, false, true); + Item_Add_To_World(kItemDeadDogB, 979, kSetTB06, -30.27f, 149.6f, -610.7f, 0, 15, 45, false, true, false, true); + Item_Add_To_World(kItemDeadDogC, 980, kSetTB06, 9.87f, 149.6f, -683.5f, 0, 12, 12, false, true, false, true); } } diff --git a/engines/bladerunner/script/scene/tb07.cpp b/engines/bladerunner/script/scene/tb07.cpp index ee8e8fc2bb..145aa45c77 100644 --- a/engines/bladerunner/script/scene/tb07.cpp +++ b/engines/bladerunner/script/scene/tb07.cpp @@ -79,7 +79,7 @@ bool SceneScriptTB07::ClickedOnItem(int itemId, bool a2) { bool SceneScriptTB07::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 68.0f, 12.0f, 288.0f, 0, true, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (Global_Variable_Query(kVariableChapter) == 4) { Game_Flag_Set(kFlagTB07toTB02); diff --git a/engines/bladerunner/script/scene/ug01.cpp b/engines/bladerunner/script/scene/ug01.cpp index 71227df96e..98e79a5c2e 100644 --- a/engines/bladerunner/script/scene/ug01.cpp +++ b/engines/bladerunner/script/scene/ug01.cpp @@ -34,30 +34,32 @@ void SceneScriptUG01::InitializeScene() { Setup_Scene_Information(-126.0f, -50.13f, -286.0f, 0); } Scene_Exit_Add_2D_Exit(0, 280, 204, 330, 265, 0); - Scene_Exit_Add_2D_Exit(1, 144, 0, 210, 104, 0); - Scene_Exit_Add_2D_Exit(2, 0, 173, 139, 402, 3); + Scene_Exit_Add_2D_Exit(1, 144, 0, 210, 104, 0); + Scene_Exit_Add_2D_Exit(2, 0, 173, 139, 402, 3); + Ambient_Sounds_Add_Looping_Sound(331, 28, 0, 1); Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1); Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1); - Ambient_Sounds_Add_Sound(291, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(293, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(402, 2, 120, 10, 11, 20, 100, 0, 100, 0, 0); - Ambient_Sounds_Add_Sound(370, 2, 120, 10, 11, 20, 100, 0, 100, 0, 0); - Ambient_Sounds_Add_Sound(397, 2, 120, 10, 11, 20, 100, 0, 100, 0, 0); - Ambient_Sounds_Add_Sound(396, 2, 120, 10, 11, 20, 100, 0, 100, 0, 0); - Ambient_Sounds_Add_Sound(294, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(295, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(234, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); - Ambient_Sounds_Add_Sound(391, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); - Ambient_Sounds_Add_Sound(394, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); - Ambient_Sounds_Add_Sound(224, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); - Ambient_Sounds_Add_Sound(227, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); - Ambient_Sounds_Add_Sound(228, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); - Ambient_Sounds_Add_Sound(229, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); - Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, 0, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, 0, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, 0, 100, -101, -101, 0, 0); - if (Game_Flag_Query(324)) { + Ambient_Sounds_Add_Sound(291, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(293, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(402, 2, 120, 10, 11, 20, 100, 0, 100, 0, 0); + Ambient_Sounds_Add_Sound(370, 2, 120, 10, 11, 20, 100, 0, 100, 0, 0); + Ambient_Sounds_Add_Sound(397, 2, 120, 10, 11, 20, 100, 0, 100, 0, 0); + Ambient_Sounds_Add_Sound(396, 2, 120, 10, 11, 20, 100, 0, 100, 0, 0); + Ambient_Sounds_Add_Sound(294, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(295, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(234, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); + Ambient_Sounds_Add_Sound(391, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); + Ambient_Sounds_Add_Sound(394, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); + Ambient_Sounds_Add_Sound(224, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); + Ambient_Sounds_Add_Sound(227, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); + Ambient_Sounds_Add_Sound(228, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); + Ambient_Sounds_Add_Sound(229, 2, 190, 12, 16, 0, 100, 0, 100, 0, 0); + Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, 0, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, 0, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, 0, 100, -101, -101, 0, 0); + + if (Game_Flag_Query(kFlagUG01SteamOff)) { Scene_Loop_Set_Default(3); } else { Scene_Loop_Set_Default(0); @@ -77,11 +79,13 @@ bool SceneScriptUG01::MouseClick(int x, int y) { bool SceneScriptUG01::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("PIPES_FG_LFT", objectName)) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -9.0f, -50.13f, -148.0f, 0, 1, false, 0) && !Game_Flag_Query(324)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -9.0f, -50.13f, -148.0f, 0, 1, false, 0) + && !Game_Flag_Query(kFlagUG01SteamOff) + ) { Actor_Says(kActorMcCoy, 8525, 13); Scene_Loop_Set_Default(3); Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true); - Game_Flag_Set(324); + Game_Flag_Set(kFlagUG01SteamOff); } else { Actor_Says(kActorMcCoy, 8525, 13); } @@ -105,6 +109,7 @@ bool SceneScriptUG01::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -70.0f, -50.13f, -500.0f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 768, false); @@ -116,6 +121,7 @@ bool SceneScriptUG01::ClickedOnExit(int exitId) { } return true; } + if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -126.0f, -50.13f, -286.0f, 0, true, false, 0)) { Game_Flag_Set(kFlagUG01toUG02); @@ -132,11 +138,11 @@ bool SceneScriptUG01::ClickedOn2DRegion(int region) { void SceneScriptUG01::SceneFrameAdvanced(int frame) { if (frame >= 61 && frame <= 120) { - float v1 = (120 - frame) / 29500.0f; - Set_Fog_Density("BoxFog01", v1); - Set_Fog_Density("BoxFog02", v1); - Set_Fog_Density("BoxFog03", v1); - Set_Fog_Density("BoxFog04", v1); + float density = (120 - frame) / 29500.0f; // why is this so big? + Set_Fog_Density("BoxFog01", density); + Set_Fog_Density("BoxFog02", density); + Set_Fog_Density("BoxFog03", density); + Set_Fog_Density("BoxFog04", density); } else if (frame > 120) { Set_Fog_Density("BoxFog01", 0.0f); Set_Fog_Density("BoxFog02", 0.0f); @@ -154,12 +160,14 @@ void SceneScriptUG01::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -55.0f, -50.13f, -288.0f, 12, 0, false, 0); Game_Flag_Reset(kFlagUG02toUG01); } + if (Game_Flag_Query(kFlagRC03toUG01)) { Actor_Set_At_XYZ(kActorMcCoy, -70.0f, 93.87f, -500.0f, 768); Loop_Actor_Travel_Ladder(kActorMcCoy, 12, 0, 0); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -58.0f, -50.13f, -488.0f, 0, 0, false, 0); Game_Flag_Reset(kFlagRC03toUG01); } + if (Actor_Query_Goal_Number(kActorLucy) == 310) { Music_Play(21, 35, 0, 3, -1, 0, 0); Actor_Set_Goal_Number(kActorLucy, 311); @@ -168,7 +176,7 @@ void SceneScriptUG01::PlayerWalkedIn() { } void SceneScriptUG01::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/ug02.cpp b/engines/bladerunner/script/scene/ug02.cpp index b196e7c997..ccea89a41e 100644 --- a/engines/bladerunner/script/scene/ug02.cpp +++ b/engines/bladerunner/script/scene/ug02.cpp @@ -31,7 +31,7 @@ void SceneScriptUG02::InitializeScene() { Setup_Scene_Information(-95.0f, 74.78f, -503.0f, 556); } Scene_Exit_Add_2D_Exit(0, 529, 130, 607, 277, 0); - Scene_Exit_Add_2D_Exit(1, 305, 36, 335, 192, 0); + Scene_Exit_Add_2D_Exit(1, 305, 36, 335, 192, 0); Ambient_Sounds_Add_Looping_Sound(332, 43, 0, 1); Ambient_Sounds_Add_Looping_Sound(333, 43, 0, 1); Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, 100, 100, -101, -101, 0, 0); @@ -44,13 +44,13 @@ void SceneScriptUG02::InitializeScene() { Ambient_Sounds_Add_Sound(134, 2, 50, 17, 37, -50, -20, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(135, 2, 50, 17, 37, -50, -20, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(136, 2, 50, 17, 37, -50, -20, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(47, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(48, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(49, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(50, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(51, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(52, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(53, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 47, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 48, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 49, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 50, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 51, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 52, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 53, 2, 50, 27, 27, 10, 30, -101, -101, 0, 0); } void SceneScriptUG02::SceneLoaded() { @@ -67,62 +67,80 @@ void SceneScriptUG02::SceneLoaded() { Clickable_Object("CRATE_3"); Footstep_Sounds_Set(0, 0); Footstep_Sounds_Set(8, 2); - if (!Game_Flag_Query(656) && Game_Flag_Query(kFlagIzoIsReplicant)) { - Item_Add_To_World(88, 963, 75, -300.37f, 120.16f, -81.31f, 0, 8, 8, false, true, false, true); + + if (!Game_Flag_Query(kFlagRagiationGooglesTaken) + && Game_Flag_Query(kFlagIzoIsReplicant) + ) { + Item_Add_To_World(kItemRadiationGoogles, 963, kSetUG02, -300.37f, 120.16f, -81.31f, 0, 8, 8, false, true, false, true); } } bool SceneScriptUG02::MouseClick(int x, int y) { - if (Game_Flag_Query(499)) { + if (Game_Flag_Query(kFlagUG02Interactive)) { return false; } - if (Region_Check(0, 0, 245, 285) || Region_Check(0, 0, 350, 257)) { + + if (Region_Check(0, 0, 245, 285) + || Region_Check(0, 0, 350, 257) + ) { return true; } - if (Region_Check(81, 224, 639, 479) && !Game_Flag_Query(498)) { - Game_Flag_Set(499); - sub_402354(); - Game_Flag_Reset(499); + + if ( Region_Check(81, 224, 639, 479) + && !Game_Flag_Query(kFlagUG02FromUG01) + ) { + Game_Flag_Set(kFlagUG02Interactive); + walkToCenter(); + Game_Flag_Reset(kFlagUG02Interactive); return true; } + return false; } bool SceneScriptUG02::ClickedOn3DObject(const char *objectName, bool a2) { - if (Object_Query_Click("GUN_1", objectName) || Object_Query_Click("GUN_2", objectName) || Object_Query_Click("CRATE_3", objectName)) { + if (Object_Query_Click("GUN_1", objectName) + || Object_Query_Click("GUN_2", objectName) + || Object_Query_Click("CRATE_3", objectName) + ) { Actor_Face_Object(kActorMcCoy, "GUN_1", true); - if (!Game_Flag_Query(449) && Global_Variable_Query(kVariableChapter) < 4) { + if (!Game_Flag_Query(kFlagUG02WeaponsChecked) + && Global_Variable_Query(kVariableChapter) < 4 + ) { Actor_Voice_Over(2430, kActorVoiceOver); Actor_Voice_Over(2440, kActorVoiceOver); Actor_Voice_Over(2450, kActorVoiceOver); Actor_Voice_Over(2460, kActorVoiceOver); - Game_Flag_Set(449); + Game_Flag_Set(kFlagUG02WeaponsChecked); Actor_Clue_Acquire(kActorMcCoy, kClueWeaponsCache, true, -1); return true; } - if (Global_Variable_Query(kVariableChapter) <= 3) { - Actor_Says(kActorMcCoy, 8580, 14); - return false; - } - if (Actor_Clue_Query(kActorMcCoy, kClueWeaponsCache) && !Actor_Clue_Query(kActorMcCoy, kClueIzosStashRaided)) { - Actor_Voice_Over(2470, kActorVoiceOver); - Actor_Voice_Over(2480, kActorVoiceOver); - Actor_Voice_Over(2490, kActorVoiceOver); - Actor_Voice_Over(2500, kActorVoiceOver); - Actor_Clue_Acquire(kActorMcCoy, kClueIzosStashRaided, true, -1); - } else if (!Actor_Clue_Query(kActorMcCoy, kClueWeaponsCache)) { - Actor_Voice_Over(2510, kActorVoiceOver); - Actor_Voice_Over(2520, kActorVoiceOver); - Actor_Voice_Over(2530, kActorVoiceOver); - } else if (Game_Flag_Query(708)) { - Actor_Says(kActorMcCoy, 8580, 14); - } else { - Item_Pickup_Spin_Effect(996, 360, 440); - Actor_Says(kActorMcCoy, 8525, 14); - Give_McCoy_Ammo(2, 18); - Game_Flag_Set(708); + + if (Global_Variable_Query(kVariableChapter) > 3) { + if ( Actor_Clue_Query(kActorMcCoy, kClueWeaponsCache) + && !Actor_Clue_Query(kActorMcCoy, kClueIzosStashRaided) + ) { + Actor_Voice_Over(2470, kActorVoiceOver); + Actor_Voice_Over(2480, kActorVoiceOver); + Actor_Voice_Over(2490, kActorVoiceOver); + Actor_Voice_Over(2500, kActorVoiceOver); + Actor_Clue_Acquire(kActorMcCoy, kClueIzosStashRaided, true, -1); + } else if (!Actor_Clue_Query(kActorMcCoy, kClueWeaponsCache)) { + Actor_Voice_Over(2510, kActorVoiceOver); + Actor_Voice_Over(2520, kActorVoiceOver); + Actor_Voice_Over(2530, kActorVoiceOver); + } else if (!Game_Flag_Query(kFlagUG02AmmoTaken)) { + Item_Pickup_Spin_Effect(996, 360, 440); + Actor_Says(kActorMcCoy, 8525, 14); + Give_McCoy_Ammo(2, 18); + Game_Flag_Set(kFlagUG02AmmoTaken); + } else { + Actor_Says(kActorMcCoy, 8580, 14); + } + return true; } - return true; + + Actor_Says(kActorMcCoy, 8580, 14); } return false; } @@ -132,11 +150,11 @@ bool SceneScriptUG02::ClickedOnActor(int actorId) { } bool SceneScriptUG02::ClickedOnItem(int itemId, bool a2) { - if (itemId == 88) { - Actor_Face_Item(kActorMcCoy, 88, true); + if (itemId == kItemRadiationGoogles) { + Actor_Face_Item(kActorMcCoy, kItemRadiationGoogles, true); Actor_Clue_Acquire(kActorMcCoy, kClueRadiationGoggles, true, -1); - Game_Flag_Set(656); - Item_Remove_From_World(88); + Game_Flag_Set(kFlagRagiationGooglesTaken); + Item_Remove_From_World(kItemRadiationGoogles); Item_Pickup_Spin_Effect(963, 426, 316); return true; } @@ -145,41 +163,41 @@ bool SceneScriptUG02::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG02::ClickedOnExit(int exitId) { if (exitId == 0) { - if (Game_Flag_Query(498) || !sub_402354()) { - int v2 = Player_Query_Combat_Mode(); - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -202.0f, 120.16f, -74.0f, 0, 1, v2, 0)) { + if ( Game_Flag_Query(kFlagUG02FromUG01) + || !walkToCenter() + ) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -202.0f, 120.16f, -74.0f, 0, 1, Player_Query_Combat_Mode(), 0)) { Actor_Face_Heading(kActorMcCoy, 270, false); Footstep_Sound_Override_On(2); - Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 0, kAnimationModeIdle); + Loop_Actor_Travel_Stairs(kActorMcCoy, 4, false, 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); - int v4 = Player_Query_Combat_Mode(); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -95.0f, 74.87f, -503.0f, 0, 0, v4, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -96.57f, 74.87f, -271.28f, 0, false, Player_Query_Combat_Mode(), 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -95.0f, 74.87f, -503.0f, 0, false, Player_Query_Combat_Mode(), 0); Game_Flag_Set(kFlagUG02toUG01); Set_Enter(kSetUG01, kSceneUG01); } } return true; } + if (exitId == 1) { - if (Game_Flag_Query(498)) { - if (sub_402354()) { + if (Game_Flag_Query(kFlagUG02FromUG01)) { + if (walkToCenter()) { return true; } - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -368.75f, 155.75f, -63.0f, 0, 0, false, 0); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -340.75f, 155.75f, -119.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -368.75f, 155.75f, -63.0f, 0, false, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -340.75f, 155.75f, -119.0f, 0, false, false, 0); } - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -304.75f, 155.75f, -171.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -304.75f, 155.75f, -171.0f, 0, false, false, 0); Actor_Face_Heading(kActorMcCoy, 14, false); - Loop_Actor_Travel_Ladder(kActorMcCoy, 9, 1, 0); + Loop_Actor_Travel_Ladder(kActorMcCoy, 9, true, 0); Game_Flag_Set(kFlagUG02toHC03); Game_Flag_Reset(kFlagMcCoyAtUGxx); Game_Flag_Set(kFlagMcCoyAtHCxx); - if (!Game_Flag_Query(403)) { - Game_Flag_Set(388); - Game_Flag_Set(403); - Item_Remove_From_World(121); + if (!Game_Flag_Query(kFlagHC03CageOpen)) { + Game_Flag_Set(kFlagHC03TrapDoorOpen); + Game_Flag_Set(kFlagHC03CageOpen); + Item_Remove_From_World(kItemHC03Lock); } Set_Enter(kSetHC01_HC02_HC03_HC04, kSceneHC03); return true; @@ -201,55 +219,57 @@ void SceneScriptUG02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptUG02::PlayerWalkedIn() { if (Game_Flag_Query(kFlagUG01toUG02)) { Actor_Set_At_XYZ(kActorMcCoy, -106.01f, 84.13f, -228.62f, 575); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -148.0f, 84.13f, -67.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -148.0f, 84.13f, -67.0f, 0, false, false, 0); Actor_Face_Heading(kActorMcCoy, 761, false); Footstep_Sound_Override_On(2); Loop_Actor_Travel_Stairs(kActorMcCoy, 4, true, kAnimationModeIdle); Footstep_Sound_Override_Off(); Game_Flag_Reset(kFlagUG01toUG02); - Game_Flag_Set(498); + Game_Flag_Set(kFlagUG02FromUG01); } else if (Game_Flag_Query(kFlagHC03toUG02)) { Actor_Set_At_XYZ(kActorMcCoy, -304.75f, 265.0f, -171.0f, 0); Loop_Actor_Travel_Ladder(kActorMcCoy, 9, false, 0); Game_Flag_Reset(kFlagHC03toUG02); - Game_Flag_Reset(498); + Game_Flag_Reset(kFlagUG02FromUG01); } else { Actor_Set_At_XYZ(kActorMcCoy, -269.24f, 120.16f, -9.94f, 477); - Game_Flag_Set(498); + Game_Flag_Set(kFlagUG02FromUG01); } - Game_Flag_Reset(499); + Game_Flag_Reset(kFlagUG02Interactive); //return false; } void SceneScriptUG02::PlayerWalkedOut() { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); } void SceneScriptUG02::DialogueQueueFlushed(int a1) { } -bool SceneScriptUG02::sub_402354() { - if (!Game_Flag_Query(498)) { - int v0 = Player_Query_Combat_Mode(); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -340.75f, 155.75f, -119.0f, 0, 0, v0, 0); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -368.75f, 155.75f, -63.0f, 0, 0, v0, 0); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -365.0f, 155.65f, -19.0f, 0, 0, v0, 0); +bool SceneScriptUG02::walkToCenter() { + if (!Game_Flag_Query(kFlagUG02FromUG01)) { + int combatMode = Player_Query_Combat_Mode(); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -340.75f, 155.75f, -119.0f, 0, 0, combatMode, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -368.75f, 155.75f, -63.0f, 0, 0, combatMode, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -365.0f, 155.65f, -19.0f, 0, 0, combatMode, 0); Actor_Face_Heading(kActorMcCoy, 318, false); Footstep_Sound_Override_On(2); - Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 0, kAnimationModeIdle); + Loop_Actor_Travel_Stairs(kActorMcCoy, 4, false, kAnimationModeIdle); Footstep_Sound_Override_Off(); - Game_Flag_Set(498); + Game_Flag_Set(kFlagUG02FromUG01); return false; } - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -312.75f, 120.16f, 1.01f, 0, 1, false, 0)) { + + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -312.75f, 120.16f, 1.01f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 830, false); Footstep_Sound_Override_On(2); - Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 1, kAnimationModeIdle); + Loop_Actor_Travel_Stairs(kActorMcCoy, 4, true, kAnimationModeIdle); Footstep_Sound_Override_Off(); - Game_Flag_Reset(498); + Game_Flag_Reset(kFlagUG02FromUG01); return false; } + return true; } diff --git a/engines/bladerunner/script/scene/ug03.cpp b/engines/bladerunner/script/scene/ug03.cpp index 81e9b967e8..c9c88e7fbf 100644 --- a/engines/bladerunner/script/scene/ug03.cpp +++ b/engines/bladerunner/script/scene/ug03.cpp @@ -103,7 +103,7 @@ bool SceneScriptUG03::ClickedOnExit(int exitId) { if (Global_Variable_Query(kVariableChapter) < 4) { Actor_Says(kActorMcCoy, 8522, 14); } else { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(336); Set_Enter(kSetUG10, kSceneUG10); @@ -113,7 +113,7 @@ bool SceneScriptUG03::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -51.0f, 0.0f, 255.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(334); Set_Enter(kSetUG04, kSceneUG04); diff --git a/engines/bladerunner/script/scene/ug04.cpp b/engines/bladerunner/script/scene/ug04.cpp index 497b3d6b3d..7aa0ad130c 100644 --- a/engines/bladerunner/script/scene/ug04.cpp +++ b/engines/bladerunner/script/scene/ug04.cpp @@ -130,7 +130,7 @@ void SceneScriptUG04::PlayerWalkedIn() { } void SceneScriptUG04::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/ug05.cpp b/engines/bladerunner/script/scene/ug05.cpp index da1cb2fd90..3be09c1ee1 100644 --- a/engines/bladerunner/script/scene/ug05.cpp +++ b/engines/bladerunner/script/scene/ug05.cpp @@ -87,7 +87,7 @@ bool SceneScriptUG05::ClickedOn3DObject(const char *objectName, bool a2) { bool SceneScriptUG05::ClickedOnActor(int actorId) { if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, actorId, 30, 1, false)) { Actor_Face_Actor(kActorMcCoy, actorId, true); - int v1 = sub_4021B0(); + int affectionTowardsActor = getAffectionTowardsActor(); if (actorId == kActorOfficerGrayford && Game_Flag_Query(368) && !Game_Flag_Query(683)) { Actor_Says(kActorOfficerGrayford, 220, -1); Actor_Says(kActorMcCoy, 5540, 14); @@ -98,7 +98,7 @@ bool SceneScriptUG05::ClickedOnActor(int actorId) { Game_Flag_Set(683); return false; } - if (actorId == v1) { + if (actorId == affectionTowardsActor) { sub_402218(); return true; } @@ -143,12 +143,12 @@ bool SceneScriptUG05::ClickedOnExit(int exitId) { return true; } } else { - int v1 = sub_4021B0(); + int affectionTowardsActor = getAffectionTowardsActor(); bool v2; - if (v1 == -1) { + if (affectionTowardsActor == -1) { v2 = Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, -1.37f, -1500.0f, 0, 1, false, 0) != 0; } else { - v2 = Loop_Actor_Walk_To_Actor(kActorMcCoy, v1, 30, 1, false) != 0; + v2 = Loop_Actor_Walk_To_Actor(kActorMcCoy, affectionTowardsActor, 30, 1, false) != 0; } if (!v2) { sub_402218(); @@ -177,12 +177,12 @@ void SceneScriptUG05::PlayerWalkedIn() { Actor_Set_At_XYZ(kActorOfficerGrayford, 4.22f, -1.37f, -925.0f, 750); Actor_Set_Goal_Number(kActorOfficerGrayford, 599); Actor_Retired_Here(kActorOfficerGrayford, 70, 36, 1, -1); - int v0 = sub_4021B0(); - if (v0 == kActorDektora) { + int affectionTowardsActor = getAffectionTowardsActor(); + if (affectionTowardsActor == kActorDektora) { Actor_Put_In_Set(kActorDektora, kSetUG05); Actor_Set_At_XYZ(kActorDektora, -100.0f, -10.31f, -906.0f, 866); Actor_Force_Stop_Walking(kActorDektora); - } else if (v0 == kActorLucy){ + } else if (affectionTowardsActor == kActorLucy){ Actor_Put_In_Set(kActorLucy, kSetUG05); Actor_Set_At_XYZ(kActorLucy, -100.0f, -10.31f, -906.0f, 866); Actor_Force_Stop_Walking(kActorLucy); @@ -214,38 +214,42 @@ void SceneScriptUG05::PlayerWalkedIn() { } void SceneScriptUG05::PlayerWalkedOut() { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); } void SceneScriptUG05::DialogueQueueFlushed(int a1) { } -int SceneScriptUG05::sub_4021B0() { - if (Global_Variable_Query(kVariableAffectionTowards) == 2 && Actor_Query_Goal_Number(kActorDektora) != 599) { +int SceneScriptUG05::getAffectionTowardsActor() { + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsDektora + && Actor_Query_Goal_Number(kActorDektora) != 599 + ) { return kActorDektora; } - if (Global_Variable_Query(kVariableAffectionTowards) == 3 && Actor_Query_Goal_Number(kActorLucy) != 599) { + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy + && Actor_Query_Goal_Number(kActorLucy) != 599 + ) { return kActorLucy; } return -1; } void SceneScriptUG05::sub_402218() { - int v0 = sub_4021B0(); - if (v0 != -1) { - Actor_Face_Actor(kActorMcCoy, v0, true); - Actor_Face_Actor(v0, kActorMcCoy, true); + int affectionTowardsActor = getAffectionTowardsActor(); + if (affectionTowardsActor != -1) { + Actor_Face_Actor(kActorMcCoy, affectionTowardsActor, true); + Actor_Face_Actor(affectionTowardsActor, kActorMcCoy, true); Actor_Says(kActorMcCoy, 5535, 13); - if (v0 == kActorDektora) { + if (affectionTowardsActor == kActorDektora) { Actor_Says(kActorDektora, 1110, 15); } else { Actor_Says(kActorLucy, 670, 17); } } - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - if (v0 == kActorLucy) { + if (affectionTowardsActor == kActorLucy) { if (Game_Flag_Query(kFlagLucyIsReplicant)) { if (Global_Variable_Query(kVariableDNAEvidences) > 3) { Outtake_Play(kOuttakeEnd1B, false, -1); @@ -255,7 +259,7 @@ void SceneScriptUG05::sub_402218() { } else { Outtake_Play(kOuttakeEnd1A, false, -1); } - } else if (v0 == kActorDektora) { + } else if (affectionTowardsActor == kActorDektora) { if (Game_Flag_Query(kFlagDektoraIsReplicant)) { if (Global_Variable_Query(kVariableDNAEvidences) > 3) { Outtake_Play(kOuttakeEnd1E, false, -1); diff --git a/engines/bladerunner/script/scene/ug06.cpp b/engines/bladerunner/script/scene/ug06.cpp index e13e720ead..8c93eb7eaa 100644 --- a/engines/bladerunner/script/scene/ug06.cpp +++ b/engines/bladerunner/script/scene/ug06.cpp @@ -26,7 +26,7 @@ namespace BladeRunner { void SceneScriptUG06::InitializeScene() { if (Game_Flag_Query(680)) { - 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(kOuttakeMovieC1, false, -1); if (Game_Flag_Query(560)) { @@ -92,7 +92,7 @@ bool SceneScriptUG06::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG06::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.0f, 0.0f, 321.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(341); Set_Enter(kSetUG04, kSceneUG04); @@ -104,7 +104,7 @@ bool SceneScriptUG06::ClickedOnExit(int exitId) { Actor_Face_Heading(kActorMcCoy, 0, false); 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_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(342); Set_Enter(kSetNR01, kSceneNR01); diff --git a/engines/bladerunner/script/scene/ug07.cpp b/engines/bladerunner/script/scene/ug07.cpp index 6880d2008a..f31660c7b5 100644 --- a/engines/bladerunner/script/scene/ug07.cpp +++ b/engines/bladerunner/script/scene/ug07.cpp @@ -95,7 +95,7 @@ bool SceneScriptUG07::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG07::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -94.0f, -12.21f, -710.0f, 0, 1, false, 0) && Actor_Query_Goal_Number(kActorClovis) != 402) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(427); Set_Enter(kSetUG09, kSceneUG09); @@ -104,7 +104,7 @@ bool SceneScriptUG07::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 110.0f, -12.21f, -274.0f, 0, 1, false, 0) && Actor_Query_Goal_Number(kActorClovis) != 402) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(425); Set_Enter(kSetUG08, kSceneUG08); @@ -143,7 +143,7 @@ bool SceneScriptUG07::ClickedOnExit(int exitId) { } } else { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.0f, -21.47f, -58.0f, 0, 1, false, 0) && Actor_Query_Goal_Number(kActorClovis) != 402) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(423); Set_Enter(kSetUG10, kSceneUG10); diff --git a/engines/bladerunner/script/scene/ug08.cpp b/engines/bladerunner/script/scene/ug08.cpp index 2c5cc613cf..6ae9d73ad2 100644 --- a/engines/bladerunner/script/scene/ug08.cpp +++ b/engines/bladerunner/script/scene/ug08.cpp @@ -86,7 +86,7 @@ bool SceneScriptUG08::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG08::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -432.0f, 0.0f, -152.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(426); Set_Enter(kSetUG07, kSceneUG07); diff --git a/engines/bladerunner/script/scene/ug09.cpp b/engines/bladerunner/script/scene/ug09.cpp index f238161a4b..0724ce8d81 100644 --- a/engines/bladerunner/script/scene/ug09.cpp +++ b/engines/bladerunner/script/scene/ug09.cpp @@ -101,7 +101,7 @@ bool SceneScriptUG09::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG09::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -67.0f, 156.94f, -425.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagUG09toCT12); Set_Enter(kSetCT01_CT12, kSceneCT12); @@ -110,7 +110,7 @@ bool SceneScriptUG09::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -53.0f, 156.94f, 206.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(428); Set_Enter(kSetUG07, kSceneUG07); diff --git a/engines/bladerunner/script/scene/ug10.cpp b/engines/bladerunner/script/scene/ug10.cpp index e95f57b237..64e63a6a03 100644 --- a/engines/bladerunner/script/scene/ug10.cpp +++ b/engines/bladerunner/script/scene/ug10.cpp @@ -35,35 +35,39 @@ void SceneScriptUG10::InitializeScene() { } else { Setup_Scene_Information(235.0f, 1.15f, 29.0f, 0); } + Scene_Exit_Add_2D_Exit(0, 589, 300, 639, 479, 1); - Scene_Exit_Add_2D_Exit(1, 460, 70, 632, 171, 0); - Scene_Exit_Add_2D_Exit(2, 38, 78, 83, 264, 3); - Scene_Exit_Add_2D_Exit(3, 0, 0, 30, 479, 3); + Scene_Exit_Add_2D_Exit(1, 460, 70, 632, 171, 0); + Scene_Exit_Add_2D_Exit(2, 38, 78, 83, 264, 3); + Scene_Exit_Add_2D_Exit(3, 0, 0, 30, 479, 3); + Scene_2D_Region_Add(0, 349, 311, 382, 364); + Ambient_Sounds_Add_Looping_Sound(105, 71, 0, 1); - Ambient_Sounds_Add_Looping_Sound(95, 45, 0, 1); + Ambient_Sounds_Add_Looping_Sound( 95, 45, 0, 1); Ambient_Sounds_Add_Looping_Sound(332, 76, 0, 1); - Ambient_Sounds_Add_Sound(291, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(293, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(295, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(368, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(402, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(397, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(398, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(303, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(1, 5, 150, 47, 57, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(58, 5, 150, 17, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(230, 2, 20, 25, 32, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(233, 2, 20, 25, 32, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(235, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(394, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(224, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(228, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(229, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - if (Game_Flag_Query(474)) { + Ambient_Sounds_Add_Sound(291, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(293, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(295, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(368, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(402, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(397, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(398, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(303, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 1, 5, 150, 47, 57, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 58, 5, 150, 17, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(230, 2, 20, 25, 32, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(233, 2, 20, 25, 32, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(235, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(394, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(224, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(228, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(229, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + + if (Game_Flag_Query(kFlagUG10GateOpen)) { Scene_Loop_Set_Default(4); } else { Scene_Loop_Set_Default(1); @@ -72,10 +76,14 @@ void SceneScriptUG10::InitializeScene() { void SceneScriptUG10::SceneLoaded() { Obstacle_Object("SLUICEGATE_LEVER", true); - if (Global_Variable_Query(kVariableChapter) == 4 && !Game_Flag_Query(474) && Game_Flag_Query(kFlagDumpsterEmptied) && !Game_Flag_Query(693)) { + if (Global_Variable_Query(kVariableChapter) == 4 + && !Game_Flag_Query(kFlagUG10GateOpen) + && Game_Flag_Query(kFlagDumpsterEmptied) + && !Game_Flag_Query(kFlagUG03DeadHomeless) + ) { Scene_Loop_Set_Default(1); Scene_Loop_Start_Special(kSceneLoopModeOnce, 6, true); - Game_Flag_Set(693); + Game_Flag_Set(kFlagUG03DeadHomeless); //return true; } //return false; @@ -101,17 +109,25 @@ bool SceneScriptUG10::ClickedOnExit(int exitId) { float x, y, z; Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); if (exitId == 0) { - if ((!Game_Flag_Query(474) && x > 125.0f) || Game_Flag_Query(474)) { + if ((!Game_Flag_Query(kFlagUG10GateOpen) + && x > 125.0f + ) + || Game_Flag_Query(kFlagUG10GateOpen) + ) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 235.0f, 1.15f, 29.0f, 0, 1, false, 0)) { Game_Flag_Set(kFlagUG10toUG01); Set_Enter(kSetUG01, kSceneUG01); return true; } - } else if (!Game_Flag_Query(474)) { + } else if (!Game_Flag_Query(kFlagUG10GateOpen)) { Actor_Says(kActorMcCoy, 8521, 3); } } else if (exitId == 1) { - if ((!Game_Flag_Query(474) && x < 120.0f) || Game_Flag_Query(474)) { + if ((!Game_Flag_Query(kFlagUG10GateOpen) + && x < 120.0f + ) + || Game_Flag_Query(kFlagUG10GateOpen) + ) { 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, kAnimationModeIdle); @@ -120,11 +136,15 @@ bool SceneScriptUG10::ClickedOnExit(int exitId) { Set_Enter(kSetUG03, kSceneUG03); return true; } - } else if (!Game_Flag_Query(474)) { + } else if (!Game_Flag_Query(kFlagUG10GateOpen)) { Actor_Says(kActorMcCoy, 6165, 3); } } else if (exitId == 2) { - if ((!Game_Flag_Query(474) && x < 120.0f) || Game_Flag_Query(474)) { + if ((!Game_Flag_Query(kFlagUG10GateOpen) + && x < 120.0f + ) + || Game_Flag_Query(kFlagUG10GateOpen) + ) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -385.0f, 1.15f, 57.44f, 0, 1, false, 0)) { Actor_Face_Heading(kActorMcCoy, 1001, false); Loop_Actor_Travel_Ladder(kActorMcCoy, 1, 1, 0); @@ -132,17 +152,21 @@ bool SceneScriptUG10::ClickedOnExit(int exitId) { Set_Enter(kSetUG07, kSceneUG07); return true; } - } else if (!Game_Flag_Query(474)) { + } else if (!Game_Flag_Query(kFlagUG10GateOpen)) { Actor_Says(kActorMcCoy, 6165, 3); } } else if (exitId == 3) { - if ((!Game_Flag_Query(474) && x < 120.0f) || Game_Flag_Query(474)) { + if ((!Game_Flag_Query(kFlagUG10GateOpen) + && x < 120.0f + ) + || Game_Flag_Query(kFlagUG10GateOpen) + ) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 2.5f, 1.15f, 405.0f, 0, 1, false, 0)) { Game_Flag_Set(347); Set_Enter(kSetUG14, kSceneUG14); return true; } - } else if (!Game_Flag_Query(474)) { + } else if (!Game_Flag_Query(kFlagUG10GateOpen)) { Actor_Says(kActorMcCoy, 6165, 3); } } @@ -155,19 +179,19 @@ bool SceneScriptUG10::ClickedOn2DRegion(int region) { if (region == 0 && !Player_Query_Combat_Mode()) { if (x >= 120.0f) { Actor_Says(kActorMcCoy, 8525, 3); - } else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 4.98f, 0.38f, 83.15f, 0, 1, false, 0)) { - if (Game_Flag_Query(474)) { - Scene_Loop_Set_Default(1); - Scene_Loop_Start_Special(kSceneLoopModeOnce, 0, false); - Game_Flag_Reset(474); - Obstacle_Object("BOX01 BRIDGE", true); - Player_Loses_Control(); - } else { + } else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 4.98f, 0.38f, 83.15f, 0, true, false, 0)) { + if (!Game_Flag_Query(kFlagUG10GateOpen)) { Scene_Loop_Set_Default(4); Scene_Loop_Start_Special(kSceneLoopModeOnce, 3, false); - Game_Flag_Set(474); + Game_Flag_Set(kFlagUG10GateOpen); Unobstacle_Object("BOX01 BRIDGE", true); Player_Loses_Control(); + } else { + Scene_Loop_Set_Default(1); + Scene_Loop_Start_Special(kSceneLoopModeOnce, 0, false); + Game_Flag_Reset(kFlagUG10GateOpen); + Obstacle_Object("BOX01 BRIDGE", true); + Player_Loses_Control(); } } return true; @@ -206,17 +230,18 @@ void SceneScriptUG10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptUG10::PlayerWalkedIn() { if (Game_Flag_Query(346)) { Game_Flag_Reset(346); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 2.5f, 1.15f, 377.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 2.5f, 1.15f, 377.0f, 0, false, false, 0); } else if (Game_Flag_Query(kFlagUG01toUG10)) { Game_Flag_Reset(kFlagUG01toUG10); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 207.0f, 1.15f, 29.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 207.0f, 1.15f, 29.0f, 0, false, false, 0); } else if (Game_Flag_Query(336)) { Game_Flag_Reset(336); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1.83f, 81.33f, -518.8f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1.83f, 81.33f, -518.8f, 0, false, false, 0); Actor_Face_Heading(kActorMcCoy, 506, false); - Loop_Actor_Travel_Stairs(kActorMcCoy, 9, 0, kAnimationModeIdle); + Loop_Actor_Travel_Stairs(kActorMcCoy, 9, false, kAnimationModeIdle); } - if (Game_Flag_Query(474)) { + + if (Game_Flag_Query(kFlagUG10GateOpen)) { Unobstacle_Object("BOX01 BRIDGE", true); } else { Obstacle_Object("BOX01 BRIDGE", true); @@ -224,7 +249,7 @@ void SceneScriptUG10::PlayerWalkedIn() { } void SceneScriptUG10::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/ug12.cpp b/engines/bladerunner/script/scene/ug12.cpp index 90f72d52bd..f189224713 100644 --- a/engines/bladerunner/script/scene/ug12.cpp +++ b/engines/bladerunner/script/scene/ug12.cpp @@ -81,7 +81,7 @@ bool SceneScriptUG12::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG12::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 375.0f, -126.21f, 180.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(344); Set_Enter(kSetUG14, kSceneUG14); @@ -90,7 +90,7 @@ bool SceneScriptUG12::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 207.0f, -126.21f, -364.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(412); Set_Enter(kSetKP02, kSceneKP02); diff --git a/engines/bladerunner/script/scene/ug13.cpp b/engines/bladerunner/script/scene/ug13.cpp index a0acf7fe82..3fb1aaf3dc 100644 --- a/engines/bladerunner/script/scene/ug13.cpp +++ b/engines/bladerunner/script/scene/ug13.cpp @@ -109,7 +109,7 @@ bool SceneScriptUG13::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptUG13::ClickedOnActor(int actorId) { - if (actorId == 12 + if (actorId == kActorTransient && Global_Variable_Query(kVariableChapter) == 4 ) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -248.0f, 44.0f, -390.0f, 12, true, false, 0)) { @@ -269,7 +269,7 @@ void SceneScriptUG13::PlayerWalkedOut() { Ambient_Sounds_Remove_Sound(397, false); Ambient_Sounds_Remove_Sound(398, false); } else { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); } } diff --git a/engines/bladerunner/script/scene/ug14.cpp b/engines/bladerunner/script/scene/ug14.cpp index 0a391cac43..6e95691367 100644 --- a/engines/bladerunner/script/scene/ug14.cpp +++ b/engines/bladerunner/script/scene/ug14.cpp @@ -93,7 +93,7 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) { Footstep_Sound_Override_Off(); } if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -278.0f, 12.97f, -152.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(348); Set_Enter(kSetUG19, kSceneUG19); @@ -111,7 +111,7 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) { Footstep_Sound_Override_Off(); } if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -50.0f, 129.0f, -814.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(345); Set_Enter(kSetCT08_CT51_UG12, kSceneUG12); @@ -134,7 +134,7 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) { 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); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(346); Set_Enter(kSetUG10, kSceneUG10); diff --git a/engines/bladerunner/script/scene/ug15.cpp b/engines/bladerunner/script/scene/ug15.cpp index 231c1a3e42..4743c8d336 100644 --- a/engines/bladerunner/script/scene/ug15.cpp +++ b/engines/bladerunner/script/scene/ug15.cpp @@ -105,7 +105,7 @@ bool SceneScriptUG15::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -25.0f, 26.31f, -434.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(352); Set_Enter(kSetUG17, kSceneUG17); @@ -114,7 +114,7 @@ bool SceneScriptUG15::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -17.0f, 26.31f, -346.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagUG15toUG16); Set_Enter(kSetUG16, kSceneUG16); @@ -126,7 +126,7 @@ bool SceneScriptUG15::ClickedOnExit(int exitId) { if (v1 >= 300 && v1 <= 303) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -137.61f, 48.07f, 147.12f, 0, 1, false, 0); } else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 18.0f, 52.28f, 46.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(354); Set_Enter(kSetUG16, kSceneUG16); @@ -135,7 +135,7 @@ bool SceneScriptUG15::ClickedOnExit(int exitId) { } if (exitId == 3) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -238.0f, 52.46f, 222.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(350); Set_Enter(kSetUG13, kSceneUG13); diff --git a/engines/bladerunner/script/scene/ug16.cpp b/engines/bladerunner/script/scene/ug16.cpp index 38ce6e439a..fbffe9f701 100644 --- a/engines/bladerunner/script/scene/ug16.cpp +++ b/engines/bladerunner/script/scene/ug16.cpp @@ -130,7 +130,7 @@ bool SceneScriptUG16::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG16::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -322.0f, -34.0f, -216.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(355); Set_Enter(kSetUG15, kSceneUG15); @@ -139,7 +139,7 @@ bool SceneScriptUG16::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -322.0f, -34.0f, -404.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagUG16toUG15); Set_Enter(kSetUG15, kSceneUG15); @@ -150,7 +150,7 @@ bool SceneScriptUG16::ClickedOnExit(int exitId) { 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, kAnimationModeIdle); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(551); Set_Enter(kSetDR06, kSceneDR06); diff --git a/engines/bladerunner/script/scene/ug17.cpp b/engines/bladerunner/script/scene/ug17.cpp index e05648f3f0..104c831e59 100644 --- a/engines/bladerunner/script/scene/ug17.cpp +++ b/engines/bladerunner/script/scene/ug17.cpp @@ -65,7 +65,7 @@ bool SceneScriptUG17::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG17::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1000.0f, 67.96f, -1539.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(353); Set_Enter(kSetUG15, kSceneUG15); @@ -79,7 +79,7 @@ bool SceneScriptUG17::ClickedOnExit(int exitId) { Actor_Says(kActorMcCoy, 8522, 14); } else { Loop_Actor_Travel_Ladder(kActorMcCoy, 10, 1, 0); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(448); Set_Enter(kSetTB02_TB03, kSceneTB03); diff --git a/engines/bladerunner/script/scene/ug18.cpp b/engines/bladerunner/script/scene/ug18.cpp index f438d9b030..5afb87e80a 100644 --- a/engines/bladerunner/script/scene/ug18.cpp +++ b/engines/bladerunner/script/scene/ug18.cpp @@ -94,9 +94,9 @@ bool SceneScriptUG18::ClickedOnActor(int actorId) { return false; } -bool SceneScriptUG18::ClickedOnItem(int itemId, bool a2) { +bool SceneScriptUG18::ClickedOnItem(int itemId, bool combatMode) { if (itemId == 91) { - if (a2) { + if (combatMode) { Item_Remove_From_World(91); } else if (!Loop_Actor_Walk_To_Item(kActorMcCoy, 91, 12, 1, false)) { Item_Pickup_Spin_Effect(987, 368, 243); @@ -111,7 +111,7 @@ bool SceneScriptUG18::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG18::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -684.71f, 0.0f, 171.59f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(435); Set_Enter(kSetUG13, kSceneUG13); @@ -129,7 +129,7 @@ void SceneScriptUG18::SceneFrameAdvanced(int frame) { } void SceneScriptUG18::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { - if (actorId == 4) { + if (actorId == kActorGuzza) { if (newGoal == 303) { Game_Flag_Set(607); ADQ_Flush(); @@ -150,7 +150,7 @@ void SceneScriptUG18::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo Scene_Exits_Enable(); Actor_Set_Goal_Number(kActorGuzza, 306); } - } else if (actorId == 8) { + } else if (actorId == kActorSadik) { if (newGoal == 302) { if (Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy) > 55 && Game_Flag_Query(607)) { sub_403588(); @@ -324,7 +324,9 @@ void SceneScriptUG18::sub_402734() { void SceneScriptUG18::sub_402DE8() { if (Player_Query_Agenda() != kPlayerAgendaPolite) { - if (Global_Variable_Query(kVariableAffectionTowards) > 1 || Player_Query_Agenda() == kPlayerAgendaSurly) { + if (Global_Variable_Query(kVariableAffectionTowards) > 1 + || Player_Query_Agenda() == kPlayerAgendaSurly + ) { sub_403114(); } else { sub_402F8C(); diff --git a/engines/bladerunner/script/scene/ug19.cpp b/engines/bladerunner/script/scene/ug19.cpp index 1f5eccdf65..4c7d96375e 100644 --- a/engines/bladerunner/script/scene/ug19.cpp +++ b/engines/bladerunner/script/scene/ug19.cpp @@ -89,7 +89,7 @@ bool SceneScriptUG19::ClickedOnExit(int exitId) { Footstep_Sound_Override_On(3); Loop_Actor_Travel_Ladder(kActorMcCoy, 8, 1, 0); Footstep_Sound_Override_Off(); - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(356); Set_Enter(kSetMA07, kSceneMA07); @@ -98,7 +98,7 @@ bool SceneScriptUG19::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 181.0f, 11.52f, -18.0f, 0, 1, false, 0)) { - Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(349); Set_Enter(kSetUG14, kSceneUG14); diff --git a/engines/bladerunner/script/scene_script.cpp b/engines/bladerunner/script/scene_script.cpp index ff43853044..7c890d6538 100644 --- a/engines/bladerunner/script/scene_script.cpp +++ b/engines/bladerunner/script/scene_script.cpp @@ -173,23 +173,23 @@ bool SceneScript::mouseClick(int x, int y) { return true; _inScriptCounter++; - //MouseX = x; - //MouseY = y; + _mouseX = x; + _mouseY = y; bool result = _currentScript->MouseClick(x, y); _vm->_runningActorId = -1; _inScriptCounter--; - //MouseX = -1; - //MouseY = -1; + _mouseX = -1; + _mouseY = -1; return result; } -bool SceneScript::clickedOn3DObject(const char *objectName, bool attack) { +bool SceneScript::clickedOn3DObject(const char *objectName, bool combatMode) { if (_inScriptCounter > 0) { return true; } _inScriptCounter++; - bool result = _currentScript->ClickedOn3DObject(objectName, attack); + bool result = _currentScript->ClickedOn3DObject(objectName, combatMode); _vm->_runningActorId = -1; _inScriptCounter--; return result; @@ -207,13 +207,13 @@ bool SceneScript::clickedOnActor(int actorId) { return result; } -bool SceneScript::clickedOnItem(int itemId, bool a2) { +bool SceneScript::clickedOnItem(int itemId, bool combatMode) { if (_inScriptCounter > 0) { return true; } _inScriptCounter++; - bool result = _currentScript->ClickedOnItem(itemId, a2); + bool result = _currentScript->ClickedOnItem(itemId, combatMode); _vm->_runningActorId = -1; _inScriptCounter--; return result; diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h index de9cd0dda5..ee439018d2 100644 --- a/engines/bladerunner/script/scene_script.h +++ b/engines/bladerunner/script/scene_script.h @@ -36,9 +36,9 @@ public: virtual void InitializeScene() = 0; virtual void SceneLoaded() = 0; virtual bool MouseClick(int x, int y) = 0; - virtual bool ClickedOn3DObject(const char *objectName, bool attack) = 0; + virtual bool ClickedOn3DObject(const char *objectName, bool combatMode) = 0; virtual bool ClickedOnActor(int actorId) = 0; - virtual bool ClickedOnItem(int itemId, bool a2) = 0; + virtual bool ClickedOnItem(int itemId, bool combatMode) = 0; virtual bool ClickedOnExit(int exitId) = 0; virtual bool ClickedOn2DRegion(int region) = 0; virtual void SceneFrameAdvanced(int frame) = 0; @@ -57,9 +57,9 @@ public: \ void InitializeScene(); \ void SceneLoaded(); \ bool MouseClick(int x, int y); \ - bool ClickedOn3DObject(const char *objectName, bool attack); \ + bool ClickedOn3DObject(const char *objectName, bool combatMode); \ bool ClickedOnActor(int actorId); \ - bool ClickedOnItem(int itemId, bool a2); \ + bool ClickedOnItem(int itemId, bool combatMode); \ bool ClickedOnExit(int exitId); \ bool ClickedOn2DRegion(int region); \ void SceneFrameAdvanced(int frame); \ @@ -74,9 +74,9 @@ DECLARE_SCRIPT(AR01) END_SCRIPT DECLARE_SCRIPT(AR02) - void sub_402694(); - void sub_402AE0(); - void sub_402CE4(); + void dialogueWithInsectDealer1(); + void dialogueWithInsectDealer2(); + void dialogueWithHassan(); END_SCRIPT DECLARE_SCRIPT(BB01) @@ -182,8 +182,8 @@ DECLARE_SCRIPT(DR06) END_SCRIPT DECLARE_SCRIPT(HC01) - void sub_402384(); - void sub_40346C(); + void dialogueWithIzo(); + void takePhotoAndRunAway(); END_SCRIPT DECLARE_SCRIPT(HC02) @@ -193,7 +193,7 @@ DECLARE_SCRIPT(HC03) END_SCRIPT DECLARE_SCRIPT(HC04) - void sub_401B90(); + void dialogueWithIsabella(); END_SCRIPT DECLARE_SCRIPT(HF01) @@ -222,7 +222,7 @@ DECLARE_SCRIPT(HF05) void sub_40410C(); void sub_4042E4(); void sub_404474(); - int sub_404858(); + int getAffectionTowardsActor(); int sub_4048C0(); END_SCRIPT @@ -232,7 +232,7 @@ DECLARE_SCRIPT(HF06) END_SCRIPT DECLARE_SCRIPT(HF07) - int sub_401864(); + int getAffectionTowardsActor(); END_SCRIPT DECLARE_SCRIPT(KP01) @@ -389,15 +389,15 @@ DECLARE_SCRIPT(PS10) END_SCRIPT DECLARE_SCRIPT(PS11) - void sub_402744(); + void removeTargets(); END_SCRIPT DECLARE_SCRIPT(PS12) - void sub_4028C4(); + void removeTargets(); END_SCRIPT DECLARE_SCRIPT(PS13) - void sub_40267C(); + void removeTargets(); END_SCRIPT DECLARE_SCRIPT(PS14) @@ -448,7 +448,7 @@ DECLARE_SCRIPT(UG01) END_SCRIPT DECLARE_SCRIPT(UG02) - bool sub_402354(); + bool walkToCenter(); END_SCRIPT DECLARE_SCRIPT(UG03) @@ -458,7 +458,7 @@ DECLARE_SCRIPT(UG04) END_SCRIPT DECLARE_SCRIPT(UG05) - int sub_4021B0(); + int getAffectionTowardsActor(); void sub_402218(); END_SCRIPT @@ -527,6 +527,9 @@ protected: SceneScriptBase *_currentScript; public: + int _mouseX; + int _mouseY; + SceneScript(BladeRunnerEngine *vm); ~SceneScript(); @@ -535,9 +538,9 @@ public: void initializeScene(); void sceneLoaded(); bool mouseClick(int x, int y); - bool clickedOn3DObject(const char *objectName, bool attack); + bool clickedOn3DObject(const char *objectName, bool combatMode); bool clickedOnActor(int actorId); - bool clickedOnItem(int itemId, bool a2); + bool clickedOnItem(int itemId, bool combatMode); bool clickedOnExit(int exitId); bool clickedOn2DRegion(int region); void sceneFrameAdvanced(int frame); diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp index dbc193301a..21ddebdf3f 100644 --- a/engines/bladerunner/script/script.cpp +++ b/engines/bladerunner/script/script.cpp @@ -46,6 +46,7 @@ #include "bladerunner/scene.h" #include "bladerunner/scene_objects.h" #include "bladerunner/script/police_maze.h" +#include "bladerunner/script/scene_script.h" #include "bladerunner/slice_animations.h" #include "bladerunner/slice_renderer.h" #include "bladerunner/suspects_database.h" @@ -90,8 +91,11 @@ void ScriptBase::Actor_Set_At_Waypoint(int actorId, int waypointId, int angle) { bool ScriptBase::Region_Check(int left, int top, int right, int down) { debugC(kDebugScript, "Region_Check(%d, %d, %d, %d)", left, top, right, down); - //TODO: return _vm->_mouse.x >= left && _vm->_mouse.y >= top && _vm->_mouse.x <= right && _vm->_mouse.y <= down; - warning("Region_Check(%d, %d, %d, %d)", left, top, right, down); + + return _vm->_sceneScript->_mouseX >= left + && _vm->_sceneScript->_mouseY >= top + && _vm->_sceneScript->_mouseX <= right + && _vm->_sceneScript->_mouseY <= down; return false; } @@ -1436,7 +1440,7 @@ bool ScriptBase::Query_System_Currently_Loading_Game() { return _vm->_gameIsLoading; } -void ScriptBase::Actor_Retired_Here(int actorId, int width, int height, int retired, int retiredByActorId) { +void ScriptBase::Actor_Retired_Here(int actorId, int width, int height, bool retired, int retiredByActorId) { debugC(kDebugScript, "Actor_Retired_Here(%d, %d, %d, %d, %d)", actorId, width, height, retired, retiredByActorId); Actor *actor = _vm->_actors[actorId]; actor->retire(retired, width, height, retiredByActorId); diff --git a/engines/bladerunner/script/script.h b/engines/bladerunner/script/script.h index f5ce3d63b0..3b35f3a81d 100644 --- a/engines/bladerunner/script/script.h +++ b/engines/bladerunner/script/script.h @@ -242,7 +242,7 @@ protected: void Assign_Player_Gun_Miss_Sounds(int ammoType, int soundId1, int soundId2, int soundId3); void Disable_Shadows(int animationsIdsList[], int listSize); bool Query_System_Currently_Loading_Game(); - void Actor_Retired_Here(int actorId, int width, int height, int retired, int retiredByActorId); + void Actor_Retired_Here(int actorId, int width, int height, bool retired, int retiredByActorId); void Clickable_Object(const char *objectName); void Unclickable_Object(const char *objectName); void Obstacle_Object(const char *objectName, bool updateWalkpath); |