From 9e341e12c86fe5f1a2aeadab3a320bb524ce25a5 Mon Sep 17 00:00:00 2001 From: Peter Kohaut Date: Sun, 18 Mar 2018 01:07:12 +0100 Subject: BLADERUNNER: Actors fixes Removed forgotten combat development hack Clovis clovis & fix Grayford cleanup & fixes Hanoi small cleanup --- engines/bladerunner/script/ai/hanoi.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'engines/bladerunner/script/ai/hanoi.cpp') diff --git a/engines/bladerunner/script/ai/hanoi.cpp b/engines/bladerunner/script/ai/hanoi.cpp index 560f8f9639..4b88be7c5f 100644 --- a/engines/bladerunner/script/ai/hanoi.cpp +++ b/engines/bladerunner/script/ai/hanoi.cpp @@ -85,7 +85,7 @@ bool AIScriptHanoi::Update() { } void AIScriptHanoi::TimerExpired(int timer) { - if (!timer) { + if (timer == 0) { if (Actor_Query_Goal_Number(kActorHanoi) == 215) { Actor_Set_Goal_Number(kActorHanoi, 210); return; //true; @@ -604,7 +604,7 @@ bool AIScriptHanoi::UpdateAnimation(int *animation, int *frame) { bool AIScriptHanoi::ChangeAnimationMode(int mode) { switch (mode) { - case 0: + case kAnimationModeIdle: if ((unsigned int)(_animationState - 2) > 1) { _animationState = 0; } else { @@ -613,12 +613,12 @@ bool AIScriptHanoi::ChangeAnimationMode(int mode) { _animationFrame = 0; break; - case 1: + case kAnimationModeWalk: _animationState = 7; _animationFrame = 0; break; - case 3: + case kAnimationModeTalk: if (_animationState == 3) { _animationState = 4; _animationFrame = 0; @@ -629,12 +629,12 @@ bool AIScriptHanoi::ChangeAnimationMode(int mode) { } break; - case 4: + case kAnimationModeCombatIdle: _animationState = 8; _animationFrame = 0; break; - case 6: + case kAnimationModeCombatAttack: _animationState = 10; _animationFrame = 0; break; @@ -675,15 +675,15 @@ bool AIScriptHanoi::ChangeAnimationMode(int mode) { _animationState = 1; break; - case 21: - case 22: + case kAnimationModeHit: + case kAnimationModeCombatHit: _animationState = 12; _animationFrame = 0; break; case 23: if (_animationState != 3 && _animationState != 4) { - Actor_Set_Invisible(kActorMcCoy, 1); + Actor_Set_Invisible(kActorMcCoy, true); _animationState = 2; _animationFrame = 0; } else { @@ -692,7 +692,7 @@ bool AIScriptHanoi::ChangeAnimationMode(int mode) { } break; - case 48: + case kAnimationModeDie: _animationState = 13; _animationFrame = 0; break; @@ -726,8 +726,9 @@ void AIScriptHanoi::SetAnimationState(int animationState, int animationFrame, in } bool AIScriptHanoi::ReachedMovementTrackWaypoint(int waypointId) { - if (waypointId == 365) - Actor_Face_Actor(kActorHanoi, kActorHysteriaPatron1, 1); + if (waypointId == 365) { + Actor_Face_Actor(kActorHanoi, kActorHysteriaPatron1, true); + } return true; } -- cgit v1.2.3