mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-09 12:27:41 +00:00
Match most of CVectorElement
This commit is contained in:
@@ -14223,7 +14223,7 @@ GetValue__33CVEParticleSystemOrientationRightCFiR9CVector3f = .text:0x80334BF8;
|
|||||||
GetValue__30CVEParticleSystemOrientationUpCFiR9CVector3f = .text:0x80334C54; // type:function size:0x5C scope:global
|
GetValue__30CVEParticleSystemOrientationUpCFiR9CVector3f = .text:0x80334C54; // type:function size:0x5C scope:global
|
||||||
GetValue__33CVEParticleSystemOrientationFrontCFiR9CVector3f = .text:0x80334CB0; // type:function size:0x5C scope:global
|
GetValue__33CVEParticleSystemOrientationFrontCFiR9CVector3f = .text:0x80334CB0; // type:function size:0x5C scope:global
|
||||||
GetValue__19CVEParticleVelocityCFiR9CVector3f = .text:0x80334D0C; // type:function size:0x24 scope:global
|
GetValue__19CVEParticleVelocityCFiR9CVector3f = .text:0x80334D0C; // type:function size:0x24 scope:global
|
||||||
GetValue__16CVEParticleColorCFiR9CVector3f = .text:0x80334D30; // type:function size:0x24 scope:global
|
GetValue__27CVEParticlePreviousLocationCFiR9CVector3f = .text:0x80334D30; // type:function size:0x24 scope:global
|
||||||
GetValue__19CVEParticleLocationCFiR9CVector3f = .text:0x80334D54; // type:function size:0x24 scope:global
|
GetValue__19CVEParticleLocationCFiR9CVector3f = .text:0x80334D54; // type:function size:0x24 scope:global
|
||||||
GetValue__15CVERealToVectorCFiR9CVector3f = .text:0x80334D78; // type:function size:0x5C scope:global
|
GetValue__15CVERealToVectorCFiR9CVector3f = .text:0x80334D78; // type:function size:0x5C scope:global
|
||||||
__dt__15CVERealToVectorFv = .text:0x80334DD4; // type:function size:0xA0 scope:global
|
__dt__15CVERealToVectorFv = .text:0x80334DD4; // type:function size:0xA0 scope:global
|
||||||
@@ -14266,7 +14266,7 @@ __dt__33CVEParticleSystemOrientationRightFv = .text:0x80336D1C; // type:function
|
|||||||
__dt__30CVEParticleSystemOrientationUpFv = .text:0x80336D8C; // type:function size:0x70 scope:global
|
__dt__30CVEParticleSystemOrientationUpFv = .text:0x80336D8C; // type:function size:0x70 scope:global
|
||||||
__dt__33CVEParticleSystemOrientationFrontFv = .text:0x80336DFC; // type:function size:0x70 scope:global
|
__dt__33CVEParticleSystemOrientationFrontFv = .text:0x80336DFC; // type:function size:0x70 scope:global
|
||||||
__dt__19CVEParticleVelocityFv = .text:0x80336E6C; // type:function size:0x70 scope:global
|
__dt__19CVEParticleVelocityFv = .text:0x80336E6C; // type:function size:0x70 scope:global
|
||||||
__dt__16CVEParticleColorFv = .text:0x80336EDC; // type:function size:0x70 scope:global
|
__dt__27CVEParticlePreviousLocationFv = .text:0x80336EDC; // type:function size:0x70 scope:global
|
||||||
__dt__19CVEParticleLocationFv = .text:0x80336F4C; // type:function size:0x70 scope:global
|
__dt__19CVEParticleLocationFv = .text:0x80336F4C; // type:function size:0x70 scope:global
|
||||||
IsFastConstant__15CVEFastConstantCFv = .text:0x80336FBC; // type:function size:0x8 scope:global
|
IsFastConstant__15CVEFastConstantCFv = .text:0x80336FBC; // type:function size:0x8 scope:global
|
||||||
__dt__5CWarpFv = .text:0x80336FC4; // type:function size:0x48 scope:global
|
__dt__5CWarpFv = .text:0x80336FC4; // type:function size:0x48 scope:global
|
||||||
@@ -18824,7 +18824,7 @@ __vt__33CVEParticleSystemOrientationRight = .data:0x803EE18C; // type:object siz
|
|||||||
__vt__30CVEParticleSystemOrientationUp = .data:0x803EE1A0; // type:object size:0x14 scope:global
|
__vt__30CVEParticleSystemOrientationUp = .data:0x803EE1A0; // type:object size:0x14 scope:global
|
||||||
__vt__33CVEParticleSystemOrientationFront = .data:0x803EE1B4; // type:object size:0x14 scope:global
|
__vt__33CVEParticleSystemOrientationFront = .data:0x803EE1B4; // type:object size:0x14 scope:global
|
||||||
__vt__19CVEParticleVelocity = .data:0x803EE1C8; // type:object size:0x14 scope:global
|
__vt__19CVEParticleVelocity = .data:0x803EE1C8; // type:object size:0x14 scope:global
|
||||||
__vt__16CVEParticleColor = .data:0x803EE1DC; // type:object size:0x14 scope:global
|
__vt__27CVEParticlePreviousLocation = .data:0x803EE1DC; // type:object size:0x14 scope:global
|
||||||
__vt__19CVEParticleLocation = .data:0x803EE1F0; // type:object size:0x14 scope:global
|
__vt__19CVEParticleLocation = .data:0x803EE1F0; // type:object size:0x14 scope:global
|
||||||
__vt__15CVERealToVector = .data:0x803EE204; // type:object size:0x14 scope:global
|
__vt__15CVERealToVector = .data:0x803EE204; // type:object size:0x14 scope:global
|
||||||
__vt__18CVEKeyframeEmitter = .data:0x803EE218; // type:object size:0x14 scope:local
|
__vt__18CVEKeyframeEmitter = .data:0x803EE218; // type:object size:0x14 scope:local
|
||||||
|
|||||||
@@ -14223,7 +14223,7 @@ GetValue__33CVEParticleSystemOrientationRightCFiR9CVector3f = .text:0x80334CD8;
|
|||||||
GetValue__30CVEParticleSystemOrientationUpCFiR9CVector3f = .text:0x80334D34; // type:function size:0x5C scope:global
|
GetValue__30CVEParticleSystemOrientationUpCFiR9CVector3f = .text:0x80334D34; // type:function size:0x5C scope:global
|
||||||
GetValue__33CVEParticleSystemOrientationFrontCFiR9CVector3f = .text:0x80334D90; // type:function size:0x5C scope:global
|
GetValue__33CVEParticleSystemOrientationFrontCFiR9CVector3f = .text:0x80334D90; // type:function size:0x5C scope:global
|
||||||
GetValue__19CVEParticleVelocityCFiR9CVector3f = .text:0x80334DEC; // type:function size:0x24 scope:global
|
GetValue__19CVEParticleVelocityCFiR9CVector3f = .text:0x80334DEC; // type:function size:0x24 scope:global
|
||||||
GetValue__16CVEParticleColorCFiR9CVector3f = .text:0x80334E10; // type:function size:0x24 scope:global
|
GetValue__27CVEParticlePreviousLocationCFiR9CVector3f = .text:0x80334E10; // type:function size:0x24 scope:global
|
||||||
GetValue__19CVEParticleLocationCFiR9CVector3f = .text:0x80334E34; // type:function size:0x24 scope:global
|
GetValue__19CVEParticleLocationCFiR9CVector3f = .text:0x80334E34; // type:function size:0x24 scope:global
|
||||||
GetValue__15CVERealToVectorCFiR9CVector3f = .text:0x80334E58; // type:function size:0x5C scope:global
|
GetValue__15CVERealToVectorCFiR9CVector3f = .text:0x80334E58; // type:function size:0x5C scope:global
|
||||||
__dt__15CVERealToVectorFv = .text:0x80334EB4; // type:function size:0xA0 scope:global
|
__dt__15CVERealToVectorFv = .text:0x80334EB4; // type:function size:0xA0 scope:global
|
||||||
@@ -14266,7 +14266,7 @@ __dt__33CVEParticleSystemOrientationRightFv = .text:0x80336DFC; // type:function
|
|||||||
__dt__30CVEParticleSystemOrientationUpFv = .text:0x80336E6C; // type:function size:0x70 scope:global
|
__dt__30CVEParticleSystemOrientationUpFv = .text:0x80336E6C; // type:function size:0x70 scope:global
|
||||||
__dt__33CVEParticleSystemOrientationFrontFv = .text:0x80336EDC; // type:function size:0x70 scope:global
|
__dt__33CVEParticleSystemOrientationFrontFv = .text:0x80336EDC; // type:function size:0x70 scope:global
|
||||||
__dt__19CVEParticleVelocityFv = .text:0x80336F4C; // type:function size:0x70 scope:global
|
__dt__19CVEParticleVelocityFv = .text:0x80336F4C; // type:function size:0x70 scope:global
|
||||||
__dt__16CVEParticleColorFv = .text:0x80336FBC; // type:function size:0x70 scope:global
|
__dt__27CVEParticlePreviousLocationFv = .text:0x80336FBC; // type:function size:0x70 scope:global
|
||||||
__dt__19CVEParticleLocationFv = .text:0x8033702C; // type:function size:0x70 scope:global
|
__dt__19CVEParticleLocationFv = .text:0x8033702C; // type:function size:0x70 scope:global
|
||||||
IsFastConstant__15CVEFastConstantCFv = .text:0x8033709C; // type:function size:0x8 scope:global
|
IsFastConstant__15CVEFastConstantCFv = .text:0x8033709C; // type:function size:0x8 scope:global
|
||||||
__dt__5CWarpFv = .text:0x803370A4; // type:function size:0x48 scope:global
|
__dt__5CWarpFv = .text:0x803370A4; // type:function size:0x48 scope:global
|
||||||
|
|||||||
@@ -14223,7 +14223,7 @@ GetValue__33CVEParticleSystemOrientationRightCFiR9CVector3f = .text:0x80334D68;
|
|||||||
GetValue__30CVEParticleSystemOrientationUpCFiR9CVector3f = .text:0x80334DC4; // type:function size:0x5C
|
GetValue__30CVEParticleSystemOrientationUpCFiR9CVector3f = .text:0x80334DC4; // type:function size:0x5C
|
||||||
GetValue__33CVEParticleSystemOrientationFrontCFiR9CVector3f = .text:0x80334E20; // type:function size:0x5C
|
GetValue__33CVEParticleSystemOrientationFrontCFiR9CVector3f = .text:0x80334E20; // type:function size:0x5C
|
||||||
GetValue__19CVEParticleVelocityCFiR9CVector3f = .text:0x80334E7C; // type:function size:0x24
|
GetValue__19CVEParticleVelocityCFiR9CVector3f = .text:0x80334E7C; // type:function size:0x24
|
||||||
GetValue__16CVEParticleColorCFiR9CVector3f = .text:0x80334EA0; // type:function size:0x24
|
GetValue__27CVEParticlePreviousLocationCFiR9CVector3f = .text:0x80334EA0; // type:function size:0x24
|
||||||
GetValue__19CVEParticleLocationCFiR9CVector3f = .text:0x80334EC4; // type:function size:0x24
|
GetValue__19CVEParticleLocationCFiR9CVector3f = .text:0x80334EC4; // type:function size:0x24
|
||||||
GetValue__15CVERealToVectorCFiR9CVector3f = .text:0x80334EE8; // type:function size:0x5C
|
GetValue__15CVERealToVectorCFiR9CVector3f = .text:0x80334EE8; // type:function size:0x5C
|
||||||
__dt__15CVERealToVectorFv = .text:0x80334F44; // type:function size:0xA0
|
__dt__15CVERealToVectorFv = .text:0x80334F44; // type:function size:0xA0
|
||||||
@@ -14266,7 +14266,7 @@ __dt__33CVEParticleSystemOrientationRightFv = .text:0x80336E8C; // type:function
|
|||||||
__dt__30CVEParticleSystemOrientationUpFv = .text:0x80336EFC; // type:function size:0x70
|
__dt__30CVEParticleSystemOrientationUpFv = .text:0x80336EFC; // type:function size:0x70
|
||||||
__dt__33CVEParticleSystemOrientationFrontFv = .text:0x80336F6C; // type:function size:0x70
|
__dt__33CVEParticleSystemOrientationFrontFv = .text:0x80336F6C; // type:function size:0x70
|
||||||
__dt__19CVEParticleVelocityFv = .text:0x80336FDC; // type:function size:0x70
|
__dt__19CVEParticleVelocityFv = .text:0x80336FDC; // type:function size:0x70
|
||||||
__dt__16CVEParticleColorFv = .text:0x8033704C; // type:function size:0x70
|
__dt__27CVEParticlePreviousLocationFv = .text:0x8033704C; // type:function size:0x70
|
||||||
__dt__19CVEParticleLocationFv = .text:0x803370BC; // type:function size:0x70
|
__dt__19CVEParticleLocationFv = .text:0x803370BC; // type:function size:0x70
|
||||||
IsFastConstant__15CVEFastConstantCFv = .text:0x8033712C; // type:function size:0x8
|
IsFastConstant__15CVEFastConstantCFv = .text:0x8033712C; // type:function size:0x8
|
||||||
__dt__5CWarpFv = .text:0x80337134; // type:function size:0x48
|
__dt__5CWarpFv = .text:0x80337134; // type:function size:0x48
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ public:
|
|||||||
bool GetValue(int frame, CVector3f& valOut) const override;
|
bool GetValue(int frame, CVector3f& valOut) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CVEParticleColor : public CVectorElement {
|
class CVEParticlePreviousLocation : public CVectorElement {
|
||||||
public:
|
public:
|
||||||
~CVEParticleColor() override {}
|
~CVEParticlePreviousLocation() override {}
|
||||||
bool GetValue(int frame, CVector3f& valOut) const override;
|
bool GetValue(int frame, CVector3f& valOut) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -78,6 +78,7 @@ class CVECircleCluster : public CVectorElement {
|
|||||||
public:
|
public:
|
||||||
CVECircleCluster(CVectorElement* circleOffset, CVectorElement* circleNormal,
|
CVECircleCluster(CVectorElement* circleOffset, CVectorElement* circleNormal,
|
||||||
CIntElement* cycleFrames, CRealElement* randomFactor);
|
CIntElement* cycleFrames, CRealElement* randomFactor);
|
||||||
|
~CVECircleCluster() override;
|
||||||
|
|
||||||
bool GetValue(int frame, CVector3f& valOut) const override;
|
bool GetValue(int frame, CVector3f& valOut) const override;
|
||||||
|
|
||||||
@@ -85,7 +86,7 @@ private:
|
|||||||
CVectorElement* mCircleOffset;
|
CVectorElement* mCircleOffset;
|
||||||
CVector3f mXVec;
|
CVector3f mXVec;
|
||||||
CVector3f mYVec;
|
CVector3f mYVec;
|
||||||
CIntElement* mCycleFrames;
|
float mRadius;
|
||||||
CRealElement* mRandomFactor;
|
CRealElement* mRandomFactor;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -120,6 +121,7 @@ class CVECircle : public CVectorElement {
|
|||||||
public:
|
public:
|
||||||
CVECircle(CVectorElement* circleOffset, CVectorElement* circleNormal, CRealElement* angleConstant,
|
CVECircle(CVectorElement* circleOffset, CVectorElement* circleNormal, CRealElement* angleConstant,
|
||||||
CRealElement* angleLinear, CRealElement* radius);
|
CRealElement* angleLinear, CRealElement* radius);
|
||||||
|
~CVECircle() override;
|
||||||
|
|
||||||
bool GetValue(int frame, CVector3f& valOut) const override;
|
bool GetValue(int frame, CVector3f& valOut) const override;
|
||||||
|
|
||||||
@@ -135,22 +137,24 @@ private:
|
|||||||
class CVEKeyframeEmitter : public CVectorElement {
|
class CVEKeyframeEmitter : public CVectorElement {
|
||||||
public:
|
public:
|
||||||
CVEKeyframeEmitter(CInputStream& in);
|
CVEKeyframeEmitter(CInputStream& in);
|
||||||
|
~CVEKeyframeEmitter() override;
|
||||||
|
|
||||||
bool GetValue(int frame, CVector3f& valOut) const override;
|
bool GetValue(int frame, CVector3f& valOut) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint mPercent;
|
int mPercent;
|
||||||
uint mUnk1;
|
int mUnk1;
|
||||||
bool mLoop;
|
bool mLoop;
|
||||||
bool mUnk2;
|
bool mUnk2;
|
||||||
uint mLoopEnd;
|
int mLoopEnd;
|
||||||
uint mLoopStart;
|
int mLoopStart;
|
||||||
rstl::vector< CVector3f > mKeys;
|
rstl::vector< CVector3f > mKeys;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CVEAdd : public CVectorElement {
|
class CVEAdd : public CVectorElement {
|
||||||
public:
|
public:
|
||||||
CVEAdd(CVectorElement* a, CVectorElement* b);
|
CVEAdd(CVectorElement* a, CVectorElement* b);
|
||||||
|
~CVEAdd() override;
|
||||||
|
|
||||||
bool GetValue(int frame, CVector3f& valOut) const override;
|
bool GetValue(int frame, CVector3f& valOut) const override;
|
||||||
|
|
||||||
@@ -162,6 +166,7 @@ private:
|
|||||||
class CVEMultiply : public CVectorElement {
|
class CVEMultiply : public CVectorElement {
|
||||||
public:
|
public:
|
||||||
CVEMultiply(CVectorElement* a, CVectorElement* b);
|
CVEMultiply(CVectorElement* a, CVectorElement* b);
|
||||||
|
~CVEMultiply() override;
|
||||||
|
|
||||||
bool GetValue(int frame, CVector3f& valOut) const override;
|
bool GetValue(int frame, CVector3f& valOut) const override;
|
||||||
|
|
||||||
@@ -173,6 +178,7 @@ private:
|
|||||||
class CVETimeChain : public CVectorElement {
|
class CVETimeChain : public CVectorElement {
|
||||||
public:
|
public:
|
||||||
CVETimeChain(CVectorElement* a, CVectorElement* b, CIntElement* mSwitchFrame);
|
CVETimeChain(CVectorElement* a, CVectorElement* b, CIntElement* mSwitchFrame);
|
||||||
|
~CVETimeChain() override;
|
||||||
|
|
||||||
bool GetValue(int frame, CVector3f& valOut) const override;
|
bool GetValue(int frame, CVector3f& valOut) const override;
|
||||||
|
|
||||||
@@ -185,6 +191,7 @@ private:
|
|||||||
class CVEPulse : public CVectorElement {
|
class CVEPulse : public CVectorElement {
|
||||||
public:
|
public:
|
||||||
CVEPulse(CIntElement* durationA, CIntElement* durationB, CVectorElement* a, CVectorElement* b);
|
CVEPulse(CIntElement* durationA, CIntElement* durationB, CVectorElement* a, CVectorElement* b);
|
||||||
|
~CVEPulse() override;
|
||||||
|
|
||||||
bool GetValue(int frame, CVector3f& valOut) const override;
|
bool GetValue(int frame, CVector3f& valOut) const override;
|
||||||
|
|
||||||
@@ -197,6 +204,7 @@ private:
|
|||||||
class CVERealToVector : public CVectorElement {
|
class CVERealToVector : public CVectorElement {
|
||||||
public:
|
public:
|
||||||
CVERealToVector(CRealElement* value);
|
CVERealToVector(CRealElement* value);
|
||||||
|
~CVERealToVector() override;
|
||||||
|
|
||||||
bool GetValue(int frame, CVector3f& valOut) const override;
|
bool GetValue(int frame, CVector3f& valOut) const override;
|
||||||
|
|
||||||
@@ -207,6 +215,7 @@ private:
|
|||||||
class CVESubtract : public CVectorElement {
|
class CVESubtract : public CVectorElement {
|
||||||
public:
|
public:
|
||||||
CVESubtract(CVectorElement* a, CVectorElement* b);
|
CVESubtract(CVectorElement* a, CVectorElement* b);
|
||||||
|
~CVESubtract() override;
|
||||||
|
|
||||||
bool GetValue(int frame, CVector3f& valOut) const override;
|
bool GetValue(int frame, CVector3f& valOut) const override;
|
||||||
|
|
||||||
@@ -218,6 +227,7 @@ private:
|
|||||||
class CVEColorToVector : public CVectorElement {
|
class CVEColorToVector : public CVectorElement {
|
||||||
public:
|
public:
|
||||||
CVEColorToVector(CColorElement* value);
|
CVEColorToVector(CColorElement* value);
|
||||||
|
~CVEColorToVector() override;
|
||||||
|
|
||||||
bool GetValue(int frame, CVector3f& valOut) const override;
|
bool GetValue(int frame, CVector3f& valOut) const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class CVector3f;
|
|||||||
|
|
||||||
class IElement {
|
class IElement {
|
||||||
public:
|
public:
|
||||||
virtual ~IElement(){};
|
virtual ~IElement() {};
|
||||||
|
|
||||||
// -> CFrameDelayedKiller
|
// -> CFrameDelayedKiller
|
||||||
void* operator new(size_t sz, const char*, const char*);
|
void* operator new(size_t sz, const char*, const char*);
|
||||||
@@ -27,7 +27,7 @@ public:
|
|||||||
|
|
||||||
class CIntElement : public IElement {
|
class CIntElement : public IElement {
|
||||||
public:
|
public:
|
||||||
~CIntElement() override{};
|
~CIntElement() override {};
|
||||||
virtual bool GetValue(int frame, int& valOut) const = 0;
|
virtual bool GetValue(int frame, int& valOut) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ struct SUVElementSet {
|
|||||||
float xMin, yMin, xMax, yMax;
|
float xMin, yMin, xMax, yMax;
|
||||||
|
|
||||||
// SUVElementSet() : xMin(0.f), yMin(1.f), xMax(0.f), yMax(1.f) {}
|
// SUVElementSet() : xMin(0.f), yMin(1.f), xMax(0.f), yMax(1.f) {}
|
||||||
//SUVElementSet(float xMin, float yMin, float xMax, float yMax)
|
// SUVElementSet(float xMin, float yMin, float xMax, float yMax)
|
||||||
//: xMin(xMin), yMin(yMin), xMax(xMax), yMax(yMax) {}
|
//: xMin(xMin), yMin(yMin), xMax(xMax), yMax(yMax) {}
|
||||||
// SUVElementSet(const SUVElementSet& other)
|
// SUVElementSet(const SUVElementSet& other)
|
||||||
// : xMin(other.xMin), yMin(other.yMin), xMax(other.xMax), yMax(other.yMax) {}
|
// : xMin(other.xMin), yMin(other.yMin), xMax(other.xMax), yMax(other.yMax) {}
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
#include "Kyoto/Particles/CVectorElement.hpp"
|
#include "Kyoto/Particles/CVectorElement.hpp"
|
||||||
|
|
||||||
#include "Kyoto/CRandom16.hpp"
|
#include "Kyoto/CRandom16.hpp"
|
||||||
|
#include "Kyoto/Graphics/CColor.hpp"
|
||||||
#include "Kyoto/Math/CMath.hpp"
|
#include "Kyoto/Math/CMath.hpp"
|
||||||
|
#include "Kyoto/Math/CRelAngle.hpp"
|
||||||
|
#include "Kyoto/Math/CVector3f.hpp"
|
||||||
|
#include "Kyoto/Particles/CParticleGlobals.hpp"
|
||||||
|
#include "Kyoto/Particles/IElement.hpp"
|
||||||
#include "rstl/math.hpp"
|
#include "rstl/math.hpp"
|
||||||
|
|
||||||
CVEConstant::CVEConstant(CRealElement* x, CRealElement* y, CRealElement* z)
|
CVEConstant::CVEConstant(CRealElement* x, CRealElement* y, CRealElement* z)
|
||||||
@@ -45,7 +49,7 @@ CVECone::CVECone(CVectorElement* direction, CRealElement* magnitude)
|
|||||||
} else {
|
} else {
|
||||||
xc_xVec = CVector3f::Cross(av, CVector3f(1.f, 0.f, 0.f));
|
xc_xVec = CVector3f::Cross(av, CVector3f(1.f, 0.f, 0.f));
|
||||||
}
|
}
|
||||||
x18_yVec = CVector3f::Cross(xc_xVec, avNorm);
|
x18_yVec = CVector3f::Cross(avNorm, xc_xVec);
|
||||||
}
|
}
|
||||||
|
|
||||||
CVECone::~CVECone() {
|
CVECone::~CVECone() {
|
||||||
@@ -59,15 +63,15 @@ bool CVECone::GetValue(int frame, CVector3f& valOut) const {
|
|||||||
|
|
||||||
x8_magnitude->GetValue(frame, b);
|
x8_magnitude->GetValue(frame, b);
|
||||||
x4_direction->GetValue(frame, dir);
|
x4_direction->GetValue(frame, dir);
|
||||||
float b2 = rstl::min_val(1.f, b);
|
b = rstl::min_val(1.f, b);
|
||||||
|
|
||||||
float randX = 0.f, randY = 0.f;
|
float randX = 0.f, randY = 0.f;
|
||||||
do {
|
do {
|
||||||
randX = 2.f * b2 * CRandom16::GetRandomNumber()->Float() - 0.5f;
|
randX = 2.f * b * (CRandom16::GetRandomNumber()->Float() - 0.5f);
|
||||||
randY = 2.f * b2 * CRandom16::GetRandomNumber()->Float() - 0.5f;
|
randY = 2.f * b * (CRandom16::GetRandomNumber()->Float() - 0.5f);
|
||||||
} while (randX * randX + randY * randY > 1.f);
|
} while (randX * randX + randY * randY > 1.f);
|
||||||
|
|
||||||
valOut = xc_xVec * randX + x18_yVec * randY + dir;
|
valOut = dir + xc_xVec * randX + x18_yVec * randY;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,5 +93,297 @@ CVEAngleCone::~CVEAngleCone() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CVEAngleCone::GetValue(int frame, CVector3f& valOut) const {
|
bool CVEAngleCone::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
float xc, xr, yc, yr;
|
||||||
|
x4_angleXConstant->GetValue(frame, xc);
|
||||||
|
x8_angleYConstant->GetValue(frame, yc);
|
||||||
|
xc_angleXRange->GetValue(frame, xr);
|
||||||
|
x10_angleYRange->GetValue(frame, yr);
|
||||||
|
|
||||||
|
xc += (xr * 0.5f - (xr * CRandom16::GetRandomNumber()->Float()));
|
||||||
|
xc *= M_PIF / 180.f;
|
||||||
|
|
||||||
|
yc += (yr * 0.5f - (yr * CRandom16::GetRandomNumber()->Float()));
|
||||||
|
yc *= M_PIF / 180.f;
|
||||||
|
|
||||||
|
CVector3f vec = CVector3f(-CMath::FastSinR(yc) * CMath::FastCosR(xc), CMath::FastSinR(xc),
|
||||||
|
CMath::FastCosR(xc) * CMath::FastCosR(yc));
|
||||||
|
float mag = 0.f;
|
||||||
|
x14_magnitude->GetValue(frame, mag);
|
||||||
|
|
||||||
|
valOut = vec * mag;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CVECircle::CVECircle(CVectorElement* circleOffset, CVectorElement* circleNormal,
|
||||||
|
CRealElement* angleConstant, CRealElement* angleLinear, CRealElement* radius)
|
||||||
|
: mCircleOffset(circleOffset)
|
||||||
|
, mXVec(CVector3f::Zero())
|
||||||
|
, mYVec(CVector3f::Zero())
|
||||||
|
, mAngleConstant(angleConstant)
|
||||||
|
, mAngleLinear(angleLinear)
|
||||||
|
, mRadius(radius) {
|
||||||
|
CVector3f direction = CVector3f(0.f, 0.f, 0.f);
|
||||||
|
circleNormal->GetValue(0, direction);
|
||||||
|
CVector3f normal = direction.AsNormalized();
|
||||||
|
|
||||||
|
if (normal.GetX() > 0.8f) {
|
||||||
|
mXVec = CVector3f::Cross(normal, CVector3f(0.f, 1.f, 0.f));
|
||||||
|
} else {
|
||||||
|
mXVec = CVector3f::Cross(normal, CVector3f(1.f, 0.f, 0.f));
|
||||||
|
}
|
||||||
|
mYVec = CVector3f::Cross(normal, mXVec);
|
||||||
|
|
||||||
|
delete circleNormal;
|
||||||
|
}
|
||||||
|
|
||||||
|
CVECircle::~CVECircle() {
|
||||||
|
delete mCircleOffset;
|
||||||
|
delete mAngleConstant;
|
||||||
|
delete mAngleLinear;
|
||||||
|
delete mRadius;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVECircle::GetValue(int frame, CVector3f& valOut) const {}
|
||||||
|
|
||||||
|
CVETimeChain::CVETimeChain(CVectorElement* a, CVectorElement* b, CIntElement* switchFrame)
|
||||||
|
: mA(a), mB(b), mSwitchFrame(switchFrame) {}
|
||||||
|
|
||||||
|
CVETimeChain::~CVETimeChain() {
|
||||||
|
delete mA;
|
||||||
|
delete mB;
|
||||||
|
delete mSwitchFrame;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVETimeChain::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
int switchFrame;
|
||||||
|
mSwitchFrame->GetValue(frame, switchFrame);
|
||||||
|
|
||||||
|
if (frame < switchFrame) {
|
||||||
|
return mA->GetValue(frame, valOut);
|
||||||
|
} else {
|
||||||
|
return mB->GetValue(frame - switchFrame, valOut);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CVECircleCluster::CVECircleCluster(CVectorElement* circleOffset, CVectorElement* circleNormal,
|
||||||
|
CIntElement* cycleFrames, CRealElement* randomFactor)
|
||||||
|
: mCircleOffset(circleOffset)
|
||||||
|
, mXVec(CVector3f::Zero())
|
||||||
|
, mYVec(CVector3f::Zero())
|
||||||
|
, mRadius(0.f)
|
||||||
|
, mRandomFactor(randomFactor) {
|
||||||
|
int _cycleFrames;
|
||||||
|
cycleFrames->GetValue(0, _cycleFrames);
|
||||||
|
mRadius = CRelAngle::FromRadians(360.f / _cycleFrames).AsDegrees();
|
||||||
|
|
||||||
|
CVector3f normal = CVector3f(0.f, 0.f, 0.f);
|
||||||
|
circleNormal->GetValue(0, normal);
|
||||||
|
CVector3f tmp = normal;
|
||||||
|
if (normal.CanBeNormalized()) {
|
||||||
|
normal = normal.AsNormalized();
|
||||||
|
} else {
|
||||||
|
normal = CVector3f::Up();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (normal.GetX() > 0.8f) {
|
||||||
|
mXVec = CVector3f::Cross(tmp, CVector3f(0.f, 1.f, 0.f));
|
||||||
|
} else {
|
||||||
|
mXVec = CVector3f::Cross(tmp, CVector3f(1.f, 0.f, 0.f));
|
||||||
|
}
|
||||||
|
|
||||||
|
mYVec = CVector3f::Cross(normal, mXVec);
|
||||||
|
|
||||||
|
delete cycleFrames;
|
||||||
|
delete circleNormal;
|
||||||
|
}
|
||||||
|
|
||||||
|
CVECircleCluster::~CVECircleCluster() {
|
||||||
|
delete mCircleOffset;
|
||||||
|
delete mRandomFactor;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVECircleCluster::GetValue(int frame, CVector3f& valOut) const { return false; }
|
||||||
|
|
||||||
|
CVEAdd::CVEAdd(CVectorElement* a, CVectorElement* b) : mA(a), mB(b) {}
|
||||||
|
CVEAdd::~CVEAdd() {
|
||||||
|
delete mA;
|
||||||
|
delete mB;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVEAdd::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
CVector3f a = CVector3f::Zero();
|
||||||
|
CVector3f b = CVector3f::Zero();
|
||||||
|
|
||||||
|
mA->GetValue(frame, a);
|
||||||
|
mB->GetValue(frame, b);
|
||||||
|
|
||||||
|
valOut = a + b;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CVEMultiply::CVEMultiply(CVectorElement* a, CVectorElement* b) : mA(a), mB(b) {}
|
||||||
|
CVEMultiply::~CVEMultiply() {
|
||||||
|
delete mA;
|
||||||
|
delete mB;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVEMultiply::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
CVector3f a = CVector3f::Zero();
|
||||||
|
CVector3f b = CVector3f::Zero();
|
||||||
|
|
||||||
|
mA->GetValue(frame, a);
|
||||||
|
mB->GetValue(frame, b);
|
||||||
|
|
||||||
|
valOut = CVector3f::ByElementMultiply(a, b);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CVEPulse::CVEPulse(CIntElement* durationA, CIntElement* durationB, CVectorElement* a,
|
||||||
|
CVectorElement* b)
|
||||||
|
: mDurationA(durationA), mDurationB(durationB), mA(a), mB(b) {}
|
||||||
|
|
||||||
|
CVEPulse::~CVEPulse() {
|
||||||
|
delete mDurationA;
|
||||||
|
delete mDurationB;
|
||||||
|
delete mA;
|
||||||
|
delete mB;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVEPulse::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
int a;
|
||||||
|
int b;
|
||||||
|
mDurationA->GetValue(frame, a);
|
||||||
|
mDurationB->GetValue(frame, b);
|
||||||
|
int cv = a + b + 1;
|
||||||
|
|
||||||
|
if (cv < 0) {
|
||||||
|
cv = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (b >= 1) {
|
||||||
|
if (frame % cv > a) {
|
||||||
|
mB->GetValue(frame, valOut);
|
||||||
|
} else {
|
||||||
|
mA->GetValue(frame, valOut);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mA->GetValue(frame, valOut);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CVEKeyframeEmitter::CVEKeyframeEmitter(CInputStream& in)
|
||||||
|
: mPercent(in.Get< uint >())
|
||||||
|
, mUnk1(in.Get< uint >())
|
||||||
|
, mLoop(in.Get< bool >())
|
||||||
|
, mUnk2(in.Get< bool >())
|
||||||
|
, mLoopEnd(in.Get< uint >())
|
||||||
|
, mLoopStart(in.Get< uint >())
|
||||||
|
, mKeys(in) {}
|
||||||
|
|
||||||
|
CVEKeyframeEmitter::~CVEKeyframeEmitter() {}
|
||||||
|
|
||||||
|
bool CVEKeyframeEmitter::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
if (!mPercent) {
|
||||||
|
int emitterTime = CParticleGlobals::GetEmitterTime();
|
||||||
|
int calcKey = emitterTime;
|
||||||
|
if (mLoop) {
|
||||||
|
if (emitterTime >= mLoopEnd) {
|
||||||
|
calcKey = ((emitterTime - mLoopStart) % (mLoopEnd - mLoopStart)) + mLoopStart;
|
||||||
|
}
|
||||||
|
valOut = mKeys[calcKey];
|
||||||
|
} else {
|
||||||
|
if ((mLoopEnd - 1) < emitterTime) {
|
||||||
|
calcKey = (mLoopEnd - 1);
|
||||||
|
}
|
||||||
|
valOut = mKeys[calcKey];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (CParticleGlobals::GetParticleLifetimePercentage() == 100) {
|
||||||
|
valOut = mKeys[100];
|
||||||
|
} else {
|
||||||
|
CVector3f tmp1 = mKeys[CParticleGlobals::GetParticleLifetimePercentage()];
|
||||||
|
CVector3f tmp2 = mKeys[CParticleGlobals::GetParticleLifetimePercentage() + 1];
|
||||||
|
valOut = (1.f - CParticleGlobals::GetParticleLifetimePercentageRemainder()) * tmp1 +
|
||||||
|
CParticleGlobals::GetParticleLifetimePercentageRemainder() * tmp2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CVERealToVector::CVERealToVector(CRealElement* value) : mValue(value) {}
|
||||||
|
CVERealToVector::~CVERealToVector() { delete mValue; }
|
||||||
|
|
||||||
|
bool CVERealToVector::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
float val = 0.f;
|
||||||
|
mValue->GetValue(frame, val);
|
||||||
|
valOut = CVector3f(val, val, val);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVEParticleLocation::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
valOut = CParticleGlobals::GetCurrentParticle()->x4_pos;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVEParticlePreviousLocation::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
valOut = CParticleGlobals::GetCurrentParticle()->x10_prevPos;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVEParticleVelocity::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
valOut = CParticleGlobals::GetCurrentParticle()->x1c_vel;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVEParticleSystemOrientationFront::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
valOut = CParticleGlobals::GetCurrentParticleSystem()->x4_system->GetOrientation().GetForward();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVEParticleSystemOrientationUp::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
valOut = CParticleGlobals::GetCurrentParticleSystem()->x4_system->GetOrientation().GetUp();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVEParticleSystemOrientationRight::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
valOut = CParticleGlobals::GetCurrentParticleSystem()->x4_system->GetOrientation().GetRight();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVEParticleSystemTranslation::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
valOut = CParticleGlobals::GetCurrentParticleSystem()->x4_system->GetTranslation();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CVESubtract::CVESubtract(CVectorElement* a, CVectorElement* b) : mA(a), mB(b) {}
|
||||||
|
CVESubtract::~CVESubtract() {
|
||||||
|
delete mA;
|
||||||
|
delete mB;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CVESubtract::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
CVector3f a = CVector3f::Zero();
|
||||||
|
CVector3f b = CVector3f::Zero();
|
||||||
|
|
||||||
|
mA->GetValue(frame, a);
|
||||||
|
mB->GetValue(frame, b);
|
||||||
|
|
||||||
|
valOut = a - b;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CVEColorToVector::CVEColorToVector(CColorElement* value) : mValue(value) {}
|
||||||
|
CVEColorToVector::~CVEColorToVector() { delete mValue; }
|
||||||
|
|
||||||
|
bool CVEColorToVector::GetValue(int frame, CVector3f& valOut) const {
|
||||||
|
CColor val = CColor::Black();
|
||||||
|
mValue->GetValue(frame, val);
|
||||||
|
valOut.SetX(val.GetRed());
|
||||||
|
valOut.SetY(val.GetGreen());
|
||||||
|
valOut.SetZ(val.GetBlue());
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,20 +4,19 @@
|
|||||||
#include "MetroidPrime/CInGameTweakManager.hpp"
|
#include "MetroidPrime/CInGameTweakManager.hpp"
|
||||||
#include "MetroidPrime/CWorld.hpp"
|
#include "MetroidPrime/CWorld.hpp"
|
||||||
|
|
||||||
#include "Kyoto/CDvdFile.hpp"
|
|
||||||
#include "Kyoto/Audio/CStreamAudioManager.hpp"
|
#include "Kyoto/Audio/CStreamAudioManager.hpp"
|
||||||
|
#include "Kyoto/CDvdFile.hpp"
|
||||||
|
|
||||||
#include "rstl/StringExtras.hpp"
|
#include "rstl/StringExtras.hpp"
|
||||||
|
|
||||||
extern "C" void nullsub_42(CScriptStreamedMusic*);
|
extern "C" void nullsub_42(CScriptStreamedMusic*);
|
||||||
int sub_8020c154(const rstl::string&, int, int);
|
int sub_8020c154(const rstl::string&, int, int);
|
||||||
|
|
||||||
extern "C" int sub_8020c844(int* a, int* b) {
|
extern "C" int sub_8020c844(int* a, int* b) { return b[1] - a[1]; }
|
||||||
return b[1] - a[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
rstl::string sub_8020c7f0(const rstl::string&) {
|
rstl::string sub_8020c7f0(const rstl::string&) {
|
||||||
sub_8020c844(nullptr, nullptr);
|
sub_8020c844(nullptr, nullptr);
|
||||||
|
return rstl::string();
|
||||||
}
|
}
|
||||||
|
|
||||||
int CScriptStreamedMusic::IsOneShot(bool b) { return b == false; }
|
int CScriptStreamedMusic::IsOneShot(bool b) { return b == false; }
|
||||||
@@ -148,7 +147,7 @@ void CScriptStreamedMusic::TweakOverride(CStateManager& mgr) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int sub_8020c154(const rstl::string&, int, int) {}
|
int sub_8020c154(const rstl::string&, int, int) { return 0; }
|
||||||
|
|
||||||
void CScriptStreamedMusic::sub_8020be90() {
|
void CScriptStreamedMusic::sub_8020be90() {
|
||||||
if (x45_fileIsDsp && sub_8020c154(x34_fileName, 0x7c, 0) == -1 && x34_fileName.size() >= 4) {
|
if (x45_fileIsDsp && sub_8020c154(x34_fileName, 0x7c, 0) == -1 && x34_fileName.size() >= 4) {
|
||||||
@@ -156,11 +155,11 @@ void CScriptStreamedMusic::sub_8020be90() {
|
|||||||
rstl::string_l(x34_fileName.data() + (x34_fileName.size() - 5)),
|
rstl::string_l(x34_fileName.data() + (x34_fileName.size() - 5)),
|
||||||
rstl::string_l("L.dsp")) == 0) {
|
rstl::string_l("L.dsp")) == 0) {
|
||||||
|
|
||||||
sub_8020c7f0(x34_fileName);
|
sub_8020c7f0(x34_fileName);
|
||||||
rstl::string file = x34_fileName + "R.dsp";
|
rstl::string file = x34_fileName + "R.dsp";
|
||||||
if (CDvdFile::FileExists(file.data())) {
|
if (CDvdFile::FileExists(file.data())) {
|
||||||
x34_fileName = x34_fileName + '|' + file;
|
x34_fileName = x34_fileName + '|' + file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user