diff --git a/main.c b/main.c index 4f5390e..a81c921 100644 --- a/main.c +++ b/main.c @@ -27,8 +27,6 @@ start: add_obstacle(&ga, a); - int rotation = 0; - while(1) { SDL_FillRect(ga.screen, NULL, 0); if(!(ga.counter % 28)) { @@ -50,8 +48,7 @@ start: ga.counter++; - ga.general_rotation += rotation; - ga.general_rotation %= ANGLE_MAX; + ga.general_rotation = ga.counter*3; ga.sexual_pulsation = 0.3 * fabs(cos(ga.counter*M_PI/45)) + 1 + 0.3 * fabs(sin(ga.counter*M_PI/90)); diff --git a/polygons.c b/polygons.c index 64c0c4c..f38c55c 100644 --- a/polygons.c +++ b/polygons.c @@ -14,7 +14,7 @@ #include "SDL/SDL.h" SDL_Point -get_hexagon_vertice(struct s_game *g, int faceno, int dist) { //{{{ +get_hexagon_vertice(int faceno, int dist) { //{{{ SDL_Point p1; p1.x = dist * cos((M_PI/3)*faceno); @@ -28,10 +28,10 @@ void draw_hexagon_side(struct s_game *g, int faceno, int dist, int thick, int col) { //{{{ SDL_Point p1, p2, p3, p4; - p1 = get_hexagon_vertice(g, faceno, dist); - p2 = get_hexagon_vertice(g, faceno+1, dist); - p3 = get_hexagon_vertice(g, faceno+1, dist+thick); - p4 = get_hexagon_vertice(g, faceno, dist+thick); + p1 = get_hexagon_vertice(faceno, dist); + p2 = get_hexagon_vertice(faceno+1, dist); + p3 = get_hexagon_vertice(faceno+1, dist+thick); + p4 = get_hexagon_vertice(faceno, dist+thick); SDL_Point points[4] = {to_screen_coords(g, p1), to_screen_coords(g, p2),