Rethink BGCL

This commit is contained in:
Phillip Stephens 2016-02-15 11:12:55 -08:00
parent 805471eb98
commit fe38bfec2d
4 changed files with 23 additions and 16 deletions

View File

@ -156,10 +156,4 @@ bool CCEParticleColor::GetValue(int /*frame*/, Zeus::CColor& colorOut) const
return false; return false;
} }
bool CCEBevelGradient::GetValue(int frame, Zeus::CColor& colorOut) const
{
m_gradientColor->GetValue(frame, colorOut);
return false;
}
} }

View File

@ -92,16 +92,6 @@ class CCEParticleColor : public CColorElement
public: public:
bool GetValue(int frame, Zeus::CColor& colorOut) const; bool GetValue(int frame, Zeus::CColor& colorOut) const;
}; };
/* Custom additions */
class CCEBevelGradient : public CColorElement
{
std::unique_ptr<CColorElement> m_gradientColor;
public:
CCEBevelGradient(CColorElement* gradientCol)
: m_gradientColor(gradientCol) {}
bool GetValue(int frame, Zeus::CColor &colorOut) const;
};
} }
#endif // __PSHAG_CCOLORELEMENT_HPP__ #endif // __PSHAG_CCOLORELEMENT_HPP__

View File

@ -103,6 +103,10 @@ public:
std::unique_ptr<CRealElement> x124_ADV7; std::unique_ptr<CRealElement> x124_ADV7;
std::unique_ptr<CRealElement> x128_ADV8; std::unique_ptr<CRealElement> x128_ADV8;
/* Custom additions */
std::unique_ptr<CColorElement> m_bevelGradient; /* FourCC BGCL */
CGenDescription() CGenDescription()
{ {
x45_25_PMOO = true; x45_25_PMOO = true;

View File

@ -1113,6 +1113,25 @@ bool CParticleDataFactory::CreateGPSM(CGenDescription* fillDesc, CInputStream& i
} }
clsId = GetClassID(in); 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; return true;
} }