diff options
author | Peter Kohaut | 2019-01-28 19:28:46 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-01-28 20:45:48 +0100 |
commit | 578d98ee1265eacfe79a4154225e8120b564ae0e (patch) | |
tree | 0afcb590c95f46c32961f7922bae1f2de470c015 /engines/bladerunner/script/ai | |
parent | 77adb67664cc4aa4c348709504d68e21a8c9791e (diff) | |
download | scummvm-rg350-578d98ee1265eacfe79a4154225e8120b564ae0e.tar.gz scummvm-rg350-578d98ee1265eacfe79a4154225e8120b564ae0e.tar.bz2 scummvm-rg350-578d98ee1265eacfe79a4154225e8120b564ae0e.zip |
BLADERUNNER: Cleanup of scripts for Gordo chase
Diffstat (limited to 'engines/bladerunner/script/ai')
-rw-r--r-- | engines/bladerunner/script/ai/bullet_bob.cpp | 3 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/clovis.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/early_q.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/gordo.cpp | 269 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/holloway.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/lucy.cpp | 14 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/mccoy.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/steele.cpp | 285 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/zuben.cpp | 4 |
9 files changed, 346 insertions, 249 deletions
diff --git a/engines/bladerunner/script/ai/bullet_bob.cpp b/engines/bladerunner/script/ai/bullet_bob.cpp index 1c1730c7d5..1a97a826cd 100644 --- a/engines/bladerunner/script/ai/bullet_bob.cpp +++ b/engines/bladerunner/script/ai/bullet_bob.cpp @@ -425,9 +425,6 @@ bool AIScriptBulletBob::UpdateAnimation(int *animation, int *frame) { *animation = 510; _animationFrame = Slice_Animation_Query_Number_Of_Frames(510) - 1; break; - - default: - break; } *frame = _animationFrame; diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp index 4702c35326..312ea08d04 100644 --- a/engines/bladerunner/script/ai/clovis.cpp +++ b/engines/bladerunner/script/ai/clovis.cpp @@ -50,7 +50,7 @@ void AIScriptClovis::Initialize() { } bool AIScriptClovis::Update() { - if (Actor_Query_Goal_Number(kActorClovis) == kGoalClovisBB11PrepareToTalkToMcCoy) { + if (Actor_Query_Goal_Number(kActorClovis) == kGoalClovisBB11PrepareTalkToMcCoy) { Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11TalkToMcCoy); return true; } @@ -449,7 +449,7 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 517: if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorLucy, kSetKP07)) { - Actor_Set_Goal_Number(kActorLucy, 599); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyDead); Global_Variable_Decrement(kVariableReplicants, 1); } if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorLuther, kSetKP07)) { @@ -616,7 +616,7 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; *animation = 238; if (Actor_Query_Goal_Number(kActorClovis) == kGoalClovisBB11TalkWithSadik) { - Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11PrepareToTalkToMcCoy); + Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11PrepareTalkToMcCoy); } } break; diff --git a/engines/bladerunner/script/ai/early_q.cpp b/engines/bladerunner/script/ai/early_q.cpp index 826a339234..2e45ffeb6d 100644 --- a/engines/bladerunner/script/ai/early_q.cpp +++ b/engines/bladerunner/script/ai/early_q.cpp @@ -282,7 +282,7 @@ bool AIScriptEarlyQ::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Put_In_Set(kActorEarlyQ, kSetFreeSlotH); Actor_Set_At_Waypoint(kActorEarlyQ, 40, 0); if (Game_Flag_Query(47) == 1 - && Game_Flag_Query(592) + && Game_Flag_Query(kFlagGordoRanWay) && Game_Flag_Query(kFlagLucyRanAway) ) { Actor_Set_Goal_Number(kActorEarlyQ, 220); diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp index e16ca05601..463960ca65 100644 --- a/engines/bladerunner/script/ai/gordo.cpp +++ b/engines/bladerunner/script/ai/gordo.cpp @@ -54,13 +54,13 @@ bool AIScriptGordo::Update() { && Actor_Query_Friendliness_To_Other(kActorGordo, kActorMcCoy) < 48 && Actor_Query_Is_In_Current_Set(kActorGordo) ) { - Actor_Set_Goal_Number(kActorGordo, kGoalGordoGetUpCT01); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01StandUp); return true; } if (Actor_Query_Which_Set_In(kActorMcCoy) == kSetCT03_CT04 && Actor_Query_Which_Set_In(kActorGordo) == kSetCT01_CT12 ) { - Actor_Set_Goal_Number(kActorGordo, kGoalGordoWalkOutFromCT01); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01WalkAway); return true; } } @@ -75,17 +75,17 @@ bool AIScriptGordo::Update() { if (Actor_Query_Goal_Number(kActorGordo) < kGoalGordoStartChapter3) { Actor_Set_Goal_Number(kActorGordo, kGoalGordoStartChapter3); } - if (Actor_Query_Goal_Number(kActorGordo) == 254) { - Actor_Set_Goal_Number(kActorGordo, 255); + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR01HostageShot) { + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01HostageDie); } } if (Global_Variable_Query(kVariableChapter) == 4) { if (Actor_Query_Goal_Number(kActorGordo) < 300 - && Actor_Query_Goal_Number(kActorGordo) != 260 + && Actor_Query_Goal_Number(kActorGordo) != kGoalGordoNR01Arrested ) { Actor_Set_Goal_Number(kActorGordo, 300); - } else if (Actor_Query_Goal_Number(kActorGordo) == 599) { + } else if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoDead) { Actor_Put_In_Set(kActorGordo, kSetFreeSlotI); Actor_Set_At_Waypoint(kActorGordo, 41, 0); } @@ -104,23 +104,23 @@ void AIScriptGordo::TimerExpired(int timer) { if (timer == 0) { AI_Countdown_Timer_Reset(kActorGordo, 0); if (Player_Query_Combat_Mode()) { - Actor_Set_Goal_Number(kActorGordo, 243); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01RunAway); } else { - Actor_Set_Goal_Number(kActorGordo, 242); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01TalkToMcCoy); } } //return false; } void AIScriptGordo::CompletedMovementTrack() { - if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoLeaveCT01 - || Actor_Query_Goal_Number(kActorGordo) == kGoalGordoWalkOutFromCT01 + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoCT01Leave + || Actor_Query_Goal_Number(kActorGordo) == kGoalGordoCT01WalkAway ) { - Actor_Set_Goal_Number(kActorGordo, kGoalGordoLeftCT01); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01Left); return;// true; } - if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoWalkThroughCT05) { + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoCT05WalkThrough) { if (Player_Query_Current_Set() == kSetCT05) { Actor_Force_Stop_Walking(kActorMcCoy); Player_Loses_Control(); @@ -135,19 +135,19 @@ void AIScriptGordo::CompletedMovementTrack() { Player_Gains_Control(); } Actor_Clue_Acquire(kActorGordo, kClueMcCoyRetiredZuben, true, -1); - Actor_Set_Goal_Number(kActorGordo, kGoalGordoLeaveCT05); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT05Leave); return;// true; } - if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoLeaveCT05) { - Actor_Set_Goal_Number(kActorGordo, kGoalGordoLeftCT05); + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoCT05Leave) { + Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT05Left); return;// true; } - if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoWalkToHowieLee) { + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoCT01WalkToHowieLee) { Actor_Set_Immunity_To_Obstacles(kActorGordo, false); Player_Gains_Control(); - Actor_Set_Goal_Number(kActorGordo, kGoalGordoBidFarewellToHowieLee); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01BidFarewellToHowieLee); return;// true; } @@ -158,7 +158,7 @@ void AIScriptGordo::CompletedMovementTrack() { return;// true; } - if (Actor_Query_Goal_Number(kActorGordo) == 202) { + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02GoToPodium) { if (Player_Query_Current_Set() == kSetNR02) { Ambient_Sounds_Play_Sound(581, 58, 0, 0, 0); Actor_Face_Heading(kActorGordo, 0, false); @@ -168,34 +168,34 @@ void AIScriptGordo::CompletedMovementTrack() { } else { Actor_Set_At_Waypoint(kActorGordo, 357, 506); } - Actor_Set_Goal_Number(kActorGordo, 205); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02NextAct); } - if (Actor_Query_Goal_Number(kActorGordo) == 220) { - Game_Flag_Set(594); - Actor_Set_Goal_Number(kActorGordo, 221); + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02RunAway1) { + Game_Flag_Set(kFlagNR02GordoJumpDown); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02RunAway2); } - if (Actor_Query_Goal_Number(kActorGordo) == 222) { + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02RunAway3) { if (Game_Flag_Query(kFlagGordoIsReplicant)) { - if (Global_Variable_Query(kVariableBehavior) == 2) { - Actor_Set_Goal_Number(kActorGordo, 250); + if (Global_Variable_Query(kVariableHollowayArrest) == 2) { + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01WaitAndTakeHostage); } else { - Actor_Set_Goal_Number(kActorGordo, 230); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01WaitAndAttack); } } else { - Actor_Set_Goal_Number(kActorGordo, 240); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01WaitAndGiveUp); } Scene_Exits_Enable(); } - if (Actor_Query_Goal_Number(kActorGordo) == 225) { + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoGoToFreeSlotGAG) { Actor_Set_Goal_Number(kActorGordo, kGoalGordoStartChapter3); } - if (Actor_Query_Goal_Number(kActorGordo) == 243) { + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR01RunAway) { Music_Stop(2); - Actor_Set_Goal_Number(kActorGordo, 280); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01RanAway); } // return false; } @@ -209,13 +209,13 @@ void AIScriptGordo::ClickedByPlayer() { if (goal == kGoalGordoGoToDNARow || goal == kGoalGordoGoToChinaTown ) { - McCoyTalkWithGordo(); - } else if (goal == 260) { + talkToMcCoyInCity(); + } else if (goal == kGoalGordoNR01Arrested) { Actor_Face_Actor(kActorMcCoy, kActorGordo, true); Actor_Says(kActorMcCoy, 8600, 11); Actor_Face_Actor(kActorGordo, kActorMcCoy, true); Actor_Says(kActorGordo, 1390, 16); - } else if (goal == 599) { + } else if (goal == kGoalGordoDead) { Actor_Face_Actor(kActorMcCoy, kActorGordo, true); Actor_Says(kActorMcCoy, 8665, 14); } @@ -243,30 +243,38 @@ void AIScriptGordo::ShotAtAndMissed() { } bool AIScriptGordo::ShotAtAndHit() { - if (Actor_Query_Goal_Number(kActorGordo) > 219 && Actor_Query_Goal_Number(kActorGordo) < 223) { + // Running from NR02 + if (Actor_Query_Goal_Number(kActorGordo) > 219 + && Actor_Query_Goal_Number(kActorGordo) < 223 + ) { Actor_Set_Health(kActorGordo, 50, 50); return true; } - if (Actor_Query_Goal_Number(kActorGordo) > 239 && Actor_Query_Goal_Number(kActorGordo) < 245) { - Actor_Set_Goal_Number(kActorGordo, 299); + + // Shot as a human + if (Actor_Query_Goal_Number(kActorGordo) > 239 + && Actor_Query_Goal_Number(kActorGordo) < 245) + { + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01Die); Delay(1500); Actor_Voice_Over(2410, kActorVoiceOver); Actor_Voice_Over(2420, kActorVoiceOver); Game_Flag_Set(kFlagNR01toNR02); Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested); } - if (Actor_Query_Goal_Number(kActorGordo) == 250) { - Actor_Set_Goal_Number(kActorGordo, 254); + + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR01WaitAndTakeHostage) { + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01HostageShot); return true; } return false; } void AIScriptGordo::Retired(int byActorId) { - if (Actor_Query_Goal_Number(kActorGordo) == 231) { + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR01Attack) { Player_Loses_Control(); - Game_Flag_Set(592); - Actor_Set_Goal_Number(kActorGordo, 599); + Game_Flag_Set(kFlagGordoRanWay); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoDead); Delay(2000); Player_Set_Combat_Mode(false); Actor_Voice_Over(1410, kActorVoiceOver); @@ -278,9 +286,10 @@ void AIScriptGordo::Retired(int byActorId) { Player_Gains_Control(); Scene_Exits_Enable(); } + if (Actor_Query_In_Set(kActorGordo, kSetKP07)) { Global_Variable_Decrement(kVariableReplicants, 1); - Actor_Set_Goal_Number(kActorGordo, 599); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoDead); if (Global_Variable_Query(kVariableReplicants) == 0) { Player_Loses_Control(); Delay(2000); @@ -295,7 +304,8 @@ void AIScriptGordo::Retired(int byActorId) { return;// true; } } - Actor_Set_Goal_Number(kActorGordo, 599); + + Actor_Set_Goal_Number(kActorGordo, kGoalGordoDead); //return false; } @@ -316,42 +326,42 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Change_Animation_Mode(kActorGordo, 53); break; - case kGoalGordoWalkThroughCT05: + case kGoalGordoCT05WalkThrough: AI_Movement_Track_Flush(kActorGordo); AI_Movement_Track_Append(kActorGordo, 119, 0); AI_Movement_Track_Append(kActorGordo, 118, 0); AI_Movement_Track_Repeat(kActorGordo); break; - case kGoalGordoLeaveCT05: + case kGoalGordoCT05Leave: AI_Movement_Track_Flush(kActorGordo); AI_Movement_Track_Append(kActorGordo, 119, 0); AI_Movement_Track_Append(kActorGordo, 33, 1); AI_Movement_Track_Repeat(kActorGordo); break; - case kGoalGordoGetUpCT01: + case kGoalGordoCT01StandUp: Game_Flag_Set(kFlagCT01GordoTalk); Actor_Set_Goal_Number(kActorGordo, 99); Actor_Change_Animation_Mode(kActorGordo, 29); break; - case kGoalGordoWalkOutFromCT01: + case kGoalGordoCT01WalkAway: AI_Movement_Track_Flush(kActorGordo); AI_Movement_Track_Append(kActorGordo, 43, 0); AI_Movement_Track_Append(kActorGordo, 33, 1); AI_Movement_Track_Repeat(kActorGordo); break; - case kGoalGordoBidFarewellToHowieLee: + case kGoalGordoCT01BidFarewellToHowieLee: Actor_Face_Actor(kActorGordo, kActorHowieLee, true); Actor_Says(kActorGordo, 0, 13); Actor_Says(kActorGordo, 10, 16); - Actor_Set_Goal_Number(kActorGordo, kGoalGordoWalkOutFromCT01); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01WalkAway); Player_Gains_Control(); break; - case kGoalGordoWalkToHowieLee: + case kGoalGordoCT01WalkToHowieLee: Player_Loses_Control(); Actor_Set_Immunity_To_Obstacles(kActorGordo, true); AI_Movement_Track_Flush(kActorGordo); @@ -454,70 +464,77 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { // chapter 3 case kGoalGordoStartChapter3: - if (Global_Variable_Query(kVariableBehavior) == 2) { + if (Global_Variable_Query(kVariableHollowayArrest) == 2) { if (Game_Flag_Query(kFlagLucyRanAway) && Game_Flag_Query(591) && Player_Query_Current_Scene() != kSceneNR02 ) { - Actor_Set_Goal_Number(kActorGordo, kGoalGordoWaitAtNR02); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02WaitAtBar); } else { - Actor_Set_Goal_Number(kActorGordo, 225); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoGoToFreeSlotGAG); } } else { - Actor_Set_Goal_Number(kActorGordo, kGoalGordoWaitAtNR02); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02WaitAtBar); } break; - case kGoalGordoWaitAtNR02: + + case kGoalGordoNR02WaitAtBar: AI_Movement_Track_Flush(kActorGordo); Actor_Put_In_Set(kActorGordo, kSetNR02); Actor_Set_At_XYZ(kActorGordo, 148.12f, -24.0f, 456.04f, 506); break; - case 202: + + case kGoalGordoNR02GoToPodium: Player_Gains_Control(); AI_Movement_Track_Flush(kActorGordo); AI_Movement_Track_Append(kActorGordo, 356, 0); AI_Movement_Track_Repeat(kActorGordo); break; - case 205: - switch(Global_Variable_Query(41)) { + + case kGoalGordoNR02NextAct: + switch(Global_Variable_Query(kVariableGordosJoke)) { case 0: - Global_Variable_Increment(41, 1); - Actor_Set_Goal_Number(kActorGordo, 206); + Global_Variable_Increment(kVariableGordosJoke, 1); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TellJoke1); break; case 1: - Global_Variable_Increment(41, 1); - Actor_Set_Goal_Number(kActorGordo, 207); + Global_Variable_Increment(kVariableGordosJoke, 1); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TellJoke2); break; case 2: - Global_Variable_Increment(41, 1); - Actor_Set_Goal_Number(kActorGordo, 208); + Global_Variable_Increment(kVariableGordosJoke, 1); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TellJoke3); break; case 3: - Global_Variable_Increment(41, 1); - Actor_Set_Goal_Number(kActorGordo, 210); + Global_Variable_Increment(kVariableGordosJoke, 1); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TalkAboutMcCoy); break; } break; - case 206: + + case kGoalGordoNR02TellJoke1: ADQ_Add_Pause(5000); ADQ_Add(kActorGordo, 630, 15); ADQ_Add(kActorGordo, 640, 16); ADQ_Add_Pause(1000); ADQ_Add(kActorGordo, 650, 14); break; - case 207: + + case kGoalGordoNR02TellJoke2: ADQ_Add_Pause(1000); ADQ_Add(kActorGordo, 660, 16); ADQ_Add(kActorGordo, 670, 14); ADQ_Add(kActorGordo, 680, 13); ADQ_Add(kActorGordo, 690, 17); break; - case 208: + + case kGoalGordoNR02TellJoke3: ADQ_Add_Pause(1000); ADQ_Add(kActorGordo, 700, 15); ADQ_Add(kActorGordo, 710, 13); break; - case 210: + + case kGoalGordoNR02TalkAboutMcCoy: Actor_Force_Stop_Walking(0); Actor_Face_Actor(kActorGordo, kActorMcCoy, true); Actor_Says(kActorGordo, 720, 16); @@ -535,17 +552,17 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { if (Game_Flag_Query(kFlagGordoIsReplicant)) { Actor_Says(kActorGordo, 850, 12); Actor_Says(kActorGordo, 860, 15); - Actor_Says(0, 3910, 16); - if (Global_Variable_Query(kVariableBehavior) == 2) { + Actor_Says(kActorMcCoy, 3910, 16); + if (Global_Variable_Query(kVariableHollowayArrest) == 2) { Actor_Says(kActorGordo, 870, 16); Sound_Play(576, 50, 0, 0, 50); Sound_Play(319, 50, 0, 0, 50); Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayGoToNR02); Actor_Says(kActorGordo, 880, 17); - Actor_Set_Goal_Number(kActorGordo, 211); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02WaitAtPodium); Player_Loses_Control(); } else { - Actor_Set_Goal_Number(kActorGordo, 220); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02RunAway1); } } else { Actor_Says(kActorGordo, 790, 12); @@ -562,15 +579,15 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Says(kActorGordo, 840, 13); Sound_Play(578, 50, 0, 0, 50); Sound_Play(321, 50, 0, 0, 50); - Actor_Set_Goal_Number(kActorGordo, 220); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02RunAway1); } break; - case kGoalGordoTalkToMcCoyAtNR02: + case kGoalGordoNR02TalkToMcCoy: talkToMcCoyAtNR02(); break; - case 220: + case kGoalGordoNR02RunAway1: Actor_Set_Targetable(kActorGordo, true); Scene_Exits_Disable(); AI_Movement_Track_Flush(kActorGordo); @@ -579,18 +596,18 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { Music_Play(1, 50, 0, 2, -1, 0, 0); break; - case 221: + case kGoalGordoNR02RunAway2: Actor_Set_At_XYZ(kActorGordo, -90.91f, -24.0f, -14.71f, 708); Actor_Change_Animation_Mode(kActorGordo, 26); break; - case 222: + case kGoalGordoNR02RunAway3: AI_Movement_Track_Flush(kActorGordo); AI_Movement_Track_Append_Run(kActorGordo, 367, 0); AI_Movement_Track_Repeat(kActorGordo); break; - case 225: + case kGoalGordoGoToFreeSlotGAG: AI_Movement_Track_Flush(kActorGordo); AI_Movement_Track_Append(kActorGordo, 39, 10); AI_Movement_Track_Append(kActorGordo, 33, Random_Query(5, 30)); @@ -598,28 +615,28 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorGordo); break; - case 230: + case kGoalGordoNR01WaitAndAttack: Actor_Put_In_Set(kActorGordo, kSetNR01); Actor_Set_At_XYZ(kActorGordo, -194.24f, 23.88f, -851.98f, 343); break; - case 240: + case kGoalGordoNR01WaitAndGiveUp: Actor_Put_In_Set(kActorGordo, kSetNR01); Actor_Set_At_XYZ(kActorGordo, -194.24f, 23.88f, -851.98f, 343); break; - case 241: + case kGoalGordoNR01GiveUp: ADQ_Add(kActorGordo, 170, 18); AI_Countdown_Timer_Start(kActorGordo, 0, 10); break; - case 242: + case kGoalGordoNR01TalkToMcCoy: Actor_Face_Actor(kActorGordo, kActorMcCoy, true); Actor_Says(kActorGordo, 180, 13); Actor_Face_Actor(kActorMcCoy, kActorGordo, true); Actor_Says(kActorMcCoy, 3075, 13); Actor_Says(kActorGordo, 190, 15); - Loop_Actor_Walk_To_Actor(kActorGordo, 0, 60, false, true); + Loop_Actor_Walk_To_Actor(kActorGordo, kActorMcCoy, 60, false, true); Actor_Face_Actor(kActorGordo, kActorMcCoy, true); Actor_Face_Actor(kActorMcCoy, kActorGordo, true); Actor_Says(kActorMcCoy, 3080, 15); @@ -628,7 +645,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { dialogue2(); break; - case 243: + case kGoalGordoNR01RunAway: AI_Movement_Track_Flush(kActorGordo); AI_Movement_Track_Append_Run(kActorGordo, 369, 0); AI_Movement_Track_Append_Run(kActorGordo, 370, 0); @@ -636,14 +653,14 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorGordo); break; - case 250: + case kGoalGordoNR01WaitAndTakeHostage: Actor_Put_In_Set(kActorGordo, kSetNR01); Actor_Set_At_XYZ(kActorGordo, -194.24f, 23.88f, -851.98f, 343); Actor_Change_Animation_Mode(kActorGordo, 80); - Actor_Set_Goal_Number(kActorSteele, 250); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01ConfrontGordo); break; - case 251: + case kGoalGordoNR01ReleaseHostage: Actor_Change_Animation_Mode(kActorGordo, 83); break; @@ -651,24 +668,24 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { ADQ_Flush(); Actor_Change_Animation_Mode(kActorGordo, 83); Player_Loses_Control(); - Game_Flag_Reset(603); + Game_Flag_Reset(kFlagSteeleAimingAtGordo); Actor_Set_Targetable(kActorSteele, false); Delay(3000); Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested); break; - case 260: + case kGoalGordoNR01Arrested: Actor_Set_Targetable(kActorGordo, false); break; - case 280: + case kGoalGordoNR01RanAway: Scene_Exits_Enable(); - Game_Flag_Set(592); + Game_Flag_Set(kFlagGordoRanWay); Actor_Put_In_Set(kActorGordo, kSetFreeSlotA); Actor_Set_At_Waypoint(kActorGordo, 33, 0); break; - case 299: + case kGoalGordoNR01Die: Music_Stop(2); AI_Countdown_Timer_Reset(kActorGordo, 0); ADQ_Flush(); @@ -678,7 +695,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { } else { Actor_Change_Animation_Mode(kActorGordo, kAnimationModeDie); } - Actor_Set_Goal_Number(kActorGordo, 599); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoDead); Actor_Retired_Here(kActorGordo, 36, 18, true, -1); break; @@ -814,7 +831,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) { _animationState = 0; _animationFrame = 0; Actor_Change_Animation_Mode(kActorGordo, kAnimationModeIdle); - Actor_Set_Goal_Number(kActorGordo, kGoalGordoWalkToHowieLee); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01WalkToHowieLee); } break; @@ -1097,9 +1114,9 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) { _animationState = 16; _animationFrame = 0; Actor_Change_Animation_Mode(kActorGordo, kAnimationModeCombatIdle); - if (Game_Flag_Query(594)) { - Actor_Set_Goal_Number(kActorGordo, 222); - Game_Flag_Set(592); + if (Game_Flag_Query(kFlagNR02GordoJumpDown)) { + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02RunAway3); + Game_Flag_Set(kFlagGordoRanWay); } } break; @@ -1108,14 +1125,14 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) { *animation = 119; _animationFrame++; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(119)) { - if (Game_Flag_Query(561)) { - Game_Flag_Reset(561); + if (Game_Flag_Query(kFlagNR02GordoLeaveLighter)) { + Game_Flag_Reset(kFlagNR02GordoLeaveLighter); if (Game_Flag_Query(kFlagGordoIsReplicant)) { - Item_Add_To_World(89, 953, kSetNR02, 148.94f, 22.19f, 476.1f, 0, 6, 6, false, true, false, false); + Item_Add_To_World(kItemGordosLighter1, 953, kSetNR02, 148.94f, 22.19f, 476.1f, 0, 6, 6, false, true, false, false); } else { - Item_Add_To_World(90, 954, kSetNR02, 148.94f, 22.19f, 476.1f, 0, 6, 6, false, true, false, false); + Item_Add_To_World(kItemGordosLighter2, 954, kSetNR02, 148.94f, 22.19f, 476.1f, 0, 6, 6, false, true, false, false); } - Actor_Set_Goal_Number(kActorGordo, 202); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02GoToPodium); } *animation = 116; _animationState = 0; @@ -1164,7 +1181,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) { *animation = 131; _animationFrame++; if (_animationFrame == 7) { - if (Actor_Query_Goal_Number(kActorGordo) == 255) { + if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR01HostageDie) { Actor_Set_Goal_Number(kActorTaffyPatron, 255); } else { Actor_Set_Goal_Number(kActorTaffyPatron, 250); @@ -1174,7 +1191,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) { Actor_Change_Animation_Mode(kActorGordo, kAnimationModeCombatIdle); *animation = 93; _animationFrame = 0; - Actor_Set_Goal_Number(kActorGordo, 243); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01RunAway); } break; @@ -1376,7 +1393,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) { var_45B078 = 0; break; - case 21: + case kAnimationModeHit: switch (_animationState) { case 14: case 16: @@ -1405,7 +1422,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) { } break; - case 22: + case kAnimationModeCombatHit: if (Random_Query(0, 1)) { _animationState = 21; } else { @@ -1434,27 +1451,27 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) { _animationFrame = 0; break; - case 44: + case kAnimationModeWalkUp: _animationState = 29; _animationFrame = 0; break; - case 45: + case kAnimationModeWalkDown: _animationState = 30; _animationFrame = 0; break; - case 46: + case kAnimationModeCombatWalkUp: _animationState = 31; _animationFrame = 0; break; - case 47: + case kAnimationModeCombatWalkDown: _animationState = 32; _animationFrame = 0; break; - case 48: + case kAnimationModeDie: switch (_animationState) { case 14: case 16: @@ -1474,7 +1491,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) { } break; - case 49: + case kAnimationModeCombatDie: _animationState = 24; _animationFrame = 0; break; @@ -1535,12 +1552,12 @@ bool AIScriptGordo::ReachedMovementTrackWaypoint(int waypointId) { void AIScriptGordo::FledCombat() { Scene_Exits_Enable(); if (Global_Variable_Query(kVariableChapter) == 3) { - Actor_Set_Goal_Number(kActorGordo, 280); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01RanAway); } // return false; } -void AIScriptGordo::McCoyTalkWithGordo() { +void AIScriptGordo::talkToMcCoyInCity() { Player_Loses_Control(); Actor_Face_Actor(kActorMcCoy, kActorGordo, true); if (!Game_Flag_Query(kFlagGordoTalk1)) { @@ -1639,7 +1656,7 @@ void AIScriptGordo::talkToMcCoyAtNR02() { Player_Gains_Control(); dialogue1(); Player_Loses_Control(); - Game_Flag_Set(561); + Game_Flag_Set(kFlagNR02GordoLeaveLighter); Actor_Face_Heading(kActorGordo, 506, false); Actor_Change_Animation_Mode(kActorGordo, 23); } @@ -1654,24 +1671,24 @@ void AIScriptGordo::dialogue2() { int answer = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); - if (answer == 820) { + if (answer == 820) { // ARREST Actor_Says(kActorMcCoy, 3090, 16); Actor_Says(kActorMcCoy, 3095, 15); Actor_Says(kActorGordo, 210, 17); Actor_Says(kActorGordo, 220, 14); Actor_Says(kActorGordo, 230, 15); - Actor_Set_Goal_Number(kActorGordo, 260); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01Arrested); Actor_Put_In_Set(kActorGordo, kSetPS09); Actor_Set_At_XYZ(kActorGordo, -479.15f, 0.0f, -197.84f, 547); - Game_Flag_Reset(255); - Game_Flag_Reset(256); - Game_Flag_Set(251); - Game_Flag_Set(592); + Game_Flag_Reset(kFlagSpinnerAtNR01); + Game_Flag_Reset(kFlagSpinnerAtHF01); + Game_Flag_Set(kFlagSpinnerAtPS01); + Game_Flag_Set(kFlagGordoRanWay); Scene_Exits_Enable(); Game_Flag_Reset(kFlagMcCoyInNightclubRow); Game_Flag_Set(kFlagMcCoyInPoliceStation); Set_Enter(kSetPS09, kScenePS09); - } else if (answer == 830) { + } else if (answer == 830) { // LET GO Actor_Says(kActorMcCoy, 3100, 16); Actor_Says(kActorGordo, 240, 14); if (Actor_Clue_Query(0, 102)) { @@ -1686,9 +1703,9 @@ void AIScriptGordo::dialogue2() { Delay(1000); Actor_Says(kActorGordo, 570, 13); } - Game_Flag_Set(592); + Game_Flag_Set(kFlagGordoRanWay); Scene_Exits_Enable(); - Actor_Set_Goal_Number(kActorGordo, 243); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01RunAway); } } diff --git a/engines/bladerunner/script/ai/holloway.cpp b/engines/bladerunner/script/ai/holloway.cpp index a64183b7c1..3b3724492c 100644 --- a/engines/bladerunner/script/ai/holloway.cpp +++ b/engines/bladerunner/script/ai/holloway.cpp @@ -50,7 +50,7 @@ bool AIScriptHolloway::Update() { void AIScriptHolloway::TimerExpired(int timer) { if (timer == 0) { AI_Countdown_Timer_Reset(kActorHolloway, 0); - if (Global_Variable_Query(kVariableBehavior) == 1) { + if (Global_Variable_Query(kVariableHollowayArrest) == 1) { Player_Gains_Control(); } Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayTalkToMcCoy); @@ -176,7 +176,7 @@ bool AIScriptHolloway::GoalChanged(int currentGoalNumber, int newGoalNumber) { Outtake_Play(kOuttakeInterrogation, 0, 1); - if (Global_Variable_Query(kVariableBehavior) == 1) { + if (Global_Variable_Query(kVariableHollowayArrest) == 1) { Actor_Set_Goal_Number(kActorDektora, 245); Actor_Change_Animation_Mode(kActorDektora, kAnimationModeIdle); } @@ -187,7 +187,7 @@ bool AIScriptHolloway::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Put_In_Set(kActorHolloway, kSetFreeSlotI); Actor_Set_At_Waypoint(kActorHolloway, 41, 0); Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle); - if (Global_Variable_Query(kVariableBehavior) != 1) { + if (Global_Variable_Query(kVariableHollowayArrest) != 1) { Player_Gains_Control(); } diff --git a/engines/bladerunner/script/ai/lucy.cpp b/engines/bladerunner/script/ai/lucy.cpp index 0e69ea6947..f735415851 100644 --- a/engines/bladerunner/script/ai/lucy.cpp +++ b/engines/bladerunner/script/ai/lucy.cpp @@ -127,7 +127,7 @@ void AIScriptLucy::CompletedMovementTrack() { switch (Actor_Query_Goal_Number(kActorLucy)) { case kGoalLucyGoToHF03: if (Game_Flag_Query(kFlagMcCoyCapturedByHolloway) - && Global_Variable_Query(kVariableBehavior) == 3 + && Global_Variable_Query(kVariableHollowayArrest) == 3 ) { Actor_Set_Goal_Number(kActorLucy, kGoalLucyReturnToHF03); return; //true; @@ -151,7 +151,7 @@ void AIScriptLucy::CompletedMovementTrack() { case kGoalLucyRunToHF042: if (Actor_Clue_Query(kActorLucy, kClueMcCoyHelpedLucy) - && Global_Variable_Query(kVariableBehavior) != 3 + && Global_Variable_Query(kVariableHollowayArrest) != 3 ) { Game_Flag_Set(kFlagLucyRanAway); } else { @@ -192,7 +192,7 @@ void AIScriptLucy::CompletedMovementTrack() { Actor_Set_At_Waypoint(kActorLucy, 33, 0); Actor_Set_Health(kActorLucy, 30, 30); - if (Global_Variable_Query(kVariableBehavior) == 3) { + if (Global_Variable_Query(kVariableHollowayArrest) == 3) { Actor_Set_Goal_Number(kActorSteele, kGoalSteeleHF02ConfrontLucy); } break; @@ -280,9 +280,9 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { switch (newGoalNumber) { case kGoalLucyMoveAround: - if (Global_Variable_Query(kVariableBehavior) == 3) { + if (Global_Variable_Query(kVariableHollowayArrest) == 3) { if (Game_Flag_Query(591) - && Game_Flag_Query(592) + && Game_Flag_Query(kFlagGordoRanWay) && Player_Query_Current_Scene() != kSceneHF03 ) { Actor_Set_Goal_Number(kActorLucy, kGoalLucyGoToHF03); @@ -426,7 +426,7 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Says(kActorLucy, 370, 14); Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04WalkAway); - if (Global_Variable_Query(kVariableBehavior) == 3) { + if (Global_Variable_Query(kVariableHollowayArrest) == 3) { Actor_Set_Goal_Number(kActorSteele, kGoalSteeleHF02LucyRanAway); Game_Flag_Set(kFlagLucyRanAway); } @@ -469,7 +469,7 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { break; case 240: // not used anywhere - if (Global_Variable_Query(kVariableBehavior) == 3) { + if (Global_Variable_Query(kVariableHollowayArrest) == 3) { Actor_Set_Goal_Number(kActorLucy, kGoalLucyDead); Actor_Set_Goal_Number(kActorSteele, kGoalSteeleHF02ConfrontLucy); } else { diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp index 120d322195..b532088f5a 100644 --- a/engines/bladerunner/script/ai/mccoy.cpp +++ b/engines/bladerunner/script/ai/mccoy.cpp @@ -271,7 +271,7 @@ void AIScriptMcCoy::Retired(int byActorId) { if (byActorId == kActorSteele && Actor_Query_In_Set(kActorSteele, kSetHF06)) { if (Actor_Query_In_Set(kActorDektora, kSetHF06) && Actor_Query_Goal_Number(kActorDektora) != 599) { Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, kActorDektora, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); - } else if (Actor_Query_In_Set(kActorLucy, kSetHF06) && Actor_Query_Goal_Number(kActorLucy) != 599) { + } else if (Actor_Query_In_Set(kActorLucy, kSetHF06) && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead) { Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, kActorLucy, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } } @@ -284,11 +284,11 @@ void AIScriptMcCoy::Retired(int byActorId) { Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateUncover, true, kActorDektora, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } - if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerLeary, kSetHF05) && Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != 599) { + if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerLeary, kSetHF05) && Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead) { Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateUncover, true, kActorLucy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } - if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerGrayford, kSetHF05) && Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != 599) { + if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerGrayford, kSetHF05) && Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead) { Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateUncover, true, kActorLucy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } } diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp index a690c74c44..3d9e0e17b8 100644 --- a/engines/bladerunner/script/ai/steele.cpp +++ b/engines/bladerunner/script/ai/steele.cpp @@ -129,15 +129,15 @@ bool AIScriptSteele::Update() { break; } - if (Actor_Query_Goal_Number(kActorSteele) < 205) { - Actor_Set_Goal_Number(kActorSteele, 205); + if (Actor_Query_Goal_Number(kActorSteele) < kGoalSteeleStartChapter3) { + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleStartChapter3); } - if (Actor_Query_Goal_Number(kActorSteele) == 251 + if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01TalkToGordo && Player_Query_Current_Scene() == kSceneNR01 && Actor_Query_In_Between_Two_Actors(kActorMcCoy, kActorSteele, kActorGordo) ) { - Actor_Set_Goal_Number(kActorSteele, 255); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01ShootMcCoy); } if (Actor_Query_Goal_Number(kActorSteele) == 213) { @@ -145,13 +145,13 @@ bool AIScriptSteele::Update() { return true; } - if (Actor_Query_Goal_Number(kActorSteele) == 261) { - Actor_Set_Goal_Number(kActorSteele, 262); + if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01PrepareTalkAboutShotGun) { + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01TalkAboutShotGun); return true; } - if (Actor_Query_Goal_Number(kActorSteele) == 271) { - Actor_Set_Goal_Number(kActorSteele, 270); + if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01PrepareShotByMcCoy) { + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01ShotByMcCoy); return true; } @@ -178,7 +178,7 @@ bool AIScriptSteele::Update() { break; } - if ( Actor_Query_Goal_Number(kActorSteele) == 599 + if ( Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleDead && !Actor_Query_In_Set(kActorSteele, kSetFreeSlotI) ) { if (Actor_Query_Which_Set_In(kActorMcCoy) != Actor_Query_Which_Set_In(kActorSteele)) { @@ -355,7 +355,7 @@ void AIScriptSteele::ReceivedClue(int clueId, int fromActorId) { void AIScriptSteele::ClickedByPlayer() { int goal = Actor_Query_Goal_Number(kActorSteele); - if (goal == 599) { + if (goal == kGoalSteeleDead) { Actor_Face_Actor(kActorMcCoy, kActorSteele, true); Actor_Says(kActorMcCoy, 8630, 14); return; //true; @@ -373,7 +373,7 @@ void AIScriptSteele::ClickedByPlayer() { return; //true; } - if (goal == 250) { + if (goal == kGoalSteeleNR01ConfrontGordo) { return; //true; } } @@ -477,8 +477,8 @@ void AIScriptSteele::ShotAtAndMissed() { } bool AIScriptSteele::ShotAtAndHit() { - if (Actor_Query_Goal_Number(kActorSteele) == 251) { - Actor_Set_Goal_Number(kActorSteele, 271); + if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01TalkToGordo) { + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01PrepareShotByMcCoy); } if (/* !a1 && */ Actor_Query_In_Set(kActorSteele, kSetHF06)) @@ -488,16 +488,16 @@ bool AIScriptSteele::ShotAtAndHit() { } void AIScriptSteele::Retired(int byActorId) { - Game_Flag_Set(646); + Game_Flag_Set(kFlagSteeleDead); if (Actor_Query_Goal_Number(kActorSteele) == 450) { Scene_Exits_Enable(); Game_Flag_Set(484); } - if (Actor_Query_Goal_Number(kActorSteele) != 599) { - Actor_Change_Animation_Mode(kActorSteele, 49); - Actor_Set_Goal_Number(kActorSteele, 599); + if (Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleDead) { + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatDie); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleDead); } } @@ -556,7 +556,7 @@ double AIScriptSteele::comp_distance(int actorId, float a5, float a6, int a1, fl } bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { - if (currentGoalNumber == 599) + if (currentGoalNumber == kGoalSteeleDead) return false; switch (newGoalNumber) { @@ -835,15 +835,15 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Flush(kActorSteele); return true; - case 205: + case kGoalSteeleStartChapter3: if (Query_Score(kActorMcCoy) > Query_Score(kActorSteele) && Query_Score(kActorMcCoy) < 75 ) { Set_Score(kActorSteele, Random_Query(2, 5) + Query_Score(kActorMcCoy)); } - if (Game_Flag_Query(kFlagRC04Locked)) { - Game_Flag_Set(643); + if (Game_Flag_Query(kFlagBulletBobDead)) { + Game_Flag_Set(kFlagSteeleKnowsBulletBobIsDead); } AI_Movement_Track_Flush(kActorSteele); @@ -866,7 +866,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { } AI_Countdown_Timer_Reset(kActorSteele, 0); Player_Loses_Control(); - if (Actor_Query_Goal_Number(kActorDektora) == 250) { + if (Actor_Query_Goal_Number(kActorDektora) == kGoalSteeleNR01ConfrontGordo) { Async_Actor_Walk_To_XYZ(kActorMcCoy, -15.53f, 0.33f, 73.49f, 0, 0); } Actor_Put_In_Set(kActorSteele, kSetNR11); @@ -922,17 +922,17 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 215: Game_Flag_Set(635); - Actor_Change_Animation_Mode(kActorSteele, 6); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack); Scene_Exits_Disable(); return true; - case 230: + case kGoalSteeleNR01WaitForMcCoy: AI_Movement_Track_Flush(kActorSteele); Actor_Put_In_Set(kActorSteele, kSetNR01); Actor_Set_At_XYZ(kActorSteele, 94.03f, 23.88f, -794.46f, 685); return true; - case 231: + case kGoalSteeleNR01GoToNR08: AI_Movement_Track_Flush(kActorSteele); Actor_Put_In_Set(kActorSteele, kSetNR05_NR08); Actor_Set_At_XYZ(kActorSteele, -1034.09f, 0.32f, 224.77f, 440); @@ -940,12 +940,12 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Set_Enter(kSetNR05_NR08, kSceneNR08); return true; - case 232: + case kGoalSteeleNR01GoToNR02: Game_Flag_Set(kFlagNR01toNR02); Set_Enter(kSetNR02, kSceneNR02); return true; - case kGoalSteeleHF03ApproachLucy: + case kGoalSteeleNR01GoToHF03: Game_Flag_Set(kFlagHF01toHF03); Game_Flag_Reset(kFlagMcCoyInNightclubRow); Game_Flag_Set(kFlagMcCoyInHysteriaHall); @@ -1089,7 +1089,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { } return true; - case 250: + case kGoalSteeleNR01ConfrontGordo: AI_Movement_Track_Flush(kActorSteele); Actor_Put_In_Set(kActorSteele, kSetNR01); Actor_Set_At_XYZ(kActorSteele, 94.03f, 23.88f, -794.46f, 685); @@ -1097,22 +1097,22 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Game_Flag_Reset(kFlagSpinnerAtNR01); Game_Flag_Reset(kFlagSpinnerAtHF01); } - Game_Flag_Set(603); + Game_Flag_Set(kFlagSteeleAimingAtGordo); Actor_Change_Animation_Mode(kActorSteele, kAnimationModeIdle); _var1 = 3; return true; - case 251: + case kGoalSteeleNR01TalkToGordo: Actor_Set_Targetable(kActorSteele, true); return true; - case 252: + case kGoalSteeleNR01ShootGordo: Player_Loses_Control(); Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack); Sound_Play(27, 100, 0, 0, 50); - Game_Flag_Reset(603); + Game_Flag_Reset(kFlagSteeleAimingAtGordo); Actor_Set_Targetable(kActorSteele, false); - Actor_Set_Goal_Number(kActorGordo, 299); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01Die); Delay(1500); Player_Set_Combat_Mode(false); Actor_Says(kActorSteele, 1070, 14); @@ -1123,7 +1123,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Says(kActorMcCoy, 3065, 18); Actor_Says(kActorSteele, 1280, 13); Actor_Says(kActorSteele, 1290, 13); - Game_Flag_Set(592); + Game_Flag_Set(kFlagGordoRanWay); Player_Gains_Control(); if (Game_Flag_Query(kFlagSpinnerAtHF01)) { Actor_Put_In_Set(kActorSteele, kSetHF01); @@ -1137,21 +1137,21 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { } return true; - case 255: + case kGoalSteeleNR01ShootMcCoy: ADQ_Flush(); Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack); Sound_Play(27, 100, 0, 0, 50); Actor_Force_Stop_Walking(kActorMcCoy); Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie); - Actor_Retired_Here(kActorMcCoy, 12, 12, 1, -1); - Actor_Set_Goal_Number(kActorGordo, 251); + Actor_Retired_Here(kActorMcCoy, 12, 12, true, -1); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01ReleaseHostage); Actor_Says(kActorSteele, 1250, kAnimationModeTalk); return true; - case 258: - Game_Flag_Reset(603); + case kGoalSteeleNR01McCoyShotGordo: + Game_Flag_Reset(kFlagSteeleAimingAtGordo); ADQ_Flush(); - Game_Flag_Set(592); + Game_Flag_Set(kFlagGordoRanWay); Actor_Set_Targetable(kActorSteele, false); Delay(1000); Player_Set_Combat_Mode(false); @@ -1177,20 +1177,20 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Set_Goal_Number(kActorSteele, kGoalSteeleTalkAboutMissingSpinner); return true; - case 260: + case kGoalSteeleNR01McCoyShotGun: ADQ_Flush(); Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatAttack); Sound_Play(27, 100, 0, 0, 50); _animationState = 38; _animationFrame = 0; - Actor_Set_Goal_Number(kActorGordo, 251); - Game_Flag_Reset(603); - Game_Flag_Set(592); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01ReleaseHostage); + Game_Flag_Reset(kFlagSteeleAimingAtGordo); + Game_Flag_Set(kFlagGordoRanWay); Actor_Set_Targetable(kActorSteele, false); Player_Loses_Control(); return true; - case 262: + case kGoalSteeleNR01TalkAboutShotGun: Actor_Face_Actor(kActorSteele, kActorMcCoy, true); Actor_Says(kActorSteele, 1160, 15); Actor_Face_Actor(kActorMcCoy, kActorSteele, true); @@ -1212,14 +1212,14 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Set_Goal_Number(kActorSteele, kGoalSteeleTalkAboutMissingSpinner); return true; - case 270: + case kGoalSteeleNR01ShotByMcCoy: ADQ_Flush(); Player_Loses_Control(); - Game_Flag_Reset(603); - Actor_Set_Targetable(kActorSteele, 0); - Actor_Set_Goal_Number(kActorGordo, 251); + Game_Flag_Reset(kFlagSteeleAimingAtGordo); + Actor_Set_Targetable(kActorSteele, false); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01ReleaseHostage); Actor_Start_Speech_Sample(kActorSteele, 1150); - Actor_Change_Animation_Mode(kActorSteele, 49); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatDie); Delay(5000); Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested); return true; @@ -1279,7 +1279,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { } return true; - case 285: + case kGoalSteeleImmediatelyStartChapter4: Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01StartChapter4); return true; @@ -1332,7 +1332,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Change_Animation_Mode(kActorSteele, 4); Actor_Face_Actor(kActorMcCoy, kActorSteele, 1); Delay(3000); - Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, 0); + Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, false); return true; case 411: @@ -1340,7 +1340,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Says(kActorSteele, 430, 14); Actor_Change_Animation_Mode(kActorSteele, 4); Delay(4000); - Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, 0); + Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, false); return true; case 412: @@ -1348,7 +1348,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 413: - Async_Actor_Walk_To_XYZ(kActorSteele, 1.0, -36.55f, 111.0f, 0, 0); + Async_Actor_Walk_To_XYZ(kActorSteele, 1.0, -36.55f, 111.0f, 0, false); return true; case 415: @@ -1359,8 +1359,8 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 416: Actor_Set_At_XYZ(kActorSteele, -48.83f, -36.55f, 69.98f, 280); - Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 36, 0, 1); - Actor_Face_Actor(kActorMcCoy, kActorSteele, 1); + Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 36, false, true); + Actor_Face_Actor(kActorMcCoy, kActorSteele, true); if (Game_Flag_Query(653) == 1) { Actor_Says(kActorSteele, 400, 3); Actor_Says(kActorMcCoy, 2165, 14); @@ -1378,17 +1378,17 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 418: - Actor_Face_Actor(kActorSteele, kActorMcCoy, 1); - Actor_Change_Animation_Mode(kActorSteele, 6); - Actor_Change_Animation_Mode(kActorMcCoy, 48); - Actor_Retired_Here(kActorMcCoy, 72, 18, 1, -1); + 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: - Actor_Set_Targetable(kActorSteele, 0); - Game_Flag_Set(646); - Actor_Set_Goal_Number(kActorSteele, 599); - Actor_Retired_Here(kActorSteele, 60, 12, 1, -1); + Actor_Set_Targetable(kActorSteele, false); + Game_Flag_Set(kFlagSteeleDead); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleDead); + Actor_Retired_Here(kActorSteele, 60, 12, true, -1); return true; case 420: @@ -1402,7 +1402,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Delay(2000); Actor_Face_Actor(kActorSteele, kActorMcCoy, 1); Actor_Says(kActorSteele, 360, -1); - Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 48, 0, 0); + Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 48, false, false); Actor_Says(kActorMcCoy, 2150, 14); Actor_Says(kActorSteele, 370, 15); Actor_Says(kActorMcCoy, 2155, 12); @@ -1480,7 +1480,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame++; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(74)) { _animationFrame = 0; - if (Game_Flag_Query(482) == 1) { + if (Game_Flag_Query(482)) { _animationState = 41; _var1 = 1; _var2 = 0; @@ -1489,23 +1489,27 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { } } break; + case 1: _animationFrame = 0; *animation = _animationNext; _animationState = _animationStateNext; break; + case 2: *animation = 67; _animationFrame++; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(67)) _animationFrame = 0; break; + case 3: *animation = 68; _animationFrame++; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(68)) _animationFrame = 0; break; + case 4: *animation = 59; _animationFrame++; @@ -1513,6 +1517,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 5: *animation = 60; _animationFrame++; @@ -1520,6 +1525,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 6: *animation = 69; _animationFrame++; @@ -1527,6 +1533,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 7: *animation = 70; _animationFrame++; @@ -1534,6 +1541,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 8: *animation = 62; _animationFrame++; @@ -1541,6 +1549,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 9: *animation = 63; _animationFrame++; @@ -1548,11 +1557,12 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 10: *animation = 83; _animationFrame++; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(83)) { - Actor_Change_Animation_Mode(kActorSteele, 0); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeIdle); *animation = 74; _animationFrame = 0; _animationState = 0; @@ -1561,6 +1571,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { } } break; + case 11: *animation = 84; _animationFrame++; @@ -1568,6 +1579,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 12: *animation = 85; _animationFrame++; @@ -1575,6 +1587,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 13: *animation = 86; _animationFrame++; @@ -1583,6 +1596,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationState = 0; } break; + case 14: *animation = 77; if (!_animationFrame && _flag) { @@ -1597,6 +1611,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { } } break; + case 15: *animation = 78; _animationFrame++; @@ -1606,6 +1621,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { *animation = 77; } break; + case 16: *animation = 79; _animationFrame++; @@ -1615,6 +1631,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { *animation = 77; } break; + case 17: *animation = 80; _animationFrame++; @@ -1624,6 +1641,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { *animation = 77; } break; + case 18: *animation = 81; _animationFrame++; @@ -1633,6 +1651,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { *animation = 77; } break; + case 19: *animation = 81; _animationFrame++; @@ -1642,13 +1661,14 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { *animation = 77; } break; + case 20: *animation = 82; if (!_animationFrame && _flag) { _animationFrame = 0; _animationState = 23; *animation = 66; - Actor_Change_Animation_Mode(kActorSteele, 4); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); _flag = 0; } else { _animationFrame++; @@ -1657,6 +1677,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { } } break; + case 21: *animation = 82; _animationFrame++; @@ -1666,6 +1687,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { *animation = 82; } break; + case 22: *animation = 82; _animationFrame++; @@ -1675,6 +1697,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { *animation = 82; } break; + case 23: *animation = 54; _animationFrame++; @@ -1682,6 +1705,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 24: *animation = 65; _animationFrame++; @@ -1691,6 +1715,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationState = 0; } break; + case 25: *animation = 64; _animationFrame++; @@ -1700,6 +1725,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { *animation = 54; } break; + case 26: *animation = 66; _animationFrame++; @@ -1720,15 +1746,16 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; _animationState = 23; *animation = 54; - Actor_Change_Animation_Mode(kActorSteele, 4); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); if (Actor_Query_Goal_Number(kActorSteele) == 215) { - Actor_Change_Animation_Mode(kActorSteele, 6); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack); _animationState = 26; _animationFrame = 0; *animation = 66; } } break; + case 27: *animation = 55; _animationFrame++; @@ -1736,9 +1763,10 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; _animationState = 23; *animation = 54; - Actor_Change_Animation_Mode(kActorSteele, 4); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); } break; + case 28: *animation = 56; _animationFrame++; @@ -1746,9 +1774,10 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; _animationState = 23; *animation = 54; - Actor_Change_Animation_Mode(kActorSteele, 4); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); } break; + case 29: *animation = 57; _animationFrame++; @@ -1756,9 +1785,10 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; _animationState = 23; *animation = 54; - Actor_Change_Animation_Mode(kActorSteele, 4); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); } break; + case 30: *animation = 58; _animationFrame++; @@ -1766,9 +1796,10 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; _animationState = 23; *animation = 54; - Actor_Change_Animation_Mode(kActorSteele, 4); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); } break; + case 31: *animation = 71; _animationFrame++; @@ -1776,9 +1807,10 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { *animation = 74; _animationFrame = 0; _animationState = 0; - Actor_Change_Animation_Mode(kActorSteele, 0); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeIdle); } break; + case 32: *animation = 72; _animationFrame++; @@ -1786,24 +1818,28 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { *animation = 74; _animationFrame = 0; _animationState = 0; - Actor_Change_Animation_Mode(kActorSteele, 0); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeIdle); } break; + case 33: *animation = 61; if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(61) - 1) _animationFrame++; break; + case 34: *animation = 73; if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(73) - 1) _animationFrame++; break; + case 35: *animation = 61; if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(61) - 1) _animationFrame++; break; + case 36: *animation = 88; _animationFrame++; @@ -1811,6 +1847,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 37: if (!_animationFrame && _flag) { _animationFrame = 0; @@ -1826,17 +1863,19 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { } } break; + case 38: *animation = 90; _animationFrame++; if (_animationFrame > 5) { - Actor_Change_Animation_Mode(kActorSteele, 0); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeIdle); _animationState = 0; _animationFrame = 0; *animation = 74; - Actor_Set_Goal_Number(kActorSteele, 261); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01PrepareTalkAboutShotGun); } break; + case 39: *animation = 92; _animationFrame++; @@ -1846,6 +1885,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { *animation = 88; } break; + case 40: *animation = 91; _animationFrame++; @@ -1856,6 +1896,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { _var1 = 0; } break; + case 41: if (_var1 > 3) { break; @@ -1906,6 +1947,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { } } break; + default: *animation = 406; _animationFrame = 0; @@ -1919,7 +1961,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) { bool AIScriptSteele::ChangeAnimationMode(int mode) { switch (mode) { case kGoalSteeleDefault: - if (Game_Flag_Query(603)) { + if (Game_Flag_Query(kFlagSteeleAimingAtGordo)) { _var1 = 3; } else { _var1 = 0; @@ -1967,9 +2009,15 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { break; } break; - case 1: - if ((_animationState != 4 && _animationState != 23 && _animationState != 25 && _animationState != 26) - || _animationState > 26) { + + case kAnimationModeWalk: + if ((_animationState != 4 + && _animationState != 23 + && _animationState != 25 + && _animationState != 26 + ) + || _animationState > 26 + ) { if (Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleApprehendIzo && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleArrestIzo ) { @@ -1984,7 +2032,8 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { _animationFrame = 0; } break; - case 2: + + case kAnimationModeRun: if (Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleApprehendIzo && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleArrestIzo && _animationState != 23 @@ -1996,9 +2045,10 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { _animationFrame = 0; } break; - case 3: + + case kAnimationModeTalk: if (_animationState != 35) { - if (Game_Flag_Query(603)) { + if (Game_Flag_Query(kFlagSteeleAimingAtGordo)) { _animationState = 37; _animationFrame = 0; _flag = 0; @@ -2016,9 +2066,13 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { } } break; - case 4: + + case kAnimationModeCombatIdle: if (_animationState) { - if (_animationState > 25 || (_animationState != 23 && _animationState != 25)) { + if (_animationState > 25 + || (_animationState != 23 + && _animationState != 25) + ) { _animationState = 23; _animationFrame = 0; } @@ -2027,22 +2081,26 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { _animationFrame = 0; } break; - case 6: - if (Game_Flag_Query(603)) { + + case kAnimationModeCombatAttack: + if (Game_Flag_Query(kFlagSteeleAimingAtGordo)) { _animationState = 39; } else { _animationState = 26; } _animationFrame = 0; break; - case 7: + + case kAnimationModeCombatWalk: _animationState = 4; _animationFrame = 0; break; - case 8: + + case kAnimationModeCombatRun: _animationState = 5; _animationFrame = 0; break; + case 12: if (_animationState) { _animationState = 15; @@ -2055,6 +2113,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { } _flag = 0; break; + case 13: if (_animationState) { _animationState = 16; @@ -2067,6 +2126,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { } _flag = 0; break; + case 14: if (_animationState) { _animationState = 17; @@ -2079,6 +2139,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { } _flag = 0; break; + case 15: if (_animationState) { _animationState = 18; @@ -2091,6 +2152,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { } _flag = 0; break; + case 16: if (_animationState) { _animationState = 19; @@ -2103,7 +2165,8 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { } _flag = 0; break; - case 21: + + case kAnimationModeHit: if (_animationState > 28) { if (Random_Query(0, 1)) { _animationState = 31; @@ -2117,7 +2180,8 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { } _animationFrame = 0; break; - case 22: + + case kAnimationModeCombatHit: if (Random_Query(0, 1)) { _animationState = 29; } else { @@ -2125,6 +2189,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { } _animationFrame = 0; break; + case 43: Game_Flag_Set(482); _animationState = 41; @@ -2132,25 +2197,37 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { _var2 = 0; _var1 = 1; break; - case 44: + + case kAnimationModeWalkUp: _animationState = 6; _animationFrame = 0; break; - case 45: + + case kAnimationModeWalkDown: _animationState = 7; _animationFrame = 0; break; - case 46: + + case kAnimationModeCombatWalkUp: _animationState = 8; _animationFrame = 0; break; - case 47: + + case kAnimationModeCombatWalkDown: _animationState = 9; _animationFrame = 0; break; - case 48: - if (_animationState != 33 && _animationState != 34) { - if (_animationState > 26 || (_animationState != 23 && _animationState != 25 && _animationState != 26)) { + + case kAnimationModeDie: + if (_animationState != 33 + && _animationState != 34 + ) { + if (_animationState > 26 + || (_animationState != 23 + && _animationState != 25 + && _animationState != 26 + ) + ) { _animationState = 34; _animationFrame = 0; } else { @@ -2159,31 +2236,37 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) { } } break; - case 49: + + case kAnimationModeCombatDie: if (_animationState != 33) { _animationState = 33; _animationFrame = 0; } break; + case 51: _animationState = 35; _animationFrame = 0; break; + case 58: _animationState = 20; _animationFrame = 0; _flag = 0; break; + case 59: _animationState = 21; _animationFrame = 0; _flag = 0; break; + case 60: _animationState = 22; _animationFrame = 0; _flag = 0; break; + case 86: _animationState = 10; _animationFrame = 0; diff --git a/engines/bladerunner/script/ai/zuben.cpp b/engines/bladerunner/script/ai/zuben.cpp index 6155a27e3b..eb7de88d99 100644 --- a/engines/bladerunner/script/ai/zuben.cpp +++ b/engines/bladerunner/script/ai/zuben.cpp @@ -103,7 +103,7 @@ bool AIScriptZuben::Update() { Game_Flag_Set(kFlagCT05WarehouseOpen); Actor_Set_Targetable(kActorZuben, true); if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoDefault) { - Actor_Set_Goal_Number(kActorGordo, kGoalGordoLeaveCT01); + Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01Leave); } return true; } @@ -1175,7 +1175,7 @@ void AIScriptZuben::FledCombat() { void AIScriptZuben::dialogue() { Dialogue_Menu_Clear_List(); DM_Add_To_List_Never_Repeat_Once_Selected(1490, 5, 5, -1); - if (Actor_Query_Goal_Number(kActorLucy) != 599) { + if (Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead) { DM_Add_To_List_Never_Repeat_Once_Selected(1500, 5, 5, 5); } DM_Add_To_List_Never_Repeat_Once_Selected(1510, -1, 5, 5); |