diff options
author | Peter Kohaut | 2019-02-03 10:01:54 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-02-03 11:44:55 +0100 |
commit | 934ba34adb8189535bf121fa3b7041e4f61bfb72 (patch) | |
tree | e862275289b832299a05c1dbd6a62fa65c8d5c77 /engines/bladerunner/script/ai | |
parent | 75daa49d112e63b9206167f39b783b9fd55c5a1e (diff) | |
download | scummvm-rg350-934ba34adb8189535bf121fa3b7041e4f61bfb72.tar.gz scummvm-rg350-934ba34adb8189535bf121fa3b7041e4f61bfb72.tar.bz2 scummvm-rg350-934ba34adb8189535bf121fa3b7041e4f61bfb72.zip |
BLADERUNNER: Cleanup of KP03 bomb related scripts
Diffstat (limited to 'engines/bladerunner/script/ai')
-rw-r--r-- | engines/bladerunner/script/ai/clovis.cpp | 12 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/dektora.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/gordo.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/izo.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/maggie.cpp | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/mccoy.cpp | 10 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/sadik.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/steele.cpp | 62 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/zuben.cpp | 2 |
9 files changed, 63 insertions, 65 deletions
diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp index a8f0cf20a9..26d545e5f1 100644 --- a/engines/bladerunner/script/ai/clovis.cpp +++ b/engines/bladerunner/script/ai/clovis.cpp @@ -82,7 +82,7 @@ bool AIScriptClovis::Update() { Actor_Set_Goal_Number(kActorClovis, 512); } - if ( Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) + if ( Game_Flag_Query(kFlagMcCoyIsHelpingReplicants) && !Game_Flag_Query(696) && Game_Flag_Query(697) ) { @@ -149,7 +149,7 @@ void AIScriptClovis::OtherAgentExitedThisScene(int otherActorId) { } void AIScriptClovis::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) { - if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && Actor_Query_In_Set(kActorMcCoy, kSetKP07)) { + if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants) && Actor_Query_In_Set(kActorMcCoy, kSetKP07)) { Game_Flag_Set(697); Game_Flag_Set(714); // return true; @@ -182,7 +182,7 @@ bool AIScriptClovis::ShotAtAndHit() { } void AIScriptClovis::Retired(int byActorId) { - if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { + if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants)) { if (Actor_Query_In_Set(kActorClovis, kSetKP07)) { Global_Variable_Decrement(kVariableReplicants, 1); Actor_Set_Goal_Number(kActorClovis, 599); @@ -195,7 +195,7 @@ void AIScriptClovis::Retired(int byActorId) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagKP07toKP06); - Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); + Game_Flag_Reset(kFlagMcCoyIsHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); } } @@ -356,7 +356,7 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 510: - if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { + if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants)) { Actor_Set_Goal_Number(kActorClovis, 513); } else { Actor_Set_Goal_Number(kActorClovis, 511); @@ -383,7 +383,7 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 513: Actor_Put_In_Set(kActorClovis, kSetKP07); Actor_Set_Targetable(kActorClovis, true); - if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { + if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants)) { Global_Variable_Set(kVariableReplicants, 0); Global_Variable_Increment(kVariableReplicants, 1); Actor_Set_At_XYZ(kActorClovis, 45.0f, -41.52f, -85.0f, 750); diff --git a/engines/bladerunner/script/ai/dektora.cpp b/engines/bladerunner/script/ai/dektora.cpp index 8054bc8627..7da4b97200 100644 --- a/engines/bladerunner/script/ai/dektora.cpp +++ b/engines/bladerunner/script/ai/dektora.cpp @@ -305,7 +305,7 @@ void AIScriptDektora::Retired(int byActorId) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagKP07toKP06); - Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); + Game_Flag_Reset(kFlagMcCoyIsHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); return; //true; diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp index 17656576f1..700e8c0066 100644 --- a/engines/bladerunner/script/ai/gordo.cpp +++ b/engines/bladerunner/script/ai/gordo.cpp @@ -299,7 +299,7 @@ void AIScriptGordo::Retired(int byActorId) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagKP07toKP06); - Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); + Game_Flag_Reset(kFlagMcCoyIsHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); return;// true; } diff --git a/engines/bladerunner/script/ai/izo.cpp b/engines/bladerunner/script/ai/izo.cpp index ede8b684c0..78c6f4f03d 100644 --- a/engines/bladerunner/script/ai/izo.cpp +++ b/engines/bladerunner/script/ai/izo.cpp @@ -249,7 +249,7 @@ void AIScriptIzo::Retired(int byActorId) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagKP07toKP06); - Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); + Game_Flag_Reset(kFlagMcCoyIsHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); return; //true; } diff --git a/engines/bladerunner/script/ai/maggie.cpp b/engines/bladerunner/script/ai/maggie.cpp index a1661eac7e..4feb740059 100644 --- a/engines/bladerunner/script/ai/maggie.cpp +++ b/engines/bladerunner/script/ai/maggie.cpp @@ -37,9 +37,9 @@ enum kMaggieStates { kMaggieStateGoingToSleep = 8, kMaggieStateSleeping = 9, kMaggieStateWakingUp = 10, - kMaggieStateHurtIdle = 11, - kMaggieStateHurtWalk = 12, - kMaggieStateHurtJumping = 13, + kMaggieStateBombIdle = 11, + kMaggieStateBombWalk = 12, + kMaggieStateBombJumping = 13, kMaggieStateExploding = 14, kMaggieStateDeadExploded = 15, kMaggieStateDead = 16 @@ -149,7 +149,7 @@ void AIScriptMaggie::ReceivedClue(int clueId, int fromActorId) { } void AIScriptMaggie::ClickedByPlayer() { - if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) + if (!Game_Flag_Query(kFlagMcCoyIsHelpingReplicants) && Global_Variable_Query(kVariableChapter) == 5 ) { if (Actor_Query_Goal_Number(kActorMaggie) == 413) { @@ -357,7 +357,7 @@ bool AIScriptMaggie::GoalChanged(int currentGoalNumber, int newGoalNumber) { break; case 411: AI_Movement_Track_Flush(kActorMaggie); - Game_Flag_Set(kFlagMaggieIsHurt); + Game_Flag_Set(kFlagMaggieHasBomb); Actor_Put_In_Set(kActorMaggie, kSetKP05_KP06); Actor_Set_At_XYZ(kActorMaggie, -672.0, 0.0, -428.0, 653); Actor_Change_Animation_Mode(kActorMaggie, kAnimationModeIdle); @@ -390,24 +390,24 @@ bool AIScriptMaggie::UpdateAnimation(int *animation, int *frame) { Actor_Set_At_Waypoint(kActorMaggie, 41, 0); } break; - case kMaggieStateHurtJumping: + case kMaggieStateBombJumping: *animation = 873; _animationFrame++; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(873)) { - _animationState = kMaggieStateHurtIdle; + _animationState = kMaggieStateBombIdle; _animationFrame = 0; *animation = 875; Actor_Set_Goal_Number(kActorMaggie, 414); } break; - case kMaggieStateHurtWalk: + case kMaggieStateBombWalk: *animation = 872; _animationFrame++; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(872)) { _animationFrame = 0; } break; - case kMaggieStateHurtIdle: + case kMaggieStateBombIdle: *animation = 875; _animationFrame++; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(875)) { @@ -540,8 +540,8 @@ bool AIScriptMaggie::UpdateAnimation(int *animation, int *frame) { bool AIScriptMaggie::ChangeAnimationMode(int mode) { if (mode == kAnimationModeWalk) { - if (Game_Flag_Query(kFlagMaggieIsHurt)) { - _animationState = kMaggieStateHurtWalk; + if (Game_Flag_Query(kFlagMaggieHasBomb)) { + _animationState = kMaggieStateBombWalk; _animationFrame = 0; } else { _animationState = kMaggieStateWalking; @@ -550,8 +550,8 @@ bool AIScriptMaggie::ChangeAnimationMode(int mode) { return true; } if (mode == kAnimationModeIdle) { - if (Game_Flag_Query(kFlagMaggieIsHurt)) { - _animationState = kMaggieStateHurtIdle; + if (Game_Flag_Query(kFlagMaggieHasBomb)) { + _animationState = kMaggieStateBombIdle; _animationFrame = kMaggieStateIdle; } else { switch (_animationState) { @@ -620,8 +620,8 @@ bool AIScriptMaggie::ChangeAnimationMode(int mode) { } break; case kAnimationModeFeeding: - if (Game_Flag_Query(kFlagMaggieIsHurt)) { - _animationState = kMaggieStateHurtJumping; + if (Game_Flag_Query(kFlagMaggieHasBomb)) { + _animationState = kMaggieStateBombJumping; _animationFrame = 0; } else { _animationState = kMaggieStateJumping; diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp index 866ee654ea..6dd8c90eb1 100644 --- a/engines/bladerunner/script/ai/mccoy.cpp +++ b/engines/bladerunner/script/ai/mccoy.cpp @@ -499,24 +499,24 @@ 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(kFlagMcCoyIsNotHelpingReplicants); + Game_Flag_Set(kFlagMcCoyIsHelpingReplicants); } affectionTowards = Global_Variable_Query(kVariableAffectionTowards); if (affectionTowards == kAffectionTowardsSteele) { - if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { + if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants)) { Global_Variable_Set(kVariableAffectionTowards, kAffectionTowardsNone); } } else if (affectionTowards == kAffectionTowardsDektora || affectionTowards == kAffectionTowardsLucy ) { - if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { + if (!Game_Flag_Query(kFlagMcCoyIsHelpingReplicants)) { Global_Variable_Set(kVariableAffectionTowards, kAffectionTowardsNone); } } - if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) { - Game_Flag_Set(kFlagMaggieIsHurt); + if (!Game_Flag_Query(kFlagMcCoyIsHelpingReplicants)) { + Game_Flag_Set(kFlagMaggieHasBomb); } Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp index fb5e725973..df9ad658c8 100644 --- a/engines/bladerunner/script/ai/sadik.cpp +++ b/engines/bladerunner/script/ai/sadik.cpp @@ -214,7 +214,7 @@ void AIScriptSadik::Retired(int byActorId) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagKP07toKP06); - Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); + Game_Flag_Reset(kFlagMcCoyIsHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); return; //true; } @@ -347,7 +347,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 410: - if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) == 1) { + if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants) == 1) { Actor_Set_Goal_Number(kActorSadik, 414); } else { Actor_Set_Goal_Number(kActorSadik, 411); @@ -430,7 +430,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 418: - Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); + Game_Flag_Reset(kFlagMcCoyIsHelpingReplicants); Actor_Set_Goal_Number(kActorClovis, 518); Non_Player_Actor_Combat_Mode_On(kActorSadik, kActorCombatStateIdle, true, kActorMcCoy, 9, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, false); return true; diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp index 58ef11593d..2b2e1f223c 100644 --- a/engines/bladerunner/script/ai/steele.cpp +++ b/engines/bladerunner/script/ai/steele.cpp @@ -165,7 +165,7 @@ bool AIScriptSteele::Update() { break; case 5: - if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) + if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants) && Actor_Query_Goal_Number(kActorSteele) < 400 ) { Actor_Set_Goal_Number(kActorSteele, 400); @@ -208,10 +208,10 @@ void AIScriptSteele::TimerExpired(int timer) { AI_Countdown_Timer_Reset(kActorSteele, 1); - if (goal == 415) { - Actor_Set_Goal_Number(kActorSteele, 416); - } else if (goal == 416) { - Actor_Set_Goal_Number(kActorSteele, 419); + if (goal == kGoalSteeleKP03Exploded) { + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP03Dying); + } else if (goal == kGoalSteeleKP03Dying) { + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP03Dead); } } return; // false; @@ -309,8 +309,8 @@ void AIScriptSteele::CompletedMovementTrack() { Actor_Set_Goal_Number(kActorSteele, kGoalSteeleHF02LucyShotBySteele); break; - case 422: - Actor_Set_Goal_Number(kActorSteele, 423); + case kGoalSteeleKP01Leave: + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP01Left); break; case 432: @@ -358,15 +358,13 @@ void AIScriptSteele::ClickedByPlayer() { return; //true; } - if (goal - 241 <= 9) { - if (goal == kGoalSteeleHF02ShootLucy) { - Actor_Set_Goal_Number(kActorSteele, kGoalSteeleHF02LucyShotBySteele); - return; //true; - } + if (goal == kGoalSteeleHF02ShootLucy) { + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleHF02LucyShotBySteele); + return; //true; + } - if (goal == kGoalSteeleNR01ConfrontGordo) { - return; //true; - } + if (goal == kGoalSteeleNR01ConfrontGordo) { + return; //true; } AI_Movement_Track_Pause(1); @@ -460,7 +458,7 @@ void AIScriptSteele::OtherAgentEnteredCombatMode(int otherActorId, int combatMod if (otherActorId == kActorMcCoy && Actor_Query_Goal_Number(kActorSteele) == 410 ) - Actor_Set_Goal_Number(kActorSteele, 418); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP03ShootMcCoy); } void AIScriptSteele::ShotAtAndMissed() { @@ -483,7 +481,7 @@ void AIScriptSteele::Retired(int byActorId) { if (Actor_Query_Goal_Number(kActorSteele) == 450) { Scene_Exits_Enable(); - Game_Flag_Set(484); + Game_Flag_Set(kFlagKP03BombDisarmed); } if (Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleGone) { @@ -1316,23 +1314,23 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 400: case 401: - case 423: + case kGoalSteeleKP01Left: return true; case 410: - Actor_Set_Targetable(kActorSteele, 1); - Actor_Face_Actor(kActorSteele, kActorMcCoy, 1); + Actor_Set_Targetable(kActorSteele, true); + Actor_Face_Actor(kActorSteele, kActorMcCoy, true); Actor_Start_Speech_Sample(kActorSteele, 2510); - Actor_Change_Animation_Mode(kActorSteele, 4); - Actor_Face_Actor(kActorMcCoy, kActorSteele, 1); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); + Actor_Face_Actor(kActorMcCoy, kActorSteele, true); Delay(3000); Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, false); return true; - case 411: - Actor_Face_Actor(kActorMcCoy, kActorSteele, 1); + case kGoalSteeleKP03Walk: + Actor_Face_Actor(kActorMcCoy, kActorSteele, true); Actor_Says(kActorSteele, 430, 14); - Actor_Change_Animation_Mode(kActorSteele, 4); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); Delay(4000); Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, false); return true; @@ -1345,17 +1343,17 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Async_Actor_Walk_To_XYZ(kActorSteele, 1.0, -36.55f, 111.0f, 0, false); return true; - case 415: + case kGoalSteeleKP03Exploded: Actor_Force_Stop_Walking(kActorSteele); Actor_Change_Animation_Mode(kActorSteele, 51); AI_Countdown_Timer_Start(kActorSteele, 1, 2); return true; - case 416: + case kGoalSteeleKP03Dying: Actor_Set_At_XYZ(kActorSteele, -48.83f, -36.55f, 69.98f, 280); Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 36, false, true); Actor_Face_Actor(kActorMcCoy, kActorSteele, true); - if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) == 1) { + if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants)) { Actor_Says(kActorSteele, 400, 3); Actor_Says(kActorMcCoy, 2165, 14); Actor_Says(kActorSteele, 410, 3); @@ -1371,14 +1369,14 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Countdown_Timer_Start(kActorSteele, 1, 3); return true; - case 418: + case kGoalSteeleKP03ShootMcCoy: Actor_Face_Actor(kActorSteele, kActorMcCoy, true); Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack); Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie); Actor_Retired_Here(kActorMcCoy, 72, 18, true, -1); return true; - case 419: + case kGoalSteeleKP03Dead: Actor_Set_Targetable(kActorSteele, false); Game_Flag_Set(kFlagSteeleDead); Actor_Set_Goal_Number(kActorSteele, kGoalSteeleGone); @@ -1403,10 +1401,10 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Says(kActorSteele, 380, 16); Actor_Says(kActorMcCoy, 2160, 18); Actor_Says(kActorSteele, 390, 13); - Actor_Set_Goal_Number(kActorSteele, 422); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP01Leave); return true; - case 422: + case kGoalSteeleKP01Leave: AI_Movement_Track_Flush(kActorSteele); AI_Movement_Track_Append(kActorSteele, 530, 0); AI_Movement_Track_Repeat(kActorSteele); diff --git a/engines/bladerunner/script/ai/zuben.cpp b/engines/bladerunner/script/ai/zuben.cpp index 3214cb6354..84139015e1 100644 --- a/engines/bladerunner/script/ai/zuben.cpp +++ b/engines/bladerunner/script/ai/zuben.cpp @@ -298,7 +298,7 @@ void AIScriptZuben::Retired(int byActorId) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagKP07toKP06); - Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants); + Game_Flag_Reset(kFlagMcCoyIsHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); // return true; return; |