-rw-r--r-- | noncore/games/kbill/Monster.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/noncore/games/kbill/Monster.h b/noncore/games/kbill/Monster.h new file mode 100644 index 0000000..84a8961 --- a/dev/null +++ b/noncore/games/kbill/Monster.h | |||
@@ -0,0 +1,53 @@ | |||
1 | #ifndef BILL_H | ||
2 | #define BILL_H | ||
3 | |||
4 | #include "Picture.h" | ||
5 | |||
6 | class Monster { /*structure for Bills*/ | ||
7 | public: | ||
8 | int state; /*what is it doing?*/ | ||
9 | int index; /*index to animation frame*/ | ||
10 | Picture *cels; /*pointer to array of animation frames*/ | ||
11 | int x, y; /*location*/ | ||
12 | int target_x; /*target x position*/ | ||
13 | int target_y; /*target y position*/ | ||
14 | int target_c; /*target computer*/ | ||
15 | int cargo; /*which OS carried*/ | ||
16 | int x_offset; /*accounts for width differences*/ | ||
17 | int y_offset; /*'bounce' factor for OS carried*/ | ||
18 | int sx, sy; /*used for drawing extra OS during switch*/ | ||
19 | |||
20 | static const int SLOW = 0;/* speeds of moving bills */ | ||
21 | static const int FAST = 1; | ||
22 | |||
23 | static const int OFF = 0;/* Bill's states */ | ||
24 | static const int IN = 1; | ||
25 | static const int AT = 2; | ||
26 | static const int OUT = 3; | ||
27 | static const int DYING = 4; | ||
28 | static const int STRAY = 5; | ||
29 | |||
30 | static const int GRAVITY = 3;/*speed at which os drops*/ | ||
31 | |||
32 | static const int XOFFSET = 20;/*offset from right of computer*/ | ||
33 | static const int YOFFSET = 3;/*offset from top of computer*/ | ||
34 | |||
35 | void get_border(); | ||
36 | void enter(); | ||
37 | int move(int mode); | ||
38 | void draw(); | ||
39 | void draw_std(); | ||
40 | void draw_at(); | ||
41 | void draw_stray(); | ||
42 | void update(); | ||
43 | void update_in(); | ||
44 | void update_at(); | ||
45 | void update_out(); | ||
46 | void update_dying(); | ||
47 | int clicked(int locx, int locy); | ||
48 | int clickedstray(int locx, int locy); | ||
49 | int step_size(unsigned int lev); | ||
50 | |||
51 | }; | ||
52 | |||
53 | #endif | ||