mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +00:00
- Changed QuakePower back to fixed_t and just had it return FLOAT2FIXED instead.
This commit is contained in:
parent
3bf24204d8
commit
d6e4a7a081
1 changed files with 8 additions and 9 deletions
|
@ -770,7 +770,7 @@ bool R_GetViewInterpolationStatus()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static double QuakePower(double factor, int intensity, double scaleDown, double scaleDownStart)
|
static fixed_t QuakePower(double factor, int intensity, double scaleDown, double scaleDownStart)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (intensity == 0)
|
if (intensity == 0)
|
||||||
|
@ -782,11 +782,11 @@ static double QuakePower(double factor, int intensity, double scaleDown, double
|
||||||
double ss = (double)((pr_torchflicker() % (intensity << 2)) - (intensity << 1));
|
double ss = (double)((pr_torchflicker() % (intensity << 2)) - (intensity << 1));
|
||||||
if (scaleDownStart == 0)
|
if (scaleDownStart == 0)
|
||||||
{
|
{
|
||||||
return factor * ss;
|
return FLOAT2FIXED(factor * ss);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return ((factor * ss) * ((scaleDown / scaleDownStart)));
|
return FLOAT2FIXED(((factor * ss) * ((scaleDown / scaleDownStart))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -904,7 +904,6 @@ void R_SetupFrame (AActor *actor)
|
||||||
{
|
{
|
||||||
int intensityX, intensityY, intensityZ, relIntensityX, relIntensityY, relIntensityZ;
|
int intensityX, intensityY, intensityZ, relIntensityX, relIntensityY, relIntensityZ;
|
||||||
double scaleDown, scaleDownStart;
|
double scaleDown, scaleDownStart;
|
||||||
//double sdown = (double)scaleDown; double sdownstart = (double)scaleDownStart;
|
|
||||||
if (DEarthquake::StaticGetQuakeIntensities(camera,
|
if (DEarthquake::StaticGetQuakeIntensities(camera,
|
||||||
intensityX, intensityY, intensityZ,
|
intensityX, intensityY, intensityZ,
|
||||||
relIntensityX, relIntensityY, relIntensityZ, scaleDown, scaleDownStart) > 0)
|
relIntensityX, relIntensityY, relIntensityZ, scaleDown, scaleDownStart) > 0)
|
||||||
|
@ -914,30 +913,30 @@ void R_SetupFrame (AActor *actor)
|
||||||
if (relIntensityX != 0)
|
if (relIntensityX != 0)
|
||||||
{
|
{
|
||||||
int ang = (camera->angle) >> ANGLETOFINESHIFT;
|
int ang = (camera->angle) >> ANGLETOFINESHIFT;
|
||||||
fixed_t power = FLOAT2FIXED(QuakePower(quakefactor, relIntensityX, scaleDown, scaleDownStart));
|
fixed_t power = QuakePower(quakefactor, relIntensityX, scaleDown, scaleDownStart);
|
||||||
viewx += FixedMul(finecosine[ang], power);
|
viewx += FixedMul(finecosine[ang], power);
|
||||||
viewy += FixedMul(finesine[ang], power);
|
viewy += FixedMul(finesine[ang], power);
|
||||||
}
|
}
|
||||||
if (relIntensityY != 0)
|
if (relIntensityY != 0)
|
||||||
{
|
{
|
||||||
int ang = (camera->angle + ANG90) >> ANGLETOFINESHIFT;
|
int ang = (camera->angle + ANG90) >> ANGLETOFINESHIFT;
|
||||||
fixed_t power = FLOAT2FIXED(QuakePower(quakefactor, relIntensityY, scaleDown, scaleDownStart));
|
fixed_t power = QuakePower(quakefactor, relIntensityY, scaleDown, scaleDownStart);
|
||||||
viewx += FixedMul(finecosine[ang], power);
|
viewx += FixedMul(finecosine[ang], power);
|
||||||
viewy += FixedMul(finesine[ang], power);
|
viewy += FixedMul(finesine[ang], power);
|
||||||
}
|
}
|
||||||
if (intensityX != 0)
|
if (intensityX != 0)
|
||||||
{
|
{
|
||||||
viewx += FLOAT2FIXED(QuakePower(quakefactor, intensityX, scaleDown, scaleDownStart));
|
viewx += QuakePower(quakefactor, intensityX, scaleDown, scaleDownStart);
|
||||||
}
|
}
|
||||||
if (intensityY != 0)
|
if (intensityY != 0)
|
||||||
{
|
{
|
||||||
viewy += FLOAT2FIXED(QuakePower(quakefactor, intensityY, scaleDown, scaleDownStart));
|
viewy += QuakePower(quakefactor, intensityY, scaleDown, scaleDownStart);
|
||||||
}
|
}
|
||||||
// FIXME: Relative Z is not relative
|
// FIXME: Relative Z is not relative
|
||||||
intensityZ = MAX(intensityZ, relIntensityZ);
|
intensityZ = MAX(intensityZ, relIntensityZ);
|
||||||
if (intensityZ != 0)
|
if (intensityZ != 0)
|
||||||
{
|
{
|
||||||
viewz += FLOAT2FIXED(QuakePower(quakefactor, intensityZ, scaleDown, scaleDownStart));
|
viewz += QuakePower(quakefactor, intensityZ, scaleDown, scaleDownStart);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue