summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/game/game.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/game/game.c b/src/main/game/game.c
index f61671a..7d756a9 100644
--- a/src/main/game/game.c
+++ b/src/main/game/game.c
@@ -37,7 +37,7 @@ init_log(void)
log = log_create("Game");
}
-static void game_draw_field(TrisGame *game, float box_size, float x, float y);
+static void game_draw_field(TrisGame *game, float box_size);
static char game_next_sign(TrisGame *game);
static void
@@ -100,7 +100,7 @@ game_init(int width, int height)
ui_set_title("Tris Game");
engine_set_mouse_button_listener(game_mouse_button_pressed, game);
- game_draw_field(game, 0.5, 0, 0);
+ game_draw_field(game, 0.5f);
return game;
}
@@ -112,8 +112,11 @@ game_start()
}
static void
-game_draw_field(TrisGame *game, float box_size, float x, float y)
+game_draw_field(TrisGame *game, float box_size)
{
+ float x = 0.0f;
+ float y = 0.0f;
+
float half_box = box_size / 2;
engine_draw_line(x - half_box, y + half_box * 3, x - half_box, y - half_box * 3);
engine_draw_line(x + half_box, y + half_box * 3, x + half_box, y - half_box * 3);