mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
ref: use designated initializers where possible
This commit is contained in:
@@ -966,9 +966,11 @@ void R_DrawAliasModel( cl_entity_t *e )
|
||||
//
|
||||
// get lighting information
|
||||
//
|
||||
alight_t lighting;
|
||||
vec3_t dir;
|
||||
lighting.plightvec = dir;
|
||||
alight_t lighting =
|
||||
{
|
||||
.plightvec = dir,
|
||||
};
|
||||
R_EntityDynamicLight( e, &lighting, FBitSet( RI.rvp.flags, RF_DRAW_WORLD ), g_alias.time, g_alias.lightspot, g_alias.lightvec );
|
||||
|
||||
r_stats.c_alias_polys += m_pAliasHeader->numtris;
|
||||
|
||||
@@ -265,8 +265,6 @@ R_SetupFrame
|
||||
*/
|
||||
void R_SetupFrameQ( void )
|
||||
{
|
||||
vrect_t vrect;
|
||||
|
||||
if( r_fullbright->flags & FCVAR_CHANGED )
|
||||
{
|
||||
r_fullbright->flags &= ~FCVAR_CHANGED;
|
||||
@@ -275,12 +273,9 @@ void R_SetupFrameQ( void )
|
||||
|
||||
// tr.framecount++;
|
||||
|
||||
|
||||
// build the transformation matrix for the given view angles
|
||||
VectorCopy( RI.rvp.vieworigin, tr.modelorg );
|
||||
|
||||
// AngleVectors (RI.rvp.viewangles, RI.vforward, RI.vright, RI.vup);
|
||||
|
||||
// current viewleaf
|
||||
if( FBitSet( RI.rvp.flags, RF_DRAW_WORLD ))
|
||||
{
|
||||
@@ -288,18 +283,13 @@ void R_SetupFrameQ( void )
|
||||
r_viewcluster = RI.viewleaf->cluster;
|
||||
}
|
||||
|
||||
// if (sw_waterwarp->value && (r_newrefdef.rdflags & RDF_UNDERWATER) )
|
||||
// r_dowarp = true;
|
||||
// else
|
||||
|
||||
/*vrect.x = 0;//r_newrefdef.x;
|
||||
vrect.y = 0;//r_newrefdef.y;
|
||||
vrect.width = gpGlobals->width;
|
||||
vrect.height = gpGlobals->height;*/
|
||||
vrect.x = RI.rvp.viewport[0];
|
||||
vrect.y = RI.rvp.viewport[1];
|
||||
vrect.width = RI.rvp.viewport[2];
|
||||
vrect.height = RI.rvp.viewport[3];
|
||||
vrect_t vrect =
|
||||
{
|
||||
.x = RI.rvp.viewport[0],
|
||||
.y = RI.rvp.viewport[1],
|
||||
.width = RI.rvp.viewport[2],
|
||||
.height = RI.rvp.viewport[3],
|
||||
};
|
||||
|
||||
d_viewbuffer = (void *)vid.buffer;
|
||||
r_screenwidth = vid.rowbytes;
|
||||
@@ -315,16 +305,6 @@ void R_SetupFrameQ( void )
|
||||
VectorCopy( RI.vright, RI.base_vright );
|
||||
VectorCopy( RI.vup, RI.base_vup );
|
||||
|
||||
// clear frame counts
|
||||
/* c_faceclip = 0;
|
||||
d_spanpixcount = 0;
|
||||
r_polycount = 0;
|
||||
r_drawnpolycount = 0;
|
||||
r_wholepolycount = 0;
|
||||
r_amodels_drawn = 0;
|
||||
r_outofsurfaces = 0;
|
||||
r_outofedges = 0;*/
|
||||
|
||||
// d_setup
|
||||
d_roverwrapped = false;
|
||||
d_initial_rover = sc_rover;
|
||||
|
||||
Reference in New Issue
Block a user