Project

General

Profile

Statistics
| Revision:

root / proj / include / ent.h @ 229

History | View | Annotate | Download (2 KB)

1
#ifndef ENT_H_INCLUDED
2
#define ENT_H_INCLUDED
3

    
4
#include "sprite.h"
5

    
6
void (ent_set_scale) (double n);
7
void (ent_set_origin)(double x, double y);
8

    
9
double (ent_get_scale)  (void);
10
double (ent_get_XLength)(void);
11
double (ent_get_YLength)(void);
12

    
13
struct gunner;
14
typedef struct gunner gunner_t;
15
gunner_t* (gunner_ctor)(basic_sprite_t *dude, basic_sprite_t *weapon);
16
void      (gunner_dtor)(gunner_t *p);
17
void (gunner_set_pos)               (gunner_t *p, double x, double y);
18
void (gunner_set_angle)             (gunner_t *p, double angle      );
19
void (gunner_set_health)            (gunner_t *p, int health);
20
void (gunner_set_curr_health)       (gunner_t *p, int health);
21
double  (gunner_get_x)              (const gunner_t *p);
22
double  (gunner_get_y)              (const gunner_t *p);
23
int     (gunner_get_health)         (const gunner_t *p);
24
int     (gunner_get_curr_health)    (const gunner_t *p);
25
int16_t (gunner_get_x_screen)       (const gunner_t *p);
26
int16_t (gunner_get_y_screen)       (const gunner_t *p);
27
void (gunner_draw)(gunner_t *p);
28
void (gunner_draw_health)(const gunner_t *p);
29

    
30
struct bullet;
31
typedef struct bullet bullet_t;
32
bullet_t* (bullet_ctor)(basic_sprite_t *b, double x, double y, double vx, double vy);
33
void      (bullet_dtor)(bullet_t *p);
34
double  (bullet_get_x)       (const bullet_t *p);
35
double  (bullet_get_y)       (const bullet_t *p);
36
int16_t (bullet_get_x_screen)(const bullet_t *p);
37
int16_t (bullet_get_y_screen)(const bullet_t *p);
38
void (bullet_update_movement)(bullet_t *p);
39
void (bullet_draw)(bullet_t *p);
40
void (gunner_draw_health)(const gunner_t *p);
41

    
42
struct map;
43
typedef struct map map_t;
44
map_t* (map_ctor)(const char **background, const char **collide);
45
void   (map_dtor)(map_t *p);
46
int    (map_collides_point)(const map_t *p, double x, double y);
47
int    (map_collides_gunner)(const map_t *p, const gunner_t *gunner);
48
int    (map_collides_bullet)(const map_t *p, const bullet_t *bullet);
49
int (gunner_collides_bullet)(const gunner_t *shooter, const bullet_t *bull);
50
void   (map_draw)(map_t *p);
51

    
52
#endif //ENT_H_INCLUDED