mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Let's just convert this in a more sane fashion...
This commit is contained in:
parent
7ce3d5bea0
commit
6ef8ddf3ee
3 changed files with 14 additions and 2 deletions
|
|
@ -838,7 +838,7 @@ static void K_ParseSplashParameter(size_t i, char *param, char *val)
|
||||||
}
|
}
|
||||||
else if (stricmp(param, "cone") == 0)
|
else if (stricmp(param, "cone") == 0)
|
||||||
{
|
{
|
||||||
splash->cone = AngleFixed(FLOAT_TO_FIXED(atof(val))); // lol
|
splash->cone = FloatToAngle(atof(val));
|
||||||
}
|
}
|
||||||
else if (stricmp(param, "numParticles") == 0)
|
else if (stricmp(param, "numParticles") == 0)
|
||||||
{
|
{
|
||||||
|
|
@ -938,7 +938,7 @@ static void K_ParseFootstepParameter(size_t i, char *param, char *val)
|
||||||
}
|
}
|
||||||
else if (stricmp(param, "cone") == 0)
|
else if (stricmp(param, "cone") == 0)
|
||||||
{
|
{
|
||||||
footstep->cone = AngleFixed(FLOAT_TO_FIXED(atof(val))); // lol
|
footstep->cone = FloatToAngle(atof(val));
|
||||||
}
|
}
|
||||||
else if (stricmp(param, "sfxFreq") == 0)
|
else if (stricmp(param, "sfxFreq") == 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
10
src/tables.c
10
src/tables.c
|
|
@ -185,6 +185,16 @@ INT32 AngleDeltaSigned(angle_t a1, angle_t a2)
|
||||||
return (INT32)(a1) - (INT32)(a2);
|
return (INT32)(a1) - (INT32)(a2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float AngleToFloat(angle_t x)
|
||||||
|
{
|
||||||
|
return x / (float)ANG1;
|
||||||
|
}
|
||||||
|
|
||||||
|
angle_t FloatToAngle(float f)
|
||||||
|
{
|
||||||
|
return (angle_t)(f * ANG1);
|
||||||
|
}
|
||||||
|
|
||||||
#include "t_ftan.c"
|
#include "t_ftan.c"
|
||||||
|
|
||||||
#include "t_fsin.c"
|
#include "t_fsin.c"
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,8 @@ FUNCMATH angle_t FixedAngleC(fixed_t fa, fixed_t factor);
|
||||||
// difference between two angle_t
|
// difference between two angle_t
|
||||||
FUNCMATH INT32 AngleDelta(angle_t a1, angle_t a2);
|
FUNCMATH INT32 AngleDelta(angle_t a1, angle_t a2);
|
||||||
FUNCMATH INT32 AngleDeltaSigned(angle_t a1, angle_t a2);
|
FUNCMATH INT32 AngleDeltaSigned(angle_t a1, angle_t a2);
|
||||||
|
FUNCMATH float AngleToFloat(angle_t x);
|
||||||
|
FUNCMATH angle_t FloatToAngle(float f);
|
||||||
|
|
||||||
/// The FixedAcos function
|
/// The FixedAcos function
|
||||||
FUNCMATH angle_t FixedAcos(fixed_t x);
|
FUNCMATH angle_t FixedAcos(fixed_t x);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue