diff options
author | Peter Kohaut | 2019-01-26 18:00:23 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-01-27 11:48:59 +0100 |
commit | ace4904d398a0ed8df7c36bc94c2b79e694610d3 (patch) | |
tree | 243d8e8dff4d412743e05aaebe34d1ffd3501df8 /engines/bladerunner/script | |
parent | 783f0554edd107b7df3057da7338d96d9d8cee7d (diff) | |
download | scummvm-rg350-ace4904d398a0ed8df7c36bc94c2b79e694610d3.tar.gz scummvm-rg350-ace4904d398a0ed8df7c36bc94c2b79e694610d3.tar.bz2 scummvm-rg350-ace4904d398a0ed8df7c36bc94c2b79e694610d3.zip |
BLADERUNNER: Cleanup of Guzza script for chapter 2
Diffstat (limited to 'engines/bladerunner/script')
-rw-r--r-- | engines/bladerunner/script/ai/guzza.cpp | 79 |
1 files changed, 65 insertions, 14 deletions
diff --git a/engines/bladerunner/script/ai/guzza.cpp b/engines/bladerunner/script/ai/guzza.cpp index 9d41d3a4cc..f715c0be75 100644 --- a/engines/bladerunner/script/ai/guzza.cpp +++ b/engines/bladerunner/script/ai/guzza.cpp @@ -52,12 +52,12 @@ bool AIScriptGuzza::Update() { return true; } - if ( Actor_Query_Goal_Number(kActorGuzza) != kGoalGuzzaGoToHawkersCircle + if ( Actor_Query_Goal_Number(kActorGuzza) != kGoalGuzzaGoToHawkersCircle1 && !Game_Flag_Query(kFlagHC01GuzzaWalk) && Game_Flag_Query(kFlagHC01GuzzaPrepare) ) { Game_Flag_Set(kFlagHC01GuzzaWalk); - Actor_Set_Goal_Number(kActorGuzza, 103); + Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaGoToHawkersCircle2); return true; } } @@ -77,19 +77,19 @@ void AIScriptGuzza::CompletedMovementTrack() { case kGoalGuzzaGoToOffice: if (Random_Query(1, 2) == 1) { - Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaGoToHawkersCircle); + Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaGoToHawkersCircle1); } else { - Actor_Set_Goal_Number(kActorGuzza, 104); + Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaGoToFreeSlotB); } // return true; break; - case 103: + case kGoalGuzzaGoToHawkersCircle2: Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeaveOffice); // return true; break; - case 105: + case kGoalGuzzaGoToFreeSlotG: Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeaveOffice); // return true; break; @@ -149,7 +149,7 @@ void AIScriptGuzza::OtherAgentEnteredCombatMode(int otherActorId, int combatMode void AIScriptGuzza::ShotAtAndMissed() { if (Actor_Query_Goal_Number(kActorGuzza) == 301) { - Actor_Change_Animation_Mode(kActorGuzza, 22); + Actor_Change_Animation_Mode(kActorGuzza, kAnimationModeCombatHit); Actor_Set_Goal_Number(kActorGuzza, 304); } // return false; @@ -157,7 +157,7 @@ void AIScriptGuzza::ShotAtAndMissed() { bool AIScriptGuzza::ShotAtAndHit() { if (Actor_Query_Goal_Number(kActorGuzza) == 301) { - Actor_Change_Animation_Mode(kActorGuzza, 22); + Actor_Change_Animation_Mode(kActorGuzza, kAnimationModeCombatHit); Actor_Set_Goal_Number(kActorGuzza, 303); } return false; @@ -182,7 +182,7 @@ bool AIScriptGuzza::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorGuzza); return true; - case kGoalGuzzaGoToHawkersCircle: + case kGoalGuzzaGoToHawkersCircle1: AI_Movement_Track_Flush(kActorGuzza); AI_Movement_Track_Append(kActorGuzza, 258, 0); AI_Movement_Track_Append(kActorGuzza, 260, 8); @@ -198,7 +198,7 @@ bool AIScriptGuzza::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorGuzza); return true; - case 103: + case kGoalGuzzaGoToHawkersCircle2: AI_Movement_Track_Flush(kActorGuzza); AI_Movement_Track_Append(kActorGuzza, 258, 0); AI_Movement_Track_Append(kActorGuzza, 259, 1); @@ -206,13 +206,13 @@ bool AIScriptGuzza::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorGuzza); return true; - case 104: + case kGoalGuzzaGoToFreeSlotB: AI_Movement_Track_Flush(kActorGuzza); AI_Movement_Track_Append(kActorGuzza, 34, 60); AI_Movement_Track_Repeat(kActorGuzza); return true; - case 105: + case kGoalGuzzaGoToFreeSlotG: AI_Movement_Track_Flush(kActorGuzza); AI_Movement_Track_Append(kActorGuzza, 39, 120); AI_Movement_Track_Repeat(kActorGuzza); @@ -285,6 +285,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { break; } break; + case 1: switch (_state) { case 0: @@ -340,6 +341,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { break; } break; + case 2: if (_state == 0) { *animation = _animationNext; @@ -359,6 +361,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { } } break; + case 3: switch (_state) { case 0: @@ -378,6 +381,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationState = _animationStateNext; } break; + case 4: *animation = 185; _animationFrame++; @@ -385,6 +389,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 5: *animation = 186; _animationFrame++; @@ -392,6 +397,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 6: *animation = 176; _animationFrame++; @@ -399,6 +405,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 7: *animation = 177; _animationFrame++; @@ -406,6 +413,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 8: *animation = 181; _animationFrame++; @@ -413,6 +421,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 9: *animation = 187; _animationFrame++; @@ -420,6 +429,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 10: *animation = 188; _animationFrame++; @@ -427,6 +437,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 11: if (_animationFrame == 0 && _flag) { *animation = 197; @@ -443,6 +454,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { } } break; + case 12: *animation = 202; _animationFrame++; @@ -452,6 +464,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationState = 11; } break; + case 13: *animation = 203; _animationFrame++; @@ -461,6 +474,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationState = 11; } break; + case 14: *animation = 204; _animationFrame++; @@ -470,6 +484,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationState = 11; } break; + case 15: *animation = 205; _animationFrame++; @@ -479,6 +494,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationState = 11; } break; + case 16: *animation = 206; _animationFrame++; @@ -488,6 +504,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationState = 11; } break; + case 17: if (_animationFrame == 0 && _flag) { *animation = 189; @@ -505,6 +522,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { } } break; + case 18: *animation = 193; _animationFrame++; @@ -514,6 +532,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationState = 17; } break; + case 19: *animation = 194; _animationFrame++; @@ -523,6 +542,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 20: *animation = 195; _animationFrame++; @@ -532,6 +552,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationState = 17; } break; + case 21: *animation = 196; _animationFrame++; @@ -541,6 +562,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationState = 17; } break; + case 22: if (_animationFrame == 0 && _flag) { *animation = 172; @@ -558,6 +580,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { } } break; + case 23: if (_animationFrame == 0 && _flag) { *animation = 172; @@ -575,12 +598,14 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { } } break; + case 24: *animation = 172; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(172)) { _animationFrame = 0; } break; + case 25: *animation = 173; _animationFrame++; @@ -588,6 +613,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; } break; + case 26: *animation = 174; _animationFrame++; @@ -598,6 +624,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { Actor_Change_Animation_Mode(kActorGuzza, kAnimationModeCombatIdle); } break; + case 27: *animation = 175; _animationFrame++; @@ -608,6 +635,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { Actor_Change_Animation_Mode(kActorGuzza, kAnimationModeCombatIdle); } break; + case 29: *animation = 182; _animationFrame++; @@ -617,6 +645,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationState = 24; } break; + case 30: *animation = 183; _animationFrame++; @@ -626,6 +655,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { _animationState = 0; } break; + case 31: *animation = 184; _animationFrame++; @@ -636,6 +666,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { Actor_Change_Animation_Mode(kActorGuzza, kAnimationModeCombatIdle); } break; + case 32: *animation = 200; _animationFrame++; @@ -646,6 +677,7 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { Actor_Change_Animation_Mode(kActorGuzza, kAnimationModeIdle); } break; + case 33: *animation = 207; _animationFrame++; @@ -664,10 +696,12 @@ bool AIScriptGuzza::UpdateAnimation(int *animation, int *frame) { } } break; + case 34: *animation = 207; _animationFrame = Slice_Animation_Query_Number_Of_Frames(207) - 1; break; + default: *animation = 399; break; @@ -719,14 +753,17 @@ bool AIScriptGuzza::ChangeAnimationMode(int mode) { break; } break; + case kAnimationModeWalk: _animationState = 4; _animationFrame = 0; break; + case kAnimationModeRun: _animationState = 5; _animationFrame = 0; break; + case kAnimationModeTalk: if (_animationState) { _animationState = 11; @@ -739,27 +776,34 @@ bool AIScriptGuzza::ChangeAnimationMode(int mode) { _animationNext = 201; } break; + case kAnimationModeCombatIdle: if (_animationState == 0) { _animationState = 29; _animationFrame = 0; - } else if (_animationState != 24 && _animationState != 29) { + } else if (_animationState != 24 + && _animationState != 29 + ) { _animationState = 24; _animationFrame = 0; } break; + case kAnimationModeCombatAttack: _animationState = 31; _animationFrame = 0; break; + case kAnimationModeCombatWalk: _animationState = 6; _animationFrame = 0; break; + case kAnimationModeCombatRun: _animationState = 7; _animationFrame = 0; break; + case 12: if (_animationState) { _animationState = 12; @@ -772,6 +816,7 @@ bool AIScriptGuzza::ChangeAnimationMode(int mode) { _animationNext = 202; } break; + case 13: if (_animationState) { _animationState = 13; @@ -784,6 +829,7 @@ bool AIScriptGuzza::ChangeAnimationMode(int mode) { _animationNext = 203; } break; + case 14: if (_animationState) { _animationState = 14; @@ -796,6 +842,7 @@ bool AIScriptGuzza::ChangeAnimationMode(int mode) { _animationNext = 204; } break; + case 15: if (_animationState) { _animationState = 15; @@ -808,6 +855,7 @@ bool AIScriptGuzza::ChangeAnimationMode(int mode) { _animationNext = 205; } break; + case 16: if (_animationState) { _animationState = 16; @@ -820,7 +868,8 @@ bool AIScriptGuzza::ChangeAnimationMode(int mode) { _animationNext = 206; } break; - case 22: + + case kAnimationModeCombatHit: if (Random_Query(0, 1)) { _animationState = 26; } else { @@ -828,10 +877,12 @@ bool AIScriptGuzza::ChangeAnimationMode(int mode) { } _animationFrame = 0; break; + case 23: _animationState = 32; _animationFrame = 0; break; + case 30: if (_animationState == 1) { _animationState = 3; |