-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcdgmain.h
92 lines (67 loc) · 1.34 KB
/
cdgmain.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#include <sys/stat.h>
//Types
struct MainConfig {
uint32_t desiredFps;
uint32_t scaling;
bool fullscreen;
bool showBorder;
Sint32 woverride, hoverride;
int h, w;
bool hasAutoFile;
string autoFile;
bool hasAutoAudioFile;
string autoAudioFile;
bool audioEnabled;
SeekMode seek;
bool quitOnEof;
bool useUI;
bool useKeys;
bool autostart;
MainConfig() {
desiredFps = 30;
scaling = 4;
autostart = quitOnEof = fullscreen = hasAutoFile = hasAutoAudioFile = showBorder = false;
useUI = useKeys = audioEnabled = true;
woverride = hoverride = -1;
h = w = -1;
//seek = S_DIRECT;
seek = SeekMode::SEEK_ENHANCED;
}
};
enum TransportState {
T_NOCHANGE = -1,
T_STOP = 1,
T_PLAY,
T_PAUSE
};
struct MainRunState {
bool keeprunning;
SDL_Event event;
bool cdgLoaded;
string cdgFile;
ifstream cdgIn;
struct stat cdgStat;
int cdgLoc;
bool audioLoaded;
string audioFile;
Mix_Music *audio;
TransportState transport;
TransportState nextTransport;
uint8_t channel;
uint8_t nextChannel;
double nextLoc;
bool dumpImage;
MainRunState() {
keeprunning = true;
cdgLoaded = false;
audioLoaded = false;
audio = NULL;
transport = T_STOP;
nextTransport = T_NOCHANGE;
channel = 1;
nextChannel = 1;
nextLoc = -1;
dumpImage = false;
}
};
extern int open_filechooser(MainRunState*, bool music = false);