summaryrefslogtreecommitdiffhomepage
path: root/src/bullet.h
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-05-27 16:36:14 -0400
committerrealtradam <[email protected]>2023-05-27 16:36:14 -0400
commit960fcfeb01626555ddb464c306c85e1f295d1d42 (patch)
tree949df7b486a2a2268fdab3b84c889751ac89749f /src/bullet.h
parent3c56ba6253de8f4bca750b61d08a22c5588b8ca5 (diff)
downloadTOJam2023-960fcfeb01626555ddb464c306c85e1f295d1d42.tar.gz
TOJam2023-960fcfeb01626555ddb464c306c85e1f295d1d42.zip
enemies shooting
Diffstat (limited to 'src/bullet.h')
-rw-r--r--src/bullet.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/bullet.h b/src/bullet.h
index f9b57ef..3438291 100644
--- a/src/bullet.h
+++ b/src/bullet.h
@@ -3,15 +3,42 @@
#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);
+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);