Project

General

Profile

Revision 339

more changes

View differences:

ent.h
1 1
#ifndef ENT_H_INCLUDED
2 2
#define ENT_H_INCLUDED
3 3

  
4
/**
5
 * @defgroup ent ent
6
 * @brief Entities module
7
 *
8
 * @{
9
 */
10

  
4 11
#include "basic_sprite.h"
5 12
#include "list.h"
6 13

  
......
11 18
double (ent_get_XLength)(void);
12 19
double (ent_get_YLength)(void);
13 20

  
21
/**
22
 * @}
23
 */
24

  
25
/**
26
 * @defgroup gunner_t gunner_t
27
 * @ingroup ent
28
 * @brief Gunner module.
29
 *
30
 * @{
31
 */
32

  
14 33
#define GUNNER_MELEE    BIT(0)
15 34
#define GUNNER_RANGED   BIT(1)
16 35
#define GUNNER_PLAYER   BIT(2)
......
37 56
int     (gunner_get_team)           (const gunner_t *p);
38 57
void (gunner_draw)(gunner_t *p);
39 58
void (gunner_draw_health)(const gunner_t *p);
40

  
59
void (gunner_draw_list)(list_t *shooter_list);
41 60
double (gunner_distance)(const gunner_t *p1, const gunner_t *p2);
61
int (gunner_collides_gunner)(const gunner_t *shooter1, const gunner_t *shooter2);
42 62

  
63
/**
64
 * @}
65
 */
66

  
67
/**
68
 * @defgroup bullet_t bullet_t
69
 * @ingroup ent
70
 * @brief Bullet module.
71
 *
72
 * @{
73
 */
74

  
43 75
typedef struct bullet bullet_t;
44 76
bullet_t* (bullet_ctor)(const gunner_t *shooter, const basic_sprite_t *b, double x, double y, double vx, double vy);
45 77
void      (bullet_dtor)(bullet_t *p);
......
55 87
void (bullet_update_movement)(bullet_t *p);
56 88
void (bullet_update_movement_list)(list_t *bullet_list);
57 89
void (bullet_draw)(bullet_t *p);
58

  
59
void (gunner_draw_list)(list_t *shooter_list);
60 90
void (bullet_draw_list)(list_t *bullet_list);
61
void (gunner_draw_health)(const gunner_t *p);
62 91

  
92
/**
93
 * @}
94
 */
95

  
96
/**
97
 * @defgroup map_t map_t
98
 * @ingroup ent
99
 * @brief Bullet module.
100
 *
101
 * @{
102
 */
103

  
63 104
typedef struct map map_t;
64 105
map_t* (map_ctor)(const char *const *background, const char *const *collide);
65 106
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 107
uint16_t (map_get_width)   (const map_t *p);
70 108
uint16_t (map_get_height)  (const map_t *p);
71 109
int (map_make_dijkstra)(map_t *p, double x_, double y_);
72 110
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 111
void   (map_draw)(map_t *p);
112
int    (map_collides_point)(const map_t *p, double x, double y);
77 113

  
114
/**
115
 * @}
116
 */
117

  
118
int    (map_collides_gunner)(const map_t *p, const gunner_t *gunner);
119
int    (map_collides_bullet)(const map_t *p, const bullet_t *bullet);
120
int (gunner_collides_bullet)(const gunner_t *shooter, const bullet_t *bull);
121

  
78 122
#endif //ENT_H_INCLUDED

Also available in: Unified diff