diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-27 21:01:21 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-27 21:01:21 +0200 |
| commit | 641f81317a5b5cea6b3c5a4c65b1ca4313b0d8c0 (patch) | |
| tree | 391bb0b6536ca2247a371f16a44249b8a5f963d6 /include/throwables.h | |
| parent | 9d0bb9f229155546fde8b4f666d2682ad5ac606f (diff) | |
audio, add throwable
Diffstat (limited to 'include/throwables.h')
| -rw-r--r-- | include/throwables.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/throwables.h b/include/throwables.h new file mode 100644 index 0000000..7a6d4eb --- /dev/null +++ b/include/throwables.h @@ -0,0 +1,32 @@ +#ifndef INCLUDE_THROWABLES +#define INCLUDE_THROWABLES + +#include <projectbase/project_base.h> + +#include "players.h" +#include "objects.h" +#include "map.h" +#include "guns.h" + +typedef enum t_throwable_type +{ + THROWABLE_GRENADE, +} throwable_type; + +typedef struct t_throwable { + u32 player_id; + bool active; + throwable_type type; + vec3f position; + vec3f direction; + float alive_time; +} throwable; + +throwable throwables[500] = {0}; +int max_throwables = 500; + +void clear_throwables(); +void throw_throwable(platform_window* window, u32 id, throwable_type type, float dirx, float diry); +void draw_throwables(platform_window* window); + +#endif
\ No newline at end of file |
