summaryrefslogtreecommitdiff
path: root/include/drops.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drops.h')
-rw-r--r--include/drops.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/drops.h b/include/drops.h
new file mode 100644
index 0000000..e7ab661
--- /dev/null
+++ b/include/drops.h
@@ -0,0 +1,33 @@
+#ifndef INCLUDE_DROPS
+#define INCLUDE_DROPS
+
+#include <projectbase/project_base.h>
+
+#include "guns.h"
+
+typedef enum t_drop_type {
+ DROP_GUN,
+ DROP_AMMO,
+} drop_type;
+
+typedef struct t_drop {
+ bool active;
+ float time_active;
+ vec3f position;
+ vec3f size;
+ float start_h;
+ drop_type type;
+ union {
+ int ammo_count;
+ gun_type gun;
+ } data;
+} drop;
+
+#define MAX_DROPS 50
+drop drops[MAX_DROPS] = {0};
+
+void update_drops();
+void draw_drops(platform_window* window);
+void spawn_drop(vec3f pos);
+
+#endif \ No newline at end of file