From f4b2ad38ead19017559127e7638d3e8c2afc20e7 Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Mon, 13 Oct 2025 21:09:37 +0100 Subject: [PATCH] Move ship vertices so origin is closer to visual centre --- main.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index 974678c..b5ac642 100644 --- a/main.c +++ b/main.c @@ -37,10 +37,10 @@ static shape_t shapes[MAX_SHAPES] = { .entity = SHIP, .vert_count = 4, .verts = { - { 0.0, 0.08 }, - { 0.05, -0.1 }, - { 0.0, -0.07 }, - { -0.05, -0.1 }, + { 0.0, 0.11 }, + { 0.05, -0.07 }, + { 0.0, -0.04 }, + { -0.05, -0.07 }, }, }, { @@ -48,8 +48,8 @@ static shape_t shapes[MAX_SHAPES] = { .entity = SHIP, .vert_count = 3, .verts = { - { 0.015, -0.1 }, - { -0.015, -0.1 }, + { 0.015, -0.07 }, + { -0.015, -0.07 }, { 0.0, -0.15 }, }, }, @@ -164,6 +164,7 @@ static void draw() for (unsigned i = 0; i < shape_count; ++i) { if (!shapes[i].visible) continue; + const mat3_t transform = transforms[shapes[i].entity]; renderer_draw(shapes[i].verts, shapes[i].vert_count, transform); }