diff --git a/game.c b/game.c index d9ab2a7..fc4f6f4 100644 --- a/game.c +++ b/game.c @@ -92,9 +92,9 @@ get_keys(struct s_game *g) { exit(0); if(g->keys[SDLK_LEFT]) - g->cursor_angle -= 5; + g->cursor_angle -= TO_DEG(3); if(g->keys[SDLK_RIGHT]) - g->cursor_angle += 5; + g->cursor_angle += TO_DEG(3); g->cursor_angle %= ANGLE_MAX; } diff --git a/game.h b/game.h index fa8a2df..c58d3e5 100644 --- a/game.h +++ b/game.h @@ -29,6 +29,7 @@ struct s_game { int cursor_angle; //relative to the polygon center's referential int polygon_type; //Shape int color; + int actual_speed; SDL_Surface *screen; Uint8 *keys; @@ -40,6 +41,7 @@ struct s_obstacle { int thick; int angle; int distance; + int speed; }; diff --git a/main.c b/main.c index 4c741c0..f0466a7 100644 --- a/main.c +++ b/main.c @@ -29,6 +29,7 @@ main(int argc, char *argv[]) //get key //do calcs //collisions + SDL_Delay(10); } return EXIT_SUCCESS;