2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27:43 +00:00

Big fixes and big memory leak refactor (linux only for now)

This commit is contained in:
Jack Andersen
2018-05-19 20:14:57 -10:00
parent 5f03362149
commit f60af632b3
84 changed files with 849 additions and 689 deletions

View File

@@ -13,8 +13,8 @@ class CEESimpleEmitter : public CEmitterElement
std::unique_ptr<CVectorElement> x4_loc;
std::unique_ptr<CVectorElement> x8_vec;
public:
CEESimpleEmitter(CVectorElement* a, CVectorElement* b)
: x4_loc(a), x8_vec(b) {}
CEESimpleEmitter(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b)
: x4_loc(std::move(a)), x8_vec(std::move(b)) {}
bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const;
};
@@ -24,8 +24,9 @@ class CVESphere : public CEmitterElement
std::unique_ptr<CRealElement> x8_sphereRadius;
std::unique_ptr<CRealElement> xc_velocityMag;
public:
CVESphere(CVectorElement* a, CRealElement* b, CRealElement* c)
: x4_sphereOrigin(a), x8_sphereRadius(b), xc_velocityMag(c) {}
CVESphere(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b,
std::unique_ptr<CRealElement>&& c)
: x4_sphereOrigin(std::move(a)), x8_sphereRadius(std::move(b)), xc_velocityMag(std::move(c)) {}
bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const;
};
@@ -39,9 +40,13 @@ class CVEAngleSphere : public CEmitterElement
std::unique_ptr<CRealElement> x18_angleXRange;
std::unique_ptr<CRealElement> x1c_angleYRange;
public:
CVEAngleSphere(CVectorElement* a, CRealElement* b, CRealElement* c, CRealElement* d,
CRealElement* e, CRealElement* f, CRealElement* g)
: x4_sphereOrigin(a), x8_sphereRadius(b), xc_velocityMag(c), x10_angleXBias(d), x14_angleYBias(e), x18_angleXRange(f), x1c_angleYRange(g) {}
CVEAngleSphere(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b,
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d,
std::unique_ptr<CRealElement>&& e, std::unique_ptr<CRealElement>&& f,
std::unique_ptr<CRealElement>&& g)
: x4_sphereOrigin(std::move(a)), x8_sphereRadius(std::move(b)), xc_velocityMag(std::move(c)),
x10_angleXBias(std::move(d)), x14_angleYBias(std::move(e)), x18_angleXRange(std::move(f)),
x1c_angleYRange(std::move(g)) {}
bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const;
};