commited Matzes Win32 patch
[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 "physic.h"
22 #include "collision.h"
23
24 /* Enemy modes: */
25
26 #define NORMAL 0
27 #define FLAT 1
28 #define KICK 2
29 #define HELD 3
30
31 /* Badguy type: */
32
33 typedef struct bad_guy_type
34   {
35     int mode;
36     int dying;
37     int kind;
38     int seen;
39     int dir;
40     int frame;
41     base_type base;
42     base_type old_base;
43     timer_type timer;
44     physic_type physic;
45   }
46 bad_guy_type;
47
48 /* Bad guy kinds: */
49
50 enum {
51   BAD_BSOD,
52   BAD_LAPTOP,
53   BAD_MONEY
54 };
55
56 extern texture_type img_bsod_squished_left, img_bsod_squished_right,
57 img_bsod_falling_left, img_bsod_falling_right,
58 img_laptop_flat_left, img_laptop_flat_right,
59 img_laptop_falling_left, img_laptop_falling_right;
60 extern texture_type img_bsod_left[4], img_bsod_right[4],
61 img_laptop_left[3], img_laptop_right[3],
62 img_money_left[2], img_money_right[2];
63
64 extern bitmask *bm_bsod;
65
66 void badguy_create_bitmasks();
67
68 void badguy_init(bad_guy_type* pbad, float x, float y, int kind);
69 void badguy_action(bad_guy_type* pbad);
70 void badguy_draw(bad_guy_type* pbad);
71 void badguy_collision(bad_guy_type* pbad, void* p_c_object, int c_object);
72
73 #endif /*SUPERTUX_BADGUY_H*/
74
75