2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-02-05 01:27:03 +00:00
|
|
|
|
2019-09-22 21:52:05 +00:00
|
|
|
#include <memory>
|
|
|
|
#include "Runtime/Particle/IElement.hpp"
|
2016-02-05 08:34:14 +00:00
|
|
|
|
2016-02-28 06:55:05 +00:00
|
|
|
/* Documentation at: http://www.metroid2002.com/retromodding/wiki/Particle_Script#Mod_Vector_Elements */
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
|
|
|
|
|
|
|
class CMVEImplosion : public CModVectorElement {
|
|
|
|
std::unique_ptr<CVectorElement> x4_implPoint;
|
|
|
|
std::unique_ptr<CRealElement> x8_magScale;
|
|
|
|
std::unique_ptr<CRealElement> xc_maxMag;
|
|
|
|
std::unique_ptr<CRealElement> x10_minMag;
|
|
|
|
bool x14_enableMinMag;
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVEImplosion(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b,
|
|
|
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d, bool e)
|
|
|
|
: x4_implPoint(std::move(a))
|
|
|
|
, x8_magScale(std::move(b))
|
|
|
|
, xc_maxMag(std::move(c))
|
|
|
|
, x10_minMag(std::move(d))
|
|
|
|
, x14_enableMinMag(std::move(e)) {}
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMVEExponentialImplosion : public CModVectorElement {
|
|
|
|
std::unique_ptr<CVectorElement> x4_implPoint;
|
|
|
|
std::unique_ptr<CRealElement> x8_magScale;
|
|
|
|
std::unique_ptr<CRealElement> xc_maxMag;
|
|
|
|
std::unique_ptr<CRealElement> x10_minMag;
|
|
|
|
bool x14_enableMinMag;
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVEExponentialImplosion(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b,
|
|
|
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d, bool e)
|
|
|
|
: x4_implPoint(std::move(a))
|
|
|
|
, x8_magScale(std::move(b))
|
|
|
|
, xc_maxMag(std::move(c))
|
|
|
|
, x10_minMag(std::move(d))
|
|
|
|
, x14_enableMinMag(std::move(e)) {}
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-07 23:59:05 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMVELinearImplosion : public CModVectorElement {
|
|
|
|
std::unique_ptr<CVectorElement> x4_implPoint;
|
|
|
|
std::unique_ptr<CRealElement> x8_magScale;
|
|
|
|
std::unique_ptr<CRealElement> xc_maxMag;
|
|
|
|
std::unique_ptr<CRealElement> x10_minMag;
|
|
|
|
bool x14_enableMinMag;
|
|
|
|
|
2016-02-07 23:59:05 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVELinearImplosion(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b,
|
|
|
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d, bool e)
|
|
|
|
: x4_implPoint(std::move(a))
|
|
|
|
, x8_magScale(std::move(b))
|
|
|
|
, xc_maxMag(std::move(c))
|
|
|
|
, x10_minMag(std::move(d))
|
|
|
|
, x14_enableMinMag(std::move(e)) {}
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMVETimeChain : public CModVectorElement {
|
|
|
|
std::unique_ptr<CModVectorElement> x4_a;
|
|
|
|
std::unique_ptr<CModVectorElement> x8_b;
|
|
|
|
std::unique_ptr<CIntElement> xc_swFrame;
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVETimeChain(std::unique_ptr<CModVectorElement>&& a, std::unique_ptr<CModVectorElement>&& b,
|
|
|
|
std::unique_ptr<CIntElement>&& c)
|
|
|
|
: x4_a(std::move(a)), x8_b(std::move(b)), xc_swFrame(std::move(c)) {}
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMVEBounce : public CModVectorElement {
|
|
|
|
std::unique_ptr<CVectorElement> x4_planePoint;
|
|
|
|
std::unique_ptr<CVectorElement> x8_planeNormal;
|
|
|
|
std::unique_ptr<CRealElement> xc_friction;
|
|
|
|
std::unique_ptr<CRealElement> x10_restitution;
|
|
|
|
bool x14_planePrecomputed;
|
|
|
|
bool x15_dieOnPenetrate;
|
|
|
|
zeus::CVector3f x18_planeValidatedNormal;
|
|
|
|
float x24_planeD;
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVEBounce(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b,
|
|
|
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d, bool e);
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMVEConstant : public CModVectorElement {
|
|
|
|
std::unique_ptr<CRealElement> x4_x;
|
|
|
|
std::unique_ptr<CRealElement> x8_y;
|
|
|
|
std::unique_ptr<CRealElement> xc_z;
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVEConstant(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b, std::unique_ptr<CRealElement>&& c)
|
|
|
|
: x4_x(std::move(a)), x8_y(std::move(b)), xc_z(std::move(c)) {}
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMVEFastConstant : public CModVectorElement {
|
|
|
|
zeus::CVector3f x4_val;
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVEFastConstant(float a, float b, float c) : x4_val(a, b, c) {}
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMVEGravity : public CModVectorElement {
|
|
|
|
std::unique_ptr<CVectorElement> x4_a;
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVEGravity(std::unique_ptr<CVectorElement>&& a) : x4_a(std::move(a)) {}
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMVEExplode : public CModVectorElement {
|
|
|
|
std::unique_ptr<CRealElement> x4_a;
|
|
|
|
std::unique_ptr<CRealElement> x8_b;
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVEExplode(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b)
|
|
|
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMVESetPosition : public CModVectorElement {
|
|
|
|
std::unique_ptr<CVectorElement> x4_a;
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVESetPosition(std::unique_ptr<CVectorElement>&& a) : x4_a(std::move(a)) {}
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMVEPulse : public CModVectorElement {
|
|
|
|
std::unique_ptr<CIntElement> x4_aDuration;
|
|
|
|
std::unique_ptr<CIntElement> x8_bDuration;
|
|
|
|
std::unique_ptr<CModVectorElement> xc_aVal;
|
|
|
|
std::unique_ptr<CModVectorElement> x10_bVal;
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVEPulse(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b, std::unique_ptr<CModVectorElement>&& c,
|
|
|
|
std::unique_ptr<CModVectorElement>&& d)
|
|
|
|
: x4_aDuration(std::move(a)), x8_bDuration(std::move(b)), xc_aVal(std::move(c)), x10_bVal(std::move(d)) {}
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMVEWind : public CModVectorElement {
|
|
|
|
std::unique_ptr<CVectorElement> x4_velocity;
|
|
|
|
std::unique_ptr<CRealElement> x8_factor;
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVEWind(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b)
|
|
|
|
: x4_velocity(std::move(a)), x8_factor(std::move(b)) {}
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMVESwirl : public CModVectorElement {
|
|
|
|
std::unique_ptr<CVectorElement> x4_helixPoint;
|
|
|
|
std::unique_ptr<CVectorElement> x8_curveBinormal;
|
|
|
|
std::unique_ptr<CRealElement> xc_filterGain;
|
|
|
|
std::unique_ptr<CRealElement> x10_tangentialVelocity;
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMVESwirl(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b, std::unique_ptr<CRealElement>&& c,
|
|
|
|
std::unique_ptr<CRealElement>&& d)
|
|
|
|
: x4_helixPoint(std::move(a))
|
|
|
|
, x8_curveBinormal(std::move(b))
|
|
|
|
, xc_filterGain(std::move(c))
|
|
|
|
, x10_tangentialVelocity(std::move(d)) {}
|
2019-08-09 12:45:18 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override;
|
2016-02-05 01:27:03 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|