Fixed some includes, syntax, increased frame rate
This commit is contained in:
parent
51c9eae76f
commit
7f39731cb7
@ -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
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
typedef struct coord {
|
||||
double x;
|
||||
double y;
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user