Atleast we go ingame

This commit is contained in:
Gray
2024-03-21 18:27:42 -04:00
parent b3d9ab9e8b
commit 79bcabbbd0
18 changed files with 77 additions and 183 deletions

View File

@@ -16,9 +16,20 @@ struct FMath : public FGenericPlatformMath
return A * A;
}
static float SRand() // T(REP)
static FORCEINLINE float Fractional(float Value)
{
return rand();
return Value - TruncToFloat(Value);
}
static float SRand()
{
GSRandSeed = (GSRandSeed * 196314165) + 907633515;
union { float f; int32 i; } Result;
union { float f; int32 i; } Temp;
const float SRandTemp = 1.0f;
Temp.f = SRandTemp;
Result.i = (Temp.i & 0xff800000) | (GSRandSeed & 0x007fffff);
return Fractional(Result.f);
}
static FORCEINLINE uint32 FloorLog2(uint32 Value)