root / proj / include / ent.h @ 320
History | View | Annotate | Download (3.42 KB)
1 | 193 | up20180642 | #ifndef ENT_H_INCLUDED
|
---|---|---|---|
2 | #define ENT_H_INCLUDED
|
||
3 | |||
4 | 286 | up20180642 | #include "graph.h" |
5 | 231 | up20180655 | #include "list.h" |
6 | 193 | up20180642 | |
7 | void (ent_set_scale) (double n); |
||
8 | void (ent_set_origin)(double x, double y); |
||
9 | |||
10 | 194 | up20180642 | double (ent_get_scale) (void); |
11 | 193 | up20180642 | double (ent_get_XLength)(void); |
12 | double (ent_get_YLength)(void); |
||
13 | |||
14 | 301 | up20180642 | typedef enum { |
15 | 305 | up20180642 | gunner_melee = BIT(0),
|
16 | gunner_ranged = BIT(1),
|
||
17 | gunner_player = BIT(2),
|
||
18 | gunner_follow = BIT(3)
|
||
19 | 301 | up20180642 | } gunner_type; |
20 | |||
21 | 201 | up20180642 | struct gunner;
|
22 | typedef struct gunner gunner_t; |
||
23 | 302 | up20180642 | gunner_t* (gunner_ctor)(basic_sprite_t *dude, basic_sprite_t *weapon, gunner_type type, int team);
|
24 | 201 | up20180642 | void (gunner_dtor)(gunner_t *p);
|
25 | 229 | up20180655 | void (gunner_set_pos) (gunner_t *p, double x, double y); |
26 | 236 | up20180642 | void (gunner_set_spawn) (gunner_t *p, double x, double y); |
27 | 229 | up20180655 | void (gunner_set_angle) (gunner_t *p, double angle ); |
28 | 267 | up20180655 | void (gunner_set_health) (gunner_t *p, double health); |
29 | void (gunner_set_curr_health) (gunner_t *p, double health); |
||
30 | 229 | up20180655 | double (gunner_get_x) (const gunner_t *p); |
31 | double (gunner_get_y) (const gunner_t *p); |
||
32 | 232 | up20180655 | double (gunner_get_spawn_x) (const gunner_t *p); |
33 | double (gunner_get_spawn_y) (const gunner_t *p); |
||
34 | 231 | up20180655 | double (gunner_get_angle) (const gunner_t *p); |
35 | 267 | up20180655 | double (gunner_get_health) (const gunner_t *p); |
36 | double (gunner_get_curr_health) (const gunner_t *p); |
||
37 | 229 | up20180655 | int16_t (gunner_get_x_screen) (const gunner_t *p);
|
38 | int16_t (gunner_get_y_screen) (const gunner_t *p);
|
||
39 | 301 | up20180642 | gunner_type (gunner_get_type) (const gunner_t *p);
|
40 | 302 | up20180642 | int (gunner_get_team) (const gunner_t *p); |
41 | 201 | up20180642 | void (gunner_draw)(gunner_t *p);
|
42 | 229 | up20180655 | void (gunner_draw_health)(const gunner_t *p); |
43 | 193 | up20180642 | |
44 | 302 | up20180642 | double (gunner_distance)(const gunner_t *p1, const gunner_t *p2); |
45 | |||
46 | 201 | up20180642 | struct bullet;
|
47 | typedef struct bullet bullet_t; |
||
48 | 237 | up20180642 | bullet_t* (bullet_ctor)(const gunner_t *shooter, const basic_sprite_t *b, double x, double y, double vx, double vy); |
49 | 203 | up20180642 | void (bullet_dtor)(bullet_t *p);
|
50 | double (bullet_get_x) (const bullet_t *p); |
||
51 | double (bullet_get_y) (const bullet_t *p); |
||
52 | 320 | up20180655 | double (bullet_get_vx) (const bullet_t *p); |
53 | double (bullet_get_vy) (const bullet_t *p); |
||
54 | 203 | up20180642 | int16_t (bullet_get_x_screen)(const bullet_t *p);
|
55 | int16_t (bullet_get_y_screen)(const bullet_t *p);
|
||
56 | 267 | up20180655 | double (bullet_get_damage) (const bullet_t *p); |
57 | void (bullet_set_damage) (bullet_t *p, double damage); |
||
58 | 302 | up20180642 | const gunner_t* (bullet_get_shooter)(const bullet_t *p); |
59 | 226 | up20180642 | void (bullet_update_movement)(bullet_t *p);
|
60 | 231 | up20180655 | void (bullet_update_movement_list)(list_t *bullet_list);
|
61 | 203 | up20180642 | void (bullet_draw)(bullet_t *p);
|
62 | 248 | up20180655 | |
63 | void (gunner_draw_list)(list_t *shooter_list);
|
||
64 | 231 | up20180655 | void (bullet_draw_list)(list_t *bullet_list);
|
65 | 229 | up20180655 | void (gunner_draw_health)(const gunner_t *p); |
66 | 193 | up20180642 | |
67 | 216 | up20180642 | struct map;
|
68 | typedef struct map map_t; |
||
69 | map_t* (map_ctor)(const char **background, const char **collide); |
||
70 | void (map_dtor)(map_t *p);
|
||
71 | 220 | up20180655 | int (map_collides_point)(const map_t *p, double x, double y); |
72 | 226 | up20180642 | int (map_collides_gunner)(const map_t *p, const gunner_t *gunner); |
73 | int (map_collides_bullet)(const map_t *p, const bullet_t *bullet); |
||
74 | 246 | up20180655 | int16_t (map_get_width) (const map_t *p);
|
75 | int16_t (map_get_height) (const map_t *p);
|
||
76 | 309 | up20180642 | 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); |
||
78 | 228 | up20180655 | int (gunner_collides_bullet)(const gunner_t *shooter, const bullet_t *bull); |
79 | 308 | up20180655 | double (distance_gunners)(const gunner_t *shooter1, const gunner_t *shooter2); |
80 | 233 | up20180655 | int (gunner_collides_gunner)(const gunner_t *shooter1, const gunner_t *shooter2); |
81 | 216 | up20180642 | void (map_draw)(map_t *p);
|
82 | |||
83 | 193 | up20180642 | #endif //ENT_H_INCLUDED |