Crossfire Server, Trunk
|
#include "global.h"
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "assets.h"
Go to the source code of this file.
Functions | |
void | animate_object (object *op, int dir) |
void | apply_anim_suffix (object *who, const char *suffix) |
static void | do_anim (const Animations *anim) |
void | dump_animations (void) |
This file contains animation-related code.
Definition in file anim.c.
void animate_object | ( | object * | op, |
int | dir | ||
) |
Updates the face-variable of an object. If the object is the head of a multi-object, all objects are animated. The object's state is not changed, but merely updated if needed (out of bounds of new animation, reached end of animation, ...). This function correctly handles FLAG_IS_TURNABLE too.
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. This parameter is ignored if the object has a head or is turnable. |
Definition at line 43 of file anim.c.
References animate_object(), blank_face, CLEAR_FLAG, FLAG_ALIVE, FLAG_IS_TURNABLE, llevError, LOG(), NUM_ANIMATIONS, NUM_FACINGS, object_dump(), object_update(), give::op, PLAYER, QUERY_FLAG, SET_ANIMATION, SET_FLAG, stringbuffer_finish(), stringbuffer_new(), and UP_OBJ_FACE.
Referenced by animate_object(), apply_anim_suffix(), apply_changes_to_player(), dragon_ability_gain(), face_player(), fix_stopped_arrow(), monster_move(), monster_use_scroll(), move_aura(), move_hole(), move_player(), move_to(), object_give_identified_properties(), object_update_turn_face(), process_events(), process_object(), turn_one_transport(), and turn_transport().
void apply_anim_suffix | ( | object * | who, |
const char * | suffix | ||
) |
Applies a compound animation to an object.
who | object to apply the animation to. Must not be NULL. |
suffix | animation suffix to apply. Must not be NULL. |
Definition at line 149 of file anim.c.
References animate::anim, animate_object(), obj::animation, buf, obj::facing, HEAD, obj::last_anim, MAX_BUF, obj::more, animations_struct::name, obj::state, castle_read::suffix, obj::temp_anim_speed, obj::temp_animation, try_find_animation(), and autojail::who.
Referenced by apply_by_living(), attack_ob_simple(), cast_spell(), do_skill(), fire_bow(), and god_intervention().
|
static |
Definition at line 176 of file anim.c.
References animate::anim.
Referenced by dump_animations().
void dump_animations | ( | void | ) |
Dump all animations to stderr, for debugging purposes.
Definition at line 183 of file anim.c.
References animations_for_each(), and do_anim().
Referenced by server_dump_animations().