diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-29 09:06:10 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-29 09:06:10 +0100 |
| commit | 2bcffc7def20dd1e660d742f54bd97307b9f193d (patch) | |
| tree | 84443fceb1b067549874b4f14e0d4aa36b0630db /include/throwables.h | |
| parent | d2c3f612b3d7b0071e98e589777d495ba45eafe4 (diff) | |
grenade work
Diffstat (limited to 'include/throwables.h')
| -rw-r--r-- | include/throwables.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/throwables.h b/include/throwables.h index 16811b2..2106c94 100644 --- a/include/throwables.h +++ b/include/throwables.h @@ -14,20 +14,27 @@ typedef enum t_throwable_type THROWABLE_GRENADE, } throwable_type; +typedef enum t_throwable_state +{ + THROWABLE_FLYING, + THROWABLE_EXPLODED, +} throwable_state; + typedef struct t_throwable { u32 player_id; bool active; + throwable_state state; throwable_type type; vec3f position; vec3f direction; float alive_time; int bounces; + sprite sprite; } 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); |
