mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 13:44:56 +00:00
Particle, map and line renderer fixes
This commit is contained in:
@@ -193,10 +193,10 @@ bool CRELifetimePercent::GetValue(int frame, float& valOut) const
|
||||
bool CRESineWave::GetValue(int frame, float& valOut) const
|
||||
{
|
||||
float a, b, c;
|
||||
x4_magnitude->GetValue(frame, a);
|
||||
x8_linearFrame->GetValue(frame, b);
|
||||
xc_constantFrame->GetValue(frame, c);
|
||||
valOut = std::sin(zeus::degToRad(frame * b + c)) * a;
|
||||
x4_frequency->GetValue(frame, a);
|
||||
x8_amplitude->GetValue(frame, b);
|
||||
xc_phase->GetValue(frame, c);
|
||||
valOut = std::sin(zeus::degToRad(frame * a + c)) * b;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -146,13 +146,13 @@ public:
|
||||
|
||||
class CRESineWave : public CRealElement
|
||||
{
|
||||
std::unique_ptr<CRealElement> x4_magnitude;
|
||||
std::unique_ptr<CRealElement> x8_linearFrame;
|
||||
std::unique_ptr<CRealElement> xc_constantFrame;
|
||||
std::unique_ptr<CRealElement> x4_frequency;
|
||||
std::unique_ptr<CRealElement> x8_amplitude;
|
||||
std::unique_ptr<CRealElement> xc_phase;
|
||||
public:
|
||||
CRESineWave(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||
std::unique_ptr<CRealElement>&& c)
|
||||
: x4_magnitude(std::move(a)), x8_linearFrame(std::move(b)), xc_constantFrame(std::move(c)) {}
|
||||
: x4_frequency(std::move(a)), x8_amplitude(std::move(b)), xc_phase(std::move(c)) {}
|
||||
bool GetValue(int frame, float& valOut) const;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user