From a17dcfdcba9f7da5a91c554eef88cea73d6598b0 Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Sun, 14 Jul 2024 13:04:54 -0400 Subject: Redid the Cmake Config and fell back to C17 --- pong.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'pong.h') diff --git a/pong.h b/pong.h index 3bdc715..377c37c 100644 --- a/pong.h +++ b/pong.h @@ -2,11 +2,12 @@ #define PONG_H #include +#include -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 -- cgit v1.2.3