summaryrefslogtreecommitdiff
path: root/in_practice/breakout/ball.h
diff options
context:
space:
mode:
Diffstat (limited to 'in_practice/breakout/ball.h')
-rw-r--r--in_practice/breakout/ball.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/in_practice/breakout/ball.h b/in_practice/breakout/ball.h
index f33773a..60654a3 100644
--- a/in_practice/breakout/ball.h
+++ b/in_practice/breakout/ball.h
@@ -4,13 +4,21 @@
#include "object.h"
#include "types.h"
-typedef struct {
- object_t o;
+struct ball {
+ struct object o;
f32 radius;
i32 stuck;
-} ball_t;
+ i32 sticky;
+ i32 pass;
+};
-extern void move_ball(ball_t *ball, f32 dt, i32 width);
-extern void reset_ball(ball_t *ball, v2 pos, v2 vel);
+struct collision {
+ i32 collide;
+ direction_enum dir;
+ v2 diff;
+};
+
+void move_ball(struct ball *ball, f32 dt, i32 width);
+struct collision check_ball_collision(struct ball ball, struct object obj);
#endif