Fixed some includes, syntax, increased frame rate

This commit is contained in:
Joe Adams 2018-01-12 10:25:01 +00:00
parent 51c9eae76f
commit 7f39731cb7
4 changed files with 9 additions and 2 deletions

View File

@ -131,7 +131,7 @@ int main(void) {
*/
char subSteps = 1; // Draw every N+1 frames, thereby calculating movement more precisely
int targetFPS = 60; // Limit FPS to this value, to stop unneccessary calculations
int targetFPS = 90; // Limit FPS to this value, to stop unneccessary calculations
char moveX=0; // Toggled between -1, 0 and 1 by keypresses later

View File

@ -1,3 +1,5 @@
typedef struct coord {
double x;
double y;

View File

@ -1,9 +1,13 @@
#ifdef _WIN32
#include <Windows.h>
#include <SDL.h>
#else
#include <SDL2/SDL.h>
#endif
#include <gl/GL.h>
#include <gl/GLU.h>
#include "include/structs.h"
#include "include/paddleAndBall.h"
#include "include/utilityFunctions.h"
void updatePaddle(Uint32 tickrate, paddle *thePaddle, char moveX, int winWidth, int winHeight) {

View File

@ -15,6 +15,7 @@
#include <math.h>
#include "include/structs.h"
#include "include/paddleAndBall.h"
void drawText(const char *text, TTF_Font *font, SDL_Color txtColour, coord loc) {
SDL_Surface *text_surface = TTF_RenderUTF8_Blended(font, text, txtColour);