From fe8d2a8e7f899858784464550423f0deb5470f6c Mon Sep 17 00:00:00 2001 From: Vincent Hamm Date: Sat, 28 Apr 2007 22:31:55 +0000 Subject: More cleanup Few bug fix svn-id: r26666 --- engines/cruise/actor.cpp | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) (limited to 'engines/cruise/actor.cpp') diff --git a/engines/cruise/actor.cpp b/engines/cruise/actor.cpp index 505817282f..3d8e856d49 100644 --- a/engines/cruise/actor.cpp +++ b/engines/cruise/actor.cpp @@ -774,11 +774,7 @@ void processAnimation(void) { getMultipleObjectParam(currentActor->overlayNumber, currentActor->idx, ¶ms); - if (((animationStart && !currentActor->flag) - || (!animationStart - && currentActor->x_dest != -1 - && currentActor->y_dest != -1)) - && (currentActor->type == 0)) { + if (((animationStart && !currentActor->flag) || (!animationStart && currentActor->x_dest != -1 && currentActor->y_dest != -1)) && (currentActor->type == 0)) { // mouse animation if (!animationStart) { var34 = currentActor->x_dest; @@ -790,11 +786,7 @@ void processAnimation(void) { currentActor->flag = 1; } - currentActor->pathId = - computePathfinding(returnVar2, params.X, - params.Y, var34, var35, - currentActor->stepX, currentActor->stepY, - currentActor->pathId); + currentActor->pathId = computePathfinding(returnVar2, params.X, params.Y, var34, var35, currentActor->stepX, currentActor->stepY, currentActor->pathId); if (currentActor->pathId == -1) { if ((currentActor->endDirection != -1) @@ -1136,31 +1128,19 @@ void processAnimation(void) { } case ANIM_PHASE_END: { - int newA = - raoul_end[currentActor-> - startDirection][0]; - - set_anim(currentActor-> - overlayNumber, - currentActor->idx, - currentActor->start, - currentActor->x, - currentActor->y, newA, - currentActor->poly); + int newA = raoul_end[currentActor->startDirection][0]; + + set_anim(currentActor->overlayNumber, currentActor->idx, currentActor->start, currentActor->x, currentActor->y, newA, currentActor->poly); currentActor->pathId = -2; - currentActor->phase = - ANIM_PHASE_WAIT; + currentActor->phase = ANIM_PHASE_WAIT; currentActor->flag = 0; - currentActor->endDirection = - -1; + currentActor->endDirection = -1; break; } default: { - printf - ("Unimplemented currentActor->phase=%d in processAnimation()\n", - currentActor->phase); + printf("Unimplemented currentActor->phase=%d in processAnimation()\n", currentActor->phase); // exit(1); } } -- cgit v1.2.3