version 1.13 | | version 1.14 |
---|
| | |
/* | | /* |
* static char *rcsid_anim_c = | | * static char *rcsid_anim_c = |
* "$Id: anim.c,v 1.13 2003/02/24 07:38:38 mwedel Exp $"; | | * "$Id: anim.c,v 1.14 2003/03/19 08:04:48 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
/* | | /* |
* animate_object(object) updates the face-variable of an object. | | * animate_object(object) updates the face-variable of an object. |
* If the object is the head of a multi-object, all objects are animated. | | * If the object is the head of a multi-object, all objects are animated. |
| | * op is the object to animate. |
| | * dir is the direction the object is facing. This is generally same as |
| | * op->direction, but in some cases, op->facing is used instead - the |
| | * caller has a better idea which one it really wants to be using, |
| | * so let it pass along the right one. |
*/ | | */ |
| | |
void animate_object(object *op) { | | void animate_object(object *op, int dir) { |
int max_state; /* Max animation state object should be drawn in */ | | int max_state; /* Max animation state object should be drawn in */ |
int base_state; /* starting index # to draw from */ | | int base_state; /* starting index # to draw from */ |
int dir=op->direction; | | |
| | |
if(!op->animation_id || !NUM_ANIMATIONS(op)) { | | if(!op->animation_id || !NUM_ANIMATIONS(op)) { |
LOG(llevError,"Object lacks animation.\n"); | | LOG(llevError,"Object lacks animation.\n"); |
| | |
} | | } |
#endif | | #endif |
if(op->more) | | if(op->more) |
animate_object(op->more); | | animate_object(op->more, dir); |
| | |
/* update_object will also recursively update all the pieces. | | /* update_object will also recursively update all the pieces. |
* as such, we call it last, and only call it for the head | | * as such, we call it last, and only call it for the head |