- removed unneded typedef's for structs
[supertux.git] / src / badguy.h
index 5f357cc..b30807b 100644 (file)
 #include "SDL.h"
 #include "bitmask.h"
 #include "type.h"
+#include "timer.h"
+#include "texture.h"
+#include "physic.h"
 #include "collision.h"
 
-#define NUM_BAD_GUYS 128
-
 /* Enemy modes: */
 
 #define NORMAL 0
 
 /* Badguy type: */
 
-typedef struct bad_guy_type
-  {
-    int alive;
-    int mode;
-    int dying;
-    int kind;
-    int seen;
-    int dir;
-    int frame;
-    float x;
-    float y;
-    float xm;
-    float ym;
-    float width;
-    float height;
-    unsigned int updated;
-    itop_type it;
-    timer_type timer;
-  }
-bad_guy_type;
+struct bad_guy_type
+{
+  int mode;
+  DyingType dying;
+  int kind;
+  bool seen;
+  int dir;
+  int frame;
+  base_type base;
+  base_type old_base;
+  timer_type timer;
+  physic_type physic;
+};
 
 /* Bad guy kinds: */
 
@@ -58,19 +52,19 @@ enum {
   BAD_MONEY
 };
 
-texture_type img_bsod_squished_left, img_bsod_squished_right,
+extern texture_type img_bsod_squished_left, img_bsod_squished_right,
 img_bsod_falling_left, img_bsod_falling_right,
 img_laptop_flat_left, img_laptop_flat_right,
 img_laptop_falling_left, img_laptop_falling_right;
-texture_type img_bsod_left[4], img_bsod_right[4],
+extern texture_type img_bsod_left[4], img_bsod_right[4],
 img_laptop_left[3], img_laptop_right[3],
 img_money_left[2], img_money_right[2];
 
-bitmask *bm_bsod;
+extern bitmask *bm_bsod;
 
 void badguy_create_bitmasks();
 
-void badguy_init(bad_guy_type* pbad);
+void badguy_init(bad_guy_type* pbad, float x, float y, int kind);
 void badguy_action(bad_guy_type* pbad);
 void badguy_draw(bad_guy_type* pbad);
 void badguy_collision(bad_guy_type* pbad, void* p_c_object, int c_object);