summaryrefslogtreecommitdiff
path: root/pong.h
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2024-07-14 13:04:54 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2024-07-14 13:04:54 -0400
commita17dcfdcba9f7da5a91c554eef88cea73d6598b0 (patch)
tree8371131c504fd13e88d98dad7d8421f93ceab3b2 /pong.h
parent2957d6c5b970d62e5d3333434b323117aaf97fa9 (diff)
Redid the Cmake Config and fell back to C17master
Diffstat (limited to 'pong.h')
-rw-r--r--pong.h23
1 files changed, 12 insertions, 11 deletions
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 <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