mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-06 09:48:39 +00:00
BLADERUNNER: Added Gordo actor
Cleanup of other actors
This commit is contained in:
parent
a9b10e50cc
commit
45c237c8d4
@ -35,7 +35,7 @@
|
||||
|
||||
//TODO: remove these when game is playable
|
||||
#define BLADERUNNER_DEBUG_CONSOLE 0
|
||||
#define BLADERUNNER_DEBUG_GAME 0
|
||||
#define BLADERUNNER_DEBUG_GAME 1
|
||||
|
||||
namespace Common {
|
||||
struct Event;
|
||||
|
@ -55,6 +55,7 @@ MODULE_OBJS = \
|
||||
script/ai/generic_walker_a.o \
|
||||
script/ai/generic_walker_b.o \
|
||||
script/ai/generic_walker_c.o \
|
||||
script/ai/gordo.o \
|
||||
script/ai/grigorian.o \
|
||||
script/ai/howie_lee.o \
|
||||
script/ai/hysteria_patron1.o \
|
||||
|
@ -376,7 +376,7 @@ bool AIScriptGaff::UpdateAnimation(int *animation, int *frame) {
|
||||
Actor_Set_Invisible(kActorGaff, true);
|
||||
*animation = 794;
|
||||
_animationFrame = 0;
|
||||
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle);
|
||||
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle); // TODO: check this, it was set directly by calling actor script
|
||||
Actor_Set_Goal_Number(kActorGaff, 5);
|
||||
}
|
||||
break;
|
||||
|
1671
engines/bladerunner/script/ai/gordo.cpp
Normal file
1671
engines/bladerunner/script/ai/gordo.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -25,6 +25,11 @@
|
||||
namespace BladeRunner {
|
||||
|
||||
AIScriptInsectDealer::AIScriptInsectDealer(BladeRunnerEngine *vm) : AIScriptBase(vm) {
|
||||
_flag1 = false;
|
||||
_state = 0;
|
||||
_frameDelta = 0;
|
||||
_var2 = 0;
|
||||
_counter = 0;
|
||||
}
|
||||
|
||||
void AIScriptInsectDealer::Initialize() {
|
||||
@ -34,13 +39,13 @@ void AIScriptInsectDealer::Initialize() {
|
||||
_animationNext = 0;
|
||||
|
||||
_flag1 = false;
|
||||
_state1 = 0;
|
||||
_var1 = 1;
|
||||
_state = 0;
|
||||
_frameDelta = 1;
|
||||
_var2 = 6;
|
||||
_var3 = 0;
|
||||
_counter = 0;
|
||||
|
||||
Actor_Put_In_Set(kActorInsectDealer, 0);
|
||||
Actor_Set_At_XYZ(kActorInsectDealer, -414.0, 0.0, -1199.0, 371);
|
||||
Actor_Put_In_Set(kActorInsectDealer, kSetAR01_AR02);
|
||||
Actor_Set_At_XYZ(kActorInsectDealer, -414.0f, 0.0f, -1199.0f, 371);
|
||||
Actor_Set_Goal_Number(kActorInsectDealer, 0);
|
||||
}
|
||||
|
||||
@ -114,77 +119,60 @@ bool AIScriptInsectDealer::GoalChanged(int currentGoalNumber, int newGoalNumber)
|
||||
}
|
||||
|
||||
bool AIScriptInsectDealer::UpdateAnimation(int *animation, int *frame) {
|
||||
int frameRes;
|
||||
|
||||
switch (_animationState) {
|
||||
case 0:
|
||||
if (_state1 > 1) {
|
||||
frameRes = _animationFrame;
|
||||
} else if (_state1) {
|
||||
*animation = 546;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(546)) {
|
||||
frameRes = _animationFrame;
|
||||
} else {
|
||||
_animationFrame = 0;
|
||||
_state1 = 0;
|
||||
*animation = 545;
|
||||
_var2 = Random_Query(6, 14);
|
||||
frameRes = _animationFrame;
|
||||
_var1 = 2 * Random_Query(0, 1) - 1;
|
||||
}
|
||||
} else {
|
||||
switch (_state) {
|
||||
case 0:
|
||||
*animation = 545;
|
||||
|
||||
if (_var3) {
|
||||
_var3--;
|
||||
|
||||
if (Random_Query(0, 6)) {
|
||||
frameRes = _animationFrame;
|
||||
} else {
|
||||
frameRes = _animationFrame;
|
||||
_var1 = -_var1;
|
||||
if (_counter) {
|
||||
_counter--;
|
||||
if (Random_Query(0, 6) == 0) {
|
||||
_frameDelta = -_frameDelta;
|
||||
}
|
||||
} else {
|
||||
_animationFrame += _var1;
|
||||
|
||||
_animationFrame += _frameDelta;
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
|
||||
_animationFrame = 0;
|
||||
|
||||
if (!Random_Query(0, 2)) {
|
||||
_state1 = 2 * Random_Query(0, 1);
|
||||
if (Random_Query(0, 2) == 0) {
|
||||
_state = 2 * Random_Query(0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (_animationFrame < 0) {
|
||||
_animationFrame = Slice_Animation_Query_Number_Of_Frames(*animation) - 1;
|
||||
}
|
||||
|
||||
_var3 = Random_Query(0, 1);
|
||||
frameRes = _animationFrame;
|
||||
|
||||
if (!_animationFrame) {
|
||||
_state1 = Random_Query(0, 1);
|
||||
frameRes = _animationFrame;
|
||||
_counter = Random_Query(0, 1);
|
||||
if (_animationFrame == 0) {
|
||||
_state = Random_Query(0, 1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
*animation = 546;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(546)) {
|
||||
*animation = 545;
|
||||
_animationFrame = 0;
|
||||
_state = 0;
|
||||
_var2 = Random_Query(6, 14);
|
||||
_frameDelta = 2 * Random_Query(0, 1) - 1;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
// TEST: nothing? actor will stuck
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
frameRes = _animationFrame;
|
||||
if (!_animationFrame && _flag1) {
|
||||
if (_animationFrame == 0 && _flag1) {
|
||||
*animation = 545;
|
||||
_animationState = 0;
|
||||
} else {
|
||||
*animation = 548;
|
||||
_animationFrame = frameRes + 1;
|
||||
|
||||
if (frameRes + 1 < Slice_Animation_Query_Number_Of_Frames(548)) {
|
||||
frameRes = _animationFrame;
|
||||
} else {
|
||||
_animationFrame++;
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(548)) {
|
||||
_animationFrame = 0;
|
||||
frameRes = 0;
|
||||
_animationState = 0;
|
||||
}
|
||||
}
|
||||
@ -192,101 +180,69 @@ bool AIScriptInsectDealer::UpdateAnimation(int *animation, int *frame) {
|
||||
case 2:
|
||||
*animation = 549;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(549)) {
|
||||
frameRes = _animationFrame;
|
||||
} else {
|
||||
_animationFrame = 0;
|
||||
frameRes = 0;
|
||||
_animationState = 1;
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(549)) {
|
||||
*animation = 548;
|
||||
_animationFrame = 0;
|
||||
_animationState = 1;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
*animation = 550;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(550)) {
|
||||
frameRes = _animationFrame;
|
||||
} else {
|
||||
_animationFrame = 0;
|
||||
frameRes = 0;
|
||||
_animationState = 1;
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(550)) {
|
||||
*animation = 548;
|
||||
_animationFrame = 0;
|
||||
_animationState = 1;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
*animation = 551;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(551)) {
|
||||
frameRes = _animationFrame;
|
||||
} else {
|
||||
_animationFrame = 0;
|
||||
frameRes = 0;
|
||||
_animationState = 1;
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(551)) {
|
||||
*animation = 548;
|
||||
_animationFrame = 0;
|
||||
_animationState = 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
*animation = 552;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(552)) {
|
||||
frameRes = _animationFrame;
|
||||
} else {
|
||||
_animationFrame = 0;
|
||||
frameRes = 0;
|
||||
_animationState = 1;
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(552)) {
|
||||
*animation = 548;
|
||||
_animationFrame = 0;
|
||||
_animationState = 1;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
*animation = 553;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(553)) {
|
||||
frameRes = _animationFrame;
|
||||
} else {
|
||||
_animationFrame = 0;
|
||||
frameRes = 0;
|
||||
_animationState = 1;
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(553)) {
|
||||
*animation = 548;
|
||||
_animationFrame = 0;
|
||||
_animationState = 1;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
*animation = 554;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(554)) {
|
||||
frameRes = _animationFrame;
|
||||
} else {
|
||||
_animationFrame = 0;
|
||||
frameRes = 0;
|
||||
_animationState = 1;
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(554)) {
|
||||
*animation = 548;
|
||||
_animationFrame = 0;
|
||||
_animationState = 1;
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
*animation = 547;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(547)) {
|
||||
frameRes = _animationFrame;
|
||||
} else {
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(547)) {
|
||||
*animation = 545;
|
||||
_animationFrame = 0;
|
||||
frameRes = 0;
|
||||
_animationState = 0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
frameRes = _animationFrame;
|
||||
break;
|
||||
}
|
||||
|
||||
*frame = frameRes;
|
||||
|
||||
*frame = _animationFrame;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -294,7 +250,7 @@ bool AIScriptInsectDealer::ChangeAnimationMode(int mode) {
|
||||
switch (mode) {
|
||||
case 0:
|
||||
if (_animationState > 0 && _animationState <= 7) {
|
||||
_flag1 = 1;
|
||||
_flag1 = true;
|
||||
} else {
|
||||
_animationState = 0;
|
||||
_animationFrame = 0;
|
||||
@ -305,37 +261,37 @@ bool AIScriptInsectDealer::ChangeAnimationMode(int mode) {
|
||||
case 19:
|
||||
_animationState = 1;
|
||||
_animationFrame = 0;
|
||||
_flag1 = 0;
|
||||
_flag1 = false;
|
||||
break;
|
||||
case 12:
|
||||
_animationState = 2;
|
||||
_animationFrame = 0;
|
||||
_flag1 = 0;
|
||||
_flag1 = false;
|
||||
break;
|
||||
case 13:
|
||||
_animationState = 3;
|
||||
_animationFrame = 0;
|
||||
_flag1 = 0;
|
||||
_flag1 = false;
|
||||
break;
|
||||
case 14:
|
||||
_animationState = 4;
|
||||
_animationFrame = 0;
|
||||
_flag1 = 0;
|
||||
_flag1 = false;
|
||||
break;
|
||||
case 15:
|
||||
_animationState = 5;
|
||||
_animationFrame = 0;
|
||||
_flag1 = 0;
|
||||
_flag1 = false;
|
||||
break;
|
||||
case 16:
|
||||
_animationState = 6;
|
||||
_animationFrame = 0;
|
||||
_flag1 = 0;
|
||||
_flag1 = false;
|
||||
break;
|
||||
case 17:
|
||||
_animationState = 7;
|
||||
_animationFrame = 0;
|
||||
_flag1 = 0;
|
||||
_flag1 = false;
|
||||
break;
|
||||
case 23:
|
||||
_animationState = 8;
|
||||
|
@ -34,30 +34,26 @@ void AIScriptTransient::Initialize() {
|
||||
_animationNext = 0;
|
||||
|
||||
Actor_Put_In_Set(kActorTransient, kSetCT03_CT04);
|
||||
Actor_Set_At_XYZ(kActorTransient, -171.41, -621.3, 736.52, 580);
|
||||
Actor_Set_At_XYZ(kActorTransient, -171.41f, -621.3f, 736.52f, 580);
|
||||
Actor_Set_Goal_Number(kActorTransient, 0);
|
||||
Actor_Set_Targetable(kActorTransient, 1);
|
||||
Actor_Set_Targetable(kActorTransient, true);
|
||||
}
|
||||
|
||||
bool AIScriptTransient::Update() {
|
||||
if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Which_Set_In(kActorTransient) != 97) {
|
||||
if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Which_Set_In(kActorTransient) != kSetFreeSlotG) {
|
||||
Actor_Put_In_Set(kActorTransient, kSetFreeSlotG);
|
||||
Actor_Set_At_Waypoint(kActorTransient, 39, 0);
|
||||
Actor_Set_At_Waypoint(kActorTransient, 39, false);
|
||||
}
|
||||
if ((!Actor_Query_Goal_Number(kActorTransient) || Actor_Query_Goal_Number(kActorTransient) == 10)
|
||||
&& Global_Variable_Query(kVariableChapter) == 2) {
|
||||
if (Global_Variable_Query(kVariableChapter) == 2 && (Actor_Query_Goal_Number(kActorTransient) == 0 || Actor_Query_Goal_Number(kActorTransient) == 10)) {
|
||||
Actor_Set_Goal_Number(kActorTransient, 200);
|
||||
}
|
||||
if (Game_Flag_Query(169) && Game_Flag_Query(170) && !Game_Flag_Query(171) && !Game_Flag_Query(172)
|
||||
&& Global_Variable_Query(kVariableChapter) == 3) {
|
||||
if (Global_Variable_Query(kVariableChapter) == 3 && Game_Flag_Query(169) && Game_Flag_Query(170) && !Game_Flag_Query(171) && !Game_Flag_Query(172)) {
|
||||
Game_Flag_Set(172);
|
||||
}
|
||||
if (Game_Flag_Query(171) == 1 && Actor_Query_Goal_Number(kActorTransient) != 6
|
||||
&& Actor_Query_Goal_Number(kActorTransient) != 599
|
||||
&& Global_Variable_Query(kVariableChapter) < 4) {
|
||||
if (Global_Variable_Query(kVariableChapter) < 4 && Game_Flag_Query(171) && Actor_Query_Goal_Number(kActorTransient) != 6 && Actor_Query_Goal_Number(kActorTransient) != 599) {
|
||||
Actor_Set_Goal_Number(kActorTransient, 6);
|
||||
}
|
||||
if (Player_Query_Current_Scene() == 16 && !Game_Flag_Query(492)) {
|
||||
if (Player_Query_Current_Scene() == kSceneCT04 && !Game_Flag_Query(492)) {
|
||||
Game_Flag_Set(492);
|
||||
AI_Countdown_Timer_Reset(kActorTransient, 1);
|
||||
AI_Countdown_Timer_Start(kActorTransient, 1, 12);
|
||||
@ -67,35 +63,34 @@ bool AIScriptTransient::Update() {
|
||||
}
|
||||
|
||||
void AIScriptTransient::TimerExpired(int timer) {
|
||||
if (timer <= 1) {
|
||||
if (timer) {
|
||||
if (!Actor_Query_Goal_Number(kActorTransient)) {
|
||||
Actor_Set_Goal_Number(kActorTransient, 10);
|
||||
Actor_Change_Animation_Mode(kActorTransient, 0);
|
||||
}
|
||||
Actor_Set_Goal_Number(kActorTransient, 10);
|
||||
Actor_Set_Targetable(kActorTransient, 0);
|
||||
AI_Countdown_Timer_Reset(kActorTransient, 1);
|
||||
} else if (Actor_Query_Goal_Number(kActorTransient) == 395 && Actor_Query_Which_Set_In(kActorMcCoy) == 85) {
|
||||
if (timer == 0) {
|
||||
if (Actor_Query_Goal_Number(kActorTransient) == 395 && Actor_Query_Which_Set_In(kActorMcCoy) == kSetUG13) {
|
||||
AI_Countdown_Timer_Start(kActorTransient, 0, Random_Query(20, 10));
|
||||
switch (Random_Query(1, 3) - 1) {
|
||||
case 0:
|
||||
switch (Random_Query(1, 3)) {
|
||||
case 1:
|
||||
Sound_Play(356, 50, 0, 0, 50);
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
Sound_Play(357, 50, 0, 0, 50);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
Sound_Play(358, 50, 0, 0, 50);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (Actor_Query_Goal_Number(kActorTransient) != 599) {
|
||||
Actor_Set_Goal_Number(kActorTransient, 391);
|
||||
AI_Countdown_Timer_Reset(kActorTransient, 0);
|
||||
}
|
||||
}
|
||||
if (timer == 1) {
|
||||
if (Actor_Query_Goal_Number(kActorTransient) == 0) {
|
||||
Actor_Set_Goal_Number(kActorTransient, 10);
|
||||
Actor_Change_Animation_Mode(kActorTransient, kAnimationModeIdle);
|
||||
}
|
||||
Actor_Set_Goal_Number(kActorTransient, 10);
|
||||
Actor_Set_Targetable(kActorTransient, false);
|
||||
AI_Countdown_Timer_Reset(kActorTransient, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void AIScriptTransient::CompletedMovementTrack() {
|
||||
@ -132,18 +127,20 @@ void AIScriptTransient::ShotAtAndMissed() {
|
||||
|
||||
bool AIScriptTransient::ShotAtAndHit() {
|
||||
Actor_Set_Frame_Rate_FPS(kActorTransient, 8);
|
||||
if (Game_Flag_Query(716))
|
||||
if (Game_Flag_Query(716)) {
|
||||
_animationState = 11;
|
||||
else
|
||||
} else {
|
||||
_animationState = 14;
|
||||
}
|
||||
|
||||
_animationFrame = 0;
|
||||
|
||||
Actor_Set_Targetable(kActorTransient, 0);
|
||||
if (Global_Variable_Query(kVariableChapter) < 4)
|
||||
Actor_Set_Targetable(kActorTransient, false);
|
||||
if (Global_Variable_Query(kVariableChapter) < 4) {
|
||||
Actor_Set_Goal_Number(kActorTransient, 3);
|
||||
else
|
||||
} else {
|
||||
Actor_Set_Goal_Number(kActorTransient, 599);
|
||||
}
|
||||
|
||||
Game_Flag_Set(169);
|
||||
|
||||
@ -153,8 +150,9 @@ bool AIScriptTransient::ShotAtAndHit() {
|
||||
void AIScriptTransient::Retired(int byActorId) {
|
||||
Actor_Set_Goal_Number(kActorTransient, 599);
|
||||
|
||||
if (Global_Variable_Query(kVariableChapter) == 4)
|
||||
if (Global_Variable_Query(kVariableChapter) == 4) {
|
||||
Game_Flag_Set(607);
|
||||
}
|
||||
}
|
||||
|
||||
int AIScriptTransient::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) {
|
||||
@ -169,26 +167,22 @@ bool AIScriptTransient::GoalChanged(int currentGoalNumber, int newGoalNumber) {
|
||||
AI_Movement_Track_Append(kActorTransient, 105, 0);
|
||||
AI_Movement_Track_Append(kActorTransient, 42, 1);
|
||||
AI_Movement_Track_Repeat(kActorTransient);
|
||||
|
||||
return true;
|
||||
case 6:
|
||||
AI_Movement_Track_Flush(kActorTransient);
|
||||
AI_Movement_Track_Append(kActorTransient, 41, 10);
|
||||
AI_Movement_Track_Repeat(kActorTransient);
|
||||
|
||||
return true;
|
||||
case 200:
|
||||
Actor_Put_In_Set(kActorTransient, kSetFreeSlotH);
|
||||
Actor_Set_At_Waypoint(kActorTransient, 40, 0);
|
||||
|
||||
return true;
|
||||
case 390:
|
||||
Actor_Put_In_Set(kActorTransient, kSetUG13);
|
||||
Actor_Set_At_XYZ(kActorTransient, -310.0, 55.0, -350.0, 400);
|
||||
Actor_Change_Animation_Mode(kActorTransient, 53);
|
||||
Actor_Set_Targetable(kActorTransient, 1);
|
||||
Actor_Set_Targetable(kActorTransient, true);
|
||||
Game_Flag_Set(716);
|
||||
|
||||
return true;
|
||||
case 391:
|
||||
Actor_Change_Animation_Mode(kActorTransient, 53);
|
||||
@ -196,13 +190,11 @@ bool AIScriptTransient::GoalChanged(int currentGoalNumber, int newGoalNumber) {
|
||||
case 395:
|
||||
Actor_Change_Animation_Mode(kActorTransient, 55);
|
||||
AI_Countdown_Timer_Start(kActorTransient, 0, Random_Query(30, 40));
|
||||
|
||||
return true;
|
||||
case 599:
|
||||
AI_Countdown_Timer_Reset(kActorTransient, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -211,71 +203,66 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
|
||||
case 0:
|
||||
*animation = 499;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(499)) {
|
||||
_animationFrame = 0;
|
||||
} else {
|
||||
*animation = 497;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(497))
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(497)) {
|
||||
_animationFrame = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
*animation = 487;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(487))
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(487)) {
|
||||
_animationFrame = 0;
|
||||
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
*animation = 500;
|
||||
_animationFrame++;
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(500))
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(500)) {
|
||||
_animationFrame = 0;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
*animation = 501;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(501)) {
|
||||
*animation = 500;
|
||||
_animationState = 2;
|
||||
_animationFrame = 0;
|
||||
*animation = 500;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
*animation = 502;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(502)) {
|
||||
*animation = 500;
|
||||
_animationState = 2;
|
||||
_animationFrame = 0;
|
||||
*animation = 500;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
*animation = 503;
|
||||
_animationFrame++;
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(503)) {
|
||||
*animation = 500;
|
||||
_animationState = 2;
|
||||
_animationFrame = 0;
|
||||
*animation = 500;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
*animation = 491;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(491))
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(491)) {
|
||||
_animationFrame = 0;
|
||||
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
*animation = 492;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(492)) {
|
||||
_animationState = 6;
|
||||
_animationFrame = 0;
|
||||
@ -284,7 +271,6 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
|
||||
case 8:
|
||||
*animation = 493;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(493)) {
|
||||
_animationState = 6;
|
||||
_animationFrame = 0;
|
||||
@ -293,7 +279,6 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
|
||||
case 9:
|
||||
*animation = 494;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(494)) {
|
||||
_animationState = 6;
|
||||
_animationFrame = 0;
|
||||
@ -302,7 +287,6 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
|
||||
case 10:
|
||||
*animation = 496;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(496)) {
|
||||
_animationState = 6;
|
||||
_animationFrame = 0;
|
||||
@ -311,7 +295,6 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
|
||||
case 11:
|
||||
*animation = 495;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(495)) {
|
||||
Actor_Set_Frame_Rate_FPS(kActorTransient, 8);
|
||||
_animationState = 12;
|
||||
@ -340,61 +323,56 @@ bool AIScriptTransient::UpdateAnimation(int *animation, int *frame) {
|
||||
case 16:
|
||||
*animation = 504;
|
||||
_animationFrame++;
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(504) - 1)
|
||||
_animationFrame = 0;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(504) - 1) {
|
||||
_animationFrame = 0;
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
*animation = 505;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(505) - 1) {
|
||||
*animation = 497;
|
||||
_animationFrame = 0;
|
||||
_animationState = 0;
|
||||
Actor_Change_Animation_Mode(kActorTransient, 0);
|
||||
|
||||
if (Actor_Query_Goal_Number(kActorTransient) == 10 && Player_Query_Current_Scene() == 16) {
|
||||
Actor_Set_At_XYZ(kActorTransient, -171.41, -621.30, 728.52, 530);
|
||||
Actor_Face_Actor(kActorTransient, kActorMcCoy, 1);
|
||||
Actor_Change_Animation_Mode(kActorTransient, kAnimationModeIdle);
|
||||
if (Actor_Query_Goal_Number(kActorTransient) == 10 && Player_Query_Current_Scene() == kSceneCT04) {
|
||||
Actor_Set_At_XYZ(kActorTransient, -171.41f, -621.30f, 728.52f, 530);
|
||||
Actor_Face_Actor(kActorTransient, kActorMcCoy, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 18:
|
||||
*animation = 491;
|
||||
_animationFrame++;
|
||||
|
||||
if (_animationFrame - 1 == 4)
|
||||
if (_animationFrame - 1 == 4) {
|
||||
_animationState = 19;
|
||||
|
||||
}
|
||||
break;
|
||||
case 19:
|
||||
*animation = 491;
|
||||
_animationFrame--;
|
||||
|
||||
if (_animationFrame + 1 == 4)
|
||||
if (_animationFrame + 1 == 4) {
|
||||
_animationState = 18;
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
*animation = 399;
|
||||
break;
|
||||
}
|
||||
|
||||
*frame = _animationFrame;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AIScriptTransient::ChangeAnimationMode(int mode) {
|
||||
if (mode != 55)
|
||||
if (mode != 55) {
|
||||
Actor_Set_Frame_Rate_FPS(kActorTransient, 8);
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case 0:
|
||||
switch (_animationState) {
|
||||
case 0:
|
||||
return 1;
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
@ -415,76 +393,37 @@ bool AIScriptTransient::ChangeAnimationMode(int mode) {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (_animationState != 1) {
|
||||
_animationState = 1;
|
||||
_animationFrame = 0;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
case 20:
|
||||
case 22:
|
||||
case 23:
|
||||
case 24:
|
||||
case 25:
|
||||
case 26:
|
||||
case 27:
|
||||
case 28:
|
||||
case 29:
|
||||
case 39:
|
||||
case 40:
|
||||
case 41:
|
||||
case 42:
|
||||
case 43:
|
||||
case 44:
|
||||
case 45:
|
||||
case 46:
|
||||
case 47:
|
||||
case 48:
|
||||
case 49:
|
||||
case 50:
|
||||
case 51:
|
||||
case 52:
|
||||
return 1;
|
||||
case 3:
|
||||
case 30:
|
||||
if (_animationState - 6 > 4)
|
||||
if (_animationState - 6 > 4) {
|
||||
_animationState = 2;
|
||||
else
|
||||
_animationState = 7;
|
||||
|
||||
} else {
|
||||
_animationState = 7;
|
||||
}
|
||||
_animationFrame = 0;
|
||||
break;
|
||||
case 12:
|
||||
case 31:
|
||||
if (_animationState == 6)
|
||||
if (_animationState == 6) {
|
||||
_animationState = 8;
|
||||
else
|
||||
} else {
|
||||
_animationState = 3;
|
||||
|
||||
}
|
||||
_animationFrame = 0;
|
||||
break;
|
||||
case 13:
|
||||
case 32:
|
||||
if (_animationState == 6)
|
||||
if (_animationState == 6) {
|
||||
_animationState = 9;
|
||||
else
|
||||
} else {
|
||||
_animationState = 4;
|
||||
|
||||
}
|
||||
_animationFrame = 0;
|
||||
break;
|
||||
case 14:
|
||||
@ -493,19 +432,19 @@ bool AIScriptTransient::ChangeAnimationMode(int mode) {
|
||||
case 35:
|
||||
case 36:
|
||||
case 37:
|
||||
if (_animationState == 6)
|
||||
if (_animationState == 6) {
|
||||
_animationState = 10;
|
||||
else
|
||||
} else {
|
||||
_animationState = 5;
|
||||
|
||||
}
|
||||
_animationFrame = 0;
|
||||
break;
|
||||
case 21:
|
||||
if (Game_Flag_Query(716))
|
||||
if (Game_Flag_Query(716)) {
|
||||
_animationState = 11;
|
||||
else
|
||||
} else {
|
||||
_animationState = 14;
|
||||
|
||||
}
|
||||
_animationFrame = 0;
|
||||
break;
|
||||
case 38:
|
||||
@ -527,10 +466,6 @@ bool AIScriptTransient::ChangeAnimationMode(int mode) {
|
||||
case 89:
|
||||
_animationState = 12;
|
||||
_animationFrame = Slice_Animation_Query_Number_Of_Frames(495) - 1;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@ AIScripts::AIScripts(BladeRunnerEngine *vm, int actorCount) {
|
||||
}
|
||||
|
||||
_AIScripts[kActorMcCoy] = new AIScriptMcCoy(_vm); // 0
|
||||
_AIScripts[kActorGordo] = new AIScriptGordo(_vm); // 2
|
||||
_AIScripts[kActorGrigorian] = new AIScriptGrigorian(_vm); // 11
|
||||
_AIScripts[kActorTransient] = new AIScriptTransient(_vm); // 12
|
||||
_AIScripts[kActorLance] = new AIScriptLance(_vm); // 13
|
||||
|
@ -120,6 +120,22 @@ DECLARE_SCRIPT(McCoy)
|
||||
void sub_4059D0(float a1);
|
||||
END_SCRIPT
|
||||
|
||||
DECLARE_SCRIPT(Gordo)
|
||||
int var_45B078;
|
||||
int _counter;
|
||||
int _counterTarget;
|
||||
int _frameMin;
|
||||
int _frameDelta;
|
||||
int _frameMax;
|
||||
int _state;
|
||||
|
||||
void sub_40FD00();
|
||||
void sub_4103B8();
|
||||
void sub_410590();
|
||||
void sub_41090C();
|
||||
void sub_41117C();
|
||||
END_SCRIPT
|
||||
|
||||
DECLARE_SCRIPT(Grigorian)
|
||||
int var_45CA10;
|
||||
int var_45CA14;
|
||||
@ -141,10 +157,10 @@ END_SCRIPT
|
||||
|
||||
DECLARE_SCRIPT(InsectDealer)
|
||||
bool _flag1;
|
||||
int _state1;
|
||||
int _var1;
|
||||
int _state;
|
||||
int _frameDelta;
|
||||
int _var2;
|
||||
int _var3;
|
||||
int _counter;
|
||||
END_SCRIPT
|
||||
|
||||
DECLARE_SCRIPT(TyrellGuard)
|
||||
|
Loading…
Reference in New Issue
Block a user