Huge code merge. This reflects the current status of my rewrite/restructuring. A...
[supertux.git] / src / badguy.h
1 //
2 // Interface: badguy
3 //
4 // Description:
5 //
6 //
7 // Author: Tobias Glaesser <tobi.web@gmx.de> (C) 2003
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12
13 #ifndef SUPERTUX_BADGUY_H
14 #define SUPERTUX_BADGUY_H
15
16 #include "SDL.h"
17 #include "bitmask.h"
18 #include "type.h"
19 #include "collision.h"
20
21 #define NUM_BAD_GUYS 128
22
23 /* Enemy modes: */
24
25 #define NORMAL 0
26 #define FLAT 1
27 #define KICK 2
28 #define HELD 3
29
30 /* Badguy type: */
31
32 typedef struct bad_guy_type
33   {
34     int alive;
35     int mode;
36     int dying;
37     int kind;
38     int seen;
39     int dir;
40     int frame;
41     float x;
42     float y;
43     float xm;
44     float ym;
45     float width;
46     float height;
47     unsigned int updated;
48     itop_type it;
49     timer_type timer;
50   }
51 bad_guy_type;
52
53 /* Bad guy kinds: */
54
55 enum {
56   BAD_BSOD,
57   BAD_LAPTOP,
58   BAD_MONEY
59 };
60
61 texture_type img_bsod_squished_left, img_bsod_squished_right,
62 img_bsod_falling_left, img_bsod_falling_right,
63 img_laptop_flat_left, img_laptop_flat_right,
64 img_laptop_falling_left, img_laptop_falling_right;
65 texture_type img_bsod_left[4], img_bsod_right[4],
66 img_laptop_left[3], img_laptop_right[3],
67 img_money_left[2], img_money_right[2];
68
69 bitmask *bm_bsod;
70
71 void badguy_create_bitmasks();
72
73 void badguy_init(bad_guy_type* pbad);
74 void badguy_action(bad_guy_type* pbad);
75 void badguy_draw(bad_guy_type* pbad);
76 void badguy_collision(bad_guy_type* pbad, void* p_c_object, int c_object);
77
78 #endif /*SUPERTUX_BADGUY_H*/
79
80