[Add] There is no denying being dead now with this lovely model.

[Fix] Fixed a scaling bug.
This commit is contained in:
Rtch90 2017-11-15 16:02:12 +00:00
parent 6c1b4e5dfd
commit 0fa35be152
2 changed files with 35 additions and 1 deletions

View File

@ -1246,6 +1246,37 @@ static Thruster wing2thruster[] = {
static Model wing2model = { 1.0f, 23, wing2vtx1, 30, 0, wing2vtx2,
0, 0, 2, wing2thruster, wing2data, 2 };
static PlainVertex tombstonevtx1[] = {
{ VTYPE_PLAIN, { 0.6f, 1.0f, -0.1f } }, /* Front quad. */
{ VTYPE_PLAIN, { 0.6f, -1.0f, -0.1f } } ,
{ VTYPE_PLAIN, { -0.6f, -1.0f, -0.1f } },
{ VTYPE_PLAIN, { -0.6f, 1.0f, -0.1f } },
{ VTYPE_PLAIN, { 0, 1, 0.1 } }, /* Cylinder. */
{ VTYPE_PLAIN, { 0, 1, -0.1 } },
{ VTYPE_PLAIN, { 0.6f, 1.0f, 0.1f } }, /* Rear quad. */
{ VTYPE_PLAIN, { 0.6f, -1.0f, 0.1f } },
{ VTYPE_PLAIN, { -0.6f, -1.0f, 0.1f } },
{ VTYPE_PLAIN, { -0.6f, 1.0f, 0.1f } },
{ VTYPE_PLAIN, { -0.5f, 0.8, -0.1 } }, /* Text start. */
};
static uint16 tombstonedata[] = {
PTYPE_MATFIXED, 50, 50, 50, 0, 0, 0, 100, 0, 0, 0,
PTYPE_QUADFLAT, 6, 7, 8, 9,
PTYPE_QUADFLAT, 15, 14, 13, 12,
PTYPE_QUADFLAT, 6, 12, 13, 7,
PTYPE_QUADFLAT, 9, 8, 14, 15,
PTYPE_QUADFLAT, 8, 7, 13, 14,
PTYPE_CYLINDER, 0x8000, 16, 10, 11, 1, 60,
PTYPE_MATFIXED, 100, 0, 0, 0, 0, 0, 100, 0, 0, 0,
PTYPE_ZBIAS, 5, 5,
PTYPE_TEXT, 0, 0x8000, 16, 5, 0, 0, 0, 30,
PTYPE_END
};
static Model tombstonemodel = { 10.0f, 17, tombstonevtx1, 17, 0, 0,
0, 0, 0, 0, tombstonedata, 1 };
Model* ppModel[] = {
&ship5model,
&wing2model,
@ -1262,6 +1293,8 @@ Model* ppModel[] = {
&station1model,
&ship3model,
&ship4model,
/* 0x10. */
&tombstonemodel,
0,
};

View File

@ -569,7 +569,7 @@ static int PrimFuncText (uint16 *pData, Model *pMod, RState *pState)
{
if (!glfinit) {
GLFTInit ();
pFace = new FontFace ("arial.ttf");
pFace = new FontFace ("font.ttf");
glfinit = 1;
}
@ -590,6 +590,7 @@ static int PrimFuncText (uint16 *pData, Model *pMod, RState *pState)
VecMul (&v2, pData[7]*0.01f, &pos);
VecAdd (&pos, &tv, &tv);
VecAdd (pState->pVtx+pData[3], &tv, &tv);
VecMul(&tv, pState->scale, &tv);
MatVecMult (&pState->objorient, &tv, &pos);
VecAdd (&pos, &pState->objpos, &pos);