src/gba/gba-rr.h (view raw)
1#ifndef GBA_RR_H
2#define GBA_RR_H
3
4#include "common.h"
5
6struct GBA;
7struct VFile;
8
9struct GBARRContext {
10 struct GBARRBlock* rootBlock;
11 struct GBARRBlock* currentBlock;
12
13 // Playback state
14 struct GBARRBlock* playbackBlock;
15 size_t inputId;
16
17 // Recording state
18 bool isRecording;
19 bool inputThisFrame;
20 uint32_t frames;
21 uint32_t lagFrames;
22};
23
24void GBARRContextCreate(struct GBA*);
25void GBARRContextDestroy(struct GBA*);
26
27bool GBARRStartPlaying(struct GBA*);
28void GBARRStopPlaying(struct GBA*);
29bool GBARRStartRecording(struct GBA*);
30void GBARRStopRecording(struct GBA*);
31
32bool GBARRIsPlaying(struct GBA*);
33bool GBARRIsRecording(struct GBA*);
34
35void GBARRNextFrame(struct GBA*);
36void GBARRLogInput(struct GBA*, uint16_t input);
37uint16_t GBARRQueryInput(struct GBA*);
38
39#endif