From ad04490ef84d7565fbec0fa878a21694ad2d61f0 Mon Sep 17 00:00:00 2001 From: pryazha Date: Tue, 26 Aug 2025 10:55:18 +0500 Subject: guess that's all --- in_practice/breakout/ball.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'in_practice/breakout/ball.h') 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 -- cgit v1.2.3-70-g09d2