7 // Author: Tobias Glaesser <tobi.web@gmx.de> (C) 2003
9 // Copyright: See COPYING file that comes with this distribution
13 #ifndef SUPERTUX_BADGUY_H
14 #define SUPERTUX_BADGUY_H
22 #include "collision.h"
38 extern texture_type img_bsod_squished_left;
39 extern texture_type img_bsod_squished_right;
40 extern texture_type img_bsod_falling_left;
41 extern texture_type img_bsod_falling_right;
42 extern texture_type img_laptop_flat_left;
43 extern texture_type img_laptop_flat_right;
44 extern texture_type img_laptop_falling_left;
45 extern texture_type img_laptop_falling_right;
46 extern texture_type img_bsod_left[4];
47 extern texture_type img_bsod_right[4];
48 extern texture_type img_laptop_left[3];
49 extern texture_type img_laptop_right[3];
50 extern texture_type img_money_left[2];
51 extern texture_type img_money_right[2];
52 extern texture_type img_mrbomb_left[4];
53 extern texture_type img_mrbomb_right[4];
54 extern texture_type img_stalactite;
55 extern texture_type img_stalactite_broken;
56 extern texture_type img_flame[2];
69 BadGuyKind badguykind_from_string(const std::string& str);
70 std::string badguykind_to_string(BadGuyKind kind);
71 void load_badguy_gfx();
72 void free_badguy_gfx();
80 BadGuyData(BadGuyKind kind_, int x_, int y_)
81 : kind(kind_), x(x_), y(y_) {}
84 : kind(BAD_BSOD), x(0), y(0) {}
104 void init(float x, float y, BadGuyKind kind);
109 void collision(void* p_c_object, int c_object,
110 CollisionType type = COLLISION_NORMAL);
113 void fall(bool dojump=false);
119 void action_laptop();
128 void action_mrbomb();
131 void action_stalactite();
132 void draw_stalactite();
137 void make_player_jump(Player* player);
138 void check_horizontal_bump(bool checkcliff = false);
140 void squich(Player* player);
143 #endif /*SUPERTUX_BADGUY_H*/