splitted actions commands for different badguys into seperate functions
[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;
56 extern texture_type img_bsod_squished_right;
57 extern texture_type img_bsod_falling_left;
58 extern texture_type img_bsod_falling_right;
59 extern texture_type img_laptop_flat_left;
60 extern texture_type img_laptop_flat_right;
61 extern texture_type img_laptop_falling_left;
62 extern texture_type img_laptop_falling_right;
63 extern texture_type img_bsod_left[4];
64 extern texture_type img_bsod_right[4];
65 extern texture_type img_laptop_left[3];
66 extern texture_type img_laptop_right[3];
67 extern texture_type img_money_left[2];
68 extern texture_type img_money_right[2];
69
70 extern bitmask *bm_bsod;
71
72 void badguy_create_bitmasks();
73
74 void badguy_init(bad_guy_type* pbad, float x, float y, int kind);
75
76 void badguy_action(bad_guy_type* pbad);
77 void badguy_draw(bad_guy_type* pbad);
78
79 void badguy_action_bsod(bad_guy_type* pbad);
80 void badguy_action_laptop(bad_guy_type* pbad);
81 void badguy_action_money(bad_guy_type* pbad);
82
83 void badguy_draw_bsod(bad_guy_type* pbad);
84 void badguy_draw_laptop(bad_guy_type* pbad);
85 void badguy_draw_money(bad_guy_type* pbad);
86
87 void badguy_collision(bad_guy_type* pbad, void* p_c_object, int c_object);
88
89 #endif /*SUPERTUX_BADGUY_H*/
90
91