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 VDir;
8struct VFile;
9
10struct GBARRContext {
11 struct GBARRBlock* rootBlock;
12 struct GBARRBlock* currentBlock;
13
14 // Playback state
15 struct GBARRBlock* playbackBlock;
16 size_t inputId;
17
18 // Recording state
19 bool isRecording;
20 bool inputThisFrame;
21 uint32_t frames;
22 uint32_t lagFrames;
23};
24
25void GBARRContextCreate(struct GBA*);
26void GBARRContextDestroy(struct GBA*);
27
28bool GBARRSave(struct GBARRContext*, struct VDir*);
29bool GBARRLoad(struct GBARRContext*, struct VDir*);
30
31bool GBARRStartPlaying(struct GBA*);
32void GBARRStopPlaying(struct GBA*);
33bool GBARRStartRecording(struct GBA*);
34void GBARRStopRecording(struct GBA*);
35
36bool GBARRIsPlaying(struct GBA*);
37bool GBARRIsRecording(struct GBA*);
38
39void GBARRNextFrame(struct GBA*);
40void GBARRLogInput(struct GBA*, uint16_t input);
41uint16_t GBARRQueryInput(struct GBA*);
42
43#endif