diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-15 12:59:19 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-15 12:59:19 +0100 |
| commit | 7b956089e6ba5162fb0b667f1c0a60f6ece90c38 (patch) | |
| tree | 82de31240ad1f1ae77874f07b288fcc39b8948f4 /include/drops.h | |
| parent | 23d2cc231e5b4c015a8471d3035dc07802de23d5 (diff) | |
added drops
Diffstat (limited to 'include/drops.h')
| -rw-r--r-- | include/drops.h | 33 |
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 |
