Revision 321
correcting some problems
ent.h | ||
---|---|---|
11 | 11 |
double (ent_get_XLength)(void); |
12 | 12 |
double (ent_get_YLength)(void); |
13 | 13 |
|
14 |
typedef enum { |
|
15 |
gunner_melee = BIT(0), |
|
16 |
gunner_ranged = BIT(1), |
|
17 |
gunner_player = BIT(2), |
|
18 |
gunner_follow = BIT(3) |
|
19 |
} gunner_type; |
|
14 |
#define GUNNER_MELEE BIT(0) |
|
15 |
#define GUNNER_RANGED BIT(1) |
|
16 |
#define GUNNER_PLAYER BIT(2) |
|
17 |
#define GUNNER_FOLLOW BIT(3) |
|
20 | 18 |
|
21 | 19 |
struct gunner; |
22 | 20 |
typedef struct gunner gunner_t; |
23 |
gunner_t* (gunner_ctor)(basic_sprite_t *dude, basic_sprite_t *weapon, gunner_type type, int team);
|
|
21 |
gunner_t* (gunner_ctor)(basic_sprite_t *dude, basic_sprite_t *weapon, uint16_t type, int team);
|
|
24 | 22 |
void (gunner_dtor)(gunner_t *p); |
25 | 23 |
void (gunner_set_pos) (gunner_t *p, double x, double y); |
26 | 24 |
void (gunner_set_spawn) (gunner_t *p, double x, double y); |
... | ... | |
36 | 34 |
double (gunner_get_curr_health) (const gunner_t *p); |
37 | 35 |
int16_t (gunner_get_x_screen) (const gunner_t *p); |
38 | 36 |
int16_t (gunner_get_y_screen) (const gunner_t *p); |
39 |
gunner_type (gunner_get_type) (const gunner_t *p);
|
|
37 |
uint16_t (gunner_get_type) (const gunner_t *p);
|
|
40 | 38 |
int (gunner_get_team) (const gunner_t *p); |
41 | 39 |
void (gunner_draw)(gunner_t *p); |
42 | 40 |
void (gunner_draw_health)(const gunner_t *p); |
... | ... | |
66 | 64 |
|
67 | 65 |
struct map; |
68 | 66 |
typedef struct map map_t; |
69 |
map_t* (map_ctor)(const char **background, const char **collide);
|
|
67 |
map_t* (map_ctor)(const char *const *background, const char *const *collide);
|
|
70 | 68 |
void (map_dtor)(map_t *p); |
71 | 69 |
int (map_collides_point)(const map_t *p, double x, double y); |
72 | 70 |
int (map_collides_gunner)(const map_t *p, const gunner_t *gunner); |
73 | 71 |
int (map_collides_bullet)(const map_t *p, const bullet_t *bullet); |
74 | 72 |
int16_t (map_get_width) (const map_t *p); |
75 | 73 |
int16_t (map_get_height) (const map_t *p); |
76 |
int (map_make_dijkstra)(map_t *p, int16_t x, int16_t y);
|
|
77 |
int (map_where_to_follow)(const map_t *p, float x, float y, float *theta);
|
|
74 |
int (map_make_dijkstra)(map_t *p, double x_, double y_);
|
|
75 |
int (map_where_to_follow)(const map_t *p, double x, double y, double *theta);
|
|
78 | 76 |
int (gunner_collides_bullet)(const gunner_t *shooter, const bullet_t *bull); |
79 | 77 |
double (distance_gunners)(const gunner_t *shooter1, const gunner_t *shooter2); |
80 | 78 |
int (gunner_collides_gunner)(const gunner_t *shooter1, const gunner_t *shooter2); |
Also available in: Unified diff