Move ship vertices so origin is closer to visual centre

This commit is contained in:
Camden Dixie O'Brien
2025-10-13 21:09:37 +01:00
parent 7d876aaf2d
commit f4b2ad38ea

13
main.c
View File

@@ -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);
}