metaforce/DataSpec/DNACommon/ParticleCommon.hpp

906 lines
20 KiB
C++
Raw Normal View History

2016-02-02 04:29:58 +00:00
#ifndef __COMMON_PARTICLECOMMON_HPP__
#define __COMMON_PARTICLECOMMON_HPP__
#include "DNACommon.hpp"
2017-12-29 08:08:12 +00:00
namespace DataSpec::DNAParticle
2016-02-02 04:29:58 +00:00
{
2016-03-04 23:04:53 +00:00
extern logvisor::Module LogModule;
2016-02-02 04:29:58 +00:00
2018-02-22 07:24:51 +00:00
struct IElement : BigDNAVYaml
2016-02-02 04:29:58 +00:00
{
Delete _d;
virtual ~IElement() = default;
2016-02-02 23:41:55 +00:00
virtual const char* ClassID() const=0;
2018-02-22 07:24:51 +00:00
const char* DNATypeV() const {return ClassID();}
2016-02-02 04:29:58 +00:00
};
2017-11-26 03:04:25 +00:00
struct IRealElement : IElement {Delete _d2;};
2018-02-22 07:24:51 +00:00
struct RealElementFactory : BigDNA
2016-02-02 04:29:58 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
2016-02-02 04:29:58 +00:00
std::unique_ptr<IRealElement> m_elem;
2016-02-04 00:55:39 +00:00
operator bool() const {return m_elem.operator bool();}
2016-02-02 04:29:58 +00:00
};
2017-11-26 03:04:25 +00:00
struct IIntElement : IElement {Delete _d2;};
2018-02-22 07:24:51 +00:00
struct IntElementFactory : BigDNA
2016-02-02 04:29:58 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
2016-02-02 04:29:58 +00:00
std::unique_ptr<IIntElement> m_elem;
2016-02-04 00:55:39 +00:00
operator bool() const {return m_elem.operator bool();}
2016-02-02 04:29:58 +00:00
};
2017-11-26 03:04:25 +00:00
struct IVectorElement : IElement {Delete _d2;};
2018-02-22 07:24:51 +00:00
struct VectorElementFactory : BigDNA
2016-02-02 08:22:01 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
2016-02-02 08:22:01 +00:00
std::unique_ptr<IVectorElement> m_elem;
2016-02-04 00:55:39 +00:00
operator bool() const {return m_elem.operator bool();}
2016-02-02 08:22:01 +00:00
};
2017-11-26 03:04:25 +00:00
struct IColorElement : IElement {Delete _d2;};
2018-02-22 07:24:51 +00:00
struct ColorElementFactory : BigDNA
2016-02-02 08:22:01 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
2016-02-02 08:22:01 +00:00
std::unique_ptr<IColorElement> m_elem;
2016-02-04 00:55:39 +00:00
operator bool() const {return m_elem.operator bool();}
2016-02-02 08:22:01 +00:00
};
2017-11-26 03:04:25 +00:00
struct IModVectorElement : IElement {Delete _d2;};
2018-02-22 07:24:51 +00:00
struct ModVectorElementFactory : BigDNA
2016-02-02 08:22:01 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
2016-02-02 08:22:01 +00:00
std::unique_ptr<IModVectorElement> m_elem;
2016-02-04 00:55:39 +00:00
operator bool() const {return m_elem.operator bool();}
2016-02-02 08:22:01 +00:00
};
2017-11-26 03:04:25 +00:00
struct IEmitterElement : IElement {Delete _d2;};
2018-02-22 07:24:51 +00:00
struct EmitterElementFactory : BigDNA
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
std::unique_ptr<IEmitterElement> m_elem;
2016-02-04 00:55:39 +00:00
operator bool() const {return m_elem.operator bool();}
};
2016-10-02 22:41:36 +00:00
struct IUVElement : IElement
{
2017-11-26 03:04:25 +00:00
Delete _d2;
2016-10-02 22:41:36 +00:00
virtual void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut) const=0;
};
2016-02-02 08:22:01 +00:00
2016-03-02 22:37:10 +00:00
struct BoolHelper : IElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
2016-03-02 22:37:10 +00:00
bool value = false;
operator bool() const {return value;}
BoolHelper& operator=(bool val) {value = val; return *this;}
const char* ClassID() const {return "BoolHelper";}
};
2016-02-02 04:29:58 +00:00
struct RELifetimeTween : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 04:29:58 +00:00
RealElementFactory a;
RealElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "LFTW";}
2016-02-02 04:29:58 +00:00
};
struct REConstant : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
2016-02-02 04:29:58 +00:00
Value<float> val;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CNST";}
2016-02-02 04:29:58 +00:00
};
struct RETimeChain : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 04:29:58 +00:00
RealElementFactory a;
RealElementFactory b;
2016-03-02 22:37:10 +00:00
IntElementFactory thresholdFrame;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CHAN";}
2016-02-02 04:29:58 +00:00
};
struct REAdd : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 04:29:58 +00:00
RealElementFactory a;
RealElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "ADD_";}
2016-02-02 04:29:58 +00:00
};
struct REClamp : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
RealElementFactory min;
RealElementFactory max;
RealElementFactory val;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CLMP";}
2016-02-02 04:29:58 +00:00
};
struct REKeyframeEmitter : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
Value<atUint32> percentageTween;
Value<atUint32> unk1;
Value<bool> loop;
Value<atUint8> unk2;
Value<atUint32> loopEnd;
Value<atUint32> loopStart;
2016-02-02 04:29:58 +00:00
Value<atUint32> count;
2018-02-25 08:23:27 +00:00
Vector<float, AT_DNA_COUNT(count)> keys;
2016-03-02 22:37:10 +00:00
const char* ClassID() const {return percentageTween ? "KEYP" : "KEYE";}
2016-02-02 04:29:58 +00:00
};
struct REInitialRandom : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 04:29:58 +00:00
RealElementFactory a;
RealElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "IRND";}
2016-02-02 04:29:58 +00:00
};
struct RERandom : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 04:29:58 +00:00
RealElementFactory a;
RealElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "RAND";}
2016-02-02 04:29:58 +00:00
};
struct REMultiply : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 04:29:58 +00:00
RealElementFactory a;
RealElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "MULT";}
2016-02-02 04:29:58 +00:00
};
struct REPulse : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
IntElementFactory aDuration;
IntElementFactory bDuration;
RealElementFactory a;
RealElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "PULS";}
2016-02-02 04:29:58 +00:00
};
struct RETimeScale : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
RealElementFactory dv;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "SCAL";}
2016-02-02 04:29:58 +00:00
};
struct RELifetimePercent : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
RealElementFactory percent;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "RLPT";}
2016-02-02 04:29:58 +00:00
};
struct RESineWave : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
RealElementFactory magnitude;
RealElementFactory linearAngle;
RealElementFactory constantAngle;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "SINE";}
2016-02-02 04:29:58 +00:00
};
2016-03-02 22:37:10 +00:00
struct REInitialSwitch : IRealElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
RealElementFactory a;
RealElementFactory b;
const char* ClassID() const {return "ISWT";}
};
struct RECompareLessThan : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
RealElementFactory ca;
RealElementFactory cb;
RealElementFactory pass;
RealElementFactory fail;
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "CLTN";}
};
struct RECompareEquals : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
RealElementFactory ca;
RealElementFactory cb;
RealElementFactory pass;
RealElementFactory fail;
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "CEQL";}
};
2016-03-02 22:37:10 +00:00
struct REParticleAdvanceParam1 : IRealElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PAP1";}
};
2016-03-02 22:37:10 +00:00
struct REParticleAdvanceParam2 : IRealElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PAP2";}
};
2016-03-02 22:37:10 +00:00
struct REParticleAdvanceParam3 : IRealElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PAP3";}
};
2016-03-02 22:37:10 +00:00
struct REParticleAdvanceParam4 : IRealElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PAP4";}
};
2016-03-02 22:37:10 +00:00
struct REParticleAdvanceParam5 : IRealElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PAP5";}
};
2016-03-02 22:37:10 +00:00
struct REParticleAdvanceParam6 : IRealElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PAP6";}
};
2016-03-02 22:37:10 +00:00
struct REParticleAdvanceParam7 : IRealElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PAP7";}
};
2016-03-02 22:37:10 +00:00
struct REParticleAdvanceParam8 : IRealElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PAP8";}
};
2016-03-02 22:37:10 +00:00
struct REParticleSizeOrLineLength : IRealElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PSLL";}
};
2016-03-02 22:37:10 +00:00
struct REParticleRotationOrLineWidth : IRealElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PRLW";}
};
struct RESubtract : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
RealElementFactory a;
RealElementFactory b;
const char* ClassID() const {return "SUB_";}
};
struct REVectorMagnitude : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory vec;
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "VMAG";}
};
struct REVectorXToReal : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory vec;
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "VXTR";}
};
struct REVectorYToReal : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory vec;
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "VYTR";}
};
struct REVectorZToReal : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory vec;
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "VZTR";}
};
struct RECEXT : IRealElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
IntElementFactory index;
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "CEXT";}
};
2016-02-07 00:19:59 +00:00
struct REIntTimesReal : IRealElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
IntElementFactory a;
RealElementFactory b;
const char* ClassID() const {return "ITRL";}
};
2016-02-02 04:29:58 +00:00
struct IEKeyframeEmitter : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
Value<atUint32> percentageTween;
Value<atUint32> unk1;
Value<bool> loop;
Value<atUint8> unk2;
Value<atUint32> loopEnd;
Value<atUint32> loopStart;
2016-02-02 04:29:58 +00:00
Value<atUint32> count;
2018-02-25 08:23:27 +00:00
Vector<atUint32, AT_DNA_COUNT(count)> keys;
2016-03-02 22:37:10 +00:00
const char* ClassID() const {return percentageTween ? "KEYP" : "KEYE";}
2016-02-02 04:29:58 +00:00
};
struct IEDeath : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
IntElementFactory passthrough;
IntElementFactory thresholdFrame;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "DETH";}
2016-02-02 04:29:58 +00:00
};
struct IEClamp : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
IntElementFactory min;
IntElementFactory max;
IntElementFactory val;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CLMP";}
2016-02-02 04:29:58 +00:00
};
struct IETimeChain : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 04:29:58 +00:00
IntElementFactory a;
IntElementFactory b;
2016-03-02 22:37:10 +00:00
IntElementFactory thresholdFrame;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CHAN";}
2016-02-02 04:29:58 +00:00
};
struct IEAdd : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 04:29:58 +00:00
IntElementFactory a;
IntElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "ADD_";}
2016-02-02 04:29:58 +00:00
};
struct IEConstant : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
2016-02-02 04:29:58 +00:00
Value<atUint32> val;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CNST";}
2016-02-02 04:29:58 +00:00
};
struct IEImpulse : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
IntElementFactory val;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "IMPL";}
2016-02-02 04:29:58 +00:00
};
struct IELifetimePercent : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
IntElementFactory percent;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "ILPT";}
2016-02-02 04:29:58 +00:00
};
struct IEInitialRandom : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 04:29:58 +00:00
IntElementFactory a;
IntElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "IRND";}
2016-02-02 04:29:58 +00:00
};
struct IEPulse : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
IntElementFactory aDuration;
IntElementFactory bDuration;
2016-02-02 04:29:58 +00:00
IntElementFactory a;
IntElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "PULS";}
2016-02-02 04:29:58 +00:00
};
struct IEMultiply : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 04:29:58 +00:00
IntElementFactory a;
IntElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "MULT";}
2016-02-02 04:29:58 +00:00
};
struct IESampleAndHold : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
IntElementFactory val;
IntElementFactory waitMin;
IntElementFactory waitMax;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "SPAH";}
2016-02-02 04:29:58 +00:00
};
struct IERandom : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 04:29:58 +00:00
IntElementFactory a;
IntElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "RAND";}
2016-02-02 04:29:58 +00:00
};
struct IETimeScale : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
RealElementFactory dv;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "TSCL";}
2016-02-02 04:29:58 +00:00
};
2016-02-04 00:55:39 +00:00
struct IEGTCP : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "GTCP";}
};
struct IEModulo : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
IntElementFactory a;
IntElementFactory b;
const char* ClassID() const {return "MODU";}
};
struct IESubtract : IIntElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
IntElementFactory direction;
IntElementFactory baseRadius;
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "SUB_";}
};
2016-02-02 08:22:01 +00:00
struct VECone : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 08:22:01 +00:00
VectorElementFactory a;
RealElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CONE";}
2016-02-02 08:22:01 +00:00
};
struct VETimeChain : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 08:22:01 +00:00
VectorElementFactory a;
VectorElementFactory b;
2016-03-02 22:37:10 +00:00
IntElementFactory thresholdFrame;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CHAN";}
2016-02-02 08:22:01 +00:00
};
struct VEAngleCone : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
RealElementFactory angleXBias;
RealElementFactory angleYBias;
RealElementFactory angleXRange;
RealElementFactory angleYRange;
RealElementFactory magnitude;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "ANGC";}
2016-02-02 08:22:01 +00:00
};
struct VEAdd : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 08:22:01 +00:00
VectorElementFactory a;
VectorElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "ADD_";}
2016-02-02 08:22:01 +00:00
};
struct VECircleCluster : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory circleOffset;
VectorElementFactory circleNormal;
IntElementFactory cycleFrames;
RealElementFactory randomFactor;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CCLU";}
2016-02-02 08:22:01 +00:00
};
struct VEConstant : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
2016-02-04 00:55:39 +00:00
RealElementFactory comps[3];
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CNST";}
2016-02-02 08:22:01 +00:00
};
struct VECircle : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory circleOffset;
VectorElementFactory circleNormal;
RealElementFactory angleConstant;
RealElementFactory angleLinear;
RealElementFactory circleRadius;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CIRC";}
2016-02-02 08:22:01 +00:00
};
struct VEKeyframeEmitter : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
Value<atUint32> percentageTween;
Value<atUint32> unk1;
Value<bool> loop;
Value<atUint8> unk2;
Value<atUint32> loopEnd;
Value<atUint32> loopStart;
2016-02-02 08:22:01 +00:00
Value<atUint32> count;
2018-02-25 08:23:27 +00:00
Vector<atVec3f, AT_DNA_COUNT(count)> keys;
2016-03-02 22:37:10 +00:00
const char* ClassID() const {return percentageTween ? "KEYP" : "KEYE";}
2016-02-02 08:22:01 +00:00
};
struct VEMultiply : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 08:22:01 +00:00
VectorElementFactory a;
VectorElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "MULT";}
2016-02-02 08:22:01 +00:00
};
struct VERealToVector : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 08:22:01 +00:00
RealElementFactory a;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "RTOV";}
2016-02-02 08:22:01 +00:00
};
struct VEPulse : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
IntElementFactory aDuration;
IntElementFactory bDuration;
VectorElementFactory a;
VectorElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "PULS";}
2016-02-02 08:22:01 +00:00
};
2016-02-04 00:55:39 +00:00
struct VEParticleVelocity : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PVEL";}
};
struct VESPOS : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
VectorElementFactory a;
const char* ClassID() const {return "SPOS";}
};
struct VEPLCO : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PLCO";}
};
struct VEPLOC : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PLOC";}
};
struct VEPSOR : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PSOR";}
};
struct VEPSOF : IVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "PSOF";}
};
2016-02-02 08:22:01 +00:00
struct CEKeyframeEmitter : IColorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
Value<atUint32> percentageTween;
Value<atUint32> unk1;
Value<bool> loop;
Value<atUint8> unk2;
Value<atUint32> loopEnd;
Value<atUint32> loopStart;
2016-02-02 08:22:01 +00:00
Value<atUint32> count;
2018-02-25 08:23:27 +00:00
Vector<atVec4f, AT_DNA_COUNT(count)> keys;
2016-03-02 22:37:10 +00:00
const char* ClassID() const {return percentageTween ? "KEYP" : "KEYE";}
2016-02-02 08:22:01 +00:00
};
struct CEConstant : IColorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
2016-02-04 00:55:39 +00:00
RealElementFactory comps[4];
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CNST";}
2016-02-02 08:22:01 +00:00
};
struct CETimeChain : IColorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 08:22:01 +00:00
ColorElementFactory a;
ColorElementFactory b;
2016-03-02 22:37:10 +00:00
IntElementFactory thresholdFrame;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CHAN";}
2016-02-02 08:22:01 +00:00
};
struct CEFadeEnd : IColorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 08:22:01 +00:00
ColorElementFactory a;
ColorElementFactory b;
2016-03-02 22:37:10 +00:00
RealElementFactory startFrame;
RealElementFactory endFrame;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CFDE";}
2016-02-02 08:22:01 +00:00
};
struct CEFade : IColorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 08:22:01 +00:00
ColorElementFactory a;
ColorElementFactory b;
2016-03-02 22:37:10 +00:00
RealElementFactory endFrame;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "FADE";}
2016-02-02 08:22:01 +00:00
};
struct CEPulse : IColorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
IntElementFactory aDuration;
IntElementFactory bDuration;
ColorElementFactory a;
ColorElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "PULS";}
2016-02-02 08:22:01 +00:00
};
struct MVEImplosion : IModVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory implodePoint;
RealElementFactory velocityScale;
RealElementFactory maxRadius;
RealElementFactory minRadius;
BoolHelper enableMinRadius;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "IMPL";}
2016-02-02 08:22:01 +00:00
};
struct MVEExponentialImplosion : IModVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory implodePoint;
RealElementFactory velocityScale;
RealElementFactory maxRadius;
RealElementFactory minRadius;
BoolHelper enableMinRadius;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "EMPL";}
2016-02-02 08:22:01 +00:00
};
struct MVETimeChain : IModVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-02-02 08:22:01 +00:00
ModVectorElementFactory a;
ModVectorElementFactory b;
2016-03-02 22:37:10 +00:00
IntElementFactory thresholdFrame;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CHAN";}
2016-02-02 08:22:01 +00:00
};
struct MVEBounce : IModVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory planePoint;
VectorElementFactory planeNormal;
RealElementFactory friction;
RealElementFactory restitution;
BoolHelper dieOnPenetrate;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "BNCE";}
2016-02-02 08:22:01 +00:00
};
struct MVEConstant : IModVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
2016-02-04 00:55:39 +00:00
RealElementFactory comps[3];
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "CNST";}
2016-02-02 08:22:01 +00:00
};
struct MVEGravity : IModVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory acceleration;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "GRAV";}
2016-02-02 08:22:01 +00:00
};
struct MVEExplode : IModVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
RealElementFactory impulseMagnitude;
RealElementFactory falloffFactor;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "EXPL";}
2016-02-02 08:22:01 +00:00
};
struct MVESetPosition : IModVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory position;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "SPOS";}
2016-02-02 08:22:01 +00:00
};
struct MVELinearImplosion : IModVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory implodePoint;
RealElementFactory velocityScale;
RealElementFactory maxRadius;
RealElementFactory minRadius;
BoolHelper enableMinRadius;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "LMPL";}
2016-02-02 08:22:01 +00:00
};
struct MVEPulse : IModVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
IntElementFactory aDuration;
IntElementFactory bDuration;
ModVectorElementFactory a;
ModVectorElementFactory b;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "PULS";}
2016-02-02 08:22:01 +00:00
};
struct MVEWind : IModVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory windVelocity;
RealElementFactory factor;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "WIND";}
2016-02-02 08:22:01 +00:00
};
struct MVESwirl : IModVectorElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory helixPoint;
VectorElementFactory curveBinormal;
2018-06-13 02:32:02 +00:00
RealElementFactory filterGain;
2016-03-02 22:37:10 +00:00
RealElementFactory tangentialVelocity;
2016-02-02 23:41:55 +00:00
const char* ClassID() const {return "SWRL";}
2016-02-02 08:22:01 +00:00
};
struct EESimpleEmitter : IEmitterElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory position;
VectorElementFactory velocity;
const char* ClassID() const {return "SEMR";}
};
struct VESphere : IEmitterElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory sphereOrigin;
RealElementFactory sphereRadius;
RealElementFactory magnitude;
const char* ClassID() const {return "SPHE";}
};
struct VEAngleSphere : IEmitterElement
2016-02-04 00:55:39 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-03-02 22:37:10 +00:00
VectorElementFactory sphereOrigin;
RealElementFactory sphereRadius;
RealElementFactory magnitude;
RealElementFactory angleXBias;
RealElementFactory angleYBias;
RealElementFactory angleXRange;
RealElementFactory angleYRange;
2016-02-04 00:55:39 +00:00
const char* ClassID() const {return "ASPH";}
};
struct EESimpleEmitterTR : EESimpleEmitter
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
const char* ClassID() const {return "SETR";}
};
2016-02-02 08:22:01 +00:00
template <class IDType>
struct UVEConstant : IUVElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
AT_SUBDECL_DNA
2018-04-02 04:27:24 +00:00
CastIDToZero<IDType> tex;
const char* ClassID() const {return "CNST";}
2016-10-02 22:41:36 +00:00
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut) const
{
g_curSpec->flattenDependencies(tex, pathsOut);
}
2016-02-02 08:22:01 +00:00
};
template <class IDType>
struct UVEAnimTexture : IUVElement
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
AT_SUBDECL_DNA
2018-04-02 04:27:24 +00:00
CastIDToZero<IDType> tex;
2016-03-02 22:37:10 +00:00
IntElementFactory tileW;
IntElementFactory tileH;
IntElementFactory strideW;
IntElementFactory strideH;
IntElementFactory cycleFrames;
Value<bool> loop = false;
const char* ClassID() const {return "ATEX";}
2016-10-02 22:41:36 +00:00
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut) const
{
g_curSpec->flattenDependencies(tex, pathsOut);
}
2016-02-02 08:22:01 +00:00
};
template <class IDType>
2018-02-22 07:24:51 +00:00
struct UVElementFactory : BigDNA
2016-02-02 08:22:01 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
AT_SUBDECL_DNA
DNAFourCC m_type;
2016-02-02 08:22:01 +00:00
std::unique_ptr<IUVElement> m_elem;
2016-02-04 00:55:39 +00:00
operator bool() const {return m_elem.operator bool();}
2016-02-02 08:22:01 +00:00
};
2016-02-02 04:29:58 +00:00
template <class IDType>
2018-02-22 07:24:51 +00:00
struct SpawnSystemKeyframeData : BigDNA
{
Value<atUint32> a;
Value<atUint32> b;
2016-03-02 22:37:10 +00:00
Value<atUint32> endFrame;
Value<atUint32> d;
2018-02-22 07:24:51 +00:00
struct SpawnSystemKeyframeInfo : BigDNA
{
IDType id;
Value<atUint32> a;
Value<atUint32> b;
Value<atUint32> c;
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
};
std::vector<std::pair<atUint32, std::vector<SpawnSystemKeyframeInfo>>> spawns;
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
AT_SUBDECL_DNA
2016-02-04 00:55:39 +00:00
operator bool() const {return spawns.size() != 0;}
2016-10-02 22:41:36 +00:00
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut) const
{
for (const auto& p : spawns)
for (const SpawnSystemKeyframeInfo& info : p.second)
g_curSpec->flattenDependencies(info.id, pathsOut);
}
};
template <class IDType>
2018-02-22 07:24:51 +00:00
struct ChildResourceFactory : BigDNA
2016-02-02 04:29:58 +00:00
{
IDType id;
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
AT_SUBDECL_DNA
2016-02-04 00:55:39 +00:00
operator bool() const {return id.operator bool();}
2016-02-02 04:29:58 +00:00
};
}
#endif // __COMMON_PARTICLECOMMON_HPP__