1befaada2a0f5f8a86747c58be5be61178d080d2
[carveJwlIkooP6JGAAIwe30JlM.git] / player_replay.h
1 #ifndef PLAYER_REPLAY_H
2 #define PLAYER_REPLAY_H
3
4 #include "skaterift.h"
5 #include "player.h"
6 #include "player_render.h"
7
8 static i32 k_replay_test = 0;
9
10 typedef struct replay_buffer replay_buffer;
11 typedef struct replay_frame replay_frame;
12
13 struct replay_buffer {
14 void *data;
15 u32 size; /* bytes */
16
17 replay_frame *head, *tail, *cursor_frame;
18
19 f64 cursor;
20 };
21
22 struct replay_frame {
23 player_animation anim;
24 struct board_pose board_pose;
25
26 f64 time;
27 replay_frame *l, *r;
28
29 /* eventually, sound events, player iframes and stuff? */
30 };
31
32 VG_STATIC void replay_debug_info( player_instance *player );
33 VG_STATIC replay_frame *replay_newframe( replay_buffer *replay );
34 VG_STATIC void replay_imgui( player_instance *player );
35 VG_STATIC void replay_seek( replay_buffer *replay, f64 t );
36
37 #endif /* PLAYER_REPLAY_H */