- removed unneded typedef's for structs
[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 struct bad_guy_type
34 {
35   int mode;
36   DyingType dying;
37   int kind;
38   bool 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
47 /* Bad guy kinds: */
48
49 enum {
50   BAD_BSOD,
51   BAD_LAPTOP,
52   BAD_MONEY
53 };
54
55 extern texture_type img_bsod_squished_left, img_bsod_squished_right,
56 img_bsod_falling_left, img_bsod_falling_right,
57 img_laptop_flat_left, img_laptop_flat_right,
58 img_laptop_falling_left, img_laptop_falling_right;
59 extern texture_type img_bsod_left[4], img_bsod_right[4],
60 img_laptop_left[3], img_laptop_right[3],
61 img_money_left[2], img_money_right[2];
62
63 extern bitmask *bm_bsod;
64
65 void badguy_create_bitmasks();
66
67 void badguy_init(bad_guy_type* pbad, float x, float y, int kind);
68 void badguy_action(bad_guy_type* pbad);
69 void badguy_draw(bad_guy_type* pbad);
70 void badguy_collision(bad_guy_type* pbad, void* p_c_object, int c_object);
71
72 #endif /*SUPERTUX_BADGUY_H*/
73
74