Move ship vertices so origin is closer to visual centre
This commit is contained in:
13
main.c
13
main.c
@@ -37,10 +37,10 @@ static shape_t shapes[MAX_SHAPES] = {
|
|||||||
.entity = SHIP,
|
.entity = SHIP,
|
||||||
.vert_count = 4,
|
.vert_count = 4,
|
||||||
.verts = {
|
.verts = {
|
||||||
{ 0.0, 0.08 },
|
{ 0.0, 0.11 },
|
||||||
{ 0.05, -0.1 },
|
{ 0.05, -0.07 },
|
||||||
{ 0.0, -0.07 },
|
{ 0.0, -0.04 },
|
||||||
{ -0.05, -0.1 },
|
{ -0.05, -0.07 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -48,8 +48,8 @@ static shape_t shapes[MAX_SHAPES] = {
|
|||||||
.entity = SHIP,
|
.entity = SHIP,
|
||||||
.vert_count = 3,
|
.vert_count = 3,
|
||||||
.verts = {
|
.verts = {
|
||||||
{ 0.015, -0.1 },
|
{ 0.015, -0.07 },
|
||||||
{ -0.015, -0.1 },
|
{ -0.015, -0.07 },
|
||||||
{ 0.0, -0.15 },
|
{ 0.0, -0.15 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -164,6 +164,7 @@ static void draw()
|
|||||||
for (unsigned i = 0; i < shape_count; ++i) {
|
for (unsigned i = 0; i < shape_count; ++i) {
|
||||||
if (!shapes[i].visible)
|
if (!shapes[i].visible)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const mat3_t transform = transforms[shapes[i].entity];
|
const mat3_t transform = transforms[shapes[i].entity];
|
||||||
renderer_draw(shapes[i].verts, shapes[i].vert_count, transform);
|
renderer_draw(shapes[i].verts, shapes[i].vert_count, transform);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user