summaryrefslogtreecommitdiff
path: root/include/throwables.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/throwables.h')
-rw-r--r--include/throwables.h9
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);