placing white holes, and changed to n-body gravitational pull instead of
[ld42_outofspace] / src / screen.h
1 #ifndef SCREEN_H_
2 #define SCREEN_H_
3
4 class ScreenBase;
5
6 bool init_screens();
7 void cleanup_screens();
8 void push_screen(ScreenBase *scr);
9 void pop_screen();
10
11 extern ScreenBase *active_screen;
12
13
14 class ScreenBase {
15 public:
16         ScreenBase *next;
17
18         ScreenBase();
19         virtual ~ScreenBase();
20
21         virtual bool init();
22         virtual void destroy();
23
24         virtual void start();
25         virtual void stop();
26
27         virtual void draw() = 0;
28         virtual void reshape(int x, int y);
29
30         virtual void keyboard(int key, bool pressed);
31         virtual void mbutton(int bn, bool pressed, int x, int y);
32         virtual void mmotion(int x, int y);
33         virtual void mwheel(int dir, int x, int y);
34 };
35
36 class MenuScreen : public ScreenBase {
37 public:
38         bool init();
39         void destroy();
40
41         void start();
42         void stop();
43
44         void draw();
45         void reshape(int x, int y);
46
47         void keyboard(int key, bool pressed);
48         void mbutton(int bn, bool pressed, int x, int y);
49         void mmotion(int x, int y);
50 };
51
52 class GameScreen : public ScreenBase {
53 public:
54         bool init();
55         void destroy();
56
57         void start();
58         void stop();
59
60         void draw();
61         void reshape(int x, int y);
62
63         void keyboard(int key, bool pressed);
64         void mbutton(int bn, bool pressed, int x, int y);
65         void mmotion(int x, int y);
66         void mwheel(int dir, int x, int y);
67 };
68
69 #endif  // SCREEN_H_