2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-06-02 23:21:19 +00:00

Implement rest of elements

This commit is contained in:
Phillip Stephens 2016-02-13 23:38:01 -08:00
parent 43986b922b
commit 33f50789e4
5 changed files with 43 additions and 27 deletions

View File

@ -150,9 +150,9 @@ bool CCEPulse::GetValue(int frame, Zeus::CColor& valOut) const
return false;
}
bool CCEParticleColor::GetValue(int frame, Zeus::CColor& colorOut) const
bool CCEParticleColor::GetValue(int /*frame*/, Zeus::CColor& colorOut) const
{
/* TODO: Do */
colorOut = CParticleGlobals::g_particleMetrics->x34_pcol;
return false;
}

View File

@ -139,9 +139,10 @@ bool CMVEBounce::GetValue(int frame, Zeus::CVector3f& pVel, Zeus::CVector3f& pPo
return false;
Zeus::CVector3f delta = pPos - pVel;
pPos.x += ((-((((delta.z * ((delta.x * (delta.y * x18_g.y)) + ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x))) + x18_g.z) - x24_j)) / ((pVel.z * ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x)) + x18_g.z)) - ((x18_g.z * ((x18_g.x * (x18_g.y * pVel.y)) + pVel.x)) + pVel.z)) * pVel.x;
pPos.y += ((-((((delta.z * ((delta.x * (delta.y * x18_g.y)) + ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x))) + x18_g.z) - x24_j)) / ((pVel.z * ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x)) + x18_g.z)) - ((x18_g.z * ((x18_g.x * (x18_g.y * pVel.y)) + pVel.x)) + pVel.z)) * pVel.y;
pPos.z += ((-((((delta.z * ((delta.x * (delta.y * x18_g.y)) + ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x))) + x18_g.z) - x24_j)) / ((pVel.z * ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x)) + x18_g.z)) - ((x18_g.z * ((x18_g.x * (x18_g.y * pVel.y)) + pVel.x)) + pVel.z)) * pVel.z;
pPos += Zeus::CVector3f{(-((((delta.z * ((delta.x * (delta.y * x18_g.y))
+ ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x))) + x18_g.z) - x24_j)) /
((pVel.z * ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x)) + x18_g.z)) - (
(x18_g.z * ((x18_g.x * (x18_g.y * pVel.y)) + pVel.x)) + pVel.z)} * pVel;
float d = 0.0f;
x10_d->GetValue(frame, d);

View File

@ -15,5 +15,5 @@ float CParticleGlobals::g_ParticleLifetimePercentageRemainder = 0.0;
float* CParticleGlobals::g_papValues = nullptr;
CParticleGlobals::SParticleMetrics* CParticleGlobals::g_particleMetrics = nullptr;
CParticleGlobals::SParticleSystem* CParticleGlobals::g_currentParticleSystem = nullptr;
}

View File

@ -2,10 +2,12 @@
#define __PSHAG_CPARTICLEGLOBALS_HPP__
#include "CVector3f.hpp"
#include "CColor.hpp"
#include "RetroTypes.hpp"
namespace pshag
{
class CParticleGen;
class CParticleGlobals
{
public:
@ -45,8 +47,17 @@ public:
Zeus::CVector3f x1c_pvel;
float x2c_psll;
float x30_prlw;
Zeus::CColor x34_pcol;
};
struct SParticleSystem
{
FourCC x0_type;
CParticleGen* x4_system;
};
static SParticleMetrics* g_particleMetrics;
static SParticleSystem* g_currentParticleSystem;
};
}

View File

@ -1,6 +1,7 @@
#include "CVectorElement.hpp"
#include "CParticleGlobals.hpp"
#include "CRandom16.hpp"
#include "CParticleGen.hpp"
#include <math.h>
namespace pshag
@ -261,51 +262,54 @@ bool CVEPulse::GetValue(int frame, Zeus::CVector3f& valOut) const
return false;
}
bool CVEParticleVelocity::GetValue(int frame, Zeus::CVector3f& valOut) const
bool CVEParticleVelocity::GetValue(int /*frame*/, Zeus::CVector3f& valOut) const
{
/* TODO: Do */
valOut = CParticleGlobals::g_particleMetrics->x1c_pvel;
return false;
}
bool CVESPOS::GetValue(int frame, Zeus::CVector3f& valOut) const
bool CVEPLCO::GetValue(int /*frame*/, Zeus::CVector3f& valOut) const
{
/* TODO: Do */
valOut = CParticleGlobals::g_particleMetrics->x10_plco;
return false;
}
bool CVEPLCO::GetValue(int frame, Zeus::CVector3f& valOut) const
bool CVEPLOC::GetValue(int /*frame*/, Zeus::CVector3f& valOut) const
{
/* TODO: Do */
valOut = CParticleGlobals::g_particleMetrics->x0_ploc;
return false;
}
bool CVEPLOC::GetValue(int frame, Zeus::CVector3f& valOut) const
bool CVEPSOF::GetValue(int /*frame*/, Zeus::CVector3f& valOut) const
{
/* TODO: Do */
Zeus::CTransform trans= CParticleGlobals::g_currentParticleSystem->x4_system->GetOrientation();
valOut.x = trans.m_basis[0][0];
valOut.y = trans.m_basis[1][1];
valOut.z = trans.m_basis[2][2];
return false;
}
bool CVEPSOF::GetValue(int frame, Zeus::CVector3f& valOut) const
bool CVEPSOU::GetValue(int /*frame*/, Zeus::CVector3f& valOut) const
{
/* TODO: Do */
Zeus::CTransform trans= CParticleGlobals::g_currentParticleSystem->x4_system->GetOrientation();
valOut.x = trans.m_basis[0][0];
valOut.y = trans.m_basis[1][1];
valOut.z = trans.m_basis[2][2];
return false;
}
bool CVEPSOU::GetValue(int frame, Zeus::CVector3f& valOut) const
bool CVEPSOR::GetValue(int /*frame*/, Zeus::CVector3f& valOut) const
{
/* TODO: Do */
Zeus::CTransform trans= CParticleGlobals::g_currentParticleSystem->x4_system->GetOrientation();
valOut.x = trans.m_basis[0][0];
valOut.y = trans.m_basis[1][1];
valOut.z = trans.m_basis[2][2];
return false;
}
bool CVEPSOR::GetValue(int frame, Zeus::CVector3f& valOut) const
bool CVEPSTR::GetValue(int /*frame*/, Zeus::CVector3f& valOut) const
{
/* TODO: Do */
return false;
}
bool CVEPSTR::GetValue(int frame, Zeus::CVector3f& valOut) const
{
/* TODO: Do */
valOut = CParticleGlobals::g_currentParticleSystem->x4_system->GetTranslation();
return false;
}