root / proj / include / ent.h @ 336
History | View | Annotate | Download (3.38 KB)
1 |
#ifndef ENT_H_INCLUDED
|
---|---|
2 |
#define ENT_H_INCLUDED
|
3 |
|
4 |
#include "basic_sprite.h" |
5 |
#include "list.h" |
6 |
|
7 |
void (ent_set_scale) (double n); |
8 |
void (ent_set_origin)(double x, double y); |
9 |
|
10 |
double (ent_get_scale) (void); |
11 |
double (ent_get_XLength)(void); |
12 |
double (ent_get_YLength)(void); |
13 |
|
14 |
#define GUNNER_MELEE BIT(0) |
15 |
#define GUNNER_RANGED BIT(1) |
16 |
#define GUNNER_PLAYER BIT(2) |
17 |
#define GUNNER_FOLLOW BIT(3) |
18 |
|
19 |
typedef struct gunner gunner_t; |
20 |
gunner_t* (gunner_ctor)(basic_sprite_t *dude, basic_sprite_t *weapon, uint16_t type, int team);
|
21 |
void (gunner_dtor)(gunner_t *p);
|
22 |
void (gunner_set_pos) (gunner_t *p, double x, double y); |
23 |
void (gunner_set_spawn) (gunner_t *p, double x, double y); |
24 |
void (gunner_set_angle) (gunner_t *p, double angle ); |
25 |
void (gunner_set_health) (gunner_t *p, double health); |
26 |
void (gunner_set_curr_health) (gunner_t *p, double health); |
27 |
double (gunner_get_x) (const gunner_t *p); |
28 |
double (gunner_get_y) (const gunner_t *p); |
29 |
double (gunner_get_spawn_x) (const gunner_t *p); |
30 |
double (gunner_get_spawn_y) (const gunner_t *p); |
31 |
double (gunner_get_angle) (const gunner_t *p); |
32 |
double (gunner_get_health) (const gunner_t *p); |
33 |
double (gunner_get_curr_health) (const gunner_t *p); |
34 |
int16_t (gunner_get_x_screen) (const gunner_t *p);
|
35 |
int16_t (gunner_get_y_screen) (const gunner_t *p);
|
36 |
uint16_t (gunner_get_type) (const gunner_t *p);
|
37 |
int (gunner_get_team) (const gunner_t *p); |
38 |
void (gunner_draw)(gunner_t *p);
|
39 |
void (gunner_draw_health)(const gunner_t *p); |
40 |
|
41 |
double (gunner_distance)(const gunner_t *p1, const gunner_t *p2); |
42 |
|
43 |
typedef struct bullet bullet_t; |
44 |
bullet_t* (bullet_ctor)(const gunner_t *shooter, const basic_sprite_t *b, double x, double y, double vx, double vy); |
45 |
void (bullet_dtor)(bullet_t *p);
|
46 |
double (bullet_get_x) (const bullet_t *p); |
47 |
double (bullet_get_y) (const bullet_t *p); |
48 |
double (bullet_get_vx) (const bullet_t *p); |
49 |
double (bullet_get_vy) (const bullet_t *p); |
50 |
int16_t (bullet_get_x_screen)(const bullet_t *p);
|
51 |
int16_t (bullet_get_y_screen)(const bullet_t *p);
|
52 |
double (bullet_get_damage) (const bullet_t *p); |
53 |
void (bullet_set_damage) (bullet_t *p, double damage); |
54 |
const gunner_t* (bullet_get_shooter)(const bullet_t *p); |
55 |
void (bullet_update_movement)(bullet_t *p);
|
56 |
void (bullet_update_movement_list)(list_t *bullet_list);
|
57 |
void (bullet_draw)(bullet_t *p);
|
58 |
|
59 |
void (gunner_draw_list)(list_t *shooter_list);
|
60 |
void (bullet_draw_list)(list_t *bullet_list);
|
61 |
void (gunner_draw_health)(const gunner_t *p); |
62 |
|
63 |
typedef struct map map_t; |
64 |
map_t* (map_ctor)(const char *const *background, const char *const *collide); |
65 |
void (map_dtor)(map_t *p);
|
66 |
int (map_collides_point)(const map_t *p, double x, double y); |
67 |
int (map_collides_gunner)(const map_t *p, const gunner_t *gunner); |
68 |
int (map_collides_bullet)(const map_t *p, const bullet_t *bullet); |
69 |
uint16_t (map_get_width) (const map_t *p);
|
70 |
uint16_t (map_get_height) (const map_t *p);
|
71 |
int (map_make_dijkstra)(map_t *p, double x_, double y_); |
72 |
int (map_where_to_follow)(const map_t *p, double x, double y, double *theta); |
73 |
int (gunner_collides_bullet)(const gunner_t *shooter, const bullet_t *bull); |
74 |
double (distance_gunners)(const gunner_t *shooter1, const gunner_t *shooter2); |
75 |
int (gunner_collides_gunner)(const gunner_t *shooter1, const gunner_t *shooter2); |
76 |
void (map_draw)(map_t *p);
|
77 |
|
78 |
#endif //ENT_H_INCLUDED |