mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-21 18:10:26 +01:00
Fix "unused but set variable" warnings from GCC
This commit is contained in:
parent
dbe524f0b2
commit
1bfc6d5d81
|
@ -296,13 +296,13 @@ void CAnimData::LoadFromScript_t( CTStream *File, CListHead *pFrameFileList) //
|
|||
char ld_line[ 128];
|
||||
CTmpListHead TempAnimationList;
|
||||
SLONG lc;
|
||||
BOOL ret_val;
|
||||
//BOOL ret_val;
|
||||
|
||||
//ASSERT( ad_Anims == NULL);
|
||||
// clears possible animations
|
||||
CAnimData::Clear();
|
||||
|
||||
ret_val = TRUE;
|
||||
//ret_val = TRUE;
|
||||
FOREVER
|
||||
{
|
||||
// Repeat reading of one line of script file until it is not empty or comment
|
||||
|
|
|
@ -505,9 +505,9 @@ extern void SetTBufferEffect( BOOL bEnable)
|
|||
if( ogl_iTBufferEffect==0 || _pGfx->go_ctSampleBuffers<2 || !bEnable) pglDisable( GL_MULTISAMPLE_3DFX);
|
||||
else {
|
||||
pglEnable( GL_MULTISAMPLE_3DFX);
|
||||
UINT uiMask = 0xFFFFFFFF;
|
||||
//UINT uiMask = 0xFFFFFFFF;
|
||||
// set one buffer in case of motion-blur
|
||||
if( ogl_iTBufferEffect==2) uiMask = (1UL) << _pGfx->go_iCurrentWriteBuffer;
|
||||
//if( ogl_iTBufferEffect==2) uiMask = (1UL) << _pGfx->go_iCurrentWriteBuffer;
|
||||
//pglTBufferMask3DFX(uiMask);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -548,7 +548,7 @@ void ColorizeMipmaps( INDEX i1stMipmapToColorize, ULONG *pulMipmaps, PIX pixWidt
|
|||
{
|
||||
// prepare ...
|
||||
ULONG *pulSrcMipmap = pulMipmaps + GetMipmapOffset( i1stMipmapToColorize, pixWidth, pixHeight);
|
||||
ULONG *pulDstMipmap;
|
||||
//ULONG *pulDstMipmap;
|
||||
PIX pixCurrWidth = pixWidth >>i1stMipmapToColorize;
|
||||
PIX pixCurrHeight = pixHeight>>i1stMipmapToColorize;
|
||||
PIX pixMipSize;
|
||||
|
@ -561,7 +561,7 @@ void ColorizeMipmaps( INDEX i1stMipmapToColorize, ULONG *pulMipmaps, PIX pixWidt
|
|||
while( pixCurrWidth>1 && pixCurrHeight>1)
|
||||
{ // prepare current mip-level
|
||||
pixMipSize = pixCurrWidth*pixCurrHeight;
|
||||
pulDstMipmap = pulSrcMipmap + pixMipSize;
|
||||
//pulDstMipmap = pulSrcMipmap + pixMipSize;
|
||||
// mask mipmap
|
||||
const ULONG ulColorMask = ByteSwap( _acolMips[iTableOfs] | 0x3F3F3FFF);
|
||||
for( INDEX iPix=0; iPix<pixMipSize; iPix++) pulSrcMipmap[iPix] &= ulColorMask;
|
||||
|
|
|
@ -1953,7 +1953,7 @@ void CModelObject::RenderModel_View( CRenderModel &rm)
|
|||
_pfModelProfile.IncrementTimerAveragingCounter( CModelProfile::PTI_VIEW_INIT_VERTICES, _ctAllSrfVx);
|
||||
|
||||
// for each surface in current mip model
|
||||
BOOL bEmpty = TRUE;
|
||||
//BOOL bEmpty = TRUE;
|
||||
{FOREACHINSTATICARRAY( mmi.mmpi_MappingSurfaces, MappingSurface, itms)
|
||||
{
|
||||
const MappingSurface &ms = *itms;
|
||||
|
@ -1961,7 +1961,7 @@ void CModelObject::RenderModel_View( CRenderModel &rm)
|
|||
ctSrfVx = ms.ms_ctSrfVx;
|
||||
// skip to next in case of invisible or empty surface
|
||||
if( (ms.ms_ulRenderingFlags&SRF_INVISIBLE) || ctSrfVx==0) break;
|
||||
bEmpty = FALSE;
|
||||
//bEmpty = FALSE;
|
||||
puwSrfToMip = &mmi.mmpi_auwSrfToMip[iSrfVx0];
|
||||
pvtxSrfBase = &_avtxSrfBase[iSrfVx0];
|
||||
INDEX iSrfVx;
|
||||
|
|
|
@ -395,7 +395,7 @@ void CClientInterface::ExchangeBuffers(void)
|
|||
// and generate acknowledge messages for incoming reliable packets
|
||||
BOOL CClientInterface::UpdateInputBuffers(void)
|
||||
{
|
||||
BOOL bSomethingDone;
|
||||
//BOOL bSomethingDone;
|
||||
ULONG pulGenAck[MAX_ACKS_PER_PACKET];
|
||||
ULONG ulAckCount=0;
|
||||
CTimerValue tvNow;
|
||||
|
@ -438,7 +438,7 @@ BOOL CClientInterface::UpdateInputBuffers(void)
|
|||
ci_pbInputBuffer.RemovePacket(ppaPacket->pa_ulSequence,FALSE);
|
||||
delete ppaPacket;
|
||||
|
||||
bSomethingDone = TRUE;
|
||||
//bSomethingDone = TRUE;
|
||||
// if the packet is reliable
|
||||
} else if (ppaPacket->pa_ubReliable & UDP_PACKET_RELIABLE) {
|
||||
|
||||
|
@ -547,7 +547,7 @@ BOOL CClientInterface::UpdateInputBuffers(void)
|
|||
// packet separately, instead of grouping them together
|
||||
BOOL CClientInterface::UpdateInputBuffersBroadcast(void)
|
||||
{
|
||||
BOOL bSomethingDone;
|
||||
//BOOL bSomethingDone;
|
||||
CTimerValue tvNow;
|
||||
|
||||
// if there are packets in the input buffer, process them
|
||||
|
@ -585,7 +585,7 @@ BOOL CClientInterface::UpdateInputBuffersBroadcast(void)
|
|||
}
|
||||
|
||||
ci_pbInputBuffer.RemovePacket(ppaPacket->pa_ulSequence,FALSE);
|
||||
bSomethingDone = TRUE;
|
||||
//bSomethingDone = TRUE;
|
||||
delete ppaPacket;
|
||||
// if the packet is reliable
|
||||
} else if (ppaPacket->pa_ubReliable & UDP_PACKET_RELIABLE) {
|
||||
|
|
|
@ -224,14 +224,14 @@ void UnDiff_t(void)
|
|||
//UBYTE *pubOld = _pubOld;
|
||||
UBYTE *pubNew = _pubNew;
|
||||
SLONG slSizeOldStream = 0;
|
||||
SLONG slSizeOutStream = 0;
|
||||
//SLONG slSizeOutStream = 0;
|
||||
// get header with size of files
|
||||
if (*(SLONG*)pubNew!=DIFF) {
|
||||
ThrowF_t(TRANS("Not a DIFF stream!"));
|
||||
}
|
||||
pubNew+=sizeof(SLONG);
|
||||
slSizeOldStream = *(SLONG*)pubNew; pubNew+=sizeof(SLONG);
|
||||
slSizeOutStream = *(SLONG*)pubNew; pubNew+=sizeof(SLONG);
|
||||
/* slSizeOutStream = *(SLONG*)pubNew; */ pubNew+=sizeof(SLONG);
|
||||
ULONG ulCRC = *(ULONG*)pubNew; pubNew+=sizeof(ULONG);
|
||||
|
||||
CRC_Start(_ulCRC);
|
||||
|
|
|
@ -695,7 +695,7 @@ void CSessionState::HandleMovers(void)
|
|||
void CSessionState::HandleTimers(TIME tmCurrentTick)
|
||||
{
|
||||
#define TIME_EPSILON 0.0001f
|
||||
IFDEBUG(TIME tmLast = 0.0f);
|
||||
//IFDEBUG(TIME tmLast = 0.0f);
|
||||
|
||||
_pfPhysicsProfile.StartTimer(CPhysicsProfile::PTI_HANDLETIMERS);
|
||||
// repeat
|
||||
|
@ -729,7 +729,7 @@ void CSessionState::HandleTimers(TIME tmCurrentTick)
|
|||
// check that timers are propertly handled
|
||||
ASSERT(penTimer->en_timeTimer>tmCurrentTick-_pTimer->TickQuantum-TIME_EPSILON);
|
||||
//ASSERT(penTimer->en_timeTimer>=tmLast);
|
||||
IFDEBUG(tmLast=penTimer->en_timeTimer);
|
||||
//IFDEBUG(tmLast=penTimer->en_timeTimer);
|
||||
|
||||
// remove the timer from the list
|
||||
penTimer->en_timeTimer = THINKTIME_NEVER;
|
||||
|
|
|
@ -789,7 +789,7 @@ void CMesh::Read_t(CTStream *istrFile)
|
|||
// read float count
|
||||
(*istrFile)>>ctfl;
|
||||
|
||||
CShader *pshMeshShader = NULL;
|
||||
//CShader *pshMeshShader = NULL;
|
||||
ShaderParams *pshpShaderParams = NULL;
|
||||
CShader shDummyShader; // dummy shader if shader is not found
|
||||
ShaderParams shpDummyShaderParams;// dummy shader params if shader is not found
|
||||
|
@ -799,12 +799,12 @@ void CMesh::Read_t(CTStream *istrFile)
|
|||
// try to load shader
|
||||
try{
|
||||
msrf.msrf_pShader = _pShaderStock->Obtain_t(strShaderName);
|
||||
pshMeshShader = msrf.msrf_pShader;
|
||||
//pshMeshShader = msrf.msrf_pShader;
|
||||
pshpShaderParams = &msrf.msrf_ShadingParams;
|
||||
} catch(char *strErr) {
|
||||
CPrintF("%s\n",strErr);
|
||||
msrf.msrf_pShader = NULL;
|
||||
pshMeshShader = &shDummyShader;
|
||||
//pshMeshShader = &shDummyShader;
|
||||
pshpShaderParams = &shpDummyShaderParams;
|
||||
}
|
||||
|
||||
|
|
|
@ -186,6 +186,8 @@ void BSPVertexContainer<Type, iDimensions>::Sort(void)
|
|||
template<class Type, int iDimensions>
|
||||
void BSPVertexContainer<Type, iDimensions>::ElliminatePairedVertices(void)
|
||||
{
|
||||
// FIXME: DG: am I missing something or is this function not actually changing anything?
|
||||
|
||||
// if there are no vertices, or the container is not line
|
||||
if (bvc_aVertices.Count()==0 || IsPlannar()) {
|
||||
// do not attempt to sort
|
||||
|
|
|
@ -202,13 +202,14 @@ void CTerrain::CreateEmptyTerrain_t(PIX pixWidth,PIX pixHeight)
|
|||
void CTerrain::ImportHeightMap_t(CTFileName fnHeightMap, BOOL bUse16b/*=TRUE*/)
|
||||
{
|
||||
_ptrTerrain = this;
|
||||
BOOL bResizeTerrain = FALSE;
|
||||
//BOOL bResizeTerrain = FALSE;
|
||||
|
||||
// Load targa file
|
||||
CImageInfo iiHeightMap;
|
||||
iiHeightMap.LoadAnyGfxFormat_t(fnHeightMap);
|
||||
|
||||
// if new width and height are same
|
||||
// if new width and height are same
|
||||
/* unused
|
||||
if(tr_pixHeightMapWidth==iiHeightMap.ii_Width && tr_pixHeightMapHeight==iiHeightMap.ii_Height) {
|
||||
// Clear terrain data without removing layers
|
||||
bResizeTerrain = FALSE;
|
||||
|
@ -217,6 +218,7 @@ void CTerrain::ImportHeightMap_t(CTFileName fnHeightMap, BOOL bUse16b/*=TRUE*/)
|
|||
bResizeTerrain = TRUE;
|
||||
}
|
||||
bResizeTerrain = TRUE;
|
||||
*/
|
||||
|
||||
FLOAT fLogWidht = Log2(iiHeightMap.ii_Width-1);
|
||||
FLOAT fLogHeight = Log2(iiHeightMap.ii_Height-1);
|
||||
|
|
|
@ -1004,6 +1004,9 @@ void CWorld::DeleteSectors(CBrushSectorSelection &selbscSectorsToDelete, BOOL bC
|
|||
|
||||
void CheckOnePolygon(CBrushSector &bsc, CBrushPolygon &bpo)
|
||||
{
|
||||
// NOTE: This function has no side effects, but I think "Check" means
|
||||
// "try to access stuff and make sure it doesn't segfault", so keep it
|
||||
// like it is even if the compiler complains about unused values?
|
||||
CBrushPlane *pbplPlane=bpo.bpo_pbplPlane;
|
||||
INDEX ctEdges=bpo.bpo_abpePolygonEdges.Count();
|
||||
INDEX ctVertices=bpo.bpo_apbvxTriangleVertices.Count();
|
||||
|
|
|
@ -1035,9 +1035,9 @@ void Particles_BeastProjectileTrail( CEntity *pen, FLOAT fSize, FLOAT fHeight, I
|
|||
fT *= 1/BEAST_PROJECTILE_TOTAL_TIME;
|
||||
// get fraction part
|
||||
fT = fT-int(fT);
|
||||
FLOAT fFade;
|
||||
if (fT>(1.0f-BEAST_PROJECTILE_FADE_OUT)) fFade=(1-fT)*(1/BEAST_PROJECTILE_FADE_OUT);
|
||||
else fFade=1.0f;
|
||||
//FLOAT fFade;
|
||||
//if (fT>(1.0f-BEAST_PROJECTILE_FADE_OUT)) fFade=(1-fT)*(1/BEAST_PROJECTILE_FADE_OUT);
|
||||
//else fFade=1.0f;
|
||||
|
||||
#define GET_POS( time) vCenter + \
|
||||
vX*(afStarsPositions[iStar][0]*time*fSize*1.5) +\
|
||||
|
|
|
@ -198,7 +198,7 @@ functions:
|
|||
return 1;
|
||||
}
|
||||
|
||||
PIX pixW = 0;
|
||||
//PIX pixW = 0;
|
||||
PIX pixH = 0;
|
||||
//FLOAT fResolutionScaling;
|
||||
CTString strEmpty;
|
||||
|
@ -209,7 +209,7 @@ functions:
|
|||
pdp->Unlock();
|
||||
pdpCurr->Lock();
|
||||
|
||||
pixW = pdpCurr->GetWidth();
|
||||
//pixW = pdpCurr->GetWidth();
|
||||
pixH = pdpCurr->GetHeight();
|
||||
|
||||
FLOAT fResFactor = pixH/480.0f;
|
||||
|
|
|
@ -873,20 +873,20 @@ functions:
|
|||
GetBoundingBox(box);
|
||||
FLOAT fEntitySize = box.Size().MaxNorm()/2;
|
||||
|
||||
INDEX iCount = 1;
|
||||
FLOAT3D vNormalizedDamage = m_vDamage-m_vDamage*(m_fBlowUpAmount/m_vDamage.Length());
|
||||
vNormalizedDamage /= Sqrt(vNormalizedDamage.Length());
|
||||
vNormalizedDamage *= 1.75f;
|
||||
/*
|
||||
FLOAT3D vBodySpeed = en_vCurrentTranslationAbsolute-en_vGravityDir*(en_vGravityDir%en_vCurrentTranslationAbsolute);
|
||||
|
||||
// spawn debris
|
||||
|
||||
INDEX iCount = 1;
|
||||
switch (m_EecChar) {
|
||||
case ELC_SMALL: iCount = 3; break;
|
||||
case ELC_BIG: iCount = 5; break;
|
||||
case ELC_LARGE: iCount = 7; break;
|
||||
}
|
||||
|
||||
FLOAT3D vNormalizedDamage = m_vDamage-m_vDamage*(m_fBlowUpAmount/m_vDamage.Length());
|
||||
vNormalizedDamage /= Sqrt(vNormalizedDamage.Length());
|
||||
vNormalizedDamage *= 1.75f;
|
||||
FLOAT3D vBodySpeed = en_vCurrentTranslationAbsolute-en_vGravityDir*(en_vGravityDir%en_vCurrentTranslationAbsolute);
|
||||
|
||||
// spawn debris
|
||||
/*
|
||||
switch (m_EetType) {
|
||||
case ELT_ICE: {
|
||||
Debris_Begin(EIBT_ICE, DPT_NONE, BET_NONE, fEntitySize, vNormalizedDamage, vBodySpeed, 1.0f, 0.0f);
|
||||
|
|
|
@ -140,7 +140,7 @@ functions:
|
|||
// render one lightning toward enemy
|
||||
FLOAT3D vSource = GetPlacement().pl_PositionVector;
|
||||
FLOAT3D vTarget = m_penEnemy->GetPlacement().pl_PositionVector;
|
||||
FLOAT3D vDirection = (vTarget-vSource).Normalize();
|
||||
//FLOAT3D vDirection = (vTarget-vSource).Normalize();
|
||||
Particles_Ghostbuster(vSource, vTarget, 32, 1.0f);
|
||||
|
||||
// random lightnings arround
|
||||
|
|
|
@ -73,7 +73,7 @@ functions:
|
|||
return;
|
||||
}
|
||||
|
||||
BOOL bFlare = TRUE;
|
||||
//BOOL bFlare = TRUE;
|
||||
// if current player has already picked this item
|
||||
if (_ulPlayerRenderingMask&m_ulPickedMask) {
|
||||
// if picked items are not rendered
|
||||
|
@ -83,11 +83,11 @@ functions:
|
|||
fMipFactor = UpperLimit(0.0f);
|
||||
}
|
||||
// if picked item particles are not rendered
|
||||
extern INDEX plr_bRenderPickedParticles;
|
||||
/*extern INDEX plr_bRenderPickedParticles;
|
||||
if (!plr_bRenderPickedParticles) {
|
||||
// kill flare
|
||||
bFlare = FALSE;
|
||||
}
|
||||
bFlare = FALSE; // DG: bFlare is otherwise unused!
|
||||
}*/
|
||||
}
|
||||
|
||||
// implement flare on/off ?
|
||||
|
|
|
@ -217,7 +217,7 @@ functions:
|
|||
} else {
|
||||
vDirectionFixed = FLOAT3D(0,1,0);
|
||||
}
|
||||
FLOAT3D vDamageOld = m_vDamage;
|
||||
//FLOAT3D vDamageOld = m_vDamage;
|
||||
m_vDamage += vDirectionFixed*fKickDamage;
|
||||
|
||||
// NOTE: we don't receive damage here, but handle death differently
|
||||
|
|
|
@ -1054,7 +1054,7 @@ functions:
|
|||
FLOAT3D vDesiredTranslation = pl.en_vDesiredTranslationRelative;
|
||||
FLOAT3D vCurrentTranslation = pl.en_vCurrentTranslationAbsolute * !pl.en_mRotation;
|
||||
ANGLE3D aDesiredRotation = pl.en_aDesiredRotationRelative;
|
||||
ANGLE3D aCurrentRotation = pl.en_aCurrentRotationAbsolute;
|
||||
//ANGLE3D aCurrentRotation = pl.en_aCurrentRotationAbsolute;
|
||||
|
||||
// if player is moving
|
||||
if (vDesiredTranslation.ManhattanNorm()>0.01f
|
||||
|
|
|
@ -1988,7 +1988,7 @@ functions:
|
|||
FLOATmatrix3D m;
|
||||
MakeRotationMatrixFast(m, plKnife.pl_OrientationAngle);
|
||||
FLOAT3D vRight = m.GetColumn(1)*fWide;
|
||||
FLOAT3D vUp = m.GetColumn(2)*fWide;
|
||||
//FLOAT3D vUp = m.GetColumn(2)*fWide;
|
||||
FLOAT3D vFront = -m.GetColumn(3)*fRange;
|
||||
|
||||
FLOAT3D vDest[3];
|
||||
|
|
|
@ -486,7 +486,7 @@ functions:
|
|||
void SpawnBeamMachineMainFlare(void)
|
||||
{
|
||||
// spawn main flare
|
||||
CPlacement3D plSpaceShip = GetPlacement();
|
||||
//CPlacement3D plSpaceShip = GetPlacement();
|
||||
CPlacement3D plFlare = CPlacement3D( FLOAT3D(0, BM_MASTER_Y+BM_FLARE_DY, 0), ANGLE3D(0,0,0));
|
||||
plFlare.RelativeToAbsolute(GetPlacement());
|
||||
CEntity *penFlare = CreateEntity( plFlare, CLASS_EFFECTOR);
|
||||
|
|
|
@ -83,10 +83,11 @@ functions:
|
|||
pen->Initialize();
|
||||
|
||||
// adjust circle radii to account for enemy size
|
||||
/* unused
|
||||
FLOAT fEntityR = 0;
|
||||
if (pen->en_pciCollisionInfo!=NULL) {
|
||||
fEntityR = pen->en_pciCollisionInfo->GetMaxFloorRadius();
|
||||
}
|
||||
} */
|
||||
|
||||
// teleport back
|
||||
pen->Teleport(GetPlacement(), FALSE);
|
||||
|
|
|
@ -222,8 +222,8 @@ void CControls::Load_t( CTFileName fnFile)
|
|||
achrIfInverted[ 0] = 0;
|
||||
char achrIfRelative[ 1024];
|
||||
achrIfRelative[ 0] = 0;
|
||||
char achrIfSmooth[ 1024];
|
||||
achrIfSmooth[ 0] = 0;
|
||||
//char achrIfSmooth[ 1024];
|
||||
//achrIfSmooth[ 0] = 0;
|
||||
achrActionName[ 0] = 0;
|
||||
FLOAT fSensitivity = 50;
|
||||
FLOAT fDeadZone = 0;
|
||||
|
|
|
@ -4077,6 +4077,7 @@ void CPlayerProfileMenu::SelectPlayer(INDEX iPlayer)
|
|||
mgPlayerModel.mg_strTip = TRANS("cannot change model for single-player game");
|
||||
mgPlayerModel.mg_bEnabled = FALSE;
|
||||
}
|
||||
(void)bSet;
|
||||
// ignore gender flags, if any
|
||||
strName.RemovePrefix("#female#");
|
||||
strName.RemovePrefix("#male#");
|
||||
|
|
|
@ -100,9 +100,9 @@ void DoSpecularLayer(INDEX iSpeculaTexture,INDEX iSpecularColor)
|
|||
|
||||
void DoReflectionLayer(INDEX iReflectionTexture,INDEX iReflectionColor,BOOL bFullBright)
|
||||
{
|
||||
GFXVertex4 *paVertices = NULL;
|
||||
//GFXVertex4 *paVertices = NULL;
|
||||
GFXNormal *paNormals = NULL;
|
||||
paVertices = shaGetVertexArray();
|
||||
//paVertices = shaGetVertexArray();
|
||||
paNormals = shaGetNormalArray();
|
||||
INDEX ctVertices = shaGetVertexCount();
|
||||
GFXTexCoord *ptcUVMap = shaGetNewTexCoordArray();
|
||||
|
|
Loading…
Reference in New Issue
Block a user