mirror of https://github.com/AxioDL/metaforce.git
CActorModelParticles work
This commit is contained in:
parent
0cae1bb036
commit
9afacd791b
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CMakeWorkspace" IGNORE_OUTSIDE_FILES="true" PROJECT_DIR="$PROJECT_DIR$" />
|
||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
|
||||
</project>
|
|
@ -116,6 +116,10 @@ public:
|
|||
void SetLocalScale(const zeus::CVector3f&);
|
||||
void SetParticleEmission(bool);
|
||||
void SetModulationColor(const zeus::CColor&);
|
||||
void SetOverrideIPos(const zeus::CVector3f& vec) { x178_overrideIPos = vec; }
|
||||
void SetOverrideIVel(const zeus::CVector3f& vec) { x188_overrideIVel = vec; }
|
||||
void SetOverrideFPos(const zeus::CVector3f& vec) { x198_overrideFPos = vec; }
|
||||
void SetOverrideFVel(const zeus::CVector3f& vec) { x1a8_overrideFVel = vec; }
|
||||
const zeus::CTransform& GetOrientation() const;
|
||||
const zeus::CVector3f& GetTranslation() const;
|
||||
const zeus::CTransform& GetGlobalOrientation() const;
|
||||
|
|
|
@ -64,7 +64,8 @@ void CActorModelParticles::CItem::GeneratePoints(const zeus::CVector3f* v1, cons
|
|||
if (v.canBeNormalized())
|
||||
{
|
||||
v.normalize();
|
||||
x78_->SetOrientation(zeus::CTransform{zeus::CVector3f::skUp.cross(v), v, zeus::CVector3f::skUp, zeus::CVector3f::skZero});
|
||||
x78_->SetOrientation(zeus::CTransform{zeus::CVector3f::skUp.cross(v), v, zeus::CVector3f::skUp,
|
||||
zeus::CVector3f::skZero});
|
||||
}
|
||||
x78_->ForceParticleCreation(1);
|
||||
}
|
||||
|
@ -83,7 +84,38 @@ void CActorModelParticles::CItem::GeneratePoints(const zeus::CVector3f* v1, cons
|
|||
iceGen->SetTranslation(xec_ * v1[next]);
|
||||
|
||||
iceGen->SetOrientation(zeus::CTransform::MakeRotationsBasedOnY(zeus::CUnitVector3f(v2[next])));
|
||||
if (x8c_ == 4)
|
||||
xb0_ = -1;
|
||||
}
|
||||
// TODO: Verify behavior
|
||||
if (xc0_particleElectric && xc0_particleElectric->GetParticleEmission())
|
||||
{
|
||||
CRandom16 rnd(xcc_seed3);
|
||||
u32 end = 1;
|
||||
#if 0
|
||||
if (4 < 1)
|
||||
end = 4;
|
||||
#endif
|
||||
u32 lastRnd;
|
||||
for (u32 i = 0; i < end; ++i)
|
||||
{
|
||||
xc0_particleElectric->SetOverrideIPos(v1[u32(rnd.Range(0, w1 - 1))] * xec_);
|
||||
lastRnd = u32(rnd.Range(0, w1 - 1));
|
||||
xc0_particleElectric->SetOverrideIPos(v1[lastRnd] * xec_);
|
||||
xc0_particleElectric->ForceParticleCreation(1);
|
||||
}
|
||||
|
||||
xcc_seed3 = rnd.GetSeed();
|
||||
xc8_ = lastRnd;
|
||||
}
|
||||
|
||||
// TODO: Finish
|
||||
#if 0
|
||||
if (xd4_)
|
||||
{
|
||||
xd4_->sub_8026A5E0(v1, v2, w1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void CActorModelParticles::CItem::Update(float, CStateManager&)
|
||||
|
|
|
@ -34,12 +34,12 @@ public:
|
|||
u32 x84_ = -1;
|
||||
u32 x88_seed1 = 99;
|
||||
rstl::reserved_vector<std::unique_ptr<CElementGen>, 4> x8c_;
|
||||
u32 xb0_ = -1;
|
||||
s32 xb0_ = -1;
|
||||
u32 xb4_seed2 = 99;
|
||||
std::unique_ptr<CElementGen> xb8_;
|
||||
std::unique_ptr<CElementGen> xc0_;
|
||||
std::unique_ptr<CParticleElectric> xc0_particleElectric;
|
||||
u32 xc8_ = 0;
|
||||
u32 xcc_ = 99;
|
||||
u32 xcc_seed3 = 99;
|
||||
zeus::CColor xd0_;
|
||||
std::unique_ptr<u32> xd4_;
|
||||
TToken<CTexture> xdc_ashy;
|
||||
|
|
Loading…
Reference in New Issue