mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 19:07:44 +00:00
Implement CParticleGenInfoGeneric
This commit is contained in:
@@ -1152,41 +1152,41 @@ void CElementGen::BuildParticleSystemBounds()
|
||||
|
||||
for (std::unique_ptr<CElementGen>& ch : x234_activePartChildren)
|
||||
{
|
||||
std::pair<zeus::CAABox, bool> chBounds = ch->GetBounds();
|
||||
if (chBounds.second)
|
||||
auto chBounds = ch->GetBounds();
|
||||
if (chBounds)
|
||||
{
|
||||
accumulated = true;
|
||||
aabb.accumulateBounds(chBounds.first);
|
||||
aabb.accumulateBounds(chBounds.value());
|
||||
}
|
||||
}
|
||||
|
||||
for (std::unique_ptr<CElementGen>& ch : x248_finishPartChildren)
|
||||
{
|
||||
std::pair<zeus::CAABox, bool> chBounds = ch->GetBounds();
|
||||
if (chBounds.second)
|
||||
auto chBounds = ch->GetBounds();
|
||||
if (chBounds)
|
||||
{
|
||||
accumulated = true;
|
||||
aabb.accumulateBounds(chBounds.first);
|
||||
aabb.accumulateBounds(chBounds.value());
|
||||
}
|
||||
}
|
||||
|
||||
for (std::unique_ptr<CParticleSwoosh>& ch : x260_swhcChildren)
|
||||
{
|
||||
std::pair<zeus::CAABox, bool> chBounds = ch->GetBounds();
|
||||
if (chBounds.second)
|
||||
auto chBounds = ch->GetBounds();
|
||||
if (chBounds)
|
||||
{
|
||||
accumulated = true;
|
||||
aabb.accumulateBounds(chBounds.first);
|
||||
aabb.accumulateBounds(chBounds.value());
|
||||
}
|
||||
}
|
||||
|
||||
for (std::unique_ptr<CParticleElectric>& ch : x280_elscChildren)
|
||||
{
|
||||
std::pair<zeus::CAABox, bool> chBounds = ch->GetBounds();
|
||||
if (chBounds.second)
|
||||
auto chBounds = ch->GetBounds();
|
||||
if (chBounds)
|
||||
{
|
||||
accumulated = true;
|
||||
aabb.accumulateBounds(chBounds.first);
|
||||
aabb.accumulateBounds(chBounds.value());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2245,12 +2245,12 @@ bool CElementGen::IsSystemDeletable() const
|
||||
return false;
|
||||
}
|
||||
|
||||
std::pair<zeus::CAABox, bool> CElementGen::GetBounds() const
|
||||
rstl::optional_object<zeus::CAABox> CElementGen::GetBounds() const
|
||||
{
|
||||
if (GetParticleCountAll() == 0)
|
||||
return {zeus::CAABox(), false};
|
||||
return {zeus::CAABox()};
|
||||
else
|
||||
return {x2c4_systemBounds, true};
|
||||
return {x2c4_systemBounds};
|
||||
}
|
||||
|
||||
u32 CElementGen::GetParticleCount() const
|
||||
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
const zeus::CVector3f& GetGlobalScale() const;
|
||||
const zeus::CColor& GetModulationColor() const;
|
||||
bool IsSystemDeletable() const;
|
||||
std::pair<zeus::CAABox, bool> GetBounds() const;
|
||||
rstl::optional_object<zeus::CAABox> GetBounds() const;
|
||||
u32 GetParticleCount() const;
|
||||
bool SystemHasLight() const;
|
||||
CLight GetLight() const;
|
||||
|
||||
@@ -185,9 +185,9 @@ bool CParticleElectric::IsSystemDeletable() const
|
||||
return false;
|
||||
}
|
||||
|
||||
std::pair<zeus::CAABox, bool> CParticleElectric::GetBounds() const
|
||||
rstl::optional_object<zeus::CAABox> CParticleElectric::GetBounds() const
|
||||
{
|
||||
return std::make_pair(zeus::CAABox(), false);
|
||||
return {};
|
||||
}
|
||||
|
||||
u32 CParticleElectric::GetParticleCount() const
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
const zeus::CVector3f& GetGlobalScale() const;
|
||||
const zeus::CColor& GetModulationColor() const;
|
||||
bool IsSystemDeletable() const;
|
||||
std::pair<zeus::CAABox, bool> GetBounds() const;
|
||||
rstl::optional_object<zeus::CAABox> GetBounds() const;
|
||||
u32 GetParticleCount() const;
|
||||
bool SystemHasLight() const;
|
||||
CLight GetLight() const;
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
virtual const zeus::CVector3f& GetGlobalScale() const=0;
|
||||
virtual const zeus::CColor& GetModulationColor() const=0;
|
||||
virtual bool IsSystemDeletable() const=0;
|
||||
virtual std::pair<zeus::CAABox, bool> GetBounds() const=0;
|
||||
virtual rstl::optional_object<zeus::CAABox> GetBounds() const=0;
|
||||
virtual u32 GetParticleCount() const=0;
|
||||
virtual bool SystemHasLight() const=0;
|
||||
virtual CLight GetLight() const=0;
|
||||
|
||||
@@ -88,9 +88,9 @@ bool CParticleSwoosh::IsSystemDeletable() const
|
||||
return false;
|
||||
}
|
||||
|
||||
std::pair<zeus::CAABox, bool> CParticleSwoosh::GetBounds() const
|
||||
rstl::optional_object<zeus::CAABox> CParticleSwoosh::GetBounds() const
|
||||
{
|
||||
return std::make_pair(zeus::CAABox(), false);
|
||||
return {};
|
||||
}
|
||||
|
||||
u32 CParticleSwoosh::GetParticleCount() const
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
const zeus::CVector3f& GetGlobalScale() const;
|
||||
const zeus::CColor& GetModulationColor() const;
|
||||
bool IsSystemDeletable() const;
|
||||
std::pair<zeus::CAABox, bool> GetBounds() const;
|
||||
rstl::optional_object<zeus::CAABox> GetBounds() const;
|
||||
u32 GetParticleCount() const;
|
||||
bool SystemHasLight() const;
|
||||
CLight GetLight() const;
|
||||
|
||||
Reference in New Issue
Block a user