move audio comp to its own thing
[carveJwlIkooP6JGAAIwe30JlM.git] / player_skate.h
index 269e552cfff54d3340bc1cfbff949a85c6938ad0..4118fd63f8552b8c8647c69225772db21d744a7b 100644 (file)
@@ -131,8 +131,8 @@ struct player_skate{
        * on activity. */
       f32 push_time, jump_time, handplant_t;
       u8 jump_dir;
-      u8 trick_type;
-      u8 activity;
+      u8 trick_type; /* todo: should encode grind type */
+      u8 activity, surface;
    }
    animator;
 
@@ -319,6 +319,8 @@ static void player__skate_sfx_oneshot  ( u8 id, v3f pos, f32 volume );
 static void player__skate_clear_mechanics(void);
 static void player__skate_reset_animator(void);
 static void player__approximate_best_trajectory(void);
+static void player__skate_comp_audio( void *animator );
+static void player__skate_kill_audio(void);
 
 struct player_subsystem_interface static player_subsystem_skate = {
    .system_register = player__skate_register,
@@ -333,6 +335,8 @@ struct player_subsystem_interface static player_subsystem_skate = {
    .post_animate = player__skate_post_animate,
    .network_animator_exchange = player__skate_animator_exchange,
    .sfx_oneshot = player__skate_sfx_oneshot,
+   .sfx_comp = player__skate_comp_audio,
+   .sfx_kill = player__skate_kill_audio,
 
    .animator_data = &player_skate.animator,
    .animator_size = sizeof(player_skate.animator),