-
Notifications
You must be signed in to change notification settings - Fork 0
/
ball.h
38 lines (32 loc) · 888 Bytes
/
ball.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef MY_AWESOME_PROJECT_BALL_H
#define MY_AWESOME_PROJECT_BALL_H
Font font;
typedef struct Ball{
double xpos;
double ypos;
double vy;
double vx;
double gravity;
double bounce;
int radius;
int HP;
bool visible;
struct Ball *next;
}Ball;
extern Ball *balls;
typedef struct BallProperties{
int ballNumber; //number of balls on the playfield at a time
int ballNumber_current;
int balls_destroyed;
int damageDealt;
}BallProperties;
BallProperties ballProps;
void spawnBall ();
void freeList_ball ();
Ball *freeBalls_dead (Ball *head);
void ballBounce (Ball *ball, bool gravity);
void collisionWall (Ball *head);
void updateBalls (Ball *head);
void applyPhysics_Balls (Ball *head);
void renderBalls ();
#endif //MY_AWESOME_PROJECT_BALL_H