diff --git a/Runtime/Particle/CColorElement.cpp b/Runtime/Particle/CColorElement.cpp index a17207bd6..2953bbdd0 100644 --- a/Runtime/Particle/CColorElement.cpp +++ b/Runtime/Particle/CColorElement.cpp @@ -156,10 +156,4 @@ bool CCEParticleColor::GetValue(int /*frame*/, Zeus::CColor& colorOut) const return false; } -bool CCEBevelGradient::GetValue(int frame, Zeus::CColor& colorOut) const -{ - m_gradientColor->GetValue(frame, colorOut); - return false; -} - } diff --git a/Runtime/Particle/CColorElement.hpp b/Runtime/Particle/CColorElement.hpp index 95ae0549f..dab30050e 100644 --- a/Runtime/Particle/CColorElement.hpp +++ b/Runtime/Particle/CColorElement.hpp @@ -92,16 +92,6 @@ class CCEParticleColor : public CColorElement public: bool GetValue(int frame, Zeus::CColor& colorOut) const; }; - -/* Custom additions */ -class CCEBevelGradient : public CColorElement -{ - std::unique_ptr m_gradientColor; -public: - CCEBevelGradient(CColorElement* gradientCol) - : m_gradientColor(gradientCol) {} - bool GetValue(int frame, Zeus::CColor &colorOut) const; -}; } #endif // __PSHAG_CCOLORELEMENT_HPP__ diff --git a/Runtime/Particle/CGenDescription.hpp b/Runtime/Particle/CGenDescription.hpp index a9d9eab4c..f3bf1712a 100644 --- a/Runtime/Particle/CGenDescription.hpp +++ b/Runtime/Particle/CGenDescription.hpp @@ -103,6 +103,10 @@ public: std::unique_ptr x124_ADV7; std::unique_ptr x128_ADV8; + + /* Custom additions */ + std::unique_ptr m_bevelGradient; /* FourCC BGCL */ + CGenDescription() { x45_25_PMOO = true; diff --git a/Runtime/Particle/CParticleDataFactory.cpp b/Runtime/Particle/CParticleDataFactory.cpp index 550c02052..0835f12b7 100644 --- a/Runtime/Particle/CParticleDataFactory.cpp +++ b/Runtime/Particle/CParticleDataFactory.cpp @@ -1113,6 +1113,25 @@ bool CParticleDataFactory::CreateGPSM(CGenDescription* fillDesc, CInputStream& i } clsId = GetClassID(in); } + + /* Now for our custom additions, if available */ + if (!in.atEnd()) + { + clsId = GetClassID(in); + if (clsId == 0xFFFFFFFF) + return true; + + while (clsId != SBIG('_END') && !in.atEnd()) + { + switch(clsId) + { + case SBIG('BGCL'): + fillDesc->m_bevelGradient.reset(GetColorElement(in)); + break; + } + clsId = GetClassID(in); + } + } return true; }