2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 13:44:56 +00:00

Proper CRandom16 usage

More CScriptGunTurret imps
This commit is contained in:
2018-11-09 18:47:07 -08:00
parent 87e5aea6f5
commit 89ece2e9b2
22 changed files with 210 additions and 47 deletions

View File

@@ -5,7 +5,7 @@
namespace urde
{
CRandom16 CDecal::sDecalRandom(99);
CRandom16 CDecal::sDecalRandom;
bool CDecal::sMoveRedToAlphaBuffer = false;
CDecal::CDecal(const TToken<CDecalDescription>& desc, const zeus::CTransform& xf)

View File

@@ -33,7 +33,7 @@ CDecalDescription* CDecalDataFactory::CreateGeneratorDescription(CInputStream& i
bool CDecalDataFactory::CreateDPSM(CDecalDescription* desc, CInputStream& in, CSimplePool* resPool)
{
CRandom16 rand{99};
CRandom16 rand;
CGlobalRandom gr{rand};
FourCC clsId = CPF::GetClassID(in);

View File

@@ -70,6 +70,7 @@ CElementGen::CElementGen(const TToken<CGenDescription>& gen,
if (desc->x58_x44_TIND)
desc->x58_x44_TIND->GetValueTexture(0).GetObj();
CGlobalRandom globRnd(x27c_randState);
if (CIntElement* seedElem = desc->x1c_x10_SEED.get())
{
int seedVal;

View File

@@ -858,7 +858,7 @@ CGenDescription* CParticleDataFactory::CreateGeneratorDescription(CInputStream&
bool CParticleDataFactory::CreateGPSM(CGenDescription* fillDesc, CInputStream& in,
std::vector<CAssetId>& tracker, CSimplePool* resPool)
{
CRandom16 rand{99};
CRandom16 rand;
CGlobalRandom gr(rand);
FourCC clsId = GetClassID(in);
while (clsId != SBIG('_END'))

View File

@@ -34,7 +34,7 @@ CElectricDescription* CParticleElectricDataFactory::CreateElectricDescription(CI
bool CParticleElectricDataFactory::CreateELSM(CElectricDescription* desc, CInputStream& in, CSimplePool* resPool)
{
CRandom16 rand{99};
CRandom16 rand;
CGlobalRandom gr{rand};
FourCC clsId = CPF::GetClassID(in);

View File

@@ -33,7 +33,7 @@ CSwooshDescription* CParticleSwooshDataFactory::CreateGeneratorDescription(CInpu
bool CParticleSwooshDataFactory::CreateWPSM(CSwooshDescription* desc, CInputStream& in, CSimplePool* resPool)
{
CRandom16 rand{99};
CRandom16 rand;
FourCC clsId = CPF::GetClassID(in);
while (clsId != SBIG('_END'))
{

View File

@@ -34,7 +34,7 @@ CWeaponDescription* CProjectileWeaponDataFactory::CreateGeneratorDescription(CIn
bool CProjectileWeaponDataFactory::CreateWPSM(CWeaponDescription* desc, CInputStream& in, CSimplePool* resPool)
{
CRandom16 rand{99};
CRandom16 rand;
CGlobalRandom gr{rand};
FourCC clsId = CPF::GetClassID(in);