metaforce/Runtime/Particle/CIntElement.hpp

184 lines
4.5 KiB
C++
Raw Normal View History

#ifndef __RETRO_CINTELEMENT_HPP__
#define __RETRO_CINTELEMENT_HPP__
2016-02-05 08:34:14 +00:00
#include "IElement.hpp"
namespace Retro
{
2016-02-05 08:34:14 +00:00
class CIEKeyframeEmitter : public CIntElement
{
u32 x4_percent;
u32 x8_unk1;
bool xc_loop;
bool xd_unk2;
u32 x10_loopEnd;
u32 x14_loopStart;
std::vector<int> x18_keys;
2016-02-05 08:34:14 +00:00
public:
CIEKeyframeEmitter(CInputStream& in);
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIEDeath : public CIntElement
{
std::unique_ptr<CIntElement> x4_a;
std::unique_ptr<CIntElement> x8_b;
2016-02-05 08:34:14 +00:00
public:
CIEDeath(CIntElement* a, CIntElement* b)
: x4_a(a), x8_b(b) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIEClamp : public CIntElement
{
std::unique_ptr<CIntElement> x4_min;
std::unique_ptr<CIntElement> x8_max;
std::unique_ptr<CIntElement> xc_val;
2016-02-05 08:34:14 +00:00
public:
CIEClamp(CIntElement* a, CIntElement* b, CIntElement* c)
: x4_min(a), x8_max(b), xc_val(c) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIETimeChain : public CIntElement
{
std::unique_ptr<CIntElement> x4_a;
std::unique_ptr<CIntElement> x8_b;
2016-02-07 00:19:59 +00:00
std::unique_ptr<CIntElement> xc_swFrame;
2016-02-05 08:34:14 +00:00
public:
CIETimeChain(CIntElement* a, CIntElement* b, CIntElement* c)
2016-02-07 00:19:59 +00:00
: x4_a(a), x8_b(b), xc_swFrame(c) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIEAdd : public CIntElement
{
std::unique_ptr<CIntElement> x4_a;
std::unique_ptr<CIntElement> x8_b;
2016-02-05 08:34:14 +00:00
public:
CIEAdd(CIntElement* a, CIntElement* b)
: x4_a(a), x8_b(b) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIEConstant : public CIntElement
{
int x4_val;
2016-02-05 08:34:14 +00:00
public:
CIEConstant(int val) : x4_val(val) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIEImpulse : public CIntElement
{
std::unique_ptr<CIntElement> x4_a;
2016-02-05 08:34:14 +00:00
public:
CIEImpulse(CIntElement* a)
: x4_a(a) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIELifetimePercent : public CIntElement
{
2016-02-07 00:19:59 +00:00
std::unique_ptr<CIntElement> x4_percentVal;
2016-02-05 08:34:14 +00:00
public:
CIELifetimePercent(CIntElement* a)
2016-02-07 00:19:59 +00:00
: x4_percentVal(a) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIEInitialRandom : public CIntElement
{
std::unique_ptr<CIntElement> x4_a;
std::unique_ptr<CIntElement> x8_b;
2016-02-05 08:34:14 +00:00
public:
CIEInitialRandom(CIntElement* a, CIntElement* b)
: x4_a(a), x8_b(b) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIEPulse : public CIntElement
{
2016-02-07 00:19:59 +00:00
std::unique_ptr<CIntElement> x4_aDuration;
std::unique_ptr<CIntElement> x8_bDuration;
std::unique_ptr<CIntElement> xc_aVal;
std::unique_ptr<CIntElement> x10_bVal;
2016-02-05 08:34:14 +00:00
public:
CIEPulse(CIntElement* a, CIntElement* b, CIntElement* c, CIntElement* d)
2016-02-07 00:19:59 +00:00
: x4_aDuration(a), x8_bDuration(b), xc_aVal(c), x10_bVal(d) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIEMultiply : public CIntElement
{
std::unique_ptr<CIntElement> x4_a;
std::unique_ptr<CIntElement> x8_b;
2016-02-05 08:34:14 +00:00
public:
CIEMultiply(CIntElement* a, CIntElement* b)
: x4_a(a), x8_b(b) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIESampleAndHold : public CIntElement
{
2016-02-07 00:19:59 +00:00
std::unique_ptr<CIntElement> x4_sampleSource;
int x8_nextSampleFrame = 0;
std::unique_ptr<CIntElement> xc_waitFramesMin;
std::unique_ptr<CIntElement> x10_waitFramesMax;
int x14_holdVal;
2016-02-05 08:34:14 +00:00
public:
CIESampleAndHold(CIntElement* a, CIntElement* b, CIntElement* c)
2016-02-07 00:19:59 +00:00
: x4_sampleSource(a), xc_waitFramesMin(b), x10_waitFramesMax(c) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIERandom : public CIntElement
{
2016-02-07 00:19:59 +00:00
std::unique_ptr<CIntElement> x4_min;
std::unique_ptr<CIntElement> x8_max;
2016-02-05 08:34:14 +00:00
public:
CIERandom(CIntElement* a, CIntElement* b)
2016-02-07 00:19:59 +00:00
: x4_min(a), x8_max(b) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIETimeScale : public CIntElement
{
std::unique_ptr<CRealElement> x4_a;
2016-02-05 08:34:14 +00:00
public:
CIETimeScale(CRealElement* a)
: x4_a(a) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIEGTCP : public CIntElement
{
public:
bool GetValue(int frame, int& valOut) const;
};
class CIEModulo : public CIntElement
{
std::unique_ptr<CIntElement> x4_a;
std::unique_ptr<CIntElement> x8_b;
2016-02-05 08:34:14 +00:00
public:
CIEModulo(CIntElement* a, CIntElement* b)
: x4_a(a), x8_b(b) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
class CIESubtract : public CIntElement
{
std::unique_ptr<CIntElement> x4_a;
std::unique_ptr<CIntElement> x8_b;
2016-02-05 08:34:14 +00:00
public:
CIESubtract(CIntElement* a, CIntElement* b)
: x4_a(a), x8_b(b) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, int& valOut) const;
};
}
#endif // __RETRO_CINTELEMENT_HPP__