From cd89b5b3fc2d25b401fb8d6dc6ea4e0337e28fa2 Mon Sep 17 00:00:00 2001 From: Reimar Date: Tue, 2 Dec 2014 22:59:07 +0100 Subject: Added Tobicompatibility --- JnR.cpp | 5 +---- Makefile | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/JnR.cpp b/JnR.cpp index b0d5d53..9cc3e61 100644 --- a/JnR.cpp +++ b/JnR.cpp @@ -109,9 +109,6 @@ Label::~Label() SDL_FreeSurface(image); } */ -vector dirx = {1,0,-1,0}; -vector diry = {0,1,0,-1}; - int xres = 600; int yres = 450; @@ -433,7 +430,7 @@ int main() { x_pos = x_pos + x_vel/60.0; y_pos = y_pos + y_vel/60.0; - drawCircle(screen, xres/4, abs(yres-y_pos), ball_rad, 100, 100, 100); + drawCircle(screen, xres/4, fabs(yres-y_pos), ball_rad, 100, 100, 100); } right = -keyState[SDLK_LEFT]+keyState[SDLK_RIGHT]; diff --git a/Makefile b/Makefile index 812fc56..11e46ce 100644 --- a/Makefile +++ b/Makefile @@ -3,4 +3,4 @@ all: JnR JnR: JnR.cpp - g++ JnR.cpp -O2 -Wall -lSDL -std=c++11 -o JnR + g++ JnR.cpp -O2 -Wall -lSDL -o JnR -- cgit v1.2.3