metaforce/Runtime/World/CExplosion.cpp

31 lines
1.1 KiB
C++
Raw Normal View History

2017-04-13 19:28:31 +00:00
#include "CExplosion.hpp"
#include "TCastTo.hpp"
2017-04-13 19:28:31 +00:00
namespace urde
{
CExplosion::CExplosion(const TLockedToken<CGenDescription>& particle, TUniqueId uid, bool active,
2017-11-13 06:19:18 +00:00
const CEntityInfo& info, std::string_view name, const zeus::CTransform& xf,
2017-04-13 19:28:31 +00:00
u32 flags, const zeus::CVector3f& scale, const zeus::CColor& color)
: CEffect(uid, info, active, name, xf)
{
xe8_particleGen = std::make_unique<CElementGen>(particle, CElementGen::EModelOrientationType::Normal,
flags & 0x2 ? CElementGen::EOptionalSystemFlags::Two :
CElementGen::EOptionalSystemFlags::One);
xf0_particleDesc = particle.GetObj();
xf4_24_ = flags & 0x4;
xf4_25_ = true;
xf4_26_ = flags & 0x8;
2017-08-13 07:56:35 +00:00
xe6_27_renderVisorFlags = flags & 0x1 ? 1 : 2;
2017-04-13 19:28:31 +00:00
xe8_particleGen->SetGlobalTranslation(xf.origin);
xe8_particleGen->SetOrientation(xf.getRotation());
xe8_particleGen->SetGlobalScale(scale);
xe8_particleGen->SetModulationColor(color);
}
void CExplosion::Accept(IVisitor& visitor)
{
visitor.Visit(this);
}
2017-04-13 19:28:31 +00:00
}