- removed a few redundant "== true"'s
[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 #define NORMAL 0
26 #define FLAT 1
27 #define KICK 2
28 #define HELD 3
29
30 extern texture_type img_bsod_squished_left;
31 extern texture_type img_bsod_squished_right;
32 extern texture_type img_bsod_falling_left;
33 extern texture_type img_bsod_falling_right;
34 extern texture_type img_laptop_flat_left;
35 extern texture_type img_laptop_flat_right;
36 extern texture_type img_laptop_falling_left;
37 extern texture_type img_laptop_falling_right;
38 extern texture_type img_bsod_left[4];
39 extern texture_type img_bsod_right[4];
40 extern texture_type img_laptop_left[3];
41 extern texture_type img_laptop_right[3];
42 extern texture_type img_money_left[2];
43 extern texture_type img_money_right[2];
44
45 /* Bad guy kinds: */
46 enum BadGuyKind {
47   BAD_BSOD,
48   BAD_LAPTOP,
49   BAD_MONEY
50 };
51
52 /* Badguy type: */
53 class BadGuy
54 {
55  public:
56   int mode;
57   DyingType dying;
58   BadGuyKind kind;
59   bool seen;
60   int dir;
61   base_type base;
62   base_type old_base;
63   timer_type timer;
64   physic_type physic;
65
66  public:
67   void init(float x, float y, BadGuyKind kind);
68
69   void action();
70   void draw();
71
72   void action_bsod();
73   void action_laptop();
74   void action_money();
75
76   void draw_bsod();
77   void draw_laptop();
78   void draw_money();
79
80   void collision(void* p_c_object, int c_object);
81 };
82
83 #endif /*SUPERTUX_BADGUY_H*/
84
85