#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
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;
+ base_type base;
timer_type timer;
+ physic_type physic;
}
bad_guy_type;
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);