update
[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 "timer.h"
20 #include "texture.h"
21 #include "collision.h"
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 mode;
35     int dying;
36     int kind;
37     int seen;
38     int dir;
39     int frame;
40     base_type base;
41     timer_type timer;
42   }
43 bad_guy_type;
44
45 /* Bad guy kinds: */
46
47 enum {
48   BAD_BSOD,
49   BAD_LAPTOP,
50   BAD_MONEY
51 };
52
53 texture_type img_bsod_squished_left, img_bsod_squished_right,
54 img_bsod_falling_left, img_bsod_falling_right,
55 img_laptop_flat_left, img_laptop_flat_right,
56 img_laptop_falling_left, img_laptop_falling_right;
57 texture_type img_bsod_left[4], img_bsod_right[4],
58 img_laptop_left[3], img_laptop_right[3],
59 img_money_left[2], img_money_right[2];
60
61 bitmask *bm_bsod;
62
63 void badguy_create_bitmasks();
64
65 void badguy_init(bad_guy_type* pbad, float x, float y, int kind);
66 void badguy_action(bad_guy_type* pbad);
67 void badguy_draw(bad_guy_type* pbad);
68 void badguy_collision(bad_guy_type* pbad, void* p_c_object, int c_object);
69
70 #endif /*SUPERTUX_BADGUY_H*/
71
72