about summary refs log tree commit diff stats
path: root/src/versus.c
diff options
context:
space:
mode:
authorCharadon <dev@iotib.net>2022-06-08 19:30:56 -0400
committerCharadon <dev@iotib.net>2022-06-08 19:30:56 -0400
commit21b272f633d8b55c2bf6c6afe24715eff0a4a207 (patch)
tree8c9b2b6a23dc389c94aa7c02a14fc65b353dd85e /src/versus.c
parent1aa1b17557dca5cc870caebcf20f2a24984460d7 (diff)
downloadPong-C-21b272f633d8b55c2bf6c6afe24715eff0a4a207.tar.gz
Begun work on seperating movement logic from framerate of game.
Diffstat (limited to 'src/versus.c')
-rw-r--r--src/versus.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/versus.c b/src/versus.c
index 71e3689..ad0d27e 100644
--- a/src/versus.c
+++ b/src/versus.c
@@ -1,4 +1,9 @@
 #include "pong.h"
+#include <raylib.h>
+
+static void game_thread() {
+	
+}
 
 void versus_main() {
     // Init Player Variables
@@ -42,6 +47,8 @@ void versus_main() {
         MainCamera.offset = (Vector2){0, 0};
         MainCamera.rotation = 0;
 	bool VersusGoing = true;
+	Ball.NextTick = 0;
+	Enemy.NextTick = 0;
     while(VersusGoing == true && GameGoing == true) {
 		
 		if (WindowShouldClose()) { //Quit Game if the window is closed.
@@ -127,6 +134,7 @@ void versus_main() {
 		
 		BeginDrawing();
 			ClearBackground(BLACK);
+			DrawFPS(100, 100);
 			BeginMode2D(MainCamera);
 				DrawRectangle(0, 0, 1280, 720, (Color){20, 20, 20, 255});
 				DrawTexture(PaddleSprite, 0, Player.Y, WHITE);