typhoon/tempest/random/CRndSeed.cpp

11 lines
283 B
C++
Raw Permalink Normal View History

2026-04-24 00:30:51 +04:00
#include "tempest/random/CRndSeed.hpp"
CRndSeed::CRndSeed(uint32_t seed) {
this->SetSeed(seed);
}
void CRndSeed::SetSeed(uint32_t seed) {
this->rndacc = seed;
this->rndvls = (4 * (seed % 0x3D)) | ((seed % 0x3B) << 10) | ((seed % 0x35) << 18) | ((seed % 0x2F) << 26);
}