blob: 027dd0c380d16c8903bb522c6e6b12ce75e0ea50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#pragma once
#include "rodeo.h"
#include "rodeo/collision.h"
typedef
struct
{
world_id id;
rodeo_color_RGBAFloat_t color;
}
bullet_t;
#define i_val bullet_t
#define i_opt c_no_cmp
#include "stc/cvec.h"
void
init_bullets(void);
void
deinit_bullets(void);
#define bullets_init_do() \
mrodeo_defer_do( \
init_bullets(), \
deinit_bullets() \
)
void
reset_bullets(void);
bullet_t *
spawn_bullet(
float x,
float y,
float dx,
float dy,
rodeo_collision_2d_world_t *bullet_world,
rodeo_color_RGBAFloat_t color
);
void
move_bullets(void);
bullet_t*
get_bullet_by_id(
world_id id
);
void
draw_bullets(void);
rodeo_collision_2d_world_t *
get_enemy_bullet_world(void);
rodeo_collision_2d_world_t *
get_player_bullet_world(void);
void
bullet_destroy(
cvec_bullet_t_value* bullet
);
void
detect_bullet_wall_collisions(void);
|