Skip to content
Permalink
Browse files

BLADERUNNER: Replace animation mode values with their proper enums

  • Loading branch information...
antoniou79 committed Sep 9, 2019
1 parent a4f9842 commit 3827000fe1b34fc3026d4b59b745a54548b22b61
@@ -452,7 +452,7 @@ bool AIScriptChew::ChangeAnimationMode(int mode) {

case 43:
if (_animationState || (!_animationState && _var2 != 1 && _var2 != 2)) {
Actor_Change_Animation_Mode(kActorChew, 0);
Actor_Change_Animation_Mode(kActorChew, kAnimationModeIdle);
_var2 = Random_Query(1, 2);
}
break;
@@ -708,7 +708,7 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
if (flag) {
*animation = 227;
_animationState = 0;
Actor_Change_Animation_Mode(kActorClovis, 0);
Actor_Change_Animation_Mode(kActorClovis, kAnimationModeIdle);
}
break;

@@ -880,7 +880,7 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
if (flag) {
_animationState = 13;
*animation = 208;
Actor_Change_Animation_Mode(kActorClovis, 4);
Actor_Change_Animation_Mode(kActorClovis, kAnimationModeCombatIdle);
}
break;

@@ -901,7 +901,7 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
if (flag) {
_animationState = 13;
*animation = 208;
Actor_Change_Animation_Mode(kActorClovis, 4);
Actor_Change_Animation_Mode(kActorClovis, kAnimationModeCombatIdle);
}
break;

@@ -922,7 +922,7 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
if (flag) {
_animationState = 13;
*animation = 208;
Actor_Change_Animation_Mode(kActorClovis, 4);
Actor_Change_Animation_Mode(kActorClovis, kAnimationModeCombatIdle);
}
break;

@@ -943,7 +943,7 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
if (flag) {
*animation = 227;
_animationState = 0;
Actor_Change_Animation_Mode(kActorClovis, 0);
Actor_Change_Animation_Mode(kActorClovis, kAnimationModeIdle);
}
break;

@@ -964,7 +964,7 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
if (flag) {
*animation = 227;
_animationState = 0;
Actor_Change_Animation_Mode(kActorClovis, 0);
Actor_Change_Animation_Mode(kActorClovis, kAnimationModeIdle);
}
break;

@@ -1081,7 +1081,7 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
if (flag) {
_animationState = 13;
*animation = 208;
Actor_Change_Animation_Mode(kActorClovis, 4);
Actor_Change_Animation_Mode(kActorClovis, kAnimationModeCombatIdle);
}
break;

@@ -1102,7 +1102,7 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
if (flag) {
_animationState = 13;
*animation = 208;
Actor_Change_Animation_Mode(kActorClovis, 4);
Actor_Change_Animation_Mode(kActorClovis, kAnimationModeCombatIdle);
}
break;

@@ -1123,7 +1123,7 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
if (flag) {
*animation = 227;
_animationState = 0;
Actor_Change_Animation_Mode(kActorClovis, 0);
Actor_Change_Animation_Mode(kActorClovis, kAnimationModeIdle);
}
break;

@@ -564,7 +564,7 @@ bool AIScriptEarlyQ::UpdateAnimation(int *animation, int *frame) {
*animation = 369;
_animationFrame = 0;
_animationState = 0;
Actor_Change_Animation_Mode(kActorEarlyQ, 0);
Actor_Change_Animation_Mode(kActorEarlyQ, kAnimationModeIdle);
}
break;

@@ -692,7 +692,7 @@ bool AIScriptEarlyQ::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 12;
*animation = 360;
Actor_Change_Animation_Mode(kActorEarlyQ, 4);
Actor_Change_Animation_Mode(kActorEarlyQ, kAnimationModeCombatIdle); // TODO: kAnimationModeCombatIdle?
}
break;

@@ -703,7 +703,7 @@ bool AIScriptEarlyQ::UpdateAnimation(int *animation, int *frame) {
*animation = 369;
_animationFrame = 0;
_animationState = 0;
Actor_Change_Animation_Mode(kActorEarlyQ, 0);
Actor_Change_Animation_Mode(kActorEarlyQ, kAnimationModeIdle);
}
break;

@@ -714,7 +714,7 @@ bool AIScriptEarlyQ::UpdateAnimation(int *animation, int *frame) {
*animation = 369;
_animationFrame = 0;
_animationState = 0;
Actor_Change_Animation_Mode(kActorEarlyQ, 0);
Actor_Change_Animation_Mode(kActorEarlyQ, kAnimationModeIdle);
}
break;

@@ -725,7 +725,7 @@ bool AIScriptEarlyQ::UpdateAnimation(int *animation, int *frame) {
*animation = 369;
_animationFrame = 0;
_animationState = 0;
Actor_Change_Animation_Mode(kActorEarlyQ, 0);
Actor_Change_Animation_Mode(kActorEarlyQ, kAnimationModeIdle);
}
break;

@@ -736,7 +736,7 @@ bool AIScriptEarlyQ::UpdateAnimation(int *animation, int *frame) {
*animation = 369;
_animationFrame = 0;
_animationState = 0;
Actor_Change_Animation_Mode(kActorEarlyQ, 0);
Actor_Change_Animation_Mode(kActorEarlyQ, kAnimationModeIdle);
}
break;

@@ -168,7 +168,7 @@ bool AIScriptEarlyQBartender::UpdateAnimation(int *animation, int *frame) {
*animation = 754;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(754)) {
Actor_Change_Animation_Mode(kActorEarlyQBartender, 0);
Actor_Change_Animation_Mode(kActorEarlyQBartender, kAnimationModeIdle);
*animation = 752;
_animationFrame = 0;
_animationState = 0;
@@ -348,7 +348,7 @@ bool AIScriptFreeSlotB::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(860)) {
_animationFrame = 0;
_animationState = 0;
Actor_Change_Animation_Mode(kActorFreeSlotB, 0);
Actor_Change_Animation_Mode(kActorFreeSlotB, kAnimationModeIdle);
}
break;

@@ -525,7 +525,7 @@ bool AIScriptHanoi::UpdateAnimation(int *animation, int *frame) {
}

if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
Actor_Change_Animation_Mode(kActorHanoi, 4);
Actor_Change_Animation_Mode(kActorHanoi, kAnimationModeCombatIdle);
_animationFrame = 0;
_animationState = 8;
*animation = 642;
@@ -640,7 +640,7 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 8;
*animation = 277;
Actor_Change_Animation_Mode(kActorIzo, 4);
Actor_Change_Animation_Mode(kActorIzo, kAnimationModeCombatIdle);
}
break;

@@ -665,7 +665,7 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 8;
*animation = 277;
Actor_Change_Animation_Mode(kActorIzo, 4);
Actor_Change_Animation_Mode(kActorIzo, kAnimationModeCombatIdle);
}
break;

@@ -690,7 +690,7 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 0;
_var4 = 0;
Actor_Change_Animation_Mode(kActorIzo, 0);
Actor_Change_Animation_Mode(kActorIzo, kAnimationModeIdle);
}
}
break;
@@ -584,7 +584,7 @@ bool AIScriptLucy::UpdateAnimation(int *animation, int *frame) {
*animation = 260;
_animationFrame = 0;
_animationState = 0;
Actor_Change_Animation_Mode(kActorLucy, 0);
Actor_Change_Animation_Mode(kActorLucy, kAnimationModeIdle);
}
break;

@@ -260,7 +260,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
*animation = 346;
_animationFrame = 0;
_animationState = 0;
Actor_Change_Animation_Mode(kActorLuther, 0);
Actor_Change_Animation_Mode(kActorLuther, kAnimationModeIdle);
}
break;

@@ -346,7 +346,7 @@ bool AIScriptLuther::UpdateAnimation(int *animation, int *frame) {
*animation = 346;
_animationFrame = 0;
_animationState = 0;
Actor_Change_Animation_Mode(kActorLuther, 0);
Actor_Change_Animation_Mode(kActorLuther, kAnimationModeIdle);
}
break;

@@ -466,7 +466,7 @@ bool AIScriptMutant1::UpdateAnimation(int *animation, int *frame) {
Actor_Combat_AI_Hit_Attempt(kActorMutant1);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(898)) {
Actor_Change_Animation_Mode(kActorMutant1, 0);
Actor_Change_Animation_Mode(kActorMutant1, kAnimationModeIdle);
}
break;

@@ -477,7 +477,7 @@ bool AIScriptMutant1::UpdateAnimation(int *animation, int *frame) {
Ambient_Sounds_Play_Sound(kSfxHURT1M1, 99, 0, 0, 25);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(899)) {
Actor_Change_Animation_Mode(kActorMutant1, 0);
Actor_Change_Animation_Mode(kActorMutant1, kAnimationModeIdle);
}
break;

@@ -504,7 +504,7 @@ bool AIScriptMutant1::UpdateAnimation(int *animation, int *frame) {
Sound_Play(kSfxHURT1M1, 100, 0, 0, 50);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(899)) {
Actor_Change_Animation_Mode(kActorMutant1, 0);
Actor_Change_Animation_Mode(kActorMutant1, kAnimationModeIdle);
}
break;

@@ -428,7 +428,7 @@ bool AIScriptMutant2::UpdateAnimation(int *animation, int *frame) {
Actor_Combat_AI_Hit_Attempt(kActorMutant2);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(906)) {
Actor_Change_Animation_Mode(kActorMutant2, 0);
Actor_Change_Animation_Mode(kActorMutant2, kAnimationModeIdle);
}
break;

@@ -456,7 +456,7 @@ bool AIScriptMutant2::UpdateAnimation(int *animation, int *frame) {
Sound_Play(kSfxHURT1M2, 100, 0, 0, 50);
} else {
if (!_animationFrame) {
Actor_Change_Animation_Mode(kActorMutant2, 0);
Actor_Change_Animation_Mode(kActorMutant2, kAnimationModeIdle);
}
}
break;
@@ -442,7 +442,7 @@ bool AIScriptMutant3::UpdateAnimation(int *animation, int *frame) {
Actor_Combat_AI_Hit_Attempt(kActorMutant3);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
Actor_Change_Animation_Mode(kActorMutant3, 0);
Actor_Change_Animation_Mode(kActorMutant3, kAnimationModeIdle);
}
break;

@@ -495,7 +495,7 @@ bool AIScriptMutant3::UpdateAnimation(int *animation, int *frame) {
_var1 = -1;
} else {
if (!_animationFrame) {
Actor_Change_Animation_Mode(kActorMutant3, 0);
Actor_Change_Animation_Mode(kActorMutant3, kAnimationModeIdle);
}
}
break;
@@ -1119,7 +1119,7 @@ bool AIScriptOfficerGrayford::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(617)) {
_animationState = 19;
_animationFrame = 0;
Actor_Change_Animation_Mode(kActorOfficerGrayford, 4);
Actor_Change_Animation_Mode(kActorOfficerGrayford, kAnimationModeCombatIdle);
}
break;

@@ -1147,7 +1147,7 @@ bool AIScriptOfficerGrayford::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 19;
*animation = 625;
Actor_Change_Animation_Mode(kActorOfficerGrayford, 4);
Actor_Change_Animation_Mode(kActorOfficerGrayford, kAnimationModeCombatIdle);
}
break;

@@ -1158,7 +1158,7 @@ bool AIScriptOfficerGrayford::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 19;
*animation = 625;
Actor_Change_Animation_Mode(kActorOfficerGrayford, 4);
Actor_Change_Animation_Mode(kActorOfficerGrayford, kAnimationModeCombatIdle);
}
break;

@@ -1304,7 +1304,7 @@ bool AIScriptOfficerGrayford::ChangeAnimationMode(int mode) {
case 18:
{
int tmp = _animationFrame;
Actor_Change_Animation_Mode(kActorOfficerGrayford, 4);
Actor_Change_Animation_Mode(kActorOfficerGrayford, kAnimationModeCombatIdle);
_animationFrame = tmp;
_animationState = 19;
break;
@@ -248,7 +248,7 @@ void AIScriptOfficerLeary::CompletedMovementTrack() {
}
if (goal == 308) {
// goal 308 (and 309) are never triggered in the original code
Actor_Change_Animation_Mode(kActorOfficerLeary, 4);
Actor_Change_Animation_Mode(kActorOfficerLeary, kAnimationModeCombatIdle);
Actor_Face_Actor(kActorOfficerLeary, kActorMcCoy, true);
Actor_Set_Goal_Number(kActorOfficerLeary, 309);
}
@@ -634,7 +634,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
// kSetUG07
AI_Movement_Track_Flush(kActorOfficerLeary);
AI_Movement_Track_Append_With_Facing(kActorOfficerLeary, 416, 0, 556);
Actor_Change_Animation_Mode(kActorOfficerLeary, 4);
Actor_Change_Animation_Mode(kActorOfficerLeary, kAnimationModeCombatIdle);
AI_Movement_Track_Repeat(kActorOfficerLeary);
return true;
case 308:
@@ -701,7 +701,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
*animation = 589;
_animationState = 0;
_animationFrame = 0;
Actor_Change_Animation_Mode(kActorOfficerLeary, 0);
Actor_Change_Animation_Mode(kActorOfficerLeary, kAnimationModeIdle);
}
*frame = _animationFrame;
return true;
@@ -712,7 +712,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
*animation = 589;
_animationState = 0;
_animationFrame = 0;
Actor_Change_Animation_Mode(kActorOfficerLeary, 0);
Actor_Change_Animation_Mode(kActorOfficerLeary, kAnimationModeIdle);
}
*frame = _animationFrame;
return true;
@@ -737,7 +737,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
_animationState = 21;
_animationFrame = 0;
*animation = 571;
Actor_Change_Animation_Mode(kActorOfficerLeary, 4);
Actor_Change_Animation_Mode(kActorOfficerLeary, kAnimationModeCombatIdle);
}
*frame = _animationFrame;
return true;
@@ -748,7 +748,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
_animationState = 21;
_animationFrame = 0;
*animation = 571;
Actor_Change_Animation_Mode(kActorOfficerLeary, 4);
Actor_Change_Animation_Mode(kActorOfficerLeary, kAnimationModeCombatIdle);
}
*frame = _animationFrame;
return true;
@@ -769,7 +769,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) {
_animationState = 21;
_animationFrame = 0;
*animation = 571;
Actor_Change_Animation_Mode(kActorOfficerLeary, 4);
Actor_Change_Animation_Mode(kActorOfficerLeary, kAnimationModeCombatIdle);
}
*frame = _animationFrame;
return true;
@@ -97,7 +97,7 @@ bool AIScriptRajif::GoalChanged(int currentGoalNumber, int newGoalNumber) {
if (newGoalNumber == 300) {
Actor_Put_In_Set(kActorRajif, kSetMA02_MA04);
Actor_Set_At_XYZ(kActorRajif, -73.34f, -140.40f, 342.0f, 300);
Actor_Change_Animation_Mode(kActorRajif, 0);
Actor_Change_Animation_Mode(kActorRajif, kAnimationModeIdle);
return true;
}

0 comments on commit 3827000

Please sign in to comment.
You can’t perform that action at this time.