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
,
22 enum replay_framedata
{
23 k_replay_framedata_animator
,
24 k_replay_framedata_gamestate
,
25 k_replay_framedata_internal_gamestate
,
26 k_replay_framedata_sfx
30 v3f cam_pos
, cam_angles
;
36 enum player_subsystem system
;
41 struct replay_gamestate
{
45 struct player_cam_controller cam_control
;
52 VG_STATIC replay_frame
*replay_newframe( replay_buffer
*replay
,
56 VG_STATIC
void replay_seek( replay_buffer
*replay
, f64 t
);
58 VG_STATIC replay_frame
*replay_find_recent_stateframe( replay_buffer
*replay
);
59 VG_STATIC
void replay_get_camera( replay_buffer
*replay
, camera
*cam
);
60 VG_STATIC
void replay_get_frame_camera( replay_frame
*frame
, camera
*cam
);
61 VG_STATIC f32
replay_subframe_time( replay_buffer
*replay
);
62 VG_STATIC
void replay_clear( replay_buffer
*replay
);
64 replay_frame_data( replay_frame
*frame
, enum replay_framedata type
);
66 VG_STATIC
void skaterift_replay_pre_update(void);
67 VG_STATIC
void skaterift_replay_imgui(void);
68 VG_STATIC
void skaterift_replay_debug_info(void);
70 #endif /* PLAYER_REPLAY_H */