diff --git a/src/sbre/models.cpp b/src/sbre/models.cpp index 084164c..c6b279e 100644 --- a/src/sbre/models.cpp +++ b/src/sbre/models.cpp @@ -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, }; diff --git a/src/sbre/primfunc.cpp b/src/sbre/primfunc.cpp index 9f75bed..f7a7973 100644 --- a/src/sbre/primfunc.cpp +++ b/src/sbre/primfunc.cpp @@ -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);