summaryrefslogtreecommitdiff
path: root/src/main/game/game.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/game/game.c')
-rw-r--r--src/main/game/game.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/game/game.c b/src/main/game/game.c
index 4addcf2..117cf45 100644
--- a/src/main/game/game.c
+++ b/src/main/game/game.c
@@ -20,10 +20,12 @@
#include "../engine/engine.h"
void
-game_draw_field(int box_size, int x, int y)
+game_draw_field(float box_size, float x, float y)
{
- engine_draw_line(box_size, y, box_size, box_size * 3);
- engine_draw_line(box_size * 2, y, box_size * 2, box_size * 3);
- engine_draw_line(x, box_size, box_size * 3, box_size);
- engine_draw_line(x, box_size * 2, box_size * 3, box_size * 2);
+ 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);
+
+ engine_draw_line(x - half_box * 3, y + half_box, x + half_box * 3, y + half_box);
+ engine_draw_line(x - half_box * 3, y - half_box, x + half_box * 3, y - half_box);
}