1 #ifndef PLAYER_REPLAY_H
2 #define PLAYER_REPLAY_H
6 #include "player_render.h"
8 typedef struct replay_buffer replay_buffer
;
9 typedef struct replay_frame replay_frame
;
10 typedef struct replay_gamestate replay_gamestate
;
11 typedef struct replay_sfx replay_sfx
;
13 struct replay_buffer
{
18 k_replay_control_none
,
19 k_replay_control_scrub
,
20 k_replay_control_play
,
21 k_replay_control_resume
25 replay_frame
*head
, *tail
, *cursor_frame
,
32 player_animation anim
;
33 struct board_pose board_pose
;
35 v3f cam_pos
, cam_angles
;
41 u16 gamestate_count
, sfx_count
;
44 struct replay_gamestate
{
45 enum player_subsystem system
;
49 struct player_cam_controller cam_control
;
52 struct player_skate_state skate
;
53 struct player_walk_state walk
;
61 VG_STATIC
void replay_debug_info( player_instance
*player
);
62 VG_STATIC replay_frame
*replay_newframe( replay_buffer
*replay
,
63 u16 gamestate_count
, u16 sfx_count
);
64 VG_STATIC
void replay_imgui( player_instance
*player
);
65 VG_STATIC
void replay_seek( replay_buffer
*replay
, f64 t
);
67 replay_gamestate
*replay_frame_gamestate( replay_frame
*frame
, u16 index
);
68 replay_sfx
*replay_frame_sfx( replay_frame
*frame
, u16 index
);
69 VG_STATIC replay_frame
*replay_find_recent_stateframe( replay_buffer
*replay
);
70 VG_STATIC
void player_replay_control_update( player_instance
*player
);
72 #endif /* PLAYER_REPLAY_H */