mirror of
https://github.com/ioquake/jedi-academy.git
synced 2024-11-22 20:31:26 +00:00
powf -> Q_powf
This commit is contained in:
parent
f99cdcd1fa
commit
e8391f9c09
5 changed files with 6 additions and 6 deletions
|
@ -345,7 +345,7 @@ void CRMLandScape::Sprinkle(CCMPatch *patch, CCGHeightDetails *hd, int level)
|
||||||
// Get a number -5.3f to 5.3f
|
// Get a number -5.3f to 5.3f
|
||||||
density = (mDensityMap[px + (common->GetBlockWidth() * py)] - 128) / 24.0f;
|
density = (mDensityMap[px + (common->GetBlockWidth() * py)] - 128) / 24.0f;
|
||||||
// ..and multiply that into the count
|
// ..and multiply that into the count
|
||||||
count = Round(common->GetPatchScalarSize() * hd->GetAverageFrequency() * powf(2.0f, density) * 0.001);
|
count = Round(common->GetPatchScalarSize() * hd->GetAverageFrequency() * Q_powf(2.0f, density) * 0.001);
|
||||||
|
|
||||||
for(i = 0; i < count; i++)
|
for(i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -441,7 +441,7 @@ static void CG_UpdateThirdPersonTargetDamp(void)
|
||||||
|
|
||||||
// Note that since there are a finite number of "practical" delta millisecond values possible,
|
// Note that since there are a finite number of "practical" delta millisecond values possible,
|
||||||
// the ratio should be initialized into a chart ultimately.
|
// the ratio should be initialized into a chart ultimately.
|
||||||
ratio = powf(dampfactor, dtime);
|
ratio = Q_powf(dampfactor, dtime);
|
||||||
|
|
||||||
// This value is how much distance is "left" from the ideal.
|
// This value is how much distance is "left" from the ideal.
|
||||||
VectorMA(cameraIdealTarget, -ratio, targetdiff, cameraCurTarget);
|
VectorMA(cameraIdealTarget, -ratio, targetdiff, cameraCurTarget);
|
||||||
|
@ -528,7 +528,7 @@ static void CG_UpdateThirdPersonCameraDamp(void)
|
||||||
|
|
||||||
// Note that since there are a finite number of "practical" delta millisecond values possible,
|
// Note that since there are a finite number of "practical" delta millisecond values possible,
|
||||||
// the ratio should be initialized into a chart ultimately.
|
// the ratio should be initialized into a chart ultimately.
|
||||||
ratio = powf(dampfactor, dtime);
|
ratio = Q_powf(dampfactor, dtime);
|
||||||
|
|
||||||
// This value is how much distance is "left" from the ideal.
|
// This value is how much distance is "left" from the ideal.
|
||||||
VectorMA(cameraIdealLoc, -ratio, locdiff, cameraCurLoc);
|
VectorMA(cameraIdealLoc, -ratio, locdiff, cameraCurLoc);
|
||||||
|
|
|
@ -1470,7 +1470,7 @@ int Q_irand(int value1, int value2)
|
||||||
return irand(value1, value2);
|
return irand(value1, value2);
|
||||||
}
|
}
|
||||||
|
|
||||||
float powf ( float x, int y )
|
float Q_powf ( float x, int y )
|
||||||
{
|
{
|
||||||
float r = x;
|
float r = x;
|
||||||
for ( y--; y>0; y-- )
|
for ( y--; y>0; y-- )
|
||||||
|
|
|
@ -1280,7 +1280,7 @@ float Q_rsqrt( float f ); // reciprocal square root
|
||||||
signed char ClampChar( int i );
|
signed char ClampChar( int i );
|
||||||
signed short ClampShort( int i );
|
signed short ClampShort( int i );
|
||||||
|
|
||||||
float powf ( float x, int y );
|
float Q_powf ( float x, int y );
|
||||||
|
|
||||||
// this isn't a real cheap function to call!
|
// this isn't a real cheap function to call!
|
||||||
int DirToByte( vec3_t dir );
|
int DirToByte( vec3_t dir );
|
||||||
|
|
|
@ -445,7 +445,7 @@ void CTRLandScape::CalculateLighting(void)
|
||||||
|
|
||||||
// Both normalised, so -1.0 < dp < 1.0
|
// Both normalised, so -1.0 < dp < 1.0
|
||||||
dp = Com_Clampi(0.0f, 1.0f, DotProduct(direction, total));
|
dp = Com_Clampi(0.0f, 1.0f, DotProduct(direction, total));
|
||||||
dp = powf(dp, 3);
|
dp = Q_powf(dp, 3);
|
||||||
VectorScale(ambient, (1.0 - dp) * 0.5, ambient);
|
VectorScale(ambient, (1.0 - dp) * 0.5, ambient);
|
||||||
VectorMA(ambient, dp, directed, tint);
|
VectorMA(ambient, dp, directed, tint);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue