diff options
Diffstat (limited to 'pong.h')
| -rw-r--r-- | pong.h | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -2,11 +2,12 @@ #define PONG_H #include <stdint.h> +#include <stdbool.h> -constexpr int PADDLE_WIDTH = 16; -constexpr int PADDLE_HEIGHT = 128; -constexpr int BALL_WIDTH = 16; -constexpr int BALL_HEIGHT = 16; +#define PADDLE_WIDTH 16 +#define PADDLE_HEIGHT 128 +#define BALL_WIDTH 16 +#define BALL_HEIGHT 16 typedef struct vector_t { int32_t x; @@ -24,12 +25,12 @@ struct moveable_t { typedef struct moveable_t ball_t; typedef struct moveable_t paddle_t; -void UpdatePosition ( vector_t * const position, const vector_t velocity ); -bool CheckMoveableCollision ( const struct moveable_t m1, const struct moveable_t m2 ); -bool CheckLeftWallCollision ( const struct moveable_t m ); -bool CheckRightWallCollision ( const struct moveable_t m ); -bool CheckGroundCollision ( const struct moveable_t m ); -bool CheckCeilingCollision ( const struct moveable_t m ); -void Reset ( ball_t * const ball ); +void UpdatePosition(vector_t * const position, const vector_t velocity); +bool CheckMoveableCollision(const struct moveable_t m1, const struct moveable_t m2); +bool CheckLeftWallCollision(const struct moveable_t m); +bool CheckRightWallCollision(const struct moveable_t m); +bool CheckGroundCollision(const struct moveable_t m); +bool CheckCeilingCollision(const struct moveable_t m); +void Reset(ball_t * const ball); #endif //PONG_H |
