Commit 68a11485 authored by Jordon Moss's avatar Jordon Moss

Added seed_krand(int32_t* seed), a function for performing RNG that reads from...

Added seed_krand(int32_t* seed), a function for performing RNG that reads from and writes to a custom seed pointer.
parent c38987bb
......@@ -1306,6 +1306,12 @@ static FORCE_INLINE int32_t krand(void)
int32_t krand(void);
#endif
static FORCE_INLINE int32_t seed_krand(int32_t* seed)
{
*seed = (*seed * 1664525ul) + 221297ul;
return ((uint32_t)*seed) >> 16;
}
int32_t ksqrt(uint32_t num);
int32_t __fastcall getangle(int32_t xvect, int32_t yvect);
fix16_t __fastcall gethiq16angle(int32_t xvect, int32_t yvect);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment