Skip to content

Commit b554ea3

Browse files
committed
NUKE srfSurfaceFace_t
It is now the same as `srfGeneric_t`, so just use that instead.
1 parent 6a96c12 commit b554ea3

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

src/engine/renderer/tr_bsp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2605,7 +2605,7 @@ static void R_CreateWorldVBO()
26052605
if ( *surface->data == surfaceType_t::SF_FACE || *surface->data == surfaceType_t::SF_GRID
26062606
|| *surface->data == surfaceType_t::SF_TRIANGLES )
26072607
{
2608-
srfSurfaceFace_t* srf = ( srfSurfaceFace_t * ) surface->data;
2608+
srfGeneric_t* srf = ( srfGeneric_t* ) surface->data;
26092609

26102610
numVerts += srf->numVerts;
26112611
numTriangles += srf->numTriangles;

src/engine/renderer/tr_local.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,9 +1773,6 @@ enum class ssaoMode {
17731773
float* heightLodError;
17741774
};
17751775

1776-
struct srfSurfaceFace_t : srfGeneric_t {
1777-
};
1778-
17791776
struct srfVBOMesh_t : srfGeneric_t {
17801777
struct shader_t *shader; // FIXME move this to somewhere else
17811778

src/engine/renderer/tr_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ void R_PlaneForSurface( surfaceType_t *surfType, cplane_t *plane ) {
12191219
case surfaceType_t::SF_FACE:
12201220
case surfaceType_t::SF_TRIANGLES:
12211221
{
1222-
*plane = ( ( srfSurfaceFace_t* ) surfType )->plane;
1222+
*plane = ( ( srfGeneric_t* ) surfType )->plane;
12231223
return;
12241224
}
12251225
case surfaceType_t::SF_POLY:

src/engine/renderer/tr_marks.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ void R_BoxSurfaces_r( bspNode_t *node, vec3_t mins, vec3_t maxs, surfaceType_t *
199199
else if ( * ( surf->data ) == surfaceType_t::SF_FACE )
200200
{
201201
// the face plane should go through the box
202-
s = BoxOnPlaneSide( mins, maxs, & ( ( srfSurfaceFace_t * ) surf->data )->plane );
202+
s = BoxOnPlaneSide( mins, maxs, & ( ( srfGeneric_t* ) surf->data )->plane );
203203

204204
if ( s == 1 || s == 2 )
205205
{
206206
surf->viewCount = tr.viewCountNoReset;
207207
}
208-
else if ( DotProduct( ( ( srfSurfaceFace_t * ) surf->data )->plane.normal, dir ) > -0.5 )
208+
else if ( DotProduct( ( ( srfGeneric_t* ) surf->data )->plane.normal, dir ) > -0.5 )
209209
{
210210
// don't add faces that make sharp angles with the projection direction
211211
surf->viewCount = tr.viewCountNoReset;
@@ -301,7 +301,6 @@ int R_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projectio
301301
vec3_t clipPoints[ 2 ][ MAX_VERTS_ON_POLY ];
302302
int numClipPoints;
303303
float *v;
304-
srfSurfaceFace_t *face;
305304
srfGridMesh_t *cv;
306305
srfVert_t *dv;
307306
srfTriangle_t *tri;
@@ -450,7 +449,7 @@ int R_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projectio
450449
}
451450
else if ( *surfaces[ i ] == surfaceType_t::SF_FACE )
452451
{
453-
face = ( srfSurfaceFace_t * ) surfaces[ i ];
452+
srfGeneric_t* face = ( srfGeneric_t* ) surfaces[i];
454453

455454
// check the normal of this face
456455
if ( DotProduct( face->plane.normal, projectionDir ) > -0.5 )

src/engine/renderer/tr_surface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ static void Tess_SurfacePolychain( srfPoly_t *p )
748748
Tess_SurfaceFace
749749
==============
750750
*/
751-
static void Tess_SurfaceFace( srfSurfaceFace_t *srf )
751+
static void Tess_SurfaceFace( srfGeneric_t* srf )
752752
{
753753
GLIMP_LOGCOMMENT( "--- Tess_SurfaceFace ---" );
754754

src/engine/renderer/tr_world.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ static bool R_CullSurface( surfaceType_t *surface, shader_t *shader, int planeBi
6262
}
6363

6464
// get generic surface
65-
gen = ( srfGeneric_t * ) surface;
65+
gen = ( srfGeneric_t* ) surface;
6666

6767
// plane cull
6868
if ( *surface == surfaceType_t::SF_FACE && r_facePlaneCull->integer )
6969
{
70-
srfSurfaceFace_t *srf = ( srfSurfaceFace_t * )gen;
70+
srfGeneric_t* srf = ( srfGeneric_t* ) gen;
7171
d = DotProduct( tr.orientation.viewOrigin, srf->plane.normal ) - srf->plane.dist;
7272

7373
// don't cull exactly on the plane, because there are levels of rounding
@@ -167,7 +167,7 @@ static bool R_CullLightSurface( surfaceType_t *surface, shader_t *shader, trRefL
167167
// plane cull
168168
if ( *surface == surfaceType_t::SF_FACE && r_facePlaneCull->integer )
169169
{
170-
srfSurfaceFace_t *srf = ( srfSurfaceFace_t * )gen;
170+
srfGeneric_t* srf = ( srfGeneric_t* ) gen;
171171
if ( light->l.rlType == refLightType_t::RL_DIRECTIONAL )
172172
{
173173
d = DotProduct( tr.sunDirection, srf->plane.normal );

0 commit comments

Comments
 (0)