From 7b956089e6ba5162fb0b667f1c0a60f6ece90c38 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Thu, 15 Dec 2022 12:59:19 +0100 Subject: added drops --- include/drops.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 include/drops.h (limited to 'include/drops.h') 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 + +#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 -- cgit v1.2.3-70-g09d2