mirror of https://github.com/AxioDL/metaforce.git
CElementGen: Make GetSystemCount() a const member function
This doesn't modify internal member state, so this can be made a const member function.
This commit is contained in:
parent
a8486cf479
commit
af2a82b5a7
|
@ -786,16 +786,17 @@ void CElementGen::BuildParticleSystemBounds() {
|
||||||
x2f0_systemBounds.accumulateBounds(aabb);
|
x2f0_systemBounds.accumulateBounds(aabb);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 CElementGen::GetSystemCount() {
|
u32 CElementGen::GetSystemCount() const {
|
||||||
u32 ret = 0;
|
u32 ret = 0;
|
||||||
for (const std::unique_ptr<CParticleGen>& child : x290_activePartChildren) {
|
for (const std::unique_ptr<CParticleGen>& child : x290_activePartChildren) {
|
||||||
if (child->Get4CharId() == FOURCC('PART'))
|
if (child->Get4CharId() == FOURCC('PART')) {
|
||||||
ret += static_cast<CElementGen&>(*child).GetSystemCount();
|
ret += static_cast<const CElementGen&>(*child).GetSystemCount();
|
||||||
else
|
} else {
|
||||||
ret += 1;
|
ret += 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (ret + (x25c_activeParticleCount != 0));
|
return ret + (x25c_activeParticleCount != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CElementGen::Render(const CActorLights* actorLights) {
|
void CElementGen::Render(const CActorLights* actorLights) {
|
||||||
|
|
|
@ -180,7 +180,7 @@ public:
|
||||||
void UpdateLightParameters();
|
void UpdateLightParameters();
|
||||||
void BuildParticleSystemBounds();
|
void BuildParticleSystemBounds();
|
||||||
u32 GetEmitterTime() const { return x74_curFrame; }
|
u32 GetEmitterTime() const { return x74_curFrame; }
|
||||||
u32 GetSystemCount();
|
u32 GetSystemCount() const;
|
||||||
u32 GetCumulativeParticleCount() const { return x260_cumulativeParticles; }
|
u32 GetCumulativeParticleCount() const { return x260_cumulativeParticles; }
|
||||||
u32 GetParticleCountAllInternal() const;
|
u32 GetParticleCountAllInternal() const;
|
||||||
u32 GetParticleCountAll() const { return x264_recursiveParticleCount; }
|
u32 GetParticleCountAll() const { return x264_recursiveParticleCount; }
|
||||||
|
|
Loading…
Reference in New Issue