diff options
Diffstat (limited to 'engines')
25 files changed, 590 insertions, 457 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h index b14b720fe5..12d4eaa69f 100644 --- a/engines/bladerunner/game_constants.h +++ b/engines/bladerunner/game_constants.h @@ -813,7 +813,10 @@ enum Flags { kFlagAR02DektoraBoughtScorpions = 374, kFlagDirectorsCut = 378, + kFlagCT08toCT51 = 379, // is never checked + kFlagCT51toCT08 = 380, + kFlagNotUsed383 = 383, kFlagHC01toHC02 = 384, kFlagHC02toHC01 = 385, kFlagHC01toHC03 = 386, // is never checked @@ -821,14 +824,15 @@ enum Flags { kFlagHC03TrapDoorOpen = 388, // 389 is never used // 390 is never used - + kFlagBB09SadikRun = 391, kFlagRC01McCoyAndOfficerLearyTalking = 392, kFlagBB06toBB51 = 393, // is never checked kFlagBB51toBB06a = 394, kFlagBB51toBB06b = 395, - + kFlagBB07ElectricityOn = 396, kFlagRC01McCoyAndOfficerLearyArtMetaphor = 397, - + kFlagBB07PrinterChecked = 398, + kFlagGeneralDollShot = 399, kFlagHC01IzoTalk1 = 400, kFlagHC01IzoTalk2 = 401, kFlagHC03Available = 402, @@ -838,6 +842,8 @@ enum Flags { kFlagUnused406 = 406, // is never checked kFlagUnused407 = 407, // is never checked + kFlagBB06AndroidDestroyed = 410, + kFlagUG09toCT12 = 432, kFlagCT12ToUG09 = 433, kFlagGenericWalkerWaiting = 443, @@ -854,6 +860,11 @@ enum Flags { kFlagMaggieIsHurt = 461, kFlagPS04GuzzaLeft = 462, kFlagMcCoyArrested = 465, + kFlagBB10Shelf1Available = 466, + kFlagBB10Shelf2Available = 467, + kFlagBB10Shelf3Available = 468, + kFlagBB10Shelf4Available = 469, + kFlagBB10Shelf5Available = 470, kFlagUG10GateOpen = 474, kFlagMcCoyAtPS03 = 478, // has no use kFlagMcCoyInHawkersCircle = 479, @@ -865,10 +876,16 @@ enum Flags { kFlagCT04HomelessTrashFinish = 492, kFlagBB02ElevatorDown = 493, kFlagBB02Entered = 494, + kFlagBB05Entered = 495, + kFlagBB08Entered = 496, + kFlagBB12Entered = 497, kFlagUG02FromUG01 = 498, kFlagUG02Interactive = 499, kFlagAR02DektoraWillBuyScorpions = 504, kFlagDR03ChewTalkExplosion = 505, + kFlagBB08toBB12 = 506, + kFlagBB12toBB08 = 507, // is never checked + kFlagBB11SadikFight = 509, kFlagDR05ExplodedEntered = 511, kFlagDR05ViewExplosion = 515, kFlagCT07ZubenAttack = 516, @@ -878,6 +895,7 @@ enum Flags { kFlagGordoTalk1 = 543, kFlagGordoTalk2 = 544, kFlagDR06MannequinHeadOpen = 548, + kFlagMcCoyTiedDown = 550, kFlagDR01toCT11 = 558, kFlagKIAPrivacyAddonIntro = 599, kFlagTB07toTB02 = 608, @@ -886,13 +904,13 @@ enum Flags { kFlagMA04PhoneMessageFromClovis = 649, kFlagMA04PhoneMessageFromLucy = 650, kFlagUG02RagiationGooglesTaken = 656, - kFlagDNARowAvailableTalk = 660, kFlagTB07ShadeDown = 661, // is never set kFlagMA07toPS14 = 672, kFlagPS14toMA07 = 673, kFlagChapter2Intro = 678, - + kFlagChapter3Intro = 679, + kFlagNotUsed686 = 686, kFlagPS05TV0 = 688, kFlagPS05TV1 = 689, kFlagPS05TV2 = 690, @@ -927,9 +945,12 @@ enum Variables { kVariableMcCoyEvidenceMissed = 14, kVariableIzoShot = 19, // has no use kVariableBobShot = 24, // has no use + kVariableGeneralDollShot = 25, // has no use kVariableGenericWalkerAModel = 32, kVariableGenericWalkerBModel = 33, kVariableGenericWalkerCModel = 34, + + kVariableBB10ShelvesAvailable = 36, kVariableWalkLoopActor = 37, kVariableWalkLoopRun = 38, kVariableDR06MannequinHeadOpened = 39, @@ -1027,17 +1048,17 @@ enum Scenes { kSceneAR01 = 0, // Animoid Row - Fish dealer kSceneAR02 = 1, // Animoid Row - Insect dealer kSceneBB01 = 2, // Bradbury building - Outside - kSceneBB02 = 3, // Bradbury building - elevator down + kSceneBB02 = 3, // Bradbury building - Inside kSceneBB03 = 4, // Bradbury building - Entrance - kSceneBB04 = 5, // Bradbury building - elevator up + kSceneBB04 = 5, // Bradbury building - Elevator kSceneBB05 = 6, // Bradbury building - Entry hall kSceneBB06 = 7, // Bradbury building - Billiard room - front - kSceneBB07 = 8, - kSceneBB08 = 9, // Bradbury building - Bathroom - kSceneBB09 = 10, // Bradbury building - Above bathroom - kSceneBB10 = 11, // Bradbury building - Cupboard - kSceneBB11 = 12, // Bradbury building - Roof - kSceneCT01 = 13, // Chinatown - Howie Lee Restaurant + kSceneBB07 = 8, // Bradbury building - Sebastian's office + kSceneBB08 = 9, // Bradbury Building - Bathroom + kSceneBB09 = 10, // Bradbury Building - Above bathroom + kSceneBB10 = 11, // Bradbury Building - Bookcase + kSceneBB11 = 12, // Bradbury Building - Roof + kSceneCT01 = 13, // Chinatown - Howie Lee's Restaurant kSceneCT02 = 14, // Chinatown - Restaurant - Kitchen kSceneCT03 = 15, // Chinatown - Back alley - Restaurant kSceneCT04 = 16, // Chinatown - Back alley - Dumpster @@ -1050,14 +1071,14 @@ enum Scenes { kSceneCT11 = 23, // Chinatown - Yukon Hotel - Outside kSceneCT12 = 24, // Chinatown - Warehouse - Outside kSceneDR01 = 25, // DNA Row - Street - kSceneDR02 = 26, // DNA Row - Eye world - Outside - kSceneDR03 = 27, // DNA Row - Eye world - Inside + kSceneDR02 = 26, // DNA Row - Eyeworld - Outside + kSceneDR03 = 27, // DNA Row - Eyeworld - Inside kSceneDR04 = 28, // DNA Row - Dermo design - Outside kSceneDR05 = 29, // DNA Row - Dermo design - Inside kSceneDR06 = 30, // DNA Row - Twin's office - kSceneHC01 = 31, // Hawker's circle - Green pawn - Outside - kSceneHC02 = 32, // Hawker's circle - China bar - kSceneHC03 = 33, // Hawker's circle - Green pawn - Inside + kSceneHC01 = 31, // Hawker's Circle - Green pawn - Outside + kSceneHC02 = 32, // Hawker's Circle - China bar + kSceneHC03 = 33, // Hawker's Circle - Green pawn - Inside kSceneHF01 = 34, kSceneHF02 = 35, kSceneHF03 = 36, @@ -1104,8 +1125,8 @@ enum Scenes { kScenePS14 = 77, // Police Station - Outside kSceneRC01 = 78, // Runciter - Outside kSceneRC02 = 79, // Runciter - Inside - kSceneRC03 = 80, // Bullet Bob - Outside - kSceneRC04 = 81, // Bullet Bob - Inside + kSceneRC03 = 80, // Bullet Bob's runner surplus - Outside + kSceneRC04 = 81, // Bullet Bob's runner surplus - Inside kSceneTB02 = 82, // Tyrell Building - Reception kSceneTB03 = 83, kSceneTB05 = 84, // Tyrell Building - Grav Test Lab - Iutside @@ -1128,13 +1149,13 @@ enum Scenes { kSceneUG17 = 101, kSceneUG18 = 102, kSceneUG19 = 103, - kSceneBB51 = 104, // Bradbury building - Billiard room - Back - kSceneCT51 = 105, - kSceneHC04 = 106, // Hawker's circle - Kingston kitchen + kSceneBB51 = 104, // Bradbury Building - Billiard room - Back + kSceneCT51 = 105, // Chinatown - Yukon Hotel - Backroom - back + kSceneHC04 = 106, // Hawker's Circle - Kingston kitchen kSceneRC51 = 107, // Runciter - Lucy's desk kSceneTB07 = 108, kScenePS15 = 119, // Police Station - Armory - kSceneBB12 = 120 + kSceneBB12 = 120 // Bradbury Building - Monkey room }; enum Sets @@ -1323,10 +1344,13 @@ enum GameItems { // 75 is never used // 76 is never used kItemDragonflyEarring = 76, + kItemBB06ControlBox = 77, kItemBomb = 78, kItemCandy = 79, + kItemCheese = 81, kItemChopstickWrapper = 82, kItemDogCollar = 84, + kItemRagDoll = 85, kItemRadiationGoogles = 88, kItemToyDog = 98, kItemShellCasingA = 100, @@ -1338,9 +1362,11 @@ enum GameItems { kItemScrorpions = 106, kItemCamera = 107, kItemKitchenBox = 108, + kItemChair = 109, kItemWeaponsCrate = 110, kItemWeaponsOrderForm = 111, kItemTyrellSalesPamphlet = 119, + kItemMoonbusPhoto = 120, kItemGreenPawnLock = 121, kItemChain = 122 }; diff --git a/engines/bladerunner/script/ai/bryant.cpp b/engines/bladerunner/script/ai/bryant.cpp index 74e5e2005e..bedb19de63 100644 --- a/engines/bladerunner/script/ai/bryant.cpp +++ b/engines/bladerunner/script/ai/bryant.cpp @@ -45,17 +45,26 @@ void AIScriptBryant::Initialize() { World_Waypoint_Set(333, kSetBB12, -34.0f, 0.0f, 33.0f); World_Waypoint_Set(334, kSetBB05, 3.0f, -60.30f, -144.0f); World_Waypoint_Set(335, kSetBB12, -50.0f, 0.0f, 212.0f); + Actor_Put_In_Set(kActorBryant, kSetBB05); + Actor_Set_Goal_Number(kActorBryant, 100); } bool AIScriptBryant::Update() { - if (Global_Variable_Query(kVariableChapter) == 2 && Actor_Query_Goal_Number(kActorBryant) <= 101 && Player_Query_Current_Scene() == kSceneBB05) { + if (Global_Variable_Query(kVariableChapter) == 2 + && Actor_Query_Goal_Number(kActorBryant) <= 101 + && Player_Query_Current_Scene() == kSceneBB05 + ) { Actor_Set_Goal_Number(kActorBryant, 101); return true; } - if (Global_Variable_Query(kVariableChapter) == 3 && Player_Query_Current_Scene() == kSceneBB05 && !Game_Flag_Query(686)) { - Game_Flag_Set(686); + + if ( Global_Variable_Query(kVariableChapter) == 3 + && Player_Query_Current_Scene() == kSceneBB05 + && !Game_Flag_Query(kFlagNotUsed686) + ) { + Game_Flag_Set(kFlagNotUsed686); return true; } return false; @@ -250,7 +259,7 @@ bool AIScriptBryant::ChangeAnimationMode(int mode) { _animationState = 1; _animationFrame = 0; break; - case 48: + case kAnimationModeDie: _animationState = 2; _animationFrame = 0; Actor_Set_Goal_Number(kActorBryant, 0); diff --git a/engines/bladerunner/script/ai/bullet_bob.cpp b/engines/bladerunner/script/ai/bullet_bob.cpp index 439431d2d4..1c1730c7d5 100644 --- a/engines/bladerunner/script/ai/bullet_bob.cpp +++ b/engines/bladerunner/script/ai/bullet_bob.cpp @@ -145,7 +145,7 @@ bool AIScriptBulletBob::ShotAtAndHit() { Actor_Set_Goal_Number(kActorBulletBob, 99); _animationFrame = 0; _animationState = 3; - Ambient_Sounds_Play_Speech_Sound(2, 9000, 100, 0, 0, 0); + Ambient_Sounds_Play_Speech_Sound(kActorGordo, 9000, 100, 0, 0, 0); // not a typo, it's really from Gordo Actor_Face_Heading(kActorBulletBob, 281, false); } diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp index 6f4d0bfd3d..d95c0e501e 100644 --- a/engines/bladerunner/script/ai/clovis.cpp +++ b/engines/bladerunner/script/ai/clovis.cpp @@ -272,19 +272,19 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Face_Current_Camera(5, true); Actor_Says(kActorClovis, 100, 17); Delay(1000); - if (!Game_Flag_Query(48)) { + if (!Game_Flag_Query(kFlagSadikIsReplicant)) { Actor_Clue_Acquire(kActorMcCoy, kClueStaggeredbyPunches, true, kActorSadik); } - Game_Flag_Set(383); - Game_Flag_Reset(509); + Game_Flag_Set(kFlagNotUsed383); + Game_Flag_Reset(kFlagBB11SadikFight); Global_Variable_Set(kVariableChapter, 3); Actor_Set_Goal_Number(kActorClovis, 200); Actor_Set_Goal_Number(kActorSadik, 200); Actor_Clue_Acquire(kActorMcCoy, kClueAct2Ended, true, -1); Player_Gains_Control(); Chapter_Enter(3, kSetCT08_CT51_UG12, kSceneCT08); - Game_Flag_Set(550); - Game_Flag_Set(679); + Game_Flag_Set(kFlagMcCoyTiedDown); + Game_Flag_Set(kFlagChapter3Intro); return true; case 300: diff --git a/engines/bladerunner/script/ai/general_doll.cpp b/engines/bladerunner/script/ai/general_doll.cpp index 7fdc9b0ba0..729bac22ed 100644 --- a/engines/bladerunner/script/ai/general_doll.cpp +++ b/engines/bladerunner/script/ai/general_doll.cpp @@ -38,62 +38,60 @@ void AIScriptGeneralDoll::Initialize() { Actor_Put_In_Set(kActorGeneralDoll, kSetFreeSlotG); Actor_Set_At_Waypoint(kActorGeneralDoll, 39, 0); + Actor_Set_Goal_Number(kActorGeneralDoll, 100); } bool AIScriptGeneralDoll::Update() { if (Global_Variable_Query(kVariableChapter) == 2 - && Actor_Query_Goal_Number(kActorGeneralDoll) <= 101 - && Player_Query_Current_Scene() == kSceneBB05) { + && Actor_Query_Goal_Number(kActorGeneralDoll) <= 101 + && Player_Query_Current_Scene() == kSceneBB05 + ) { Actor_Set_Goal_Number(kActorGeneralDoll, 101); - } else if (Global_Variable_Query(kVariableChapter) != 3 || Actor_Query_Goal_Number(kActorGeneralDoll) >= 200) { - return false; + return true; } - return true; + if (Global_Variable_Query(kVariableChapter) == 3 + && Actor_Query_Goal_Number(kActorGeneralDoll) < 200 + ) { + return true; + } + + return false; } void AIScriptGeneralDoll::TimerExpired(int timer) { - if (timer != 2) - return; //false; - - Actor_Change_Animation_Mode(kActorMcCoy, 48); - Actor_Change_Animation_Mode(kActorGeneralDoll, 48); - AI_Countdown_Timer_Reset(kActorGeneralDoll, 2); - - return; //true; + if (timer == 2) { + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie); + Actor_Change_Animation_Mode(kActorGeneralDoll, kAnimationModeDie); + AI_Countdown_Timer_Reset(kActorGeneralDoll, 2); + return; //true; + } + return; //false; } void AIScriptGeneralDoll::CompletedMovementTrack() { switch (Actor_Query_Goal_Number(kActorGeneralDoll)) { - case 200: - Actor_Set_Goal_Number(kActorGeneralDoll, 201); - return; //true; - - case 201: - Actor_Set_Goal_Number(kActorGeneralDoll, 200); - return; //true; - case 101: if (Player_Query_Current_Scene() == 6) { switch (Random_Query(0, 5)) { case 0: - Ambient_Sounds_Play_Speech_Sound(58, 0, 80, 0, 0, 0); + Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 0, 80, 0, 0, 0); break; case 1: - Ambient_Sounds_Play_Speech_Sound(58, 10, 80, 0, 0, 0); + Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 10, 80, 0, 0, 0); break; case 2: - Ambient_Sounds_Play_Speech_Sound(58, 20, 80, 0, 0, 0); + Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 20, 80, 0, 0, 0); break; case 3: - Ambient_Sounds_Play_Speech_Sound(58, 30, 80, 0, 0, 0); + Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 30, 80, 0, 0, 0); break; case 4: - Ambient_Sounds_Play_Speech_Sound(58, 40, 80, 0, 0, 0); + Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 40, 80, 0, 0, 0); break; case 5: - Ambient_Sounds_Play_Speech_Sound(58, 50, 80, 0, 0, 0); + Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 50, 80, 0, 0, 0); break; } Actor_Set_Goal_Number(kActorGeneralDoll, 102); @@ -110,6 +108,13 @@ void AIScriptGeneralDoll::CompletedMovementTrack() { Actor_Set_Goal_Number(kActorGeneralDoll, 101); return; //true; + case 200: + Actor_Set_Goal_Number(kActorGeneralDoll, 201); + return; //true; + + case 201: + Actor_Set_Goal_Number(kActorGeneralDoll, 200); + return; //true; } return; //false @@ -120,7 +125,7 @@ void AIScriptGeneralDoll::ReceivedClue(int clueId, int fromActorId) { } void AIScriptGeneralDoll::ClickedByPlayer() { - Actor_Face_Actor(kActorMcCoy, kActorGeneralDoll, 1); + Actor_Face_Actor(kActorMcCoy, kActorGeneralDoll, true); Actor_Voice_Over(30, kActorVoiceOver); Actor_Voice_Over(40, kActorVoiceOver); } @@ -147,13 +152,15 @@ void AIScriptGeneralDoll::ShotAtAndMissed() { bool AIScriptGeneralDoll::ShotAtAndHit() { AI_Movement_Track_Flush(kActorGeneralDoll); - Global_Variable_Increment(25, 1); - if (!Game_Flag_Query(399) && Global_Variable_Query(25) == 1) { + Global_Variable_Increment(kVariableGeneralDollShot, 1); + if (!Game_Flag_Query(kFlagGeneralDollShot) + && Global_Variable_Query(kVariableGeneralDollShot) == 1 + ) { Sound_Play(121, 100, 0, 0, 50); - Game_Flag_Set(399); + Game_Flag_Set(kFlagGeneralDollShot); Actor_Set_Goal_Number(kActorGeneralDoll, 104); - ChangeAnimationMode(48); - Actor_Set_Targetable(kActorGeneralDoll, 0); + ChangeAnimationMode(kAnimationModeDie); + Actor_Set_Targetable(kActorGeneralDoll, false); } return false; diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp index 0f8843af61..12e58b85cf 100644 --- a/engines/bladerunner/script/ai/mccoy.cpp +++ b/engines/bladerunner/script/ai/mccoy.cpp @@ -599,7 +599,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) { dword_45A0DC = 0; _animationState = 0; Player_Gains_Control(); - Item_Add_To_World(109, 982, kSetCT08_CT51_UG12, -110.0, 0.0, -192.0, 0, 48, 32, false, true, false, false); + Item_Add_To_World(kItemChair, 982, kSetCT08_CT51_UG12, -110.0, 0.0, -192.0, 0, 48, 32, false, true, false, false); } break; case 58: @@ -627,7 +627,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) { if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(46)) { _animationFrame = 0; } - if (!Game_Flag_Query(550)) { + if (!Game_Flag_Query(kFlagMcCoyTiedDown)) { _animationFrame = 0; _animationState = 59; *animation = 48; @@ -1230,52 +1230,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) { bool AIScriptMcCoy::ChangeAnimationMode(int mode) { switch (mode) { case kAnimationModeIdle: - if (!Game_Flag_Query(550)) { - switch (_animationState) { - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - Game_Flag_Set(kFlagMcCoyAnimation1); - dword_45A0D8 = 0; - dword_45A0DC = 30; - dword_45A0E4 = 0; - _animationFrameDelta = 1; - dword_45A0E8 = 3; - return true; - case 14: - case 17: - case 20: - case 21: - case 36: - _animationState = 16; - _animationFrame = 0; - return true; - case 15: - _animationState = 16; - _animationFrame = 16 - ((16 * _animationFrame) / 12); - return true; - case 16: - case 25: - case 26: - case 55: - return true; - case 60: - _animationState = 61; - return true; - default: - _animationState = 0; - _animationFrame = 0; - dword_45A0DC = 0; - return true; - } - } else { + if (Game_Flag_Query(kFlagMcCoyTiedDown)) { if (_animationFrame <= 6) { int random = Random_Query(0, 2); int soundId = 0; @@ -1292,25 +1247,74 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) { _animationFrame = 0; return true; } + switch (_animationState) { + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + Game_Flag_Set(kFlagMcCoyAnimation1); + dword_45A0D8 = 0; + dword_45A0DC = 30; + dword_45A0E4 = 0; + _animationFrameDelta = 1; + dword_45A0E8 = 3; + return true; + case 14: + case 17: + case 20: + case 21: + case 36: + _animationState = 16; + _animationFrame = 0; + return true; + case 15: + _animationState = 16; + _animationFrame = 16 - ((16 * _animationFrame) / 12); + return true; + case 16: + case 25: + case 26: + case 55: + return true; + case 60: + _animationState = 61; + return true; + default: + _animationState = 0; + _animationFrame = 0; + dword_45A0DC = 0; + return true; + } + break; case kAnimationModeWalk: - if (_animationState != 27 && _animationState != 50) { - if (!Game_Flag_Query(550)) { - _animationState = 32; + if (_animationState != 27 + && _animationState != 50 + ) { + if (Game_Flag_Query(kFlagMcCoyTiedDown)) { + _animationState = 58; _animationFrame = 0; } else { - _animationState = 58; + _animationState = 32; _animationFrame = 0; } } break; case kAnimationModeRun: - if (_animationState != 27 && _animationState != 50) { - if (!Game_Flag_Query(550)) { - _animationState = 31; - _animationFrame = 0; - } else { + if (_animationState != 27 + && _animationState != 50 + ) { + if (Game_Flag_Query(kFlagMcCoyTiedDown)) { _animationState = 58; _animationFrame = 4; + } else { + _animationState = 31; + _animationFrame = 0; } } break; @@ -1702,7 +1706,7 @@ void AIScriptMcCoy::sub_4054F0() { } void AIScriptMcCoy::sub_405660() { - if (Game_Flag_Query(550)) { + if (Game_Flag_Query(kFlagMcCoyTiedDown)) { if (_animationFrame <= 6) { int v1 = Random_Query(0, 2); int v2 = 0; diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp index 353a926eec..be81315d03 100644 --- a/engines/bladerunner/script/ai/sadik.cpp +++ b/engines/bladerunner/script/ai/sadik.cpp @@ -50,13 +50,13 @@ void AIScriptSadik::Initialize() { } bool AIScriptSadik::Update() { - if (Global_Variable_Query(kVariableChapter) == 2 - && Player_Query_Current_Scene() == kSceneBB09 - && !Game_Flag_Query(391) + if ( Global_Variable_Query(kVariableChapter) == 2 + && Player_Query_Current_Scene() == kSceneBB09 + && !Game_Flag_Query(kFlagBB09SadikRun) ) { Actor_Set_Goal_Number(kActorSadik, 101); Actor_Set_Targetable(kActorSadik, true); - Game_Flag_Set(391); + Game_Flag_Set(kFlagBB09SadikRun); Game_Flag_Set(kFlagUnused406); return true; } @@ -65,12 +65,19 @@ bool AIScriptSadik::Update() { Sound_Play(_var1, 100, 0, 0, 50); _var1 = 0; } - if (Global_Variable_Query(kVariableChapter) == 3 && Actor_Query_Goal_Number(kActorSadik) < 200) { + + if (Global_Variable_Query(kVariableChapter) == 3 + && Actor_Query_Goal_Number(kActorSadik) < 200 + ) { Actor_Set_Goal_Number(kActorSadik, 200); } - if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorSadik) < 400) { + + if (Global_Variable_Query(kVariableChapter) == 5 + && Actor_Query_Goal_Number(kActorSadik) < 400 + ) { Actor_Set_Goal_Number(kActorSadik, 400); } + if (Actor_Query_Goal_Number(kActorSadik) == 411) { if (Game_Flag_Query(657)) { Actor_Set_Goal_Number(kActorSadik, 412); @@ -80,7 +87,7 @@ bool AIScriptSadik::Update() { } void AIScriptSadik::TimerExpired(int timer) { - if (!timer) { + if (timer == 0) { AI_Countdown_Timer_Reset(kActorSadik, 0); switch (Actor_Query_Goal_Number(kActorSadik)) { @@ -101,10 +108,6 @@ void AIScriptSadik::TimerExpired(int timer) { void AIScriptSadik::CompletedMovementTrack() { switch (Actor_Query_Goal_Number(kActorSadik)) { - case 301: - Actor_Set_Goal_Number(kActorSadik, 302); - break; - case 101: Actor_Set_Goal_Number(kActorSadik, 102); break; @@ -117,6 +120,10 @@ void AIScriptSadik::CompletedMovementTrack() { Actor_Set_Goal_Number(kActorSadik, 106); break; + case 301: + Actor_Set_Goal_Number(kActorSadik, 302); + break; + default: return; //false; } @@ -130,7 +137,7 @@ void AIScriptSadik::ReceivedClue(int clueId, int fromActorId) { void AIScriptSadik::ClickedByPlayer() { if (Actor_Query_Goal_Number(kActorSadik) == 599) { - Actor_Face_Actor(kActorMcCoy, kActorSadik, 1); + Actor_Face_Actor(kActorMcCoy, kActorSadik, true); Actor_Says(kActorMcCoy, 8580, 16); } } @@ -152,9 +159,11 @@ void AIScriptSadik::OtherAgentEnteredCombatMode(int otherActorId, int combatMode } void AIScriptSadik::ShotAtAndMissed() { - if (Actor_Query_Goal_Number(kActorSadik) == 414 || Actor_Query_Goal_Number(kActorSadik) == 416) { + if (Actor_Query_Goal_Number(kActorSadik) == 414 + || Actor_Query_Goal_Number(kActorSadik) == 416 + ) { Game_Flag_Set(714); - if (Actor_Query_Which_Set_In(kActorSadik) != 48) { + if (Actor_Query_Which_Set_In(kActorSadik) != kSetKP07) { Actor_Set_Goal_Number(kActorSadik, 418); Scene_Exits_Disable(); } @@ -162,30 +171,37 @@ void AIScriptSadik::ShotAtAndMissed() { } bool AIScriptSadik::ShotAtAndHit() { + if (Actor_Query_Goal_Number(kActorSadik) == 301) { - if (Game_Flag_Query(48)) { + if (Game_Flag_Query(kFlagSadikIsReplicant)) { Actor_Set_Health(kActorSadik, 60, 60); } else { Actor_Set_Health(kActorSadik, 40, 40); } return true; - } else { - if (Actor_Query_Goal_Number(kActorSadik) == 414 || Actor_Query_Goal_Number(kActorSadik) == 416) { - Game_Flag_Set(714); - if (Actor_Query_Which_Set_In(kActorSadik) != 48) { - Actor_Set_Goal_Number(kActorSadik, 418); - Scene_Exits_Disable(); - } + } + + if (Actor_Query_Goal_Number(kActorSadik) == 414 + || Actor_Query_Goal_Number(kActorSadik) == 416 + ) { + Game_Flag_Set(714); + if (Actor_Query_Which_Set_In(kActorSadik) != kSetKP07) { + Actor_Set_Goal_Number(kActorSadik, 418); + Scene_Exits_Disable(); } - return false; } + return false; } void AIScriptSadik::Retired(int byActorId) { - if ((Actor_Query_Goal_Number(kActorSadik) == 418 || Actor_Query_Goal_Number(kActorSadik) == 450) - && Actor_Query_Which_Set_In(kActorSadik) != 48) { + if ((Actor_Query_Goal_Number(kActorSadik) == 418 + || Actor_Query_Goal_Number(kActorSadik) == 450 + ) + && Actor_Query_Which_Set_In(kActorSadik) != kSetKP07 + ) { Scene_Exits_Enable(); } + if (Actor_Query_In_Set(kActorSadik, kSetKP07)) { Global_Variable_Decrement(kVariableReplicants, 1); Actor_Set_Goal_Number(kActorSadik, 599); @@ -193,8 +209,8 @@ void AIScriptSadik::Retired(int byActorId) { if (Global_Variable_Query(kVariableReplicants) == 0) { Player_Loses_Control(); Delay(2000); - Player_Set_Combat_Mode(0); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, 1, 0, 0); + Player_Set_Combat_Mode(false); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); @@ -233,7 +249,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Flush(kActorSadik); AI_Movement_Track_Append(kActorSadik, 313, 0); AI_Movement_Track_Repeat(kActorSadik); - Game_Flag_Set(509); + Game_Flag_Set(kFlagBB11SadikFight); return true; case 103: @@ -241,7 +257,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Face_Heading(kActorSadik, kActorMcCoy, kActorMcCoy); _animationState = 32; _animationFrame = -1; - Actor_Change_Animation_Mode(kActorMcCoy, 48); + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie); return true; case 104: @@ -280,7 +296,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 301: - Actor_Set_Targetable(kActorSadik, 1); + Actor_Set_Targetable(kActorSadik, true); World_Waypoint_Set(436, 89, -356.11f, 0.0f, 652.42f); AI_Movement_Track_Flush(kActorSadik); AI_Movement_Track_Append_Run(kActorSadik, 436, 0); @@ -288,7 +304,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 302: - Actor_Set_Targetable(kActorSadik, 0); + Actor_Set_Targetable(kActorSadik, false); return true; case 303: @@ -297,7 +313,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 304: - Actor_Set_Targetable(kActorSadik, 0); + Actor_Set_Targetable(kActorSadik, false); AI_Countdown_Timer_Reset(kActorSadik, 0); return true; @@ -314,10 +330,10 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 308: if (Player_Query_Current_Scene() == 102) { Actor_Force_Stop_Walking(kActorMcCoy); - Actor_Change_Animation_Mode(kActorSadik, 6); + Actor_Change_Animation_Mode(kActorSadik, kAnimationModeCombatAttack); Sound_Play(12, 100, 0, 0, 50); - Actor_Change_Animation_Mode(kActorMcCoy, 48); - Actor_Retired_Here(kActorMcCoy, 6, 6, 1, -1); + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie); + Actor_Retired_Here(kActorMcCoy, 6, 6, true, -1); } return true; @@ -357,8 +373,8 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 413: - Loop_Actor_Walk_To_XYZ(kActorSadik, -1062.0f, 0.0f, 219.0f, 0, 0, 1, 0); - Actor_Set_Targetable(kActorSadik, 1); + Loop_Actor_Walk_To_XYZ(kActorSadik, -1062.0f, 0.0f, 219.0f, 0, false, true, 0); + Actor_Set_Targetable(kActorSadik, true); Non_Player_Actor_Combat_Mode_On(kActorSadik, kActorCombatStateIdle, true, kActorMcCoy, 9, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, false); Actor_Set_Goal_Number(kActorSadik, 450); return true; @@ -366,49 +382,49 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 414: Actor_Put_In_Set(kActorSadik, kSetKP05_KP06); Actor_Set_At_XYZ(kActorSadik, -961.0f, 0.0f, -778.0f, 150); - Actor_Set_Targetable(kActorSadik, 1); + Actor_Set_Targetable(kActorSadik, true); return true; case 415: - Actor_Says(kActorSadik, 110, 3); - Actor_Says(kActorMcCoy, 2290, 3); - Actor_Says(kActorSadik, 310, 3); - Actor_Says(kActorMcCoy, 2300, 3); - if (Game_Flag_Query(48)) { - Actor_Says(kActorSadik, 180, 3); - Actor_Says(kActorSadik, 190, 3); - Actor_Says(kActorMcCoy, 2310, 3); - Actor_Says(kActorSadik, 200, 3); + Actor_Says(kActorSadik, 110, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 2290, kAnimationModeTalk); + Actor_Says(kActorSadik, 310, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 2300, kAnimationModeTalk); + if (Game_Flag_Query(kFlagSadikIsReplicant)) { + Actor_Says(kActorSadik, 180, kAnimationModeTalk); + Actor_Says(kActorSadik, 190, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 2310, kAnimationModeTalk); + Actor_Says(kActorSadik, 200, kAnimationModeTalk); } else { - Actor_Says(kActorSadik, 140, 3); - Actor_Says(kActorSadik, 150, 3); - Actor_Says(kActorMcCoy, 2305, 3); - Actor_Says(kActorSadik, 160, 3); - Actor_Says(kActorSadik, 170, 3); + Actor_Says(kActorSadik, 140, kAnimationModeTalk); + Actor_Says(kActorSadik, 150, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 2305, kAnimationModeTalk); + Actor_Says(kActorSadik, 160, kAnimationModeTalk); + Actor_Says(kActorSadik, 170, kAnimationModeTalk); } - Actor_Says(kActorMcCoy, 2315, 3); - Actor_Says(kActorSadik, 210, 3); - Actor_Says(kActorSadik, 220, 3); - Actor_Says(kActorSadik, 230, 3); - Actor_Says(kActorSadik, 240, 3); - Actor_Says(kActorSadik, 250, 3); - Actor_Says(kActorSadik, 260, 3); + Actor_Says(kActorMcCoy, 2315, kAnimationModeTalk); + Actor_Says(kActorSadik, 210, kAnimationModeTalk); + Actor_Says(kActorSadik, 220, kAnimationModeTalk); + Actor_Says(kActorSadik, 230, kAnimationModeTalk); + Actor_Says(kActorSadik, 240, kAnimationModeTalk); + Actor_Says(kActorSadik, 250, kAnimationModeTalk); + Actor_Says(kActorSadik, 260, kAnimationModeTalk); Actor_Set_Goal_Number(kActorSadik, 416); return true; case 416: - Loop_Actor_Walk_To_XYZ(kActorSadik, -961.0f, 0.0f, -778.0f, 0, 0, 0, 0); - Actor_Face_Heading(kActorSadik, 150, 0); + Loop_Actor_Walk_To_XYZ(kActorSadik, -961.0f, 0.0f, -778.0f, 0, false, false, 0); + Actor_Face_Heading(kActorSadik, 150, false); return true; case 417: - Actor_Face_Actor(kActorSadik, kActorMcCoy, 1); - Actor_Says(kActorSadik, 320, 3); - Loop_Actor_Walk_To_XYZ(kActorSadik, -857.0f, 0.0f, -703.0f, 0, 0, 1, 0); - Actor_Says(kActorMcCoy, 2330, 3); - Actor_Says(kActorSadik, 330, 3); - Actor_Says(kActorMcCoy, 2335, 3); - Actor_Says(kActorSadik, 340, 3); + Actor_Face_Actor(kActorSadik, kActorMcCoy, true); + Actor_Says(kActorSadik, 320, kAnimationModeTalk); + Loop_Actor_Walk_To_XYZ(kActorSadik, -857.0f, 0.0f, -703.0f, 0, false, true, 0); + Actor_Says(kActorMcCoy, 2330, kAnimationModeTalk); + Actor_Says(kActorSadik, 330, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 2335, kAnimationModeTalk); + Actor_Says(kActorSadik, 340, kAnimationModeTalk); Actor_Set_Goal_Number(kActorSadik, 416); return true; @@ -553,7 +569,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) { *animation = 328; _animationFrame = 0; _animationState = 0; - Actor_Change_Animation_Mode(kActorSadik, 0); + Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle); } break; @@ -564,7 +580,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; _animationState = 7; *animation = 312; - Actor_Change_Animation_Mode(kActorSadik, 4); + Actor_Change_Animation_Mode(kActorSadik, kAnimationModeCombatIdle); } break; @@ -575,7 +591,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; _animationState = 7; *animation = 312; - Actor_Change_Animation_Mode(kActorSadik, 4); + Actor_Change_Animation_Mode(kActorSadik, kAnimationModeCombatIdle); } break; @@ -632,7 +648,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; _animationState = 7; *animation = 312; - Actor_Change_Animation_Mode(kActorSadik, 4); + Actor_Change_Animation_Mode(kActorSadik, kAnimationModeCombatIdle); } break; @@ -695,7 +711,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) { *animation = 328; _animationFrame = 0; _animationState = 0; - Actor_Change_Animation_Mode(kActorSadik, 0); + Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle); } break; @@ -726,7 +742,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) { *animation = 328; _animationFrame = 0; _animationState = 0; - Actor_Change_Animation_Mode(kActorSadik, 0); + Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle); } break; @@ -737,7 +753,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) { *animation = 328; _animationFrame = 0; _animationState = 0; - Actor_Change_Animation_Mode(kActorSadik, 0); + Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle); } break; @@ -763,7 +779,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) { _var1 = 221; } if (_animationFrame == 6) { - Actor_Change_Animation_Mode(0, 21); + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeHit); } } if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) { @@ -771,7 +787,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; _animationState = 0; - Actor_Change_Animation_Mode(kActorSadik, 0); + Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle); if (Actor_Query_Goal_Number(kActorSadik) == 105) { Actor_Change_Animation_Mode(kActorSadik, 63); } @@ -783,10 +799,10 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) { _animationFrame++; if (_animationFrame == 4) { if (Actor_Query_Goal_Number(kActorSadik) == 105) { - Actor_Change_Animation_Mode(0, 48); + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie); _var1 = 222; } else { - Actor_Change_Animation_Mode(0, 68); + Actor_Change_Animation_Mode(kActorMcCoy, 68); _var1 = 223; } } @@ -795,7 +811,7 @@ bool AIScriptSadik::UpdateAnimation(int *animation, int *frame) { *animation = 328; _animationFrame = 0; _animationState = 0; - Actor_Change_Animation_Mode(kActorSadik, 0); + Actor_Change_Animation_Mode(kActorSadik, kAnimationModeIdle); if (Actor_Query_Goal_Number(kActorSadik) == 105) { AI_Movement_Track_Flush(kActorSadik); AI_Movement_Track_Append(kActorSadik, 318, 0); @@ -995,7 +1011,9 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) { break; case 62: - if (Actor_Query_Goal_Number(kActorSadik) != 105 && Actor_Query_Goal_Number(kActorSadik) != 106) { + if (Actor_Query_Goal_Number(kActorSadik) != 105 + && Actor_Query_Goal_Number(kActorSadik) != 106 + ) { _animationState = 31; _animationFrame = 0; } else { @@ -1005,7 +1023,9 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) { break; case 63: - if (Actor_Query_Goal_Number(kActorSadik) != 105 && Actor_Query_Goal_Number(kActorSadik) != 106) { + if (Actor_Query_Goal_Number(kActorSadik) != 105 + && Actor_Query_Goal_Number(kActorSadik) != 106 + ) { _animationState = 30; _animationFrame = 2; } else { diff --git a/engines/bladerunner/script/ai/sebastian.cpp b/engines/bladerunner/script/ai/sebastian.cpp index b6a9b50bea..2d8bec2852 100644 --- a/engines/bladerunner/script/ai/sebastian.cpp +++ b/engines/bladerunner/script/ai/sebastian.cpp @@ -40,8 +40,11 @@ void AIScriptSebastian::Initialize() { } bool AIScriptSebastian::Update() { - if (Actor_Query_Goal_Number(kActorSebastian) < 200 && Global_Variable_Query(kVariableChapter) == 3) + if (Actor_Query_Goal_Number(kActorSebastian) < 200 + && Global_Variable_Query(kVariableChapter) == 3 + ) { Actor_Set_Goal_Number(kActorSebastian, 200); + } return false; } diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp index 637d3b0983..9c7d51f56f 100644 --- a/engines/bladerunner/script/ai/steele.cpp +++ b/engines/bladerunner/script/ai/steele.cpp @@ -150,8 +150,9 @@ bool AIScriptSteele::Update() { return true; } - if (Actor_Query_Goal_Number(kActorSteele) != 271) { + if (Actor_Query_Goal_Number(kActorSteele) == 271) { Actor_Set_Goal_Number(kActorSteele, 270); + return true; } break; diff --git a/engines/bladerunner/script/scene/bb01.cpp b/engines/bladerunner/script/scene/bb01.cpp index 47734a4d23..f78cd72898 100644 --- a/engines/bladerunner/script/scene/bb01.cpp +++ b/engines/bladerunner/script/scene/bb01.cpp @@ -26,11 +26,11 @@ namespace BladeRunner { void SceneScriptBB01::InitializeScene() { if (Game_Flag_Query(kFlagDR02toBB01)) { - Setup_Scene_Information(-253.0f, 9.0f, 715.0f, 266); + Setup_Scene_Information(-253.0f, 9.0f, 715.0f, 266); } else if (Game_Flag_Query(kFlagBB02toBB01)) { - Setup_Scene_Information(-128.0f, 9.0f, 342.0f, 266); + Setup_Scene_Information(-128.0f, 9.0f, 342.0f, 266); } else { - Setup_Scene_Information(43.0f, 0.0f, 1058.0f, 0); + Setup_Scene_Information( 43.0f, 0.0f, 1058.0f, 0); } Scene_Exit_Add_2D_Exit(0, 0, 0, 72, 299, 3); diff --git a/engines/bladerunner/script/scene/bb02.cpp b/engines/bladerunner/script/scene/bb02.cpp index 8ebecee27f..f07a37aab8 100644 --- a/engines/bladerunner/script/scene/bb02.cpp +++ b/engines/bladerunner/script/scene/bb02.cpp @@ -141,6 +141,7 @@ void SceneScriptBB02::SceneFrameAdvanced(int frame) { if (frame == 1) { Ambient_Sounds_Play_Sound(434, 40, -50, -50, 0); } + if (frame == 124) { Ambient_Sounds_Play_Sound(434, 40, -50, -50, 0); } @@ -151,10 +152,10 @@ void SceneScriptBB02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptBB02::PlayerWalkedIn() { if (Game_Flag_Query(kFlagBB03toBB02)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 86.0f, -415.06f, 174.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 86.0f, -415.06f, 174.0f, 0, false, false, 0); Game_Flag_Reset(kFlagBB03toBB02); } else if (Game_Flag_Query(kFlagBB04toBB02)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 35.0f, -415.06f, -27.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 35.0f, -415.06f, -27.0f, 0, false, false, 0); Player_Gains_Control(); Game_Flag_Reset(kFlagBB04toBB02); } diff --git a/engines/bladerunner/script/scene/bb03.cpp b/engines/bladerunner/script/scene/bb03.cpp index b21fcd387c..de7c368d11 100644 --- a/engines/bladerunner/script/scene/bb03.cpp +++ b/engines/bladerunner/script/scene/bb03.cpp @@ -28,7 +28,7 @@ void SceneScriptBB03::InitializeScene() { Setup_Scene_Information(20.0f, 60.16f, 0.0f, 0); Game_Flag_Reset(kFlagBB02toBB03); if (Game_Flag_Query(kFlagBB04toBB03)) { - Setup_Scene_Information(176.0f, 60.16f, 0.0f, 900); + Setup_Scene_Information(176.0f, 60.16f, 0.0f, 900); } if (Game_Flag_Query(kFlagBB05toBB03)) { Setup_Scene_Information(204.0f, 60.16f, -164.0f, 740); diff --git a/engines/bladerunner/script/scene/bb04.cpp b/engines/bladerunner/script/scene/bb04.cpp index ab935ad55c..6ac7a7e5bf 100644 --- a/engines/bladerunner/script/scene/bb04.cpp +++ b/engines/bladerunner/script/scene/bb04.cpp @@ -26,10 +26,10 @@ namespace BladeRunner { void SceneScriptBB04::InitializeScene() { if (Game_Flag_Query(kFlagBB03toBB04)) { - Setup_Scene_Information(-107.0f, -26.6f, 397.0f, 29); + Setup_Scene_Information(-107.0f, -26.6f, 397.0f, 29); Game_Flag_Reset(kFlagBB03toBB04); } else { - Setup_Scene_Information(-15.0f, -25.17f, 45.0f, 691); + Setup_Scene_Information( -15.0f, -25.17f, 45.0f, 691); } Scene_Exit_Add_2D_Exit(0, 218, 102, 360, 254, 1); diff --git a/engines/bladerunner/script/scene/bb05.cpp b/engines/bladerunner/script/scene/bb05.cpp index cf788291a2..ef3e5ba6ac 100644 --- a/engines/bladerunner/script/scene/bb05.cpp +++ b/engines/bladerunner/script/scene/bb05.cpp @@ -60,9 +60,9 @@ void SceneScriptBB05::InitializeScene() { Ambient_Sounds_Add_Sound( 73, 5, 80, 14, 14, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound( 74, 5, 80, 14, 14, -100, 100, -101, -101, 0, 0); - if (!Game_Flag_Query(495)) { - Overlay_Play("BB05OVER", 0, false, false, 0); - Game_Flag_Set(495); + if (!Game_Flag_Query(kFlagBB05Entered)) { + Overlay_Play("BB05OVER", 0, false, false, 0); // Sadik's shadow in lower left corner + Game_Flag_Set(kFlagBB05Entered); } } @@ -180,7 +180,7 @@ void SceneScriptBB05::PlayerWalkedIn() { Actor_Says(kActorMcCoy, 7040, 14); Actor_Says(kActorSebastian, 180, 16); Actor_Says(kActorMcCoy, 7045, 14); - if (Game_Flag_Query(399)) { + if (Game_Flag_Query(kFlagGeneralDollShot)) { Actor_Says(kActorSebastian, 190, 15); Actor_Says(kActorMcCoy, 7050, 17); Actor_Says(kActorSebastian, 200, 16); diff --git a/engines/bladerunner/script/scene/bb06.cpp b/engines/bladerunner/script/scene/bb06.cpp index 51fc0db2c0..8dca747684 100644 --- a/engines/bladerunner/script/scene/bb06.cpp +++ b/engines/bladerunner/script/scene/bb06.cpp @@ -33,7 +33,7 @@ void SceneScriptBB06::InitializeScene() { Setup_Scene_Information(-115.0f, 0.0f, -103.0f, 375); Game_Flag_Reset(kFlagBB07toBB06); } else { - Setup_Scene_Information(-37.0f, 0.0f, 178.0f, 0); + Setup_Scene_Information( -37.0f, 0.0f, 178.0f, 0); } Scene_Exit_Add_2D_Exit(0, 0, 43, 14, 478, 3); @@ -64,15 +64,16 @@ void SceneScriptBB06::InitializeScene() { } else { Scene_Loop_Set_Default(1); } - if (Game_Flag_Query(410)) { - Overlay_Play("BB06OVER", 1, true, false, 0); + + if (Game_Flag_Query(kFlagBB06AndroidDestroyed)) { + Overlay_Play("BB06OVER", 1, true, false, 0); // TODO: check, it's is playing while the background is still panning so it looks pretty weird } } void SceneScriptBB06::SceneLoaded() { Obstacle_Object("V2CHESSTBL01", true); Clickable_Object("BOX31"); - Item_Add_To_World(77, 931, kSetBB02_BB04_BB06_BB51, -127.0f, 68.42f, 57.0f, 0, 8, 8, true, true, false, true); + Item_Add_To_World(kItemBB06ControlBox, 931, kSetBB02_BB04_BB06_BB51, -127.0f, 68.42f, 57.0f, 0, 8, 8, true, true, false, true); } bool SceneScriptBB06::MouseClick(int x, int y) { @@ -83,7 +84,7 @@ bool SceneScriptBB06::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("BOX31", objectName)) { if (!Loop_Actor_Walk_To_Scene_Object(kActorMcCoy, "BOX31", 24, true, false)) { Actor_Face_Object(kActorMcCoy, "BOX31", true); - if (Game_Flag_Query(410)) { + if (Game_Flag_Query(kFlagBB06AndroidDestroyed)) { Actor_Voice_Over(60, kActorVoiceOver); Actor_Voice_Over(70, kActorVoiceOver); } else { @@ -99,11 +100,11 @@ bool SceneScriptBB06::ClickedOnActor(int actorId) { } bool SceneScriptBB06::ClickedOnItem(int itemId, bool a2) { - if (itemId == 77) { + if (itemId == kItemBB06ControlBox) { if (Player_Query_Combat_Mode()) { Overlay_Play("BB06OVER", 1, true, true, 0); - Game_Flag_Set(410); - Item_Remove_From_World(77); + Game_Flag_Set(kFlagBB06AndroidDestroyed); + Item_Remove_From_World(kItemBB06ControlBox); return true; } } diff --git a/engines/bladerunner/script/scene/bb07.cpp b/engines/bladerunner/script/scene/bb07.cpp index 37bf9b5be6..060ae28dd4 100644 --- a/engines/bladerunner/script/scene/bb07.cpp +++ b/engines/bladerunner/script/scene/bb07.cpp @@ -28,7 +28,7 @@ void SceneScriptBB07::InitializeScene() { if (Game_Flag_Query(kFlagBB12toBB07)) { Setup_Scene_Information(-655.0f, 252.59f, -1136.0f, 323); } else if (Game_Flag_Query(kFlagBB06toBB07)) { - Setup_Scene_Information(-551.0f, 252.59f, -1004.0f, 29); + Setup_Scene_Information(-551.0f, 252.59f, -1004.0f, 29); Game_Flag_Reset(kFlagBB06toBB07); } else { Setup_Scene_Information(-652.0f, 252.59f, -1018.0f, 268); @@ -37,6 +37,7 @@ void SceneScriptBB07::InitializeScene() { Scene_Exit_Add_2D_Exit(0, 0, 16, 51, 426, 3); Scene_Exit_Add_2D_Exit(1, 124, 101, 172, 305, 3); Scene_Exit_Add_2D_Exit(2, 282, 408, 476, 479, 2); + Scene_2D_Region_Add(0, 308, 283, 354, 308); Ambient_Sounds_Add_Looping_Sound(332, 44, 0, 1); @@ -69,15 +70,19 @@ bool SceneScriptBB07::MouseClick(int x, int y) { bool SceneScriptBB07::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("PRINTER", objectName)) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -472.63f, 252.59f, -1086.81f, 0, 0, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -472.63f, 252.59f, -1086.81f, 0, false, false, 0)) { Actor_Face_Object(kActorMcCoy, "PRINTER", true); - if (Game_Flag_Query(396) && !Game_Flag_Query(398)) { + if ( Game_Flag_Query(kFlagBB07ElectricityOn) + && !Game_Flag_Query(kFlagBB07PrinterChecked) + ) { Actor_Voice_Over(130, kActorVoiceOver); Item_Pickup_Spin_Effect(941, 439, 242); Actor_Voice_Over(140, kActorVoiceOver); - Game_Flag_Set(398); + Game_Flag_Set(kFlagBB07PrinterChecked); Actor_Clue_Acquire(kActorMcCoy, kClueDNASebastian, true, -1); - } else if (Game_Flag_Query(396) && Game_Flag_Query(398)) { + } else if (Game_Flag_Query(kFlagBB07ElectricityOn) + && Game_Flag_Query(kFlagBB07PrinterChecked) + ) { Actor_Face_Object(kActorMcCoy, "PRINTER", true); Actor_Says(kActorMcCoy, 8570, 13); } else { @@ -94,10 +99,10 @@ bool SceneScriptBB07::ClickedOnActor(int actorId) { } bool SceneScriptBB07::ClickedOnItem(int itemId, bool a2) { - if (itemId == 83) { - if (!Loop_Actor_Walk_To_Item(kActorMcCoy, 83, 36, 1, false)) { + if (itemId == 83) { // this item is never added to this set/scene + if (!Loop_Actor_Walk_To_Item(kActorMcCoy, 83, 36, true, false)) { Actor_Face_Item(kActorMcCoy, 83, true); - if (Game_Flag_Query(396) == 1) { + if (Game_Flag_Query(kFlagBB07ElectricityOn)) { Actor_Voice_Over(150, kActorVoiceOver); Actor_Voice_Over(160, kActorVoiceOver); Actor_Voice_Over(170, kActorVoiceOver); @@ -109,7 +114,7 @@ bool SceneScriptBB07::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB07::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -615.0f, 252.59f, -1018.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -615.0f, 252.59f, -1018.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Overlay_Remove("BB07OVER"); @@ -118,8 +123,9 @@ bool SceneScriptBB07::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -619.0f, 252.59f, -1136.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -619.0f, 252.59f, -1136.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Overlay_Remove("BB07OVER"); @@ -128,8 +134,9 @@ bool SceneScriptBB07::ClickedOnExit(int exitId) { } return true; } + if (exitId == 2) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -551.0f, 252.59f, -1004.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -551.0f, 252.59f, -1004.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Overlay_Remove("BB07OVER"); @@ -143,18 +150,18 @@ bool SceneScriptBB07::ClickedOnExit(int exitId) { bool SceneScriptBB07::ClickedOn2DRegion(int region) { if (region == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -568.63f, 252.59f, -1114.81f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -568.63f, 252.59f, -1114.81f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 229, false); - if (Game_Flag_Query(396)) { - Actor_Says(kActorMcCoy, 8585, 15); - } else { + if (!Game_Flag_Query(kFlagBB07ElectricityOn)) { Ambient_Sounds_Play_Sound(592, 40, 20, 20, 99); - Overlay_Play("BB07OVER", 1, 0, 1, 0); - Overlay_Play("BB07OVER", 2, 1, 0, 0); - Game_Flag_Set(396); - if (!Game_Flag_Query(398)) { - Actor_Says(kActorAnsweringMachine, 0, 3); + Overlay_Play("BB07OVER", 1, false, true, 0); + Overlay_Play("BB07OVER", 2, true, false, 0); + Game_Flag_Set(kFlagBB07ElectricityOn); + if (!Game_Flag_Query(kFlagBB07PrinterChecked)) { + Actor_Says(kActorAnsweringMachine, 0, kAnimationModeTalk); } + } else { + Actor_Says(kActorMcCoy, 8585, 15); } } } @@ -169,11 +176,12 @@ void SceneScriptBB07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptBB07::PlayerWalkedIn() { if (Game_Flag_Query(kFlagBB05toBB07)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -594.0f, 252.59f, -1018.0f, 6, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -594.0f, 252.59f, -1018.0f, 6, false, false, 0); Game_Flag_Reset(kFlagBB05toBB07); } + if (Game_Flag_Query(kFlagBB12toBB07)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -602.0f, 252.59f, -1124.0f, 6, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -602.0f, 252.59f, -1124.0f, 6, false, false, 0); Game_Flag_Reset(kFlagBB12toBB07); } } diff --git a/engines/bladerunner/script/scene/bb08.cpp b/engines/bladerunner/script/scene/bb08.cpp index 7dc951e5b0..7c856dba4f 100644 --- a/engines/bladerunner/script/scene/bb08.cpp +++ b/engines/bladerunner/script/scene/bb08.cpp @@ -30,29 +30,32 @@ void SceneScriptBB08::InitializeScene() { } else { Setup_Scene_Information(247.0f, 0.0f, 27.0f, 790); } - Scene_Exit_Add_2D_Exit(0, 307, 0, 361, 238, 0); + + Scene_Exit_Add_2D_Exit(0, 307, 0, 361, 238, 0); Scene_Exit_Add_2D_Exit(1, 117, 38, 214, 245, 0); + Ambient_Sounds_Add_Looping_Sound(105, 44, 0, 1); - Ambient_Sounds_Add_Sound(291, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(292, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(293, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(294, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(295, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(291, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(292, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(293, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(294, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(295, 1, 20, 20, 25, -100, 100, -100, 100, 0, 0); Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - if (!Game_Flag_Query(496)) { - Overlay_Play("BB08OVER", 0, 0, 0, 0); - Game_Flag_Set(496); + Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + + if (!Game_Flag_Query(kFlagBB08Entered)) { + Overlay_Play("BB08OVER", 0, false, false, 0); // Sadik's shadow going up + Game_Flag_Set(kFlagBB08Entered); } } @@ -80,10 +83,10 @@ bool SceneScriptBB08::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB08::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 204.0f, 0.1f, 94.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 204.0f, 0.1f, 94.0f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 256, false); Footstep_Sound_Override_On(2); - Loop_Actor_Travel_Ladder(kActorMcCoy, 8, 1, 0); + Loop_Actor_Travel_Ladder(kActorMcCoy, 8, true, 0); Footstep_Sound_Override_Off(); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); @@ -92,11 +95,12 @@ bool SceneScriptBB08::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 247.0f, 0.1f, 27.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 247.0f, 0.1f, 27.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(506); + Game_Flag_Set(kFlagBB08toBB12); Set_Enter(kSetBB12, kSceneBB12); } return true; @@ -118,12 +122,12 @@ void SceneScriptBB08::PlayerWalkedIn() { if (Game_Flag_Query(kFlagBB09toBB08)) { Actor_Set_At_XYZ(kActorMcCoy, 204.0f, 96.1f, 94.0f, 256); Footstep_Sound_Override_On(2); - Loop_Actor_Travel_Ladder(kActorMcCoy, 8, 0, 0); + Loop_Actor_Travel_Ladder(kActorMcCoy, 8, false, 0); Footstep_Sound_Override_Off(); Actor_Face_Heading(kActorMcCoy, 768, false); Game_Flag_Reset(kFlagBB09toBB08); } else { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 188.0f, 0.1f, 28.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 188.0f, 0.1f, 28.0f, 0, false, false, 0); } } diff --git a/engines/bladerunner/script/scene/bb09.cpp b/engines/bladerunner/script/scene/bb09.cpp index 15d491976d..ffe0fd08f6 100644 --- a/engines/bladerunner/script/scene/bb09.cpp +++ b/engines/bladerunner/script/scene/bb09.cpp @@ -33,27 +33,30 @@ void SceneScriptBB09::InitializeScene() { Game_Flag_Reset(kFlagBB08toBB09); Setup_Scene_Information(107.45f, -9.14f, 166.0f, 244); } + Scene_Exit_Add_2D_Exit(0, 224, 213, 286, 353, 1); - Scene_Exit_Add_2D_Exit(1, 75, 450, 480, 479, 2); - Ambient_Sounds_Add_Looping_Sound(54, 20, 100, 1); - Ambient_Sounds_Add_Looping_Sound(103, 40, 0, 1); - Ambient_Sounds_Add_Looping_Sound(105, 50, 55, 1); - Ambient_Sounds_Add_Sound(297, 5, 20, 20, 25, -100, -100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(298, 5, 20, 20, 25, -100, -100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(299, 5, 20, 20, 25, -100, -100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Actor_Set_Targetable(kActorSadik, true); + Scene_Exit_Add_2D_Exit(1, 75, 450, 480, 479, 2); + + Ambient_Sounds_Add_Looping_Sound(54, 20, 100, 1); + Ambient_Sounds_Add_Looping_Sound(103, 40, 0, 1); + Ambient_Sounds_Add_Looping_Sound(105, 50, 55, 1); + Ambient_Sounds_Add_Sound(297, 5, 20, 20, 25, -100, -100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(298, 5, 20, 20, 25, -100, -100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(299, 5, 20, 20, 25, -100, -100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + + Actor_Set_Targetable(kActorSadik, true); // Don't kill Sadik yet, game cannot continue, a bug? } void SceneScriptBB09::SceneLoaded() { @@ -80,8 +83,8 @@ bool SceneScriptBB09::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB09::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 454.56f, -9.0f, 190.31f, 0, 1, false, 0)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 450.56f, -9.0f, 250.31f, 0, 0, false, 0); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 454.56f, -9.0f, 190.31f, 0, true, false, 0)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 450.56f, -9.0f, 250.31f, 0, false, false, 0); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB09toBB10a); @@ -90,8 +93,9 @@ bool SceneScriptBB09::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 71.0f, -9.0f, 136.0f, 72, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 71.0f, -9.0f, 136.0f, 72, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB09toBB08); diff --git a/engines/bladerunner/script/scene/bb10.cpp b/engines/bladerunner/script/scene/bb10.cpp index 6ae671ceba..7e7fd78567 100644 --- a/engines/bladerunner/script/scene/bb10.cpp +++ b/engines/bladerunner/script/scene/bb10.cpp @@ -26,50 +26,54 @@ namespace BladeRunner { void SceneScriptBB10::InitializeScene() { if (Game_Flag_Query(kFlagBB11toBB10)) { - Setup_Scene_Information(255.29f, 90.24f, -103.0f, 830); + Setup_Scene_Information(255.29f, 90.24f, -103.0f, 830); } else if (Game_Flag_Query(kFlagBB09toBB10b)) { Game_Flag_Reset(kFlagBB09toBB10b); - Setup_Scene_Information(151.67f, 66.84f, -313.06f, 0); + Setup_Scene_Information(151.67f, 66.84f, -313.06f, 0); } else { - Setup_Scene_Information(199.67f, 67.4f, -169.06f, 628); + Setup_Scene_Information(199.67f, 67.4f, -169.06f, 628); } - if (Global_Variable_Query(36) > 2) { + + if (Global_Variable_Query(kVariableBB10ShelvesAvailable) > 2) { Scene_Exit_Add_2D_Exit(0, 281, 0, 531, 115, 0); } + Scene_Exit_Add_2D_Exit(1, 58, 91, 193, 401, 3); + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Add_Looping_Sound(382, 76, 0, 1); Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - if (!Game_Flag_Query(466)) { + Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + + if (!Game_Flag_Query(kFlagBB10Shelf1Available)) { Scene_2D_Region_Add(0, 458, 99, 522, 133); - Overlay_Play("BB10OVR1", 0, 1, 0, 0); + Overlay_Play("BB10OVR1", 0, true, false, 0); } - if (!Game_Flag_Query(467)) { + if (!Game_Flag_Query(kFlagBB10Shelf2Available)) { Scene_2D_Region_Add(1, 459, 164, 522, 193); - Overlay_Play("BB10OVR2", 0, 1, 0, 0); + Overlay_Play("BB10OVR2", 0, true, false, 0); } - if (!Game_Flag_Query(468)) { + if (!Game_Flag_Query(kFlagBB10Shelf3Available)) { Scene_2D_Region_Add(2, 458, 194, 522, 223); - Overlay_Play("BB10OVR3", 0, 1, 0, 0); + Overlay_Play("BB10OVR3", 0, true, false, 0); } - if (!Game_Flag_Query(469)) { + if (!Game_Flag_Query(kFlagBB10Shelf4Available)) { Scene_2D_Region_Add(3, 458, 255, 522, 278); - Overlay_Play("BB10OVR4", 0, 1, 0, 0); + Overlay_Play("BB10OVR4", 0, true, false, 0); } - if (!Game_Flag_Query(470)) { + if (!Game_Flag_Query(kFlagBB10Shelf5Available)) { Scene_2D_Region_Add(4, 458, 316, 522, 335); - Overlay_Play("BB10OVR5", 0, 1, 0, 0); + Overlay_Play("BB10OVR5", 0, true, false, 0); } } @@ -99,14 +103,14 @@ bool SceneScriptBB10::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB10::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 225.58f, 67.2f, -102.1f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 225.58f, 67.2f, -102.1f, 0, true, false, 0)) { Player_Set_Combat_Mode(false); Actor_Face_Heading(kActorMcCoy, 274, false); Footstep_Sound_Override_On(2); - Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 1, kAnimationModeIdle); + Loop_Actor_Travel_Stairs(kActorMcCoy, 2, true, kAnimationModeIdle); Footstep_Sound_Override_Off(); Footstep_Sound_Override_On(2); - Loop_Actor_Travel_Ladder(kActorMcCoy, 3, 1, 0); + Loop_Actor_Travel_Ladder(kActorMcCoy, 3, true, kAnimationModeIdle); Footstep_Sound_Override_Off(); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); @@ -115,8 +119,11 @@ bool SceneScriptBB10::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 206.01f, 66.84f, -261.62f, 0, 1, false, 0) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 151.67f, 66.84f, -313.06f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 206.01f, 66.84f, -261.62f, 0, true, false, 0) + && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 151.67f, 66.84f, -313.06f, 0, true, false, 0) + ) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Reset(kFlagBB09toBB10a); @@ -129,40 +136,43 @@ bool SceneScriptBB10::ClickedOnExit(int exitId) { } bool SceneScriptBB10::ClickedOn2DRegion(int region) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 225.58f, 67.2f, -102.1f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 225.58f, 67.2f, -102.1f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 274, false); Sound_Play(Random_Query(289, 290), 40, 70, 70, 50); switch (region) { - case 4: - Overlay_Remove("BB10OVR5"); - Game_Flag_Set(470); - Scene_2D_Region_Remove(4); + case 0: + Overlay_Remove("BB10OVR1"); + Game_Flag_Set(kFlagBB10Shelf1Available); + Scene_2D_Region_Remove(0); break; - case 3: - Overlay_Remove("BB10OVR4"); - Game_Flag_Set(469); - Scene_2D_Region_Remove(3); + + case 1: + Overlay_Remove("BB10OVR2"); + Game_Flag_Set(kFlagBB10Shelf2Available); + Scene_2D_Region_Remove(1); break; + case 2: Overlay_Remove("BB10OVR3"); - Game_Flag_Set(468); + Game_Flag_Set(kFlagBB10Shelf3Available); Scene_2D_Region_Remove(2); break; - case 1: - Overlay_Remove("BB10OVR2"); - Game_Flag_Set(467); - Scene_2D_Region_Remove(1); - break; - case 0: - Overlay_Remove("BB10OVR1"); - Game_Flag_Set(466); - Scene_2D_Region_Remove(0); + + case 3: + Overlay_Remove("BB10OVR4"); + Game_Flag_Set(kFlagBB10Shelf4Available); + Scene_2D_Region_Remove(3); break; - default: + + case 4: + Overlay_Remove("BB10OVR5"); + Game_Flag_Set(kFlagBB10Shelf5Available); + Scene_2D_Region_Remove(4); break; } - Global_Variable_Increment(36, 1); - if (Global_Variable_Query(36) > 4) { + + Global_Variable_Increment(kVariableBB10ShelvesAvailable, 1); + if (Global_Variable_Query(kVariableBB10ShelvesAvailable) > 4) { Scene_Exit_Add_2D_Exit(0, 281, 0, 531, 115, 0); } return false; @@ -180,17 +190,17 @@ void SceneScriptBB10::PlayerWalkedIn() { if (Game_Flag_Query(kFlagBB09toBB10a)) { Player_Loses_Control(); Actor_Set_At_XYZ(kActorMcCoy, 214.01f, 66.84f, -349.62f, 462); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 206.01f, 66.84f, -261.62f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 206.01f, 66.84f, -261.62f, 0, false, false, 0); Player_Gains_Control(); Game_Flag_Reset(kFlagBB09toBB10a); } else if (Game_Flag_Query(kFlagBB11toBB10)) { Actor_Set_At_XYZ(kActorMcCoy, 249.58f, 127.2f, -102.1f, 256); Footstep_Sound_Override_On(2); - Loop_Actor_Travel_Ladder(kActorMcCoy, 3, 0, 0); + Loop_Actor_Travel_Ladder(kActorMcCoy, 3, false, kAnimationModeIdle); Footstep_Sound_Override_Off(); Actor_Face_Heading(kActorMcCoy, 768, false); Footstep_Sound_Override_On(2); - Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 0, kAnimationModeIdle); + Loop_Actor_Travel_Stairs(kActorMcCoy, 3, false, kAnimationModeIdle); Footstep_Sound_Override_Off(); Game_Flag_Reset(kFlagBB11toBB10); } diff --git a/engines/bladerunner/script/scene/bb11.cpp b/engines/bladerunner/script/scene/bb11.cpp index 8cb70b7af5..75e0c6045b 100644 --- a/engines/bladerunner/script/scene/bb11.cpp +++ b/engines/bladerunner/script/scene/bb11.cpp @@ -26,18 +26,20 @@ namespace BladeRunner { void SceneScriptBB11::InitializeScene() { Setup_Scene_Information(43.39f, -10.27f, -20.52f, 200); - if (!Game_Flag_Query(509)) { + if (!Game_Flag_Query(kFlagBB11SadikFight)) { Scene_Exit_Add_2D_Exit(0, 280, 154, 388, 247, 2); } + Ambient_Sounds_Add_Looping_Sound(101, 90, 0, 1); - Ambient_Sounds_Add_Looping_Sound(99, 45, 0, 1); + Ambient_Sounds_Add_Looping_Sound( 99, 45, 0, 1); Ambient_Sounds_Add_Looping_Sound(100, 76, 0, 1); - Ambient_Sounds_Add_Sound(68, 5, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(69, 5, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 68, 5, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 69, 5, 180, 16, 25, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(375, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(376, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0); - if (Game_Flag_Query(509)) { + + if (Game_Flag_Query(kFlagBB11SadikFight)) { Preload(19); Preload(220); Preload(227); @@ -56,7 +58,7 @@ void SceneScriptBB11::InitializeScene() { void SceneScriptBB11::SceneLoaded() { Obstacle_Object("X2AIRCON01", true); Unclickable_Object("X2AIRCON01"); - if (Game_Flag_Query(509)) { + if (Game_Flag_Query(kFlagBB11SadikFight)) { Unobstacle_Object("X2PIPES01", true); Unobstacle_Object("X2PIPES02", true); Unobstacle_Object("X2PIPES03", true); @@ -99,8 +101,10 @@ bool SceneScriptBB11::ClickedOn2DRegion(int region) { } void SceneScriptBB11::SceneFrameAdvanced(int frame) { - if (Actor_Query_Goal_Number(kActorSadik) == 105 && !Game_Flag_Query(375)) { - Actor_Change_Animation_Mode(kActorMcCoy, 48); + if ( Actor_Query_Goal_Number(kActorSadik) == 105 + && !Game_Flag_Query(375) + ) { + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie); Game_Flag_Set(375); } else { if (frame == 1) { @@ -113,7 +117,9 @@ void SceneScriptBB11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptBB11::PlayerWalkedIn() { - if (Actor_Query_Goal_Number(kActorSadik) == 102 && Global_Variable_Query(kVariableChapter) == 2) { + if (Actor_Query_Goal_Number(kActorSadik) == 102 + && Global_Variable_Query(kVariableChapter) == 2 + ) { Actor_Set_Invisible(kActorMcCoy, true); Actor_Set_Goal_Number(kActorSadik, 103); Music_Play(11, 61, 0, 1, -1, 0, 0); diff --git a/engines/bladerunner/script/scene/bb12.cpp b/engines/bladerunner/script/scene/bb12.cpp index 7f7f1d9a41..666738044c 100644 --- a/engines/bladerunner/script/scene/bb12.cpp +++ b/engines/bladerunner/script/scene/bb12.cpp @@ -26,34 +26,37 @@ namespace BladeRunner { void SceneScriptBB12::InitializeScene() { if (Game_Flag_Query(kFlagBB07toBB12)) { - Setup_Scene_Information(138.0f, 0.0f, 104.0f, 760); - } else if (Game_Flag_Query(506)) { - Setup_Scene_Information(-129.0f, 0.0f, 64.0f, 307); + Setup_Scene_Information( 138.0f, 0.0f, 104.0f, 760); + } else if (Game_Flag_Query(kFlagBB08toBB12)) { + Setup_Scene_Information(-129.0f, 0.0f, 64.0f, 307); } else { - Setup_Scene_Information(54.0f, 0.0f, 200.0f, 0); + Setup_Scene_Information( 54.0f, 0.0f, 200.0f, 0); Game_Flag_Reset(kFlagBB05toBB12); } - Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3); - Scene_Exit_Add_2D_Exit(1, 589, 0, 639, 479, 1); + + Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3); + Scene_Exit_Add_2D_Exit(1, 589, 0, 639, 479, 1); Scene_Exit_Add_2D_Exit(2, 377, 374, 533, 479, 2); + Ambient_Sounds_Add_Looping_Sound(103, 28, 0, 1); Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(303, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(305, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(306, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(307, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(308, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(309, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(310, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(303, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(305, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(306, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(307, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(308, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(309, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(310, 5, 50, 27, 27, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(375, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(376, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0); - if (!Game_Flag_Query(497)) { - Overlay_Play("BB12OVER", 0, 0, 0, 0); - Game_Flag_Set(497); + + if (!Game_Flag_Query(kFlagBB12Entered)) { + Overlay_Play("BB12OVER", 0, false, false, 0); // Sadik's shadow going left + Game_Flag_Set(kFlagBB12Entered); } } @@ -80,16 +83,17 @@ bool SceneScriptBB12::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB12::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -129.0f, 0.0f, 64.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -129.0f, 0.0f, 64.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(507); + Game_Flag_Set(kFlagBB12toBB08); Set_Enter(kSetBB08, kSceneBB08); } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 138.0f, 0.0f, 104.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 138.0f, 0.0f, 104.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB12toBB07); @@ -97,8 +101,9 @@ bool SceneScriptBB12::ClickedOnExit(int exitId) { } return true; } + if (exitId == 2) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 54.0f, 0.0f, 200.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 54.0f, 0.0f, 200.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB12toBB05); @@ -114,9 +119,14 @@ bool SceneScriptBB12::ClickedOn2DRegion(int region) { } void SceneScriptBB12::SceneFrameAdvanced(int frame) { - if (frame == 10 || frame == 22 || frame == 33 || frame == 41) { + if (frame == 10 + || frame == 22 + || frame == 33 + || frame == 41 + ) { Sound_Play(311, 17, -30, -30, 50); } + if (frame == 3) { Sound_Play(313, 16, -30, -30, 50); } @@ -127,11 +137,11 @@ void SceneScriptBB12::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptBB12::PlayerWalkedIn() { if (Game_Flag_Query(kFlagBB07toBB12)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 114.0f, 0.0f, 104.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 114.0f, 0.0f, 104.0f, 0, false, false, 0); Game_Flag_Reset(kFlagBB07toBB12); - } else if (Game_Flag_Query(506)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -101.0f, 0.0f, 64.0f, 0, 0, false, 0); - Game_Flag_Reset(506); + } else if (Game_Flag_Query(kFlagBB08toBB12)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -101.0f, 0.0f, 64.0f, 0, false, false, 0); + Game_Flag_Reset(kFlagBB08toBB12); } } diff --git a/engines/bladerunner/script/scene/bb51.cpp b/engines/bladerunner/script/scene/bb51.cpp index a28f66961b..d53a8d72ee 100644 --- a/engines/bladerunner/script/scene/bb51.cpp +++ b/engines/bladerunner/script/scene/bb51.cpp @@ -27,22 +27,25 @@ namespace BladeRunner { void SceneScriptBB51::InitializeScene() { Setup_Scene_Information(101.0f, 0.0f, -25.0f, 152); Game_Flag_Reset(kFlagBB06toBB51); - Scene_Exit_Add_2D_Exit(0, 615, 0, 639, 479, 1); - Scene_Exit_Add_2D_Exit(1, 0, 323, 241, 479, 2); + + Scene_Exit_Add_2D_Exit(0, 615, 0, 639, 479, 1); + Scene_Exit_Add_2D_Exit(1, 0, 323, 241, 479, 2); + Ambient_Sounds_Add_Looping_Sound(103, 28, 0, 1); - Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Scene_Loop_Start_Special(0, 0, 0); + Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + + Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); Scene_Loop_Set_Default(1); } @@ -62,6 +65,7 @@ bool SceneScriptBB51::ClickedOn3DObject(const char *objectName, bool a2) { Actor_Voice_Over(80, kActorVoiceOver); Actor_Voice_Over(90, kActorVoiceOver); } + if (Object_Query_Click("TOP02", objectName)) { Actor_Face_Object(kActorMcCoy, "TOP02", true); Actor_Voice_Over(100, kActorVoiceOver); @@ -89,6 +93,7 @@ bool SceneScriptBB51::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 55.0f, 0.0f, -96.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); diff --git a/engines/bladerunner/script/scene/ct08.cpp b/engines/bladerunner/script/scene/ct08.cpp index 5dc68616e0..eb1aea0843 100644 --- a/engines/bladerunner/script/scene/ct08.cpp +++ b/engines/bladerunner/script/scene/ct08.cpp @@ -25,7 +25,7 @@ namespace BladeRunner { void SceneScriptCT08::InitializeScene() { - if (Game_Flag_Query(679)) { + if (Game_Flag_Query(kFlagChapter3Intro)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Outtake_Play(kOuttakeMovieB1, false, -1); @@ -37,35 +37,40 @@ void SceneScriptCT08::InitializeScene() { Outtake_Play(kOuttakeMovieB4, false, -1); } Outtake_Play(kOuttakeMovieB5, false, -1); - Game_Flag_Reset(679); + Game_Flag_Reset(kFlagChapter3Intro); } Actor_Force_Stop_Walking(kActorMcCoy); - if (Game_Flag_Query(380)) { - Setup_Scene_Information(-11.0f, 0.0f, -156.0f, 769); + + if (Game_Flag_Query(kFlagCT51toCT08)) { + Setup_Scene_Information( -11.0f, 0.0f, -156.0f, 769); } else if (Game_Flag_Query(kFlagCT06toCT08)) { - Setup_Scene_Information(-143.0f, 0.0f, -92.0f, 420); + Setup_Scene_Information(-143.0f, 0.0f, -92.0f, 420); } else { - Setup_Scene_Information(-183.0f, 0.0f, 128.0f, 205); + Setup_Scene_Information(-183.0f, 0.0f, 128.0f, 205); } - Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3); - Scene_Exit_Add_2D_Exit(1, 389, 0, 639, 303, 0); + + Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3); + Scene_Exit_Add_2D_Exit(1, 389, 0, 639, 303, 0); Scene_Exit_Add_2D_Exit(2, 115, 87, 137, 267, 3); - if (Game_Flag_Query(550)) { + + if (Game_Flag_Query(kFlagMcCoyTiedDown)) { Scene_2D_Region_Add(0, 185, 185, 230, 230); } + Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1); - Ambient_Sounds_Add_Looping_Sound(205, 20, 1, 1); - Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); + Ambient_Sounds_Add_Looping_Sound(205, 20, 1, 1); + Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); - Ambient_Sounds_Add_Sound(67, 80, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(68, 50, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(379, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(380, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(377, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0); - if (Game_Flag_Query(380)) { - Scene_Loop_Start_Special(0, 0, 0); + Ambient_Sounds_Add_Sound( 67, 80, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 68, 50, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(379, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(380, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(377, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0); + + if (Game_Flag_Query(kFlagCT51toCT08)) { + Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); Scene_Loop_Set_Default(1); } else { Scene_Loop_Set_Default(1); @@ -76,10 +81,10 @@ void SceneScriptCT08::SceneLoaded() { Obstacle_Object("ASHTRAY", true); Unobstacle_Object("BLANKET03", true); if (!Actor_Clue_Query(kActorMcCoy, kClueRagDoll)) { - Item_Add_To_World(85, 943, 6, 44.0f, 0.0f, -95.0f, 540, 12, 12, false, true, false, true); + Item_Add_To_World(kItemRagDoll, 943, kSetCT08_CT51_UG12, 44.0f, 0.0f, -95.0f, 540, 12, 12, false, true, false, true); } if (!Actor_Clue_Query(kActorMcCoy, kClueCheese)) { - Item_Add_To_World(81, 936, 6, -102.0f, 2.0f, 41.0f, 432, 6, 6, false, true, false, true); + Item_Add_To_World(kItemCheese, 936, kSetCT08_CT51_UG12, -102.0f, 2.0f, 41.0f, 432, 6, 6, false, true, false, true); } } @@ -96,14 +101,16 @@ bool SceneScriptCT08::ClickedOnActor(int actorId) { } bool SceneScriptCT08::ClickedOnItem(int itemId, bool a2) { - if (itemId == 81) { - if (!Loop_Actor_Walk_To_Item(kActorMcCoy, 81, 36, 1, false) && !Game_Flag_Query(550)) { - Actor_Clue_Acquire(kActorMcCoy, kClueCheese, true, -1); - Item_Pickup_Spin_Effect(936, 266, 328); - Item_Remove_From_World(81); - Actor_Voice_Over(480, kActorVoiceOver); - Actor_Voice_Over(490, kActorVoiceOver); - Actor_Voice_Over(500, kActorVoiceOver); + if (itemId == kItemCheese) { + if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemCheese, 36, true, false)) { + if (!Game_Flag_Query(kFlagMcCoyTiedDown)) { + Actor_Clue_Acquire(kActorMcCoy, kClueCheese, true, -1); + Item_Pickup_Spin_Effect(936, 266, 328); + Item_Remove_From_World(kItemCheese); + Actor_Voice_Over(480, kActorVoiceOver); + Actor_Voice_Over(490, kActorVoiceOver); + Actor_Voice_Over(500, kActorVoiceOver); + } } return true; } @@ -112,7 +119,7 @@ bool SceneScriptCT08::ClickedOnItem(int itemId, bool a2) { bool SceneScriptCT08::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -183.0f, 0.0f, 128.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -183.0f, 0.0f, 128.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT08toCT09); @@ -120,18 +127,20 @@ bool SceneScriptCT08::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -11.0f, 0.0f, -156.0f, 0, 1, false, 0)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, 0.0f, -102.0f, 0, 0, false, 0); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -11.0f, 0.0f, -156.0f, 0, true, false, 0)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, 0.0f, -102.0f, 0, false, false, 0); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(379); + Game_Flag_Set(kFlagCT08toCT51); Set_Enter(kSetCT08_CT51_UG12, kSceneCT51); } return true; } + if (exitId == 2) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -143.0f, 0.0f, -92.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -143.0f, 0.0f, -92.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT08toCT06); @@ -144,9 +153,9 @@ bool SceneScriptCT08::ClickedOnExit(int exitId) { bool SceneScriptCT08::ClickedOn2DRegion(int region) { if (region == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -108.0f, 0.0f, -178.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -108.0f, 0.0f, -178.0f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 512, false); - Game_Flag_Reset(550); + Game_Flag_Reset(kFlagMcCoyTiedDown); Player_Set_Combat_Mode_Access(true); Scene_Exits_Enable(); Ambient_Sounds_Play_Sound(564, 40, 99, 0, 0); @@ -165,28 +174,28 @@ void SceneScriptCT08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptCT08::PlayerWalkedIn() { - if (Game_Flag_Query(550)) { + if (Game_Flag_Query(kFlagMcCoyTiedDown)) { Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeTalk); Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle); Actor_Set_At_XYZ(kActorMcCoy, -148.0f, 0.0f, 4.0f, 256); Player_Set_Combat_Mode_Access(false); Scene_Exits_Disable(); - Game_Flag_Reset(380); + Game_Flag_Reset(kFlagCT51toCT08); Game_Flag_Reset(kFlagCT06toCT08); Autosave_Game(1); - } else if (Game_Flag_Query(380)) { - Game_Flag_Reset(380); + } else if (Game_Flag_Query(kFlagCT51toCT08)) { + Game_Flag_Reset(kFlagCT51toCT08); } else if (Game_Flag_Query(kFlagCT06toCT08)) { Game_Flag_Reset(kFlagCT06toCT08); } else { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -156.0f, 0.0f, 128.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -156.0f, 0.0f, 128.0f, 0, false, false, 0); Game_Flag_Reset(kFlagCT09toCT08); } } void SceneScriptCT08::PlayerWalkedOut() { if (!Actor_Clue_Query(kActorMcCoy, kClueRagDoll)) { - Item_Remove_From_World(85); + Item_Remove_From_World(kItemRagDoll); } } diff --git a/engines/bladerunner/script/scene/ct10.cpp b/engines/bladerunner/script/scene/ct10.cpp index 7b666efbf4..0bbc6c2f50 100644 --- a/engines/bladerunner/script/scene/ct10.cpp +++ b/engines/bladerunner/script/scene/ct10.cpp @@ -27,7 +27,9 @@ namespace BladeRunner { void SceneScriptCT10::InitializeScene() { Setup_Scene_Information(-121.0f, 0.0f, -78.0f, 446); Game_Flag_Reset(kFlagCT09toCT08); // a bug? + Scene_Exit_Add_2D_Exit(0, 135, 74, 238, 340, 0); + Ambient_Sounds_Add_Looping_Sound(336, 28, 0, 1); Ambient_Sounds_Add_Sound(375, 6, 180, 33, 33, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(376, 5, 180, 33, 33, 0, 0, -101, -101, 0, 0); diff --git a/engines/bladerunner/script/scene/ct51.cpp b/engines/bladerunner/script/scene/ct51.cpp index 6f44fb0b27..0c6c1c8110 100644 --- a/engines/bladerunner/script/scene/ct51.cpp +++ b/engines/bladerunner/script/scene/ct51.cpp @@ -26,15 +26,18 @@ namespace BladeRunner { void SceneScriptCT51::InitializeScene() { Setup_Scene_Information(0.0f, 0.0f, -102.0f, 470); - Game_Flag_Reset(379); + Game_Flag_Reset(kFlagCT08toCT51); + Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3); + Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1); - Ambient_Sounds_Add_Sound(68, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(69, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 68, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 69, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(375, 60, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(376, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0); - Scene_Loop_Start_Special(0, 0, 0); + + Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); Scene_Loop_Set_Default(1); } @@ -42,10 +45,10 @@ void SceneScriptCT51::SceneLoaded() { Unobstacle_Object("BLANKET03", true); Clickable_Object("BED02"); if (!Actor_Clue_Query(kActorMcCoy, kClueRagDoll)) { - Item_Add_To_World(85, 943, 6, 44.0f, 0.0f, -95.0f, 540, 24, 24, false, true, false, true); + Item_Add_To_World(kItemRagDoll, 943, kSetCT08_CT51_UG12, 44.0f, 0.0f, -95.0f, 540, 24, 24, false, true, false, true); } if (!Actor_Clue_Query(kActorMcCoy, kClueMoonbus1)) { - Item_Add_To_World(120, 984, 6, 44.0f, 0.0f, -22.0f, 0, 12, 12, false, true, false, true); + Item_Add_To_World(kItemMoonbusPhoto, 984, kSetCT08_CT51_UG12, 44.0f, 0.0f, -22.0f, 0, 12, 12, false, true, false, true); } } @@ -55,14 +58,13 @@ bool SceneScriptCT51::MouseClick(int x, int y) { bool SceneScriptCT51::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("BED02", objectName)) { - if (Actor_Clue_Query(kActorMcCoy, kClueHysteriaToken)) { - Actor_Says(kActorMcCoy, 8580, 12); - return false; + if (!Actor_Clue_Query(kActorMcCoy, kClueHysteriaToken)) { + Item_Pickup_Spin_Effect(970, 203, 200); + Actor_Clue_Acquire(kActorMcCoy, kClueHysteriaToken, true, -1); + Actor_Voice_Over(420, kActorVoiceOver); + return true; } - Item_Pickup_Spin_Effect(970, 203, 200); - Actor_Clue_Acquire(kActorMcCoy, kClueHysteriaToken, true, -1); - Actor_Voice_Over(420, kActorVoiceOver); - return true; + Actor_Says(kActorMcCoy, 8580, 12); } return false; } @@ -72,18 +74,19 @@ bool SceneScriptCT51::ClickedOnActor(int actorId) { } bool SceneScriptCT51::ClickedOnItem(int itemId, bool a2) { - if (itemId == 85) { + if (itemId == kItemRagDoll) { Actor_Clue_Acquire(kActorMcCoy, kClueRagDoll, true, -1); Item_Pickup_Spin_Effect(943, 260, 200); Ambient_Sounds_Play_Sound(563, 40, 99, 0, 0); - Item_Remove_From_World(85); + Item_Remove_From_World(kItemRagDoll); return true; } - if (itemId == 120) { + + if (itemId == kItemMoonbusPhoto) { Actor_Clue_Acquire(kActorMcCoy, kClueMoonbus1, true, -1); Item_Pickup_Spin_Effect(984, 490, 307); - Item_Remove_From_World(120); - Actor_Says(kActorMcCoy, 8527, 3); + Item_Remove_From_World(kItemMoonbusPhoto); + Actor_Says(kActorMcCoy, 8527, kAnimationModeTalk); return true; } return false; @@ -91,11 +94,11 @@ bool SceneScriptCT51::ClickedOnItem(int itemId, bool a2) { bool SceneScriptCT51::ClickedOnExit(int exitId) { if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, 0.0f, -102.0f, 0, 1, false, 0)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -11.0f, 0.0f, -156.0f, 0, 0, false, 0); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, 0.0f, -102.0f, 0, true, false, 0)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -11.0f, 0.0f, -156.0f, 0, false, false, 0); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(380); + Game_Flag_Set(kFlagCT51toCT08); Set_Enter(kSetCT08_CT51_UG12, kSceneCT08); } return true; @@ -119,7 +122,7 @@ void SceneScriptCT51::PlayerWalkedIn() { void SceneScriptCT51::PlayerWalkedOut() { if (!Actor_Clue_Query(kActorMcCoy, kClueRagDoll)) { - Item_Remove_From_World(85); + Item_Remove_From_World(kItemRagDoll); } } |