fixed a bunch of variable shadowing cases and removed unused variables

This commit is contained in:
myT 2020-02-24 01:52:29 +01:00
parent 36f363b47a
commit 7b01f8b8d3
4 changed files with 16 additions and 23 deletions

View file

@ -801,8 +801,8 @@ static void Con_DrawSolidConsole( float frac )
const short* text = con.text + (row % con.totallines)*con.linewidth; const short* text = con.text + (row % con.totallines)*con.linewidth;
re.SetColor( colShadow ); re.SetColor( colShadow );
for (int i = 0; i < con.linewidth; ++i) { for (int j = 0; j < con.linewidth; ++j) {
SCR_DrawChar( 1 + con.xadjust + i * con.cw, 1 + y, con.cw, con.ch, (text[i] & 0xFF) ); SCR_DrawChar( 1 + con.xadjust + j * con.cw, 1 + y, con.cw, con.ch, (text[j] & 0xFF) );
} }
re.SetColor( colText ); re.SetColor( colText );

View file

@ -431,12 +431,12 @@ static void CL_ParseGamestate( msg_t *msg )
// all previous config string commands need to be marked as invalid // all previous config string commands need to be marked as invalid
for ( i = 0; i < MAX_RELIABLE_COMMANDS; ++i ) { for ( i = 0; i < MAX_RELIABLE_COMMANDS; ++i ) {
const char* const cmd = clc.serverCommands[i]; const char* const cmdStr = clc.serverCommands[i];
if ( !strncmp(cmd, "cs " , 3) || if ( !strncmp(cmdStr, "cs " , 3) ||
!strncmp(cmd, "bcs0 ", 5) || !strncmp(cmdStr, "bcs0 ", 5) ||
!strncmp(cmd, "bcs1 ", 5) || !strncmp(cmdStr, "bcs1 ", 5) ||
!strncmp(cmd, "bcs2 ", 5) ) !strncmp(cmdStr, "bcs2 ", 5) )
clc.serverCommandsBad[i] = qtrue; clc.serverCommandsBad[i] = qtrue;
} }

View file

@ -246,9 +246,9 @@ static void RB_RenderDrawSurfList( const drawSurf_t* drawSurfs, int numDrawSurfs
const int numVertexes = tess.numVertexes - firstVertex; const int numVertexes = tess.numVertexes - firstVertex;
const int numIndexes = tess.numIndexes - firstIndex; const int numIndexes = tess.numIndexes - firstIndex;
RB_DeformTessGeometry( firstVertex, numVertexes, firstIndex, numIndexes ); RB_DeformTessGeometry( firstVertex, numVertexes, firstIndex, numIndexes );
for ( int i = 0; i < shader->numStages; ++i ) { for ( int s = 0; s < shader->numStages; ++s ) {
R_ComputeColors( shader->stages[i], tess.svars[i], firstVertex, numVertexes ); R_ComputeColors( shader->stages[s], tess.svars[s], firstVertex, numVertexes );
R_ComputeTexCoords( shader->stages[i], tess.svars[i], firstVertex, numVertexes, qfalse ); R_ComputeTexCoords( shader->stages[s], tess.svars[s], firstVertex, numVertexes, qfalse );
} }
} }
continue; continue;
@ -270,9 +270,9 @@ static void RB_RenderDrawSurfList( const drawSurf_t* drawSurfs, int numDrawSurfs
// so we need to compute everything added with the first one now // so we need to compute everything added with the first one now
tess.shader = shaderPrev; tess.shader = shaderPrev;
RB_DeformTessGeometry( 0, tess.numVertexes, 0, tess.numIndexes ); RB_DeformTessGeometry( 0, tess.numVertexes, 0, tess.numIndexes );
for ( int i = 0; i < shaderPrev->numStages; ++i ) { for ( int s = 0; s < shaderPrev->numStages; ++s ) {
R_ComputeColors( shaderPrev->stages[i], tess.svars[i], 0, tess.numVertexes ); R_ComputeColors( shaderPrev->stages[s], tess.svars[s], 0, tess.numVertexes );
R_ComputeTexCoords( shaderPrev->stages[i], tess.svars[i], 0, tess.numVertexes, qfalse ); R_ComputeTexCoords( shaderPrev->stages[s], tess.svars[s], 0, tess.numVertexes, qfalse );
} }
} }
tess.shader = shader; tess.shader = shader;
@ -283,9 +283,9 @@ static void RB_RenderDrawSurfList( const drawSurf_t* drawSurfs, int numDrawSurfs
const int numVertexes = tess.numVertexes - firstVertex; const int numVertexes = tess.numVertexes - firstVertex;
const int numIndexes = tess.numIndexes - firstIndex; const int numIndexes = tess.numIndexes - firstIndex;
RB_DeformTessGeometry( firstVertex, numVertexes, firstIndex, numIndexes ); RB_DeformTessGeometry( firstVertex, numVertexes, firstIndex, numIndexes );
for ( int i = 0; i < shader->numStages; ++i ) { for ( int s = 0; s < shader->numStages; ++s ) {
R_ComputeColors( shader->stages[i], tess.svars[i], firstVertex, numVertexes ); R_ComputeColors( shader->stages[s], tess.svars[s], firstVertex, numVertexes );
R_ComputeTexCoords( shader->stages[i], tess.svars[i], firstVertex, numVertexes, qfalse ); R_ComputeTexCoords( shader->stages[s], tess.svars[s], firstVertex, numVertexes, qfalse );
} }
sort = drawSurf->sort; sort = drawSurf->sort;
oldEntityNum = entityNum; oldEntityNum = entityNum;

View file

@ -120,13 +120,6 @@ cvar_t *r_directedScale;
cvar_t *r_debugLight; cvar_t *r_debugLight;
cvar_t *r_debugSort; cvar_t *r_debugSort;
///////////////////////////////////////////////////////////////
cvar_t *r_maplightBrightness;
cvar_t *r_maplightSaturation;
cvar_t *r_maplightColor;
cvar_t *r_maplightColorMode;
vec3_t vMaplightColorFilter;
// these limits apply to the sum of all scenes in a frame: // these limits apply to the sum of all scenes in a frame:
// the main view, all the 3D icons, and even the console etc // the main view, all the 3D icons, and even the console etc
#define DEFAULT_MAX_POLYS 8192 #define DEFAULT_MAX_POLYS 8192