diff options
| -rw-r--r-- | JnR.cpp | 5 | ||||
| -rw-r--r-- | Makefile | 2 |
2 files changed, 2 insertions, 5 deletions
| @@ -109,9 +109,6 @@ Label::~Label() | |||
| 109 | SDL_FreeSurface(image); | 109 | SDL_FreeSurface(image); |
| 110 | } | 110 | } |
| 111 | */ | 111 | */ |
| 112 | vector<int> dirx = {1,0,-1,0}; | ||
| 113 | vector<int> diry = {0,1,0,-1}; | ||
| 114 | |||
| 115 | 112 | ||
| 116 | int xres = 600; | 113 | int xres = 600; |
| 117 | int yres = 450; | 114 | int 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]; |
| @@ -3,4 +3,4 @@ | |||
| 3 | all: JnR | 3 | all: JnR |
| 4 | 4 | ||
| 5 | JnR: JnR.cpp | 5 | JnR: JnR.cpp |
| 6 | g++ JnR.cpp -O2 -Wall -lSDL -std=c++11 -o JnR | 6 | g++ JnR.cpp -O2 -Wall -lSDL -o JnR |
