summaryrefslogtreecommitdiff
path: root/in_practice/breakout/ball.h
blob: 60654a340b69083ef04fea3fc5d5434dd84441d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef BALL_H
#define BALL_H

#include "object.h"
#include "types.h"

struct ball {
	struct object o;
	f32 radius;
	i32 stuck;
	i32 sticky;
	i32 pass;
};

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