metaforce/DataSpec/DNACommon/ParticleCommon.hpp

815 lines
22 KiB
C++
Raw Normal View History

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