summaryrefslogtreecommitdiff
path: root/noncore/games/kbill/Game.h
Unidiff
Diffstat (limited to 'noncore/games/kbill/Game.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kbill/Game.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/noncore/games/kbill/Game.h b/noncore/games/kbill/Game.h
new file mode 100644
index 0000000..4473936
--- a/dev/null
+++ b/noncore/games/kbill/Game.h
@@ -0,0 +1,55 @@
1#ifndef GAME_H
2#define GAME_H
3
4#include "objects.h"
5
6class Game {
7 unsigned state;
8 int efficiency;
9public:
10 unsigned score, level, iteration;
11 Picture logo;
12 int grabbed;
13
14 static const unsigned short scrwidth = 240;
15 static const unsigned short scrheight = 290;
16
17 static const int PLAYING = 1;
18 static const int BETWEEN = 2;
19 static const int END = 3;
20 static const int WAITING = 4;
21
22 static const int DEFAULTC = 0; /* cursors */
23 static const int DOWNC = -1;
24 static const int BUCKETC = -2;
25
26 static const int ENDGAME = 200; /* dialog window IDs */
27 static const int ENTERNAME = 201;
28 static const int HIGHSCORE = 202;
29 static const int SCORE = 203;
30
31 static const int ENDLEVEL = -1; /* Codes for updating score */
32 static const int BILLPOINTS = 5;
33
34 static const int EMPTY = -2; /* Grabbed object */
35 static const int BUCKET = -1;
36
37 int RAND(int lb, int ub);
38 int MAX(int x, int y);
39 int MIN(int x, int y);
40 int INTERSECT(int x1, int y1, int w1, int h1, int x2, int y2, int w2,
41 int h2);
42
43 void setup_level (unsigned int lev);
44 void start(unsigned int lev);
45 void quit();
46 void update_info();
47 void update_score (int action);
48 void warp_to_level (unsigned int lev);
49 void button_press(int x, int y);
50 void button_release(int x, int y);
51 void update();
52 void main(int argc, char **argv);
53};
54
55#endif