22 lines
400 B
C
22 lines
400 B
C
#ifndef BALL_H
|
|
#define BALL_H
|
|
|
|
#define BALL_WIDTH 15
|
|
#define BALL_SPEED 1000
|
|
|
|
struct ball
|
|
{
|
|
int x_location;
|
|
int y_location;
|
|
int width;
|
|
int speed;
|
|
float x_direction;
|
|
float y_direction;
|
|
};
|
|
|
|
struct ball* ball_init(int x_location, int y_location, int width, int speed);
|
|
struct game_data;
|
|
void ball_update(struct game_data* data, struct ball* ball, float dt);
|
|
|
|
#endif /* BALL_H */
|