1 #ifndef Z_ANIM_H
2 #define Z_ANIM_H
3 
4 #if defined(_DEBUG) && defined(_Z_TESTMODE)
5 
6 /*=========================================================================
7    Animation player types.
8   =========================================================================*/
9 typedef enum
10 {
11    DIR_FIXED,
12    DIR_AT_CLIENT,
13    DIR_PARA_CLIENT
14 } anim_dir_t;
15 
16 
17 typedef struct
18 {
19    edict_t *monster; //monster being animated
20    mframe_t monster_frames[1]; //current frame buffer
21    mmove_t monster_move; //replacement currentmove for monster
22    mmove_t **monster_sequences; //list of frame sequences for monster
23 
24    int current_sequence; //0 to play all frames
25    int current_frame; //current frame in the current sequence (0 based)
26 
27    float last_dist; //last distance travelled, for going backwards
28    qboolean moving_forward;
29 
30    int actual_frame, last_actual_frame;
31    mmove_t *actual_sequence;
32    int actual_sequence_idx;
33 
34    qboolean paused; //is animation paused or looping
35    qboolean stationary; //allow movement in frame
36    qboolean frame_events; //play frame events?
37    qboolean active; //apply state changes to this animation
38 
39    anim_dir_t facing;
40    anim_dir_t aim;
41    vec3_t v_aim;
42 } anim_data_t;
43 
44 //for aim correction during animation playback
45 qboolean anim_player_correct_aim(edict_t *self, vec3_t aim);
46 
47 //for console commands
48 void anim_player_cmd(edict_t *ent);
49 
50 #define ANIM_AIM(x, y) anim_player_correct_aim(x, y)
51 
52 #else
53 
54 #define ANIM_AIM(x, y)
55 
56 #endif
57 
58 #endif
59