aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script/ai
diff options
context:
space:
mode:
authorPeter Kohaut2019-02-02 00:17:18 +0100
committerPeter Kohaut2019-02-02 00:50:16 +0100
commit19d92484fdbae556a5238b13535e34f8436f399b (patch)
tree9ca4d167794848dc4345e62785e97c09b33b118c /engines/bladerunner/script/ai
parenta5854b524b4251eb4636063fbee37f07d5f86168 (diff)
downloadscummvm-rg350-19d92484fdbae556a5238b13535e34f8436f399b.tar.gz
scummvm-rg350-19d92484fdbae556a5238b13535e34f8436f399b.tar.bz2
scummvm-rg350-19d92484fdbae556a5238b13535e34f8436f399b.zip
BLADERUNNER: Cleanup of scripts at start of chapter 4
Diffstat (limited to 'engines/bladerunner/script/ai')
-rw-r--r--engines/bladerunner/script/ai/bullet_bob.cpp12
-rw-r--r--engines/bladerunner/script/ai/free_slot_a.cpp13
-rw-r--r--engines/bladerunner/script/ai/mutant1.cpp2
-rw-r--r--engines/bladerunner/script/ai/officer_leary.cpp2
-rw-r--r--engines/bladerunner/script/ai/rajif.cpp5
-rw-r--r--engines/bladerunner/script/ai/runciter.cpp281
6 files changed, 180 insertions, 135 deletions
diff --git a/engines/bladerunner/script/ai/bullet_bob.cpp b/engines/bladerunner/script/ai/bullet_bob.cpp
index 1a97a826cd..75acdfdb21 100644
--- a/engines/bladerunner/script/ai/bullet_bob.cpp
+++ b/engines/bladerunner/script/ai/bullet_bob.cpp
@@ -79,7 +79,7 @@ bool AIScriptBulletBob::Update() {
Actor_Face_Heading(kActorBulletBob, 208, false);
_animationFrame = 0;
_animationState = 2;
- Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShotMcCoy);
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobWillShotMcCoy);
Game_Flag_Set(kFlagRC04BobShootMcCoy);
return true;
}
@@ -142,7 +142,7 @@ bool AIScriptBulletBob::ShotAtAndHit() {
Global_Variable_Increment(kVariableBobShot, 1);
if (Global_Variable_Query(kVariableBobShot) > 0) {
Actor_Set_Targetable(kActorBulletBob, false);
- Actor_Set_Goal_Number(kActorBulletBob, 99);
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobGone);
_animationFrame = 0;
_animationState = 3;
Ambient_Sounds_Play_Speech_Sound(kActorGordo, 9000, 100, 0, 0, 0); // not a typo, it's really from Gordo
@@ -178,7 +178,7 @@ bool AIScriptBulletBob::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
}
- if (newGoalNumber == kGoalBulletBobDead
+ if ( newGoalNumber == kGoalBulletBobDead
&& !Actor_Clue_Query(kActorMcCoy, kClueVKBobGorskyReplicant)
) {
Delay(2000);
@@ -189,11 +189,11 @@ bool AIScriptBulletBob::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
}
- if (newGoalNumber == 6) {
+ if (newGoalNumber == kGoalBulletBobShotMcCoy) {
Scene_Exits_Disable();
Actor_Force_Stop_Walking(kActorMcCoy);
Ambient_Sounds_Play_Speech_Sound(kActorMcCoy, 9900, 100, 0, 0, 0);
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
Actor_Retired_Here(kActorMcCoy, 6, 6, 1, -1);
Scene_Exits_Enable();
return true;
@@ -268,7 +268,7 @@ bool AIScriptBulletBob::UpdateAnimation(int *animation, int *frame) {
}
if (_animationFrame == 5) {
Sound_Play(493, 90, 0, 0, 50);
- Actor_Set_Goal_Number(kActorBulletBob, 6);
+ Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShotMcCoy);
}
break;
diff --git a/engines/bladerunner/script/ai/free_slot_a.cpp b/engines/bladerunner/script/ai/free_slot_a.cpp
index f673860119..6c3e9e2c80 100644
--- a/engines/bladerunner/script/ai/free_slot_a.cpp
+++ b/engines/bladerunner/script/ai/free_slot_a.cpp
@@ -51,9 +51,15 @@ void AIScriptFreeSlotA::Initialize() {
bool AIScriptFreeSlotA::Update() {
switch (Global_Variable_Query(kVariableChapter)) {
case 4:
- if (Actor_Query_Which_Set_In(kActorMcCoy) == kSceneUG02 && Actor_Query_Which_Set_In(kActorFreeSlotA) == kSceneUG02) {
+ if (Actor_Query_Which_Set_In(kActorMcCoy) == kSceneUG02
+ && Actor_Query_Which_Set_In(kActorFreeSlotA) == kSceneUG02
+ ) {
int goal = Actor_Query_Goal_Number(kActorFreeSlotA);
- if ((goal == 302 || goal == 303) && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotA, kActorMcCoy) <= 48) {
+ if ((goal == 302
+ || goal == 303
+ )
+ && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotA, kActorMcCoy) <= 48
+ ) {
Actor_Set_Goal_Number(kActorFreeSlotA, 304);
} else if (goal == 309) {
float x, y, z;
@@ -72,7 +78,8 @@ bool AIScriptFreeSlotA::Update() {
switch (Actor_Query_Goal_Number(kActorFreeSlotA)) {
case 306:
if (Actor_Query_Which_Set_In(kActorFreeSlotA) == Player_Query_Current_Set()
- && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotA, kActorMcCoy) <= 48) {
+ && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotA, kActorMcCoy) <= 48
+ ) {
Actor_Set_Goal_Number(kActorFreeSlotA, 308);
}
break;
diff --git a/engines/bladerunner/script/ai/mutant1.cpp b/engines/bladerunner/script/ai/mutant1.cpp
index fa9b736671..3849cfcaea 100644
--- a/engines/bladerunner/script/ai/mutant1.cpp
+++ b/engines/bladerunner/script/ai/mutant1.cpp
@@ -295,7 +295,7 @@ bool AIScriptMutant1::GoalChanged(int currentGoalNumber, int newGoalNumber) {
break;
case 8:
- if (Game_Flag_Query(623) == 1) {
+ if (Game_Flag_Query(kFlagUG07Empty)) {
AI_Movement_Track_Append(kActorMutant1, 418, 0);
AI_Movement_Track_Append(kActorMutant1, 417, 0);
AI_Movement_Track_Append(kActorMutant1, 539, 0);
diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp
index 0348806508..718a39aff7 100644
--- a/engines/bladerunner/script/ai/officer_leary.cpp
+++ b/engines/bladerunner/script/ai/officer_leary.cpp
@@ -91,7 +91,7 @@ bool AIScriptOfficerLeary::Update() {
return false;
}
- if ( Game_Flag_Query(623)
+ if ( Game_Flag_Query(kFlagUG07Empty)
&& !Game_Flag_Query(664)
) {
Game_Flag_Set(664);
diff --git a/engines/bladerunner/script/ai/rajif.cpp b/engines/bladerunner/script/ai/rajif.cpp
index 26cf41282f..3703e74b64 100644
--- a/engines/bladerunner/script/ai/rajif.cpp
+++ b/engines/bladerunner/script/ai/rajif.cpp
@@ -37,7 +37,9 @@ void AIScriptRajif::Initialize() {
}
bool AIScriptRajif::Update() {
- if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorRajif) < 400)
+ if (Global_Variable_Query(kVariableChapter) == 5
+ && Actor_Query_Goal_Number(kActorRajif) < 400
+ )
Actor_Set_Goal_Number(kActorRajif, 599);
return false;
@@ -98,6 +100,7 @@ bool AIScriptRajif::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Change_Animation_Mode(kActorRajif, 0);
return true;
}
+
if (newGoalNumber == 599) {
Actor_Put_In_Set(kActorRajif, kSetFreeSlotI);
Actor_Set_At_Waypoint(kActorRajif, 41, 0);
diff --git a/engines/bladerunner/script/ai/runciter.cpp b/engines/bladerunner/script/ai/runciter.cpp
index 8087489d49..11ad906593 100644
--- a/engines/bladerunner/script/ai/runciter.cpp
+++ b/engines/bladerunner/script/ai/runciter.cpp
@@ -57,19 +57,21 @@ bool AIScriptRunciter::Update() {
) {
Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterGoToFreeSlotGH);
}
+
if (Global_Variable_Query(kVariableChapter) == 4
- && Actor_Query_Goal_Number(kActorRunciter) < 300
+ && Actor_Query_Goal_Number(kActorRunciter) < kGoalRunciterRC02Wait
) {
- Actor_Set_Goal_Number(kActorRunciter, 300);
+ Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterRC02Wait);
}
+
return false;
}
void AIScriptRunciter::TimerExpired(int timer) {}
void AIScriptRunciter::CompletedMovementTrack() {
- if (Actor_Query_Goal_Number(kActorRunciter) == 1) {
- if (Player_Query_Current_Scene() == 79) {
+ if (Actor_Query_Goal_Number(kActorRunciter) == kGoalRunciterRC02WalkAround) {
+ if (Player_Query_Current_Scene() == kSceneRC02) {
switch (Random_Query(1, 5)) {
case 2:
case 3:
@@ -85,7 +87,7 @@ void AIScriptRunciter::CompletedMovementTrack() {
}
}
Actor_Set_Goal_Number(kActorRunciter, 99);
- Actor_Set_Goal_Number(kActorRunciter, 1);
+ Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterRC02WalkAround);
//return true;
}
//return false;
@@ -102,12 +104,15 @@ void AIScriptRunciter::OtherAgentEnteredThisScene(int otherActorId) {}
void AIScriptRunciter::OtherAgentExitedThisScene(int otherActorId) {}
void AIScriptRunciter::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
- if (Actor_Query_Goal_Number(kActorRunciter) == 300 && combatMode == 1 && !Game_Flag_Query(705)) {
+ if ( Actor_Query_Goal_Number(kActorRunciter) == kGoalRunciterRC02Wait
+ && combatMode
+ && !Game_Flag_Query(kFlagRC02RunciterTalkWithGun)
+ ) {
Actor_Set_Targetable(kActorRunciter, true);
Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
Actor_Says(kActorRunciter, 420, 12);
Actor_Face_Actor(kActorMcCoy, kActorRunciter, true);
- Actor_Change_Animation_Mode(kActorMcCoy, 5);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatAim);
if (Actor_Clue_Query(kActorMcCoy, kClueZubensMotive)) {
Actor_Says(kActorMcCoy, 4770, -1);
Actor_Says(kActorRunciter, 590, 13);
@@ -145,7 +150,7 @@ void AIScriptRunciter::OtherAgentEnteredCombatMode(int otherActorId, int combatM
Actor_Says(kActorRunciter, 530, 18);
Actor_Says(kActorRunciter, 540, 16);
}
- Game_Flag_Set(705);
+ Game_Flag_Set(kFlagRC02RunciterTalkWithGun);
}
}
@@ -180,7 +185,8 @@ bool AIScriptRunciter::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_At_Waypoint(kActorRunciter, 92, 567);
return false;
}
- if (newGoalNumber == kGoalRunciterWalkAroundRC02) {
+
+ if (newGoalNumber == kGoalRunciterRC02WalkAround) {
AI_Movement_Track_Flush(kActorRunciter);
if (Random_Query(0, 1) == 1) {
if (Random_Query(0, 1) == 0) {
@@ -198,6 +204,7 @@ bool AIScriptRunciter::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorRunciter);
return true;
}
+
if (newGoalNumber == kGoalRunciterGoToFreeSlotGH) {
AI_Movement_Track_Flush(kActorRunciter);
AI_Movement_Track_Append(kActorRunciter, 39, 120);
@@ -205,7 +212,8 @@ bool AIScriptRunciter::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorRunciter);
return false;
}
- if (newGoalNumber == kGoalRunciterAtShop) {
+
+ if (newGoalNumber == kGoalRunciterRC02Wait) {
Actor_Put_In_Set(kActorRunciter, kSetRC02_RC51);
Actor_Set_At_Waypoint(kActorRunciter, 93, 1007);
return false;
@@ -214,77 +222,95 @@ bool AIScriptRunciter::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
-
switch (_animationState) {
- case kRunciterStateDead:
- *animation = 528;
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(528) - 1;
- *frame = _animationFrame;
- break;
- case kRunciterStateDying:
- *animation = 528;
- _animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(528) - 1) {
- *animation = 528;
- _animationState = kRunciterStateDead;
- }
- *frame = _animationFrame;
- break;
- case 13:
+ case kRunciterStateIdle:
if (var_45CD78 == 0) {
- _animationFrame = 0;
- _animationState = _animationStateNext;
- *animation = _animationNext;
+ *animation = 529;
+ if (var_45CD84) {
+ var_45CD84--;
+ } else {
+ _animationFrame += var_45CD80;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(529)) {
+ _animationFrame = 0;
+ }
+ if (_animationFrame < 0) {
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(529) - 1;
+ }
+ --var_45CD7C;
+ if (var_45CD7C == 0) {
+ var_45CD80 = 2 * Random_Query(0, 1) - 1;
+ var_45CD7C = Random_Query(6, 14);
+ var_45CD84 = Random_Query(0, 4);
+ }
+ if (_animationFrame == 0) {
+ if (Random_Query(0, 1) == 1) {
+ var_45CD78 = Random_Query(1, 2);
+ var_45CD80 = 1;
+ var_45CD84 = 0;
+ }
+ }
+ }
} else if (var_45CD78 == 1) {
*animation = 530;
- _animationFrame += 3;
+ _animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(530)) {
_animationFrame = 0;
- _animationState = _animationStateNext;
- *animation = _animationNext;
+ var_45CD78 = 0;
+ *animation = 529;
+ var_45CD7C = Random_Query(6, 14);
+ var_45CD80 = 2 * Random_Query(0, 1) - 1;
}
} else if (var_45CD78 == 2) {
*animation = 531;
- _animationFrame -= 3;
- if (_animationFrame - 3 < 0) {
- _animationFrame = 0;
- _animationState = _animationStateNext;
- *animation = _animationNext;
+ if (var_45CD84) {
+ var_45CD84--;
+ } else {
+ _animationFrame += var_45CD80;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
+ var_45CD84 = Random_Query(5, 15);
+ var_45CD80 = -1;
+ }
+ if (_animationFrame <= 0) {
+ _animationFrame = 0;
+ var_45CD78 = 0;
+ *animation = 529;
+ var_45CD7C = Random_Query(6, 14);
+ var_45CD80 = 2 * Random_Query(0, 1) - 1;
+ }
}
}
*frame = _animationFrame;
break;
- case 12:
- *animation = 532;
+
+ case kRunciterStateWalking:
+ *animation = 526;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(532)) {
- *animation = 529;
- _animationState = 0;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(526)) {
_animationFrame = 0;
- var_45CD78 = 0;
- Actor_Change_Animation_Mode(kActorRunciter, kAnimationModeCombatIdle);
}
*frame = _animationFrame;
break;
- case 11:
- *animation = 541;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(541)) {
+
+ case 2:
+ *animation = 533;
+ _animationFrame++;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(533)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
_animationState = 0;
var_45CD78 = 0;
} else {
- *animation = 533;
- _animationState = 2;
+ _animationState = 4;
}
}
*frame = _animationFrame;
break;
- case 10:
- *animation = 540;
+
+ case 4:
+ *animation = 534;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(540)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(534)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
@@ -297,10 +323,11 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
- case 9:
- *animation = 539;
+
+ case 5:
+ *animation = 535;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(539)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(535)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
@@ -313,10 +340,11 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
- case 8:
- *animation = 538;
+
+ case 6:
+ *animation = 536;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(538)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(536)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
@@ -329,6 +357,7 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
+
case 7:
*animation = 537;
_animationFrame++;
@@ -345,10 +374,11 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
- case 6:
- *animation = 536;
+
+ case 8:
+ *animation = 538;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(536)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(538)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
@@ -361,10 +391,11 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
- case 5:
- *animation = 535;
+
+ case 9:
+ *animation = 539;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(535)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(539)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
@@ -377,10 +408,10 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
- case 4:
- *animation = 534;
+ case 10:
+ *animation = 540;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(534)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(540)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
@@ -393,87 +424,77 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
}
*frame = _animationFrame;
break;
- case 2:
- *animation = 533;
- _animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(533)) {
+
+ case 11:
+ *animation = 541;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(541)) {
_animationFrame = 0;
if (var_45CD88) {
*animation = 529;
_animationState = 0;
var_45CD78 = 0;
} else {
- _animationState = 4;
+ *animation = 533;
+ _animationState = 2;
}
}
*frame = _animationFrame;
break;
- case kRunciterStateWalking:
- *animation = 526;
+
+ case 12:
+ *animation = 532;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(526)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(532)) {
+ *animation = 529;
+ _animationState = 0;
_animationFrame = 0;
+ var_45CD78 = 0;
+ Actor_Change_Animation_Mode(kActorRunciter, kAnimationModeCombatIdle);
}
*frame = _animationFrame;
break;
- case kRunciterStateIdle:
+
+ case 13:
if (var_45CD78 == 0) {
- *animation = 529;
- if (var_45CD84) {
- var_45CD84--;
- } else {
- _animationFrame += var_45CD80;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(529)) {
- _animationFrame = 0;
- }
- if (_animationFrame < 0) {
- _animationFrame = Slice_Animation_Query_Number_Of_Frames(529) - 1;
- }
- --var_45CD7C;
- if (var_45CD7C == 0) {
- var_45CD80 = 2 * Random_Query(0, 1) - 1;
- var_45CD7C = Random_Query(6, 14);
- var_45CD84 = Random_Query(0, 4);
- }
- if (_animationFrame == 0) {
- if (Random_Query(0, 1) == 1) {
- var_45CD78 = Random_Query(1, 2);
- var_45CD80 = 1;
- var_45CD84 = 0;
- }
- }
- }
+ _animationFrame = 0;
+ _animationState = _animationStateNext;
+ *animation = _animationNext;
} else if (var_45CD78 == 1) {
*animation = 530;
- _animationFrame++;
+ _animationFrame += 3;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(530)) {
_animationFrame = 0;
- var_45CD78 = 0;
- *animation = 529;
- var_45CD7C = Random_Query(6, 14);
- var_45CD80 = 2 * Random_Query(0, 1) - 1;
+ _animationState = _animationStateNext;
+ *animation = _animationNext;
}
} else if (var_45CD78 == 2) {
*animation = 531;
- if (var_45CD84) {
- var_45CD84--;
- } else {
- _animationFrame += var_45CD80;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
- var_45CD84 = Random_Query(5, 15);
- var_45CD80 = -1;
- }
- if (_animationFrame <= 0) {
- _animationFrame = 0;
- var_45CD78 = 0;
- *animation = 529;
- var_45CD7C = Random_Query(6, 14);
- var_45CD80 = 2 * Random_Query(0, 1) - 1;
- }
+ _animationFrame -= 3;
+ if (_animationFrame - 3 < 0) {
+ _animationFrame = 0;
+ _animationState = _animationStateNext;
+ *animation = _animationNext;
}
}
*frame = _animationFrame;
break;
+
+ case kRunciterStateDying:
+ *animation = 528;
+ _animationFrame++;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(528) - 1) {
+ *animation = 528;
+ _animationState = kRunciterStateDead;
+ }
+ *frame = _animationFrame;
+ break;
+
+ case kRunciterStateDead:
+ *animation = 528;
+ _animationFrame = Slice_Animation_Query_Number_Of_Frames(528) - 1;
+ *frame = _animationFrame;
+ break;
+
default:
*animation = 399;
_animationFrame = 0;
@@ -486,7 +507,9 @@ bool AIScriptRunciter::UpdateAnimation(int *animation, int *frame) {
bool AIScriptRunciter::ChangeAnimationMode(int mode) {
switch (mode) {
case kAnimationModeIdle:
- if (_animationState >= 2 && _animationState <= 11) {
+ if (_animationState >= 2
+ && _animationState <= 11
+ ) {
var_45CD88 = 1;
} else {
_animationState = 0;
@@ -494,6 +517,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
var_45CD78 = 0;
}
break;
+
case kAnimationModeWalk:
if (_animationState > 1) {
_animationState = 1;
@@ -504,6 +528,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
_animationNext = 526;
}
break;
+
case kAnimationModeTalk:
if (_animationState != 0) {
_animationState = 2;
@@ -515,6 +540,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 12:
if (_animationState != 0) {
_animationState = 2;
@@ -526,6 +552,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 13:
if (_animationState != 0) {
_animationState = 2;
@@ -537,6 +564,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 14:
if (_animationState != 0) {
_animationState = 2;
@@ -548,6 +576,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 15:
if (_animationState != 0) {
_animationState = 2;
@@ -559,6 +588,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 16:
if (_animationState != 0) {
_animationState = 2;
@@ -570,6 +600,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 17:
if (_animationState != 0) {
_animationState = 2;
@@ -581,6 +612,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 18:
if (_animationState != 0) {
_animationState = 2;
@@ -592,6 +624,7 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 19:
if (_animationState != 0) {
_animationState = 2;
@@ -603,11 +636,13 @@ bool AIScriptRunciter::ChangeAnimationMode(int mode) {
}
var_45CD88 = 0;
break;
+
case 23:
_animationState = 12;
_animationFrame = 0;
break;
- case 48:
+
+ case kAnimationModeDie:
_animationState = 14;
_animationFrame = 0;
break;