mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Fixed Linux build issues. Tested with Clang
This commit is contained in:
parent
5d26aaddb3
commit
2f8ae72431
3 changed files with 10 additions and 10 deletions
|
@ -320,12 +320,12 @@ float shFindWindowingLambda( const SphericalHarmonicsT<float, L>& sh, float maxL
|
|||
|
||||
for( int l = 1; l <= ( int )L; ++l )
|
||||
{
|
||||
tableL[l] = float( sqr( l ) * sqr( l + 1 ) );
|
||||
tableL[l] = float( Square( l ) * Square( l + 1 ) );
|
||||
|
||||
float B = 0.0f;
|
||||
for( int m = -1; m <= l; ++m )
|
||||
{
|
||||
B += sqr( sh.at( l, m ) );
|
||||
B += Square( sh.at( l, m ) );
|
||||
}
|
||||
tableB[l] = B;
|
||||
}
|
||||
|
@ -345,16 +345,16 @@ float shFindWindowingLambda( const SphericalHarmonicsT<float, L>& sh, float maxL
|
|||
|
||||
float lambda = 0.0f;
|
||||
|
||||
const u32 iterationLimit = 10000000;
|
||||
for( u32 i = 0; i < iterationLimit; ++i )
|
||||
const uint32_t iterationLimit = 10000000;
|
||||
for( uint32_t i = 0; i < iterationLimit; ++i )
|
||||
{
|
||||
float f = 0.0f;
|
||||
float fd = 0.0f;
|
||||
|
||||
for( int l = 1; l <= ( int )L; ++l )
|
||||
{
|
||||
f += tableL[l] * tableB[l] / sqr( 1.0f + lambda * tableL[l] );
|
||||
fd += ( 2.0f * sqr( tableL[l] ) * tableB[l] ) / cube( 1.0f + lambda * tableL[l] );
|
||||
f += tableL[l] * tableB[l] / Square( 1.0f + lambda * tableL[l] );
|
||||
fd += ( 2.0f * Square( tableL[l] ) * tableB[l] ) / Cube( 1.0f + lambda * tableL[l] );
|
||||
}
|
||||
|
||||
f = targetSquaredLaplacian - f;
|
||||
|
@ -362,7 +362,7 @@ float shFindWindowingLambda( const SphericalHarmonicsT<float, L>& sh, float maxL
|
|||
float delta = -f / fd;
|
||||
lambda += delta;
|
||||
|
||||
if( abs( delta ) < 1e-6f )
|
||||
if( idMath::Fabs( delta ) < 1e-6f )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -368,7 +368,7 @@ typedef enum
|
|||
class idSoundEmitter;
|
||||
|
||||
// RB: predefined Quake 1 light styles
|
||||
static char* predef_lightstyles[] =
|
||||
static const char* predef_lightstyles[] =
|
||||
{
|
||||
"m",
|
||||
"mmnmmommommnonmmonqnmmo",
|
||||
|
@ -384,7 +384,7 @@ static char* predef_lightstyles[] =
|
|||
"abcdefghijklmnopqrrqponmlkjihgfedcba"
|
||||
};
|
||||
|
||||
static char* predef_lightstylesinfo[] =
|
||||
static const char* predef_lightstylesinfo[] =
|
||||
{
|
||||
"Normal",
|
||||
"Flicker A",
|
||||
|
|
|
@ -1337,7 +1337,7 @@ void idRenderBackend::DrawSingleInteraction( drawInteraction_t* din, bool useFas
|
|||
probeMaxs[2] = viewDef->globalProbeBounds[1][2];
|
||||
probeMaxs[3] = 0.0f;
|
||||
|
||||
idVec3& center = viewDef->globalProbeBounds.GetCenter();
|
||||
idVec3 center = viewDef->globalProbeBounds.GetCenter();
|
||||
probeCenter.Set( center.x, center.y, center.z, 1.0f );
|
||||
|
||||
SetVertexParm( RENDERPARM_WOBBLESKY_X, probeMins.ToFloatPtr() );
|
||||
|
|
Loading…
Reference in a new issue