Simplicity is a virute... don't overcomplicate things.

This commit is contained in:
Inuyasha 2016-03-29 06:14:31 -07:00
parent a3e940fe65
commit 3dc4cfc229
1 changed files with 3 additions and 6 deletions

View File

@ -95,13 +95,10 @@ static UINT32 initialseed = 0;
*/ */
ATTRINLINE static fixed_t FUNCINLINE __internal_prng__(void) ATTRINLINE static fixed_t FUNCINLINE __internal_prng__(void)
{ {
randomseed += 7069; randomseed ^= randomseed >> 13;
randomseed ^= randomseed << 17; randomseed ^= randomseed >> 11;
randomseed ^= randomseed >> 9;
randomseed *= 373;
randomseed ^= randomseed << 21; randomseed ^= randomseed << 21;
randomseed ^= randomseed >> 15; return ( (randomseed*36548569) >> 4) & (FRACUNIT-1);
return (randomseed&((FRACUNIT-1)<<9))>>9;
} }
/** Provides a random fixed point number. Distribution is uniform. /** Provides a random fixed point number. Distribution is uniform.