2016-02-13 09:02:47 +00:00
|
|
|
#ifndef __PSHAG_CMODVECTORELEMENT_HPP__
|
|
|
|
#define __PSHAG_CMODVECTORELEMENT_HPP__
|
2016-02-05 01:27:03 +00:00
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
#include "IElement.hpp"
|
|
|
|
|
2016-02-28 06:55:05 +00:00
|
|
|
/* Documentation at: http://www.metroid2002.com/retromodding/wiki/Particle_Script#Mod_Vector_Elements */
|
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2016-02-05 01:27:03 +00:00
|
|
|
{
|
|
|
|
|
2016-02-05 08:34:14 +00:00
|
|
|
class CMVEImplosion : public CModVectorElement
|
|
|
|
{
|
2016-02-07 23:59:05 +00:00
|
|
|
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:
|
2016-02-06 00:34:40 +00:00
|
|
|
CMVEImplosion(CVectorElement* a, CRealElement* b, CRealElement* c, CRealElement* d, bool e)
|
2016-02-07 23:59:05 +00:00
|
|
|
: x4_implPoint(a), x8_magScale(b), xc_maxMag(c), x10_minMag(d), x14_enableMinMag(e) {}
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CMVEExponentialImplosion : public CModVectorElement
|
|
|
|
{
|
2016-02-07 23:59:05 +00:00
|
|
|
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:
|
2016-02-06 00:34:40 +00:00
|
|
|
CMVEExponentialImplosion(CVectorElement* a, CRealElement* b, CRealElement* c, CRealElement* d, bool e)
|
2016-02-07 23:59:05 +00:00
|
|
|
: x4_implPoint(a), x8_magScale(b), xc_maxMag(c), x10_minMag(d), x14_enableMinMag(e) {}
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-07 23:59:05 +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;
|
|
|
|
public:
|
|
|
|
CMVELinearImplosion(CVectorElement* a, CRealElement* b, CRealElement* c, CRealElement* d, bool e)
|
|
|
|
: x4_implPoint(a), x8_magScale(b), xc_maxMag(c), x10_minMag(d), x14_enableMinMag(e) {}
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CMVETimeChain : public CModVectorElement
|
|
|
|
{
|
2016-02-06 00:34:40 +00:00
|
|
|
std::unique_ptr<CModVectorElement> x4_a;
|
|
|
|
std::unique_ptr<CModVectorElement> x8_b;
|
2016-02-07 23:59:05 +00:00
|
|
|
std::unique_ptr<CIntElement> xc_swFrame;
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2016-02-06 00:34:40 +00:00
|
|
|
CMVETimeChain(CModVectorElement* a, CModVectorElement* b, CIntElement* c)
|
2016-02-07 23:59:05 +00:00
|
|
|
: x4_a(a), x8_b(b), xc_swFrame(c) {}
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CMVEBounce : public CModVectorElement
|
|
|
|
{
|
2016-02-28 06:55:05 +00:00
|
|
|
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;
|
2016-03-04 23:04:53 +00:00
|
|
|
zeus::CVector3f x18_planeValidatedNormal;
|
2016-02-28 06:55:05 +00:00
|
|
|
float x24_planeD;
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2016-02-13 06:25:29 +00:00
|
|
|
CMVEBounce(CVectorElement* a, CVectorElement* b, CRealElement* c, CRealElement* d, bool e);
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CMVEConstant : public CModVectorElement
|
|
|
|
{
|
2016-02-14 00:14:23 +00:00
|
|
|
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:
|
2016-02-06 00:34:40 +00:00
|
|
|
CMVEConstant(CRealElement* a, CRealElement* b, CRealElement* c)
|
2016-02-14 00:14:23 +00:00
|
|
|
: x4_x(a), x8_y(b), xc_z(c) {}
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CMVEFastConstant : public CModVectorElement
|
|
|
|
{
|
2016-03-04 23:04:53 +00:00
|
|
|
zeus::CVector3f x4_val;
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2016-02-06 00:34:40 +00:00
|
|
|
CMVEFastConstant(float a, float b, float c)
|
|
|
|
: x4_val(a, b, c) {}
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CMVEGravity : public CModVectorElement
|
|
|
|
{
|
2016-02-06 00:34:40 +00:00
|
|
|
std::unique_ptr<CVectorElement> x4_a;
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2016-02-06 00:34:40 +00:00
|
|
|
CMVEGravity(CVectorElement* a)
|
|
|
|
: x4_a(a) {}
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CMVEExplode : public CModVectorElement
|
|
|
|
{
|
2016-02-06 00:34:40 +00:00
|
|
|
std::unique_ptr<CRealElement> x4_a;
|
|
|
|
std::unique_ptr<CRealElement> x8_b;
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2016-02-06 00:34:40 +00:00
|
|
|
CMVEExplode(CRealElement* a, CRealElement* b)
|
|
|
|
: x4_a(a), x8_b(b) {}
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CMVESetPosition : public CModVectorElement
|
|
|
|
{
|
2016-02-06 00:34:40 +00:00
|
|
|
std::unique_ptr<CVectorElement> x4_a;
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2016-02-06 00:34:40 +00:00
|
|
|
CMVESetPosition(CVectorElement* a)
|
|
|
|
: x4_a(a) {}
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CMVEPulse : public CModVectorElement
|
|
|
|
{
|
2016-02-14 00:14:23 +00:00
|
|
|
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:
|
2016-02-06 00:34:40 +00:00
|
|
|
CMVEPulse(CIntElement* a, CIntElement* b, CModVectorElement* c, CModVectorElement* d)
|
2016-02-14 00:14:23 +00:00
|
|
|
: x4_aDuration(a), x8_bDuration(b), xc_aVal(c), x10_bVal(d) {}
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CMVEWind : public CModVectorElement
|
|
|
|
{
|
2016-02-29 03:03:11 +00:00
|
|
|
std::unique_ptr<CVectorElement> x4_velocity;
|
|
|
|
std::unique_ptr<CRealElement> x8_factor;
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2016-02-06 00:34:40 +00:00
|
|
|
CMVEWind(CVectorElement* a, CRealElement* b)
|
2016-02-29 03:03:11 +00:00
|
|
|
: x4_velocity(a), x8_factor(b) {}
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-05 08:34:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CMVESwirl : public CModVectorElement
|
2016-02-05 01:27:03 +00:00
|
|
|
{
|
2016-02-29 03:03:11 +00:00
|
|
|
std::unique_ptr<CVectorElement> x4_helixPoint;
|
|
|
|
std::unique_ptr<CVectorElement> x8_curveBinormal;
|
|
|
|
std::unique_ptr<CRealElement> xc_targetRadius;
|
|
|
|
std::unique_ptr<CRealElement> x10_tangentialVelocity;
|
2016-02-05 08:34:14 +00:00
|
|
|
public:
|
2016-02-06 00:34:40 +00:00
|
|
|
CMVESwirl(CVectorElement* a, CVectorElement* b, CRealElement* c, CRealElement* d)
|
2016-02-29 03:03:11 +00:00
|
|
|
: x4_helixPoint(a), x8_curveBinormal(b), xc_targetRadius(c), x10_tangentialVelocity(d) {}
|
2016-03-04 23:04:53 +00:00
|
|
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
2016-02-05 01:27:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-02-13 09:02:47 +00:00
|
|
|
#endif // __PSHAG_CMODVECTORELEMENT_HPP__
|