bc1fb59f13fd042b83b668c49cd271d20ece431f
[carveJwlIkooP6JGAAIwe30JlM.git] / player_walk.h
1 #ifndef PLAYER_WALK_H
2 #define PLAYER_WALK_H
3
4 #include "player_api.h"
5
6 struct player_walk
7 {
8 rb_capsule collider;
9
10 struct
11 {
12 v3f prev_pos;
13 v3f drop_in_target,
14 drop_in_foot_anchor,
15 drop_in_start,
16 drop_in_normal;
17
18 float drop_in_start_angle,
19 drop_in_angle;
20
21 enum walk_activity
22 {
23 k_walk_activity_air,
24 k_walk_activity_ground,
25 k_walk_activity_sleep,
26 k_walk_activity_immobile
27 }
28 activity;
29
30 enum walk_outro
31 {
32 k_walk_outro_none,
33 k_walk_outro_jump_to_air,
34 k_walk_outro_drop_in
35 }
36 outro_type;
37
38 struct skeleton_anim *outro_anim;
39 double outro_start_time;
40 }
41 state,
42 state_gate_storage;
43
44 enum mdl_surface_prop surface;
45 struct skeleton_anim *anim_walk, *anim_run, *anim_idle, *anim_jump,
46 *anim_jump_to_air, *anim_drop_in;
47
48 float blend_fly,
49 blend_run,
50 blend_walk,
51
52 move_speed,
53 walk_timer;
54 };
55
56 VG_STATIC void player__walk_pre_update ( player_instance *player );
57 VG_STATIC void player__walk_update ( player_instance *player );
58 VG_STATIC void player__walk_post_update ( player_instance *player );
59 VG_STATIC void player__walk_animate ( player_instance *player,
60 player_animation *anim );
61 VG_STATIC void player__walk_post_animate( player_instance *player );
62 VG_STATIC void player__walk_im_gui ( player_instance *player );
63 VG_STATIC void player__walk_bind ( player_instance *player );
64 VG_STATIC void player__walk_transition ( player_instance *player, v3f angles );
65
66 #endif /* PLAYER_WALK_H */