Treat angle values as floating point numbers
[neverball] / share / state.h
1 #ifndef STATE_H
2 #define STATE_H
3
4 /*---------------------------------------------------------------------------*/
5
6 struct state
7 {
8     int  (*enter)(struct state *, struct state *prev);
9     void (*leave)(struct state *, struct state *next, int id);
10     void (*paint)(int id, float t);
11     void (*timer)(int id, float dt);
12     void (*point)(int id, int x, int y, int dx, int dy);
13     void (*stick)(int id, int a, float v, int bump);
14     void (*angle)(int id, float x, float z);
15     int  (*click)(int b,  int d);
16     int  (*keybd)(int c,  int d);
17     int  (*buttn)(int b,  int d);
18
19     int gui_id;
20 };
21
22 struct state *curr_state(void);
23
24 float time_state(void);
25 void  init_state(struct state *);
26 int   goto_state(struct state *);
27
28 void st_paint(float);
29 void st_timer(float);
30 void st_point(int, int, int, int);
31 void st_stick(int, float);
32 void st_angle(float, float);
33 int  st_click(int, int);
34 int  st_keybd(int, int);
35 int  st_buttn(int, int);
36
37 /*---------------------------------------------------------------------------*/
38
39 #endif