benilla-re systems structs docs

NTempest::CRndSeed::SetSeed

function · random · primitive

Address
0x44ea80 · 85 bytes, up to 0x44ead4
Signature
void __thiscall (NTempest::CRndSeed *this, uint32_t seed)
Meaning
Seeds a state: accumulator = seed, lane k = 4·(seed mod 61, 59, 53, 47) from byte 0 up
Confidence
verified, proof two
Name from
the community database (idb)
Finding
random#state-and-seeding
Test
random::srand_seed_state_init, random::prng_difftest, gx::lightning_segment_subdivide_difftest, models::burst_velocity_difftest, models::emit_shape_plane_difftest, models::emit_shape_sphere_difftest, models::emit_shape_spline_difftest, models::emitter_speed_difftest, random::seeded_sequence_difftest

Finding: State and seeding in random

The state is two dwords: an accumulator, and four one-byte lane indices. 0x44ea80 sets the accumulator to the seed and each lane to four times the seed modulo a prime: byte 3 is 4·(s mod 47), byte 2 4·(s mod 53), byte 1 4·(s mod 59), byte 0 4·(s mod 61).

The derivation is in the doc.

Callers 16

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.