diff --git a/Runtime/Particle/CParticleElectric.cpp b/Runtime/Particle/CParticleElectric.cpp index 6386a708d..ed7d684b4 100644 --- a/Runtime/Particle/CParticleElectric.cpp +++ b/Runtime/Particle/CParticleElectric.cpp @@ -33,23 +33,30 @@ CParticleElectric::CParticleElectric(const TToken& token) desc->x0_LIFE->GetValue(x28_currentFrame, x2c_LIFE); else x2c_LIFE = 0x7FFFFF; - /* TODO: figure this out more */ + if (desc->x40_SSWH.m_found) { - x438_27_x450_27 = true; - //x1e0_SSWH.reset(new CParticleSwoosh(desc->x40_SSWH.m_token + x438_27_x450_27_HaveSSWH = true; + for (int i = 0 ; i < x154_SCNT ; i++) + x1e0_lineManagers[i].SSWH.reset(new CParticleSwoosh(desc->x40_SSWH.m_token, x150_SSEG)); } if (desc->x50_GPSM.m_found) { - x438_25_x450_25 = true; - //x400_GPSM.reset(new CElementGen(desc->x50_GPSM.m_token + x438_25_x450_25_HaveGPSM = true; + for (int i = 0 ; i < x154_SCNT ; i++) + x1e0_lineManagers[i].GPSM.reset(new CElementGen(desc->x50_GPSM.m_token, + CElementGen::EModelOrientationType::Normal, + CElementGen::EOptionalSystemFlags::One)); } if (desc->x60_EPSM.m_found) { - x438_26_x450_26 = true; - //x410_GPSM.reset(new CElementGen(desc->x60_EPSM.m_token + x438_26_x450_26_HaveEPSM = true; + for (int i = 0 ; i < x154_SCNT ; i++) + x1e0_lineManagers[i].EPSM.reset(new CElementGen(desc->x60_EPSM.m_token, + CElementGen::EModelOrientationType::Normal, + CElementGen::EOptionalSystemFlags::One)); } } @@ -125,7 +132,7 @@ void CParticleElectric::SetLocalScale(const zeus::CVector3f& scale) { xec_localScale = scale; x438_28_x450_28 = true; - if (x438_26_x450_26) + if (x438_26_x450_26_HaveEPSM) { } diff --git a/Runtime/Particle/CParticleElectric.hpp b/Runtime/Particle/CParticleElectric.hpp index 506073d4d..661afe357 100644 --- a/Runtime/Particle/CParticleElectric.hpp +++ b/Runtime/Particle/CParticleElectric.hpp @@ -14,9 +14,11 @@ class CElementGen; class CParticleElectric : public CParticleGen { public: - class CLineManager + struct CLineManager { - + std::unique_ptr SSWH; + std::unique_ptr GPSM; + std::unique_ptr EPSM; }; private: TLockedToken x1c_elecDesc; @@ -45,17 +47,7 @@ private: bool x1bc_hasModuColor = false; int x1c0 = 32; char x1c4[4][8]; - std::unique_ptr x1e0_SSWH; - int x2e4 = 0; - int x3ec = 0; - int x3f4 = 0; // actually the offset of itself - int x3f0 = x3f4; - int x3f8 = x3f4; - int x3fc = 0; - std::unique_ptr x400_GPSM; - int x404 = 0; - int x408 = 0; - int x40c = 0; + rstl::reserved_vector x1e0_lineManagers; int x414 = 0; int x418 = 0; int x41c = 0; @@ -73,7 +65,7 @@ private: { struct { - bool x438_24_x450_24 : 1; bool x438_25_x450_25 : 1; bool x438_26_x450_26 : 1; bool x438_27_x450_27 : 1; + bool x438_24_x450_24 : 1; bool x438_25_x450_25_HaveGPSM : 1; bool x438_26_x450_26_HaveEPSM : 1; bool x438_27_x450_27_HaveSSWH : 1; bool x438_28_x450_28: 1; bool x450_29 : 1; }; u8 dummy = 0;