mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- Eliminate last remaining binangle
inline utilities.
This commit is contained in:
parent
dd55569915
commit
abb8b87be1
3 changed files with 4 additions and 16 deletions
|
@ -419,26 +419,14 @@ inline constexpr int32_t interpolatedangle(int32_t oang, int32_t ang, int const
|
|||
return oang + MulScale(((ang + 1024 - oang) & 2047) - 1024, smoothratio, scale);
|
||||
}
|
||||
|
||||
inline constexpr binangle interpolatedangle(binangle oang, binangle ang, double const smoothratio, int const scale = 16)
|
||||
{
|
||||
return bamang(oang.asbam() + MulScale(((ang.asbam() + 0x80000000 - oang.asbam()) & 0xFFFFFFFF) - 0x80000000, int(smoothratio), scale));
|
||||
}
|
||||
|
||||
inline constexpr binangle interpolatedangle(binangle oang, binangle ang, int const smoothratio, int const scale = 16)
|
||||
{
|
||||
return bamang(oang.asbam() + MulScale(((ang.asbam() + 0x80000000 - oang.asbam()) & 0xFFFFFFFF) - 0x80000000, smoothratio, scale));
|
||||
}
|
||||
|
||||
// FIXME: Can't rely on overloading this to functions we're trying to deprecate. OK for now.
|
||||
inline constexpr DAngle interpolatedangle(DAngle oang, DAngle ang, double const smoothratio, int const scale = 16)
|
||||
{
|
||||
return DAngle::fromBam(interpolatedangle(bamang(oang.BAMs()), bamang(ang.BAMs()), int(smoothratio), scale).asbam());
|
||||
return DAngle::fromBam(oang.BAMs() + MulScale(((ang.BAMs() + 0x80000000 - oang.BAMs()) & 0xFFFFFFFF) - 0x80000000, int(smoothratio), scale));
|
||||
}
|
||||
|
||||
// FIXME: Can't rely on overloading this to functions we're trying to deprecate. OK for now.
|
||||
inline constexpr DAngle interpolatedangle(DAngle oang, DAngle ang, int const smoothratio, int const scale = 16)
|
||||
{
|
||||
return DAngle::fromBam(interpolatedangle(bamang(oang.BAMs()), bamang(ang.BAMs()), smoothratio, scale).asbam());
|
||||
return DAngle::fromBam(oang.BAMs() + MulScale(((ang.BAMs() + 0x80000000 - oang.BAMs()) & 0xFFFFFFFF) - 0x80000000, smoothratio, scale));
|
||||
}
|
||||
|
||||
inline constexpr fixedhoriz interpolatedhorizon(fixedhoriz oval, fixedhoriz val, double const smoothratio, int const scale = 16)
|
||||
|
|
|
@ -198,7 +198,7 @@ void QAV::Draw(double x, double y, int ticks, int stat, int shade, int palnum, b
|
|||
tileX += interpolatedvaluef(prevTile->x, thisTile->x, smoothratio);
|
||||
tileY += interpolatedvaluef(prevTile->y, thisTile->y, smoothratio);
|
||||
tileZ = interpolatedvaluef(prevTile->z, thisTile->z, smoothratio);
|
||||
tileA = interpolatedangle(buildang(prevTile->angle), buildang(thisTile->angle), smoothratio).asbuildf();
|
||||
tileA = interpolatedangle(DAngle::fromBuild(prevTile->angle), DAngle::fromBuild(thisTile->angle), smoothratio).Buildfang();
|
||||
tileShade = interpolatedvalue(prevTile->shade, thisTile->shade, smoothratio) + shade;
|
||||
auto prevAlpha = ((stat | prevTile->stat) & RS_TRANS1) ? glblend[0].def[!!((stat | prevTile->stat) & RS_TRANS2)].alpha : 1.;
|
||||
auto thisAlpha = (tileStat & RS_TRANS1) ? glblend[0].def[!!(tileStat & RS_TRANS2)].alpha : 1.;
|
||||
|
|
|
@ -927,7 +927,7 @@ void DrawWeapons(double smooth)
|
|||
|
||||
if (cl_hudinterpolation)
|
||||
{
|
||||
nBobAngle = interpolatedangle(buildang(obobangle), buildang(bobangle), smooth).asbuildf();
|
||||
nBobAngle = interpolatedangle(DAngle::fromBuild(obobangle), DAngle::fromBuild(bobangle), smooth).Buildfang();
|
||||
nVal = interpolatedvaluef(PlayerList[nLocalPlayer].ototalvel, PlayerList[nLocalPlayer].totalvel, smooth, 16) * 0.5;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue