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
{
17 replay_frame
*head
, *tail
, *cursor_frame
,
23 player_animation anim
;
24 struct board_pose board_pose
;
26 v3f cam_pos
, cam_angles
;
32 u16 gamestate_count
, sfx_count
;
35 struct replay_gamestate
{
36 enum player_subsystem system
;
40 struct player_cam_controller cam_control
;
43 struct player_skate_state skate
;
44 struct player_walk_state walk
;
52 VG_STATIC replay_frame
*replay_newframe( replay_buffer
*replay
,
53 u16 gamestate_count
, u16 sfx_count
);
54 VG_STATIC
void replay_seek( replay_buffer
*replay
, f64 t
);
56 replay_gamestate
*replay_frame_gamestate( replay_frame
*frame
, u16 index
);
57 replay_sfx
*replay_frame_sfx( replay_frame
*frame
, u16 index
);
58 VG_STATIC replay_frame
*replay_find_recent_stateframe( replay_buffer
*replay
);
60 VG_STATIC
void skaterift_replay_pre_update(void);
61 VG_STATIC
void skaterift_replay_imgui(void);
62 VG_STATIC
void skaterift_replay_debug_info(void);
64 #endif /* PLAYER_REPLAY_H */