resonance 1.0.1
Loading...
Searching...
No Matches
random.h File Reference

Go to the source code of this file.

Functions

int NextRandomValue ()
 Advance the shared seed and return it.

Variables

int gRandom
 Seed of NextRandomValue(), 1 until the first draw.

Function Documentation

◆ NextRandomValue()

int NextRandomValue ( )

Advance the shared seed and return it.

The step is the RANDU generator, the seed times 65539 masked to 31 bits, so every result is non-negative and odd.

Returns
The new seed.
Ghidra address:
NTSC-U/C: 0x0054f770
Ghidra address:
PAL: 0x0058fdb0

Variable Documentation

◆ gRandom

int gRandom
extern

Seed of NextRandomValue(), 1 until the first draw.

NextRandomValue() is the only reader and the only writer.

Ghidra address:
NTSC-U/C: 0x0072407c
Ghidra address:
PAL: 0x00767c6c