-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommon.h
59 lines (45 loc) · 986 Bytes
/
Common.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
/* This file is part of the Elliott 803 emulator.
Copyright © 2020 Peter Onion
See LICENCE file.
*/
struct fsmtable {
int state;
int event;
int nextState;
int (*handler)(int state,int event,void *data,guint time);
};
struct fsm {
const char *name;
int state;
struct fsmtable *table;
const char **stateNames;
const char **eventNames;
int debugFlag;
int nextEvent;
};
struct sndEffect
{
int effectType;
gint16 *frames;
int frameCount;
};
struct sndEffect *readWavData(const char *wavFileName);
void doFSM(struct fsm *fsm,int event,void *data);
gboolean Running;
typedef struct _buttonEvent
{
gboolean press;
int rowId;
guint value;
guint time;
} ButtonEvent;
GAsyncQueue *ButtonEventQueue;
typedef struct _lampsEvent
{
unsigned int lampId;
gboolean on;
gfloat brightness;
} LampsEvent;
GAsyncQueue *LampsEventQueue;
GAsyncQueue *PlotterMovesQueue;
gboolean oldHandSwap;