summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimar <Reimar@Leike.name>2014-12-02 22:59:07 +0100
committerReimar <Reimar@Leike.name>2014-12-02 22:59:07 +0100
commitcd89b5b3fc2d25b401fb8d6dc6ea4e0337e28fa2 (patch)
tree92cda2c2122ad0cd61eb086643c1f0606bee2b9f
parente777b111586e0d049a9e2265f2ff1deec1689c3f (diff)
downloadSpaceCannon-cd89b5b3fc2d25b401fb8d6dc6ea4e0337e28fa2.tar
SpaceCannon-cd89b5b3fc2d25b401fb8d6dc6ea4e0337e28fa2.tar.gz
SpaceCannon-cd89b5b3fc2d25b401fb8d6dc6ea4e0337e28fa2.tar.bz2
SpaceCannon-cd89b5b3fc2d25b401fb8d6dc6ea4e0337e28fa2.tar.xz
SpaceCannon-cd89b5b3fc2d25b401fb8d6dc6ea4e0337e28fa2.zip
Added Tobicompatibility
-rw-r--r--JnR.cpp5
-rw-r--r--Makefile2
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()
109 SDL_FreeSurface(image); 109 SDL_FreeSurface(image);
110} 110}
111*/ 111*/
112vector<int> dirx = {1,0,-1,0};
113vector<int> diry = {0,1,0,-1};
114
115 112
116int xres = 600; 113int xres = 600;
117int yres = 450; 114int yres = 450;
@@ -433,7 +430,7 @@ int main()
433 { 430 {
434 x_pos = x_pos + x_vel/60.0; 431 x_pos = x_pos + x_vel/60.0;
435 y_pos = y_pos + y_vel/60.0; 432 y_pos = y_pos + y_vel/60.0;
436 drawCircle(screen, xres/4, abs(yres-y_pos), ball_rad, 100, 100, 100); 433 drawCircle(screen, xres/4, fabs(yres-y_pos), ball_rad, 100, 100, 100);
437 } 434 }
438 435
439 right = -keyState[SDLK_LEFT]+keyState[SDLK_RIGHT]; 436 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 @@
3all: JnR 3all: JnR
4 4
5JnR: JnR.cpp 5JnR: JnR.cpp
6 g++ JnR.cpp -O2 -Wall -lSDL -std=c++11 -o JnR 6 g++ JnR.cpp -O2 -Wall -lSDL -o JnR