diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2025-04-05 18:36:45 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2025-04-05 18:36:45 +0100 |
commit | 1c805d096248db7184b7d935f008ab5ae49a714e (patch) | |
tree | be953f7bb2614eacdcd742149eae80d6ac4f6e57 /src/all.c | |
parent | 75d3e5ed4616eb381ae299ea731be739c8629258 (diff) | |
download | ldjam57-1c805d096248db7184b7d935f008ab5ae49a714e.tar |
Fix grid not being offset
Diffstat (limited to 'src/all.c')
-rw-r--r-- | src/all.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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, |