mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-10 13:09:43 +01:00
fd4415317d
This is to make it so RNG is deterministic when played back with the same inputs in a libTAS movie even if screen effects or backgrounds are disabled. That way, Gravitron RNG is on its own system (seeded in hardreset()), separate from the constant fRandom() calls that go to visual systems and don't do anything of actual consequence. The seed is based off of SDL_GetTicks(), so RTA runners don't get the same Gravitron RNG every time. This also paves the way for a future in-built input-based recording system, which now only has to save the seed for a given recording in order for it to play back deterministically.
21 lines
256 B
C
21 lines
256 B
C
#ifndef XOSHIRO_H
|
|
#define XOSHIRO_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
#include <stdint.h>
|
|
|
|
void xoshiro_seed(uint32_t s);
|
|
|
|
uint32_t xoshiro_next(void);
|
|
|
|
float xoshiro_rand(void);
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif /* XOSHIRO_H */
|