diff options
author | Charadon <dev@iotib.net> | 2022-05-30 22:18:05 -0400 |
---|---|---|
committer | Charadon <dev@iotib.net> | 2022-05-30 22:18:05 -0400 |
commit | ca6e7eb99e864ff662b2e14e6f9679e293ec17d8 (patch) | |
tree | f455ab47c3af47b7d3e3bc1971eace9e5299b4c8 | |
parent | d50c22c29464f0e1f69d00627984295278b3a634 (diff) | |
download | Pong-C-ca6e7eb99e864ff662b2e14e6f9679e293ec17d8.tar.gz |
Fix potential undefined behavior
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | src/main.c | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/Makefile b/Makefile index f9e7343..8f8e59f 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,7 @@ install_flatpak: clean: rm -fv *.o rm -fv pong - rm -rf .flatpak-builder - rm -rf flatpak + rm -rf .flatpak-builder/ + rm -rf flatpak/ + rm -rf *.flatpak cd raylib/src && $(MAKE) clean diff --git a/src/main.c b/src/main.c index 280b16c..89422ba 100644 --- a/src/main.c +++ b/src/main.c @@ -108,6 +108,7 @@ int main() { // Init Player Variables struct Players Player; + Player.Y = 0; Player.Score = 0; char PlayerScore[50]; // Used later to display score on screen. @@ -136,9 +137,6 @@ int main() { Ball.HitBox = (Rectangle){Ball.X, Ball.Y, BallSprite.width, BallSprite.height}; Enemy.BallDetector = (Rectangle){0, Enemy.Y+120, 1280, PaddleSprite.height/5.0f}; - // Debug - Player.Y = 200; - // Initialize Internal Clock thrd_t InternalClock; thrd_create(&InternalClock, internal_clock, NULL); |