Fix -Wunused-variable warnings

unused variable
This commit is contained in:
dhewg 2011-12-02 17:22:12 +01:00
parent 7f4bcf94ca
commit e4771f3a5f
56 changed files with 59 additions and 128 deletions

View file

@ -2616,7 +2616,6 @@ idEntity::RunPhysics
bool idEntity::RunPhysics( void ) {
int i, reachedTime, startTime, endTime;
idEntity * part, *blockedPart, *blockingEntity;
trace_t results;
bool moved;
// don't run physics if not enabled

View file

@ -31,6 +31,13 @@ If you have questions concerning this license or the applicable additional terms
#include "Game_local.h"
const int NUM_RENDER_PORTAL_BITS = idMath::BitsForInteger( PS_BLOCK_ALL );
const float DEFAULT_GRAVITY = 1066.0f;
const idVec3 DEFAULT_GRAVITY_VEC3( 0, 0, -DEFAULT_GRAVITY );
const int CINEMATIC_SKIP_DELAY = SEC2MS( 2.0f );
#ifdef GAME_DLL
idSys * sys = NULL;
@ -4763,8 +4770,6 @@ idGameLocal::SelectTimeGroup
============
*/
void idGameLocal::SelectTimeGroup( int timeGroup ) {
int i = 0;
if ( timeGroup ) {
fast.Get( time, previousTime, msec, framenum, realClientTime );
} else {

View file

@ -110,10 +110,11 @@ void gameError( const char *fmt, ... );
//============================================================================
const int MAX_GAME_MESSAGE_SIZE = 8192;
const int MAX_ENTITY_STATE_SIZE = 512;
const int ENTITY_PVS_SIZE = ((MAX_GENTITIES+31)>>5);
const int NUM_RENDER_PORTAL_BITS = idMath::BitsForInteger( PS_BLOCK_ALL );
#define MAX_GAME_MESSAGE_SIZE 8192
#define MAX_ENTITY_STATE_SIZE 512
#define ENTITY_PVS_SIZE ((MAX_GENTITIES+31)>>5)
extern const int NUM_RENDER_PORTAL_BITS;
typedef struct entityState_s {
int entityNumber;
@ -741,11 +742,10 @@ typedef enum {
#define MASK_SHOT_RENDERMODEL (CONTENTS_SOLID|CONTENTS_RENDERMODEL)
#define MASK_SHOT_BOUNDINGBOX (CONTENTS_SOLID|CONTENTS_BODY)
const float DEFAULT_GRAVITY = 1066.0f;
#define DEFAULT_GRAVITY_STRING "1066"
const idVec3 DEFAULT_GRAVITY_VEC3( 0, 0, -DEFAULT_GRAVITY );
const int CINEMATIC_SKIP_DELAY = SEC2MS( 2.0f );
extern const float DEFAULT_GRAVITY;
extern const idVec3 DEFAULT_GRAVITY_VEC3;
extern const int CINEMATIC_SKIP_DELAY;
//============================================================================

View file

@ -31,6 +31,8 @@ If you have questions concerning this license or the applicable additional terms
#include "Game_local.h"
const int ASYNC_PLAYER_INV_AMMO_BITS = idMath::BitsForInteger( 999 ); // 9 bits to cover the range [0, 999]
const int ASYNC_PLAYER_INV_CLIP_BITS = -7; // -7 bits to cover the range [-1, 60]
/*
===============================================================================
@ -8181,7 +8183,6 @@ void idPlayer::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &di
damage = 1;
}
int oldHealth = health;
health -= damage;
if ( health <= 0 ) {

View file

@ -70,8 +70,8 @@ const int DEATH_VOLUME = 15; // volume at death
const int SAVING_THROW_TIME = 5000; // maximum one "saving throw" every five seconds
const int ASYNC_PLAYER_INV_AMMO_BITS = idMath::BitsForInteger( 999 ); // 9 bits to cover the range [0, 999]
const int ASYNC_PLAYER_INV_CLIP_BITS = -7; // -7 bits to cover the range [-1, 60]
extern const int ASYNC_PLAYER_INV_AMMO_BITS;
extern const int ASYNC_PLAYER_INV_CLIP_BITS;
struct idItemInfo {
idStr name;

View file

@ -924,7 +924,6 @@ void idTarget_SetInfluence::Event_GatherEntities() {
int i, listedEntities;
idEntity *entityList[ MAX_GENTITIES ];
bool demonicOnly = spawnArgs.GetBool( "effect_demonic" );
bool lights = spawnArgs.GetBool( "effect_lights" );
bool sounds = spawnArgs.GetBool( "effect_sounds" );
bool guis = spawnArgs.GetBool( "effect_guis" );
@ -1794,7 +1793,6 @@ idTarget_FadeSoundClass::Event_RestoreVolume
void idTarget_FadeSoundClass::Event_RestoreVolume() {
float fadeTime = spawnArgs.GetFloat( "fadeTime" );
float fadeDB = spawnArgs.GetFloat( "fadeDB" );
int fadeClass = spawnArgs.GetInt( "fadeClass" );
// restore volume
gameSoundWorld->FadeSoundClasses( 0, fadeDB, fadeTime );
}

View file

@ -1253,7 +1253,6 @@ void idTrigger_Flag::Spawn( void ) {
void idTrigger_Flag::Event_Touch( idEntity *other, trace_t *trace ) {
bool bTrigger = false;
idItemTeam * flag = NULL;
if ( player ) {

View file

@ -3299,7 +3299,6 @@ void idWeapon::Event_LaunchProjectiles( int num_projectiles, float spread, float
#ifdef _D3XP
int ammoAvail = owner->inventory.HasAmmo( ammoType, ammoRequired );
if ( ( clipSize != 0 ) && ( ammoClip <= 0 ) ) {
return;
}
@ -3500,7 +3499,6 @@ void idWeapon::Event_LaunchProjectilesEllipse( int num_projectiles, float spread
// avoid all ammo considerations on a client
if ( !gameLocal.isClient ) {
int ammoAvail = owner->inventory.HasAmmo( ammoType, ammoRequired );
if ( ( clipSize != 0 ) && ( ammoClip <= 0 ) ) {
return;
}

View file

@ -70,16 +70,6 @@ void idAASLocal::DrawReachability( const idReachability *reach ) const {
if ( gameLocal.GetLocalPlayer() ) {
gameRenderWorld->DrawText( va( "%d", reach->edgeNum ), ( reach->start + reach->end ) * 0.5f, 0.1f, colorWhite, gameLocal.GetLocalPlayer()->viewAxis );
}
switch( reach->travelType ) {
case TFL_WALK: {
const idReachability_Walk *walk = static_cast<const idReachability_Walk *>(reach);
break;
}
default: {
break;
}
}
}
/*

View file

@ -1513,7 +1513,6 @@ float idAI::TravelDistance( const idVec3 &start, const idVec3 &end ) const {
int toArea;
float dist;
idVec2 delta;
aasPath_t path;
if ( !aas ) {
// no aas, so just take the straight line distance
@ -3874,7 +3873,6 @@ void idAI::UpdateEnemyPosition( void ) {
int enemyAreaNum;
int areaNum;
aasPath_t path;
predictedPath_t predictedPath;
idVec3 enemyPos;
bool onGround;

View file

@ -1792,7 +1792,6 @@ idAI::Event_TestChargeAttack
=====================
*/
void idAI::Event_TestChargeAttack( void ) {
trace_t trace;
idActor *enemyEnt = enemy.GetEntity();
predictedPath_t path;
idVec3 end;

View file

@ -68,10 +68,6 @@ typedef struct {
} classTypeInfo_t;
static constantInfo_t constantInfo[] = {
{ NULL, NULL, NULL }
};
static enumTypeInfo_t enumTypeInfo[] = {
{ NULL, NULL }
};

View file

@ -7904,10 +7904,10 @@ const float AF_VELOCITY_MAX = 16000;
const int AF_VELOCITY_TOTAL_BITS = 16;
const int AF_VELOCITY_EXPONENT_BITS = idMath::BitsForInteger( idMath::BitsForFloat( AF_VELOCITY_MAX ) ) + 1;
const int AF_VELOCITY_MANTISSA_BITS = AF_VELOCITY_TOTAL_BITS - 1 - AF_VELOCITY_EXPONENT_BITS;
const float AF_FORCE_MAX = 1e20f;
const int AF_FORCE_TOTAL_BITS = 16;
const int AF_FORCE_EXPONENT_BITS = idMath::BitsForInteger( idMath::BitsForFloat( AF_FORCE_MAX ) ) + 1;
const int AF_FORCE_MANTISSA_BITS = AF_FORCE_TOTAL_BITS - 1 - AF_FORCE_EXPONENT_BITS;
//const float AF_FORCE_MAX = 1e20f;
//const int AF_FORCE_TOTAL_BITS = 16;
//const int AF_FORCE_EXPONENT_BITS = idMath::BitsForInteger( idMath::BitsForFloat( AF_FORCE_MAX ) ) + 1;
//const int AF_FORCE_MANTISSA_BITS = AF_FORCE_TOTAL_BITS - 1 - AF_FORCE_EXPONENT_BITS;
/*
================

View file

@ -823,7 +823,6 @@ void idPhysics_Player::SpectatorMove( void ) {
idVec3 wishdir;
float scale;
trace_t trace;
idVec3 end;
// fly movement

View file

@ -800,9 +800,6 @@ int idPush::TryRotatePushEntity( trace_t &results, idEntity *check, idClipModel
SaveEntityPosition( check );
newRotation.Set( rotation.GetOrigin(), rotation.GetVec(), checkAngle );
// NOTE: this code prevents msvc 6.0 & 7.0 from screwing up the above code in
// release builds moving less floats than it should
static float shit = checkAngle;
newRotation.RotatePoint( rotationPoint );

View file

@ -2524,7 +2524,6 @@ idEntity::RunPhysics
bool idEntity::RunPhysics( void ) {
int i, reachedTime, startTime, endTime;
idEntity * part, *blockedPart, *blockingEntity;
trace_t results;
bool moved;
// don't run physics if not enabled

View file

@ -31,6 +31,12 @@ If you have questions concerning this license or the applicable additional terms
#include "Game_local.h"
const int NUM_RENDER_PORTAL_BITS = idMath::BitsForInteger( PS_BLOCK_ALL );
const float DEFAULT_GRAVITY = 1066.0f;
const idVec3 DEFAULT_GRAVITY_VEC3( 0, 0, -DEFAULT_GRAVITY );
const int CINEMATIC_SKIP_DELAY = SEC2MS( 2.0f );
#ifdef GAME_DLL
idSys * sys = NULL;

View file

@ -110,10 +110,11 @@ void gameError( const char *fmt, ... );
//============================================================================
const int MAX_GAME_MESSAGE_SIZE = 8192;
const int MAX_ENTITY_STATE_SIZE = 512;
const int ENTITY_PVS_SIZE = ((MAX_GENTITIES+31)>>5);
const int NUM_RENDER_PORTAL_BITS = idMath::BitsForInteger( PS_BLOCK_ALL );
#define MAX_GAME_MESSAGE_SIZE 8192
#define MAX_ENTITY_STATE_SIZE 512
#define ENTITY_PVS_SIZE ((MAX_GENTITIES+31)>>5)
extern const int NUM_RENDER_PORTAL_BITS;
typedef struct entityState_s {
int entityNumber;
@ -682,11 +683,10 @@ typedef enum {
#define MASK_SHOT_RENDERMODEL (CONTENTS_SOLID|CONTENTS_RENDERMODEL)
#define MASK_SHOT_BOUNDINGBOX (CONTENTS_SOLID|CONTENTS_BODY)
const float DEFAULT_GRAVITY = 1066.0f;
#define DEFAULT_GRAVITY_STRING "1066"
const idVec3 DEFAULT_GRAVITY_VEC3( 0, 0, -DEFAULT_GRAVITY );
const int CINEMATIC_SKIP_DELAY = SEC2MS( 2.0f );
extern const float DEFAULT_GRAVITY;
extern const idVec3 DEFAULT_GRAVITY_VEC3;
extern const int CINEMATIC_SKIP_DELAY;
//============================================================================

View file

@ -31,6 +31,9 @@ If you have questions concerning this license or the applicable additional terms
#include "Game_local.h"
const int ASYNC_PLAYER_INV_AMMO_BITS = idMath::BitsForInteger( 999 ); // 9 bits to cover the range [0, 999]
const int ASYNC_PLAYER_INV_CLIP_BITS = -7; // -7 bits to cover the range [-1, 60]
/*
===============================================================================
@ -6816,7 +6819,6 @@ void idPlayer::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &di
damage = 1;
}
int oldHealth = health;
health -= damage;
if ( health <= 0 ) {

View file

@ -66,8 +66,8 @@ const int DEATH_VOLUME = 15; // volume at death
const int SAVING_THROW_TIME = 5000; // maximum one "saving throw" every five seconds
const int ASYNC_PLAYER_INV_AMMO_BITS = idMath::BitsForInteger( 999 ); // 9 bits to cover the range [0, 999]
const int ASYNC_PLAYER_INV_CLIP_BITS = -7; // -7 bits to cover the range [-1, 60]
extern const int ASYNC_PLAYER_INV_AMMO_BITS;
extern const int ASYNC_PLAYER_INV_CLIP_BITS;
struct idItemInfo {
idStr name;

View file

@ -904,7 +904,6 @@ void idTarget_SetInfluence::Event_GatherEntities() {
int i, listedEntities;
idEntity *entityList[ MAX_GENTITIES ];
bool demonicOnly = spawnArgs.GetBool( "effect_demonic" );
bool lights = spawnArgs.GetBool( "effect_lights" );
bool sounds = spawnArgs.GetBool( "effect_sounds" );
bool guis = spawnArgs.GetBool( "effect_guis" );
@ -1758,7 +1757,6 @@ idTarget_FadeSoundClass::Event_RestoreVolume
void idTarget_FadeSoundClass::Event_RestoreVolume() {
float fadeTime = spawnArgs.GetFloat( "fadeTime" );
float fadeDB = spawnArgs.GetFloat( "fadeDB" );
int fadeClass = spawnArgs.GetInt( "fadeClass" );
// restore volume
gameSoundWorld->FadeSoundClasses( 0, fadeDB, fadeTime );
}

View file

@ -70,16 +70,6 @@ void idAASLocal::DrawReachability( const idReachability *reach ) const {
if ( gameLocal.GetLocalPlayer() ) {
gameRenderWorld->DrawText( va( "%d", reach->edgeNum ), ( reach->start + reach->end ) * 0.5f, 0.1f, colorWhite, gameLocal.GetLocalPlayer()->viewAxis );
}
switch( reach->travelType ) {
case TFL_WALK: {
const idReachability_Walk *walk = static_cast<const idReachability_Walk *>(reach);
break;
}
default: {
break;
}
}
}
/*

View file

@ -1431,7 +1431,6 @@ float idAI::TravelDistance( const idVec3 &start, const idVec3 &end ) const {
int toArea;
float dist;
idVec2 delta;
aasPath_t path;
if ( !aas ) {
// no aas, so just take the straight line distance
@ -3758,7 +3757,6 @@ void idAI::UpdateEnemyPosition( void ) {
int enemyAreaNum;
int areaNum;
aasPath_t path;
predictedPath_t predictedPath;
idVec3 enemyPos;
bool onGround;

View file

@ -1643,7 +1643,6 @@ idAI::Event_TestChargeAttack
=====================
*/
void idAI::Event_TestChargeAttack( void ) {
trace_t trace;
idActor *enemyEnt = enemy.GetEntity();
predictedPath_t path;
idVec3 end;

View file

@ -68,10 +68,6 @@ typedef struct {
} classTypeInfo_t;
static constantInfo_t constantInfo[] = {
{ NULL, NULL, NULL }
};
static enumTypeInfo_t enumTypeInfo[] = {
{ NULL, NULL }
};

View file

@ -7903,10 +7903,10 @@ const float AF_VELOCITY_MAX = 16000;
const int AF_VELOCITY_TOTAL_BITS = 16;
const int AF_VELOCITY_EXPONENT_BITS = idMath::BitsForInteger( idMath::BitsForFloat( AF_VELOCITY_MAX ) ) + 1;
const int AF_VELOCITY_MANTISSA_BITS = AF_VELOCITY_TOTAL_BITS - 1 - AF_VELOCITY_EXPONENT_BITS;
const float AF_FORCE_MAX = 1e20f;
const int AF_FORCE_TOTAL_BITS = 16;
const int AF_FORCE_EXPONENT_BITS = idMath::BitsForInteger( idMath::BitsForFloat( AF_FORCE_MAX ) ) + 1;
const int AF_FORCE_MANTISSA_BITS = AF_FORCE_TOTAL_BITS - 1 - AF_FORCE_EXPONENT_BITS;
//const float AF_FORCE_MAX = 1e20f;
//const int AF_FORCE_TOTAL_BITS = 16;
//const int AF_FORCE_EXPONENT_BITS = idMath::BitsForInteger( idMath::BitsForFloat( AF_FORCE_MAX ) ) + 1;
//const int AF_FORCE_MANTISSA_BITS = AF_FORCE_TOTAL_BITS - 1 - AF_FORCE_EXPONENT_BITS;
/*
================

View file

@ -823,7 +823,6 @@ void idPhysics_Player::SpectatorMove( void ) {
idVec3 wishdir;
float scale;
trace_t trace;
idVec3 end;
// fly movement

View file

@ -800,9 +800,6 @@ int idPush::TryRotatePushEntity( trace_t &results, idEntity *check, idClipModel
SaveEntityPosition( check );
newRotation.Set( rotation.GetOrigin(), rotation.GetVec(), checkAngle );
// NOTE: this code prevents msvc 6.0 & 7.0 from screwing up the above code in
// release builds moving less floats than it should
static float shit = checkAngle;
newRotation.RotatePoint( rotationPoint );

View file

@ -333,7 +333,7 @@ idCurve::SetConstantSpeed
*/
template< class type >
ID_INLINE void idCurve<type>::SetConstantSpeed( const float totalTime ) {
int i, j;
int i;
float *length, totalLength, scale, t;
length = (float *) _alloca16( values.Num() * sizeof( float ) );
@ -777,7 +777,6 @@ idCurve_QuadraticBezier::BasisSecondDerivative
*/
template< class type >
ID_INLINE void idCurve_QuadraticBezier<type>::BasisSecondDerivative( const float t, float *bvals ) const {
float s1 = (float) ( t - this->times[0] ) / ( this->times[2] - this->times[0] );
bvals[0] = 2.0f;
bvals[1] = -4.0f;
bvals[2] = 2.0f;

View file

@ -3124,8 +3124,6 @@ void TestGetTextureSpaceLightVectors( void ) {
int i, j;
TIME_TYPE start, end, bestClocksGeneric, bestClocksSIMD;
ALIGN16( idDrawVert drawVerts[COUNT] );
ALIGN16( idVec4 texCoords1[COUNT] );
ALIGN16( idVec4 texCoords2[COUNT] );
ALIGN16( int indexes[COUNT*3] );
ALIGN16( idVec3 lightVectors1[COUNT] );
ALIGN16( idVec3 lightVectors2[COUNT] );
@ -3191,8 +3189,6 @@ void TestGetSpecularTextureCoords( void ) {
ALIGN16( idVec4 texCoords1[COUNT] );
ALIGN16( idVec4 texCoords2[COUNT] );
ALIGN16( int indexes[COUNT*3] );
ALIGN16( idVec3 lightVectors1[COUNT] );
ALIGN16( idVec3 lightVectors2[COUNT] );
idVec3 lightOrigin, viewOrigin;
const char *result;

View file

@ -2601,7 +2601,6 @@ maps are constant, but 2/3 of the surface references are.
This is probably an optimization of dubious value.
==================
*/
static int c_constant, c_variable;
void idMaterial::CheckForConstantRegisters() {
if ( !pd->registersAreConstant ) {
return;

View file

@ -381,7 +381,6 @@ void idTextureLevel::UpdateTile( int localX, int localY, int globalX, int global
break;
}
int byteSize = size * 4;
// mip-map in place
for ( int y = 0 ; y < size ; y++ ) {
byte *in, *in2, *out;

View file

@ -103,7 +103,6 @@ may extend well past the 0.0 to 1.0 texture range
*/
void idRenderModelOverlay::CreateOverlay( const idRenderModel *model, const idPlane localTextureAxis[2], const idMaterial *mtr ) {
int i, maxVerts, maxIndexes, surfNum;
idRenderModelOverlay *overlay = NULL;
// count up the maximum possible vertices and indexes per surface
maxVerts = 0;

View file

@ -401,7 +401,7 @@ bool MA_ParseFace(idParser& parser, maAttribHeader_t* header) {
pMesh->faces[currentFace].vertexColors[0] = pMesh->faces[currentFace].vertexColors[1] = pMesh->faces[currentFace].vertexColors[2] = -1;
} else if(!token.Icmp("mu")) {
int uvstIndex = parser.ParseInt();
/* int uvstIndex = */ parser.ParseInt();
int count = parser.ParseInt();
if(count != 3) {
throw idException(va("Maya Loader '%s': Invalid texture coordinates.", parser.GetFileName()));

View file

@ -133,7 +133,6 @@ idRenderModel *idRenderModelPrt::InstantiateDynamicModel( const struct renderEnt
int stageAge = g.renderView->time + renderEntity->shaderParms[SHADERPARM_TIMEOFFSET] * 1000 - stage->timeOffset * 1000;
int stageCycle = stageAge / stage->cycleMsec;
int inCycleTime = stageAge - stageCycle * stage->cycleMsec;
// some particles will be in this cycle, some will be in the previous cycle
steppingRandom.SetSeed( (( stageCycle << 10 ) & idRandom::MAX_RAND) ^ (int)( renderEntity->shaderParms[SHADERPARM_DIVERSITY] * idRandom::MAX_RAND ) );

View file

@ -1351,8 +1351,6 @@ void R_ScreenShot_f( const idCmdArgs &args ) {
int width = glConfig.vidWidth;
int height = glConfig.vidHeight;
int x = 0;
int y = 0;
int blends = 0;
switch ( args.Argc() ) {
@ -1597,8 +1595,6 @@ void R_MakeAmbientMap_f( const idCmdArgs &args ) {
idStr fullname;
const char *baseName;
int i;
renderView_t ref;
viewDef_t primary;
int downSample;
const char *extensions[6] = { "_px.tga", "_nx.tga", "_py.tga", "_ny.tga",
"_pz.tga", "_nz.tga" };

View file

@ -1000,10 +1000,6 @@ guiPoint_t idRenderWorldLocal::GuiTrace( qhandle_t entityHandle, const idVec3 st
R_GlobalPointToLocal( def->modelMatrix, start, localStart );
R_GlobalPointToLocal( def->modelMatrix, end, localEnd );
float best = 99999.0;
const modelSurface_t *bestSurf = NULL;
for ( j = 0 ; j < model->NumSurfaces() ; j++ ) {
const modelSurface_t *surf = model->Surface( j );

View file

@ -504,10 +504,8 @@ idVertexCache::List
*/
void idVertexCache::List( void ) {
int numActive = 0;
int numDeferred = 0;
int frameStatic = 0;
int totalStatic = 0;
int deferredSpace = 0;
vertCache_t *block;
for ( block = staticHeaders.next ; block != &staticHeaders ; block = block->next) {

View file

@ -78,7 +78,7 @@ it is set to lessThan for blended transparent surfaces
==================
*/
static void RB_ARB_DrawInteraction( const drawInteraction_t *din ) {
const drawSurf_t *surf = din->surf;
//const drawSurf_t *surf = din->surf;
const srfTriangles_t *tri = din->surf->geo;
// set the vertex arrays, which may not all be enabled on a given pass
@ -278,7 +278,7 @@ it is set to lessThan for blended transparent surfaces
==================
*/
static void RB_ARB_DrawThreeTextureInteraction( const drawInteraction_t *din ) {
const drawSurf_t *surf = din->surf;
//const drawSurf_t *surf = din->surf;
const srfTriangles_t *tri = din->surf->geo;
// set the vertex arrays, which may not all be enabled on a given pass

View file

@ -602,8 +602,6 @@ RB_NV20_DrawInteraction
==================
*/
static void RB_NV20_DrawInteraction( const drawInteraction_t *din ) {
const drawSurf_t *surf = din->surf;
// load all the vertex program parameters
qglProgramEnvParameter4fvARB( GL_VERTEX_PROGRAM_ARB, PP_LIGHT_ORIGIN, din->localLightOrigin.ToFloatPtr() );
qglProgramEnvParameter4fvARB( GL_VERTEX_PROGRAM_ARB, PP_VIEW_ORIGIN, din->localViewOrigin.ToFloatPtr() );
@ -642,7 +640,6 @@ static void RB_NV20_DrawInteraction( const drawInteraction_t *din ) {
// ambient light could be done as a single pass if we want to optimize for it
// monochrome light is two passes
int internalFormat = din->lightImage->internalFormat;
if ( ( r_useNV20MonoLights.GetInteger() == 2 ) ||
( din->lightImage->isMonochrome && r_useNV20MonoLights.GetInteger() ) ) {
// do a two-pass rendering

View file

@ -79,8 +79,6 @@ typedef struct {
} atiVertexShaderInfo_t;
static atiVertexShaderInfo_t vsi;
/*
===================
RB_R200_ARB_DrawInteraction

View file

@ -1100,7 +1100,6 @@ static void R_ParticleDeform( drawSurf_t *surf, bool useArea ) {
int stageAge = g.renderView->time + renderEntity->shaderParms[SHADERPARM_TIMEOFFSET] * 1000 - stage->timeOffset * 1000;
int stageCycle = stageAge / stage->cycleMsec;
int inCycleTime = stageAge - stageCycle * stage->cycleMsec;
// some particles will be in this cycle, some will be in the previous cycle
steppingRandom.SetSeed( (( stageCycle << 10 ) & idRandom::MAX_RAND) ^ (int)( renderEntity->shaderParms[SHADERPARM_DIVERSITY] * idRandom::MAX_RAND ) );

View file

@ -364,7 +364,7 @@ bool idRenderSystemLocal::RegisterFont( const char *fontName, fontInfoEx_t &font
outFont->glyphs[i].t = readFloat();
outFont->glyphs[i].s2 = readFloat();
outFont->glyphs[i].t2 = readFloat();
int junk /* font.glyphs[i].glyph */ = readInt();
/* font.glyphs[i].glyph = */ readInt();
//FIXME: the +6, -6 skips the embedded fonts/
memcpy( outFont->glyphs[i].shaderName, &fdFile[fdOffset + 6], 32 - 6 );
fdOffset += 32;

View file

@ -733,7 +733,6 @@ Debugging tool
=====================
*/
static void RB_ShowTris( drawSurf_t **drawSurfs, int numDrawSurfs ) {
modelTrace_t mt;
idVec3 end;
if ( !r_showTris.GetInteger() ) {
@ -811,7 +810,6 @@ static void RB_ShowSurfaceInfo( drawSurf_t **drawSurfs, int numDrawSurfs ) {
qglPolygonOffset( -1, -2 );
qglEnable( GL_POLYGON_OFFSET_LINE );
idVec3 trans[3];
float matrix[16];
// transform the object verts into global space

View file

@ -270,7 +270,6 @@ R_XrayViewBySurface
*/
static viewDef_t *R_XrayViewBySurface( drawSurf_t *drawSurf ) {
viewDef_t *parms;
orientation_t surface, camera;
idPlane originalPlane, plane;
// copy the viewport size from the original

View file

@ -512,7 +512,6 @@ Called once each sound frame by the main thread from idSoundWorldLocal::PlaceOri
*/
void idSoundEmitterLocal::Spatialize( idVec3 listenerPos, int listenerArea, idRenderWorld *rw ) {
int i;
bool hasActive = false;
//
// work out the maximum distance of all the playing channels

View file

@ -213,12 +213,12 @@ bool idSoundShader::ParseShader( idLexer &src ) {
}
// reverb
else if ( !token.Icmp( "reverb" ) ) {
int reg0 = src.ParseFloat();
src.ParseFloat();
if ( !src.ExpectTokenString( "," ) ) {
src.FreeSource();
return false;
}
int reg1 = src.ParseFloat();
src.ParseFloat();
// no longer supported
}
// volume

View file

@ -219,11 +219,11 @@ GLX_TestDGA
Check for DGA - update in_dgamouse if needed
*/
void GLX_TestDGA() {
#if defined( ID_ENABLE_DGA )
int dga_MajorVersion = 0, dga_MinorVersion = 0;
assert( dpy );
#if defined( ID_ENABLE_DGA )
if ( !XF86DGAQueryVersion( dpy, &dga_MajorVersion, &dga_MinorVersion ) ) {
// unable to query, probalby not supported
common->Printf( "Failed to detect DGA DirectVideo Mouse\n" );

View file

@ -1293,7 +1293,6 @@ void idBrushBSP::MakeOutsidePortals( void ) {
idBounds bounds;
idBrushBSPPortal *p, *portals[6];
idVec3 normal;
idPlane planes[6];
// pad with some space so there will never be null volume leaves
bounds = treeBounds.Expand( 32 );

View file

@ -102,7 +102,6 @@ typedef struct {
triHash_t *hash;
} renderBump_t;
static float traceFraction;
static int rayNumber; // for avoiding retests of bins and faces
static int oldWidth, oldHeight;

View file

@ -836,7 +836,6 @@ void codec::FvqData( byte *bitmap, int size, int realx, int realy, quadcel *pqu
return;
}
int sPsQ = -1;
for( sX=(((realx-xxMean)-searchX)+depthx); sX<=((realx-xxMean)+searchX) && !fabort; sX+=depthx ) {
for( sY=(((realy-yyMean)-searchY)+depthy); sY<=((realy-yyMean)+searchY) && breakHigh; sY+=depthy ) {
temp1 = xLen*sY+sX;

View file

@ -1210,7 +1210,7 @@ void idGameBustOutWindow::UpdateBall( void ) {
brick->ent->fadeOut = true;
if ( brick->powerup > POWERUP_NONE ) {
BOEntity *pUp = CreatePowerup( brick );
CreatePowerup( brick );
}
numBricks--;

View file

@ -321,7 +321,6 @@ void idMarkerWindow::Activate(bool activate, idStr &act) {
fileSystem->FreeFileList( markers );
memset(imageBuff, 0, 512*64*4);
float step = 511.0f / (numStats - 1);
float startX = 0;
float x1, y1, x2, y2;
x1 = 0 - step;
for (i = 0; i < numStats-1; i++) {

View file

@ -185,7 +185,6 @@ idUserInterface *idUserInterfaceManagerLocal::FindGui( const char *qpath, bool a
int c = guis.Num();
for ( int i = 0; i < c; i++ ) {
idUserInterfaceLocal *gui = guis[i];
if ( !idStr::Icmp( guis[i]->GetSourceFile(), qpath ) ) {
if ( !forceNOTUnique && ( needUnique || guis[i]->IsInteractive() ) ) {
break;

View file

@ -33,6 +33,9 @@ If you have questions concerning this license or the applicable additional terms
#include "Winvar.h"
#include "UserInterfaceLocal.h"
const char *VAR_GUIPREFIX = "gui::";
static const int VAR_GUIPREFIX_LEN = strlen(VAR_GUIPREFIX);
idWinVar::idWinVar() {
guiDict = NULL;
name = NULL;

View file

@ -31,8 +31,7 @@ If you have questions concerning this license or the applicable additional terms
#include "Rectangle.h"
static const char *VAR_GUIPREFIX = "gui::";
static const int VAR_GUIPREFIX_LEN = strlen(VAR_GUIPREFIX);
extern const char *VAR_GUIPREFIX;
class idWindow;
class idWinVar {