root / proj / include / ent.h @ 231
History | View | Annotate | Download (2.28 KB)
1 | 193 | up20180642 | #ifndef ENT_H_INCLUDED
|
---|---|---|---|
2 | #define ENT_H_INCLUDED
|
||
3 | |||
4 | #include "sprite.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 | 201 | up20180642 | struct gunner;
|
15 | typedef struct gunner gunner_t; |
||
16 | gunner_t* (gunner_ctor)(basic_sprite_t *dude, basic_sprite_t *weapon); |
||
17 | void (gunner_dtor)(gunner_t *p);
|
||
18 | 229 | up20180655 | void (gunner_set_pos) (gunner_t *p, double x, double y); |
19 | void (gunner_set_angle) (gunner_t *p, double angle ); |
||
20 | void (gunner_set_health) (gunner_t *p, int health); |
||
21 | void (gunner_set_curr_health) (gunner_t *p, int health); |
||
22 | double (gunner_get_x) (const gunner_t *p); |
||
23 | double (gunner_get_y) (const gunner_t *p); |
||
24 | 231 | up20180655 | double (gunner_get_angle) (const gunner_t *p); |
25 | 229 | up20180655 | int (gunner_get_health) (const gunner_t *p); |
26 | int (gunner_get_curr_health) (const gunner_t *p); |
||
27 | int16_t (gunner_get_x_screen) (const gunner_t *p);
|
||
28 | int16_t (gunner_get_y_screen) (const gunner_t *p);
|
||
29 | 201 | up20180642 | void (gunner_draw)(gunner_t *p);
|
30 | 229 | up20180655 | void (gunner_draw_health)(const gunner_t *p); |
31 | 193 | up20180642 | |
32 | 201 | up20180642 | struct bullet;
|
33 | typedef struct bullet bullet_t; |
||
34 | 227 | up20180642 | bullet_t* (bullet_ctor)(basic_sprite_t *b, double x, double y, double vx, double vy); |
35 | 203 | up20180642 | void (bullet_dtor)(bullet_t *p);
|
36 | double (bullet_get_x) (const bullet_t *p); |
||
37 | double (bullet_get_y) (const bullet_t *p); |
||
38 | int16_t (bullet_get_x_screen)(const bullet_t *p);
|
||
39 | int16_t (bullet_get_y_screen)(const bullet_t *p);
|
||
40 | 230 | up20180655 | int (bullet_get_damage) (const bullet_t *p); |
41 | void (bullet_set_damage) (bullet_t *p, int damage); |
||
42 | 226 | up20180642 | void (bullet_update_movement)(bullet_t *p);
|
43 | 231 | up20180655 | void (bullet_update_movement_list)(list_t *bullet_list);
|
44 | 203 | up20180642 | void (bullet_draw)(bullet_t *p);
|
45 | 231 | up20180655 | void (bullet_draw_list)(list_t *bullet_list);
|
46 | 229 | up20180655 | void (gunner_draw_health)(const gunner_t *p); |
47 | 193 | up20180642 | |
48 | 216 | up20180642 | struct map;
|
49 | typedef struct map map_t; |
||
50 | map_t* (map_ctor)(const char **background, const char **collide); |
||
51 | void (map_dtor)(map_t *p);
|
||
52 | 220 | up20180655 | int (map_collides_point)(const map_t *p, double x, double y); |
53 | 226 | up20180642 | int (map_collides_gunner)(const map_t *p, const gunner_t *gunner); |
54 | int (map_collides_bullet)(const map_t *p, const bullet_t *bullet); |
||
55 | 228 | up20180655 | int (gunner_collides_bullet)(const gunner_t *shooter, const bullet_t *bull); |
56 | 216 | up20180642 | void (map_draw)(map_t *p);
|
57 | |||
58 | 193 | up20180642 | #endif //ENT_H_INCLUDED |