removed accidentally added o file
authorMatthew Owens <matthew@owens.tech>
Thu, 1 Oct 2020 14:58:20 +0000 (15:58 +0100)
committerMatthew Owens <matthew@owens.tech>
Thu, 1 Oct 2020 14:58:20 +0000 (15:58 +0100)
src/main.c
src/main.o [deleted file]

index fb05761..9ce4d31 100644 (file)
@@ -5,6 +5,11 @@
 #include <stdbool.h>
 #include "timestep.h"
 
+typedef struct Vec2d {
+       int x;
+       int y;
+} Vec2d;
+
 typedef struct Colour {
        Uint8 r;
        Uint8 g;
@@ -21,7 +26,7 @@ static SDL_Window *window = NULL;
 static SDL_Renderer *renderer = NULL;
 static const Vec2d windowSize = { 1920, 1080 };
 static bool quit = false;
-static const float speed = 5.f;
+static const float speed = 20.f;
 static const Colour bgClr = { 0x1c, 0x1c, 0x1c, 0xff };
 
 Box pad, ball;
@@ -81,7 +86,8 @@ static bool init()
                return false;
        }
 
-       renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
+       renderer = SDL_CreateRenderer(window, -1,
+                       SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
 
        if(renderer == NULL) {
                COUT_ERR("Couldn't create renderer! SDL_Error: %s", SDL_GetError());
@@ -99,12 +105,13 @@ static void update()
        int nPhysUpdates = 0;
        const Uint8 *keyStates = SDL_GetKeyboardState(NULL);
 
-       ts_update();
 
        while(SDL_PollEvent(&e) != 0){
                if(e.type == SDL_QUIT) { quit = true; }
        }
 
+       ts_update();
+
        while(ts_phys_required(nPhysUpdates)){
                paddle_update(keyStates, 1.f);
                nPhysUpdates++;
diff --git a/src/main.o b/src/main.o
deleted file mode 100644 (file)
index 667fbd2..0000000
Binary files a/src/main.o and /dev/null differ