Add vertex height vars into the vertex struct, and their textmap parsing.

This commit is contained in:
Nev3r 2020-01-04 10:24:42 +01:00
parent a6926e339f
commit 0b21a34ddd
2 changed files with 14 additions and 0 deletions

View File

@ -1368,6 +1368,16 @@ static void ParseTextmapVertexParameter(UINT32 i, char *param, char *val)
vertexes[i].x = FLOAT_TO_FIXED(atof(val));
else if (fastcmp(param, "y"))
vertexes[i].y = FLOAT_TO_FIXED(atof(val));
else if (fastcmp(param, "zfloor"))
{
vertexes[i].floorz = FLOAT_TO_FIXED(atof(val));
vertexes[i].floorzset = true;
}
else if (fastcmp(param, "zceiling"))
{
vertexes[i].ceilingz = FLOAT_TO_FIXED(atof(val));
vertexes[i].ceilingzset = true;
}
}
static void ParseTextmapSectorParameter(UINT32 i, char *param, char *val)
@ -1576,6 +1586,8 @@ static void P_LoadTextmap(void)
// Defaults.
vt->x = vt->y = INT32_MAX;
vt->z = 0;
vt->floorzset = vt->ceilingzset = false;
vt->floorz = vt->ceilingz = 0;
TextmapParse(vertexesPos[i], i, ParseTextmapVertexParameter);

View File

@ -84,6 +84,8 @@ typedef struct extracolormap_s
typedef struct
{
fixed_t x, y, z;
boolean floorzset, ceilingzset;
fixed_t floorz, ceilingz;
} vertex_t;
// Forward of linedefs, for sectors.