From 1c805d096248db7184b7d935f008ab5ae49a714e Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Sat, 5 Apr 2025 18:36:45 +0100 Subject: Fix grid not being offset --- src/all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/all.c b/src/all.c index 372690f..028289c 100644 --- a/src/all.c +++ b/src/all.c @@ -115,7 +115,7 @@ static DrawList *render(State *state, UI *ui, Arena *a) { for (int subx = 0; subx < 2; subx++) { for (int suby = 0; suby < 2; suby++) { drawList->els[drawList->len++] = (DrawElement) { - .x = cellWidth * x + subx * cellWidth / 2, + .x = cellWidth * x + GRID_OFFSET_X + subx * cellWidth / 2, .y = cellHeight * y + suby * cellHeight / 2, .w = cellWidth / 2, .h = cellHeight / 2, @@ -128,7 +128,7 @@ static DrawList *render(State *state, UI *ui, Arena *a) { } drawList->els[drawList->len++] = (DrawElement) { - .x = cellWidth * state->goalx, + .x = cellWidth * state->goalx + GRID_OFFSET_X, .y = cellHeight * state->goaly, .w = cellWidth, .h = cellHeight, -- cgit v1.2.3