mirror of https://github.com/AxioDL/metaforce.git
Implement ParticleAccessParameters properly
SParticleMetrics is still a lie
This commit is contained in:
parent
7032274d66
commit
37da86838d
|
@ -46,6 +46,7 @@ std::unique_ptr<pshag::IObj> ProjectResourceFactory::Build(const pshag::SObjectT
|
|||
if (search == m_resPaths.end())
|
||||
return {};
|
||||
|
||||
fprintf(stderr, "Loading resource %s\n", search->second.getRelativePath().c_str());
|
||||
Athena::io::FileReader fr(search->second.getAbsolutePath(), 32 * 1024, false);
|
||||
if (fr.hasError())
|
||||
return {};
|
||||
|
|
|
@ -13,6 +13,6 @@ int CParticleGlobals::g_ParticleLifetimePercentage = 0;
|
|||
float CParticleGlobals::g_ParticleLifetimePercentageReal = 0.0;
|
||||
float CParticleGlobals::g_ParticleLifetimePercentageRemainder = 0.0;
|
||||
|
||||
float* CParticleGlobals::g_papValues = nullptr;
|
||||
float CParticleGlobals::g_papValues[8] = { 0.f };
|
||||
CParticleGlobals::SParticleSystem* CParticleGlobals::g_currentParticleSystem = nullptr;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
g_ParticleLifetimePercentageRemainder = g_ParticleLifetimePercentageReal - g_ParticleLifetimePercentage;
|
||||
}
|
||||
|
||||
static float* g_papValues;
|
||||
static float g_papValues[8];
|
||||
|
||||
struct SParticleSystem
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "CRealElement.hpp"
|
||||
#include "CParticleGlobals.hpp"
|
||||
#include "CRandom16.hpp"
|
||||
#include "CElementGen.hpp"
|
||||
#include <math.h>
|
||||
|
||||
namespace pshag
|
||||
|
@ -228,63 +229,63 @@ bool CRECompareEquals::GetValue(int frame, float& valOut) const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool CREParticleAccessParam1::GetValue(int frame, float& valOut) const
|
||||
bool CREParticleAccessParam1::GetValue(int /*frame*/, float& valOut) const
|
||||
{
|
||||
//valOut = CParticleGlobals::g_papValues[0];
|
||||
valOut = CParticleGlobals::g_papValues[0];
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CREParticleAccessParam2::GetValue(int frame, float& valOut) const
|
||||
bool CREParticleAccessParam2::GetValue(int /*frame*/, float& valOut) const
|
||||
{
|
||||
//valOut = CParticleGlobals::g_papValues[1];
|
||||
valOut = CParticleGlobals::g_papValues[1];
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CREParticleAccessParam3::GetValue(int frame, float& valOut) const
|
||||
bool CREParticleAccessParam3::GetValue(int /*frame*/, float& valOut) const
|
||||
{
|
||||
//valOut = CParticleGlobals::g_papValues[2];
|
||||
valOut = CParticleGlobals::g_papValues[2];
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CREParticleAccessParam4::GetValue(int frame, float& valOut) const
|
||||
bool CREParticleAccessParam4::GetValue(int /*frame*/, float& valOut) const
|
||||
{
|
||||
//valOut = CParticleGlobals::g_papValues[3];
|
||||
valOut = CParticleGlobals::g_papValues[3];
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CREParticleAccessParam5::GetValue(int frame, float& valOut) const
|
||||
bool CREParticleAccessParam5::GetValue(int /*frame*/, float& valOut) const
|
||||
{
|
||||
//valOut = CParticleGlobals::g_papValues[4];
|
||||
valOut = CParticleGlobals::g_papValues[4];
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CREParticleAccessParam6::GetValue(int frame, float& valOut) const
|
||||
bool CREParticleAccessParam6::GetValue(int /*frame*/, float& valOut) const
|
||||
{
|
||||
//valOut = CParticleGlobals::g_papValues[5];
|
||||
valOut = CParticleGlobals::g_papValues[5];
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CREParticleAccessParam7::GetValue(int frame, float& valOut) const
|
||||
bool CREParticleAccessParam7::GetValue(int /*frame*/, float& valOut) const
|
||||
{
|
||||
//valOut = CParticleGlobals::g_papValues[6];
|
||||
valOut = CParticleGlobals::g_papValues[6];
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CREParticleAccessParam8::GetValue(int frame, float& valOut) const
|
||||
bool CREParticleAccessParam8::GetValue(int /*frame*/, float& valOut) const
|
||||
{
|
||||
//valOut = CParticleGlobals::g_papValues[7];
|
||||
valOut = CParticleGlobals::g_papValues[7];
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CREPSLL::GetValue(int frame, float& valOut) const
|
||||
bool CREPSLL::GetValue(int /*frame*/, float& valOut) const
|
||||
{
|
||||
//valOut = CParticleGlobals::g_particleMetrics->x2c_psll;
|
||||
valOut = CElementGen::g_currentParticle->x2c_lineLengthOrSize;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CREPRLW::GetValue(int frame, float& valOut) const
|
||||
bool CREPRLW::GetValue(int /*frame*/, float& valOut) const
|
||||
{
|
||||
//valOut = CParticleGlobals::g_particleMetrics->x30_prlw;
|
||||
valOut = CElementGen::g_currentParticle->x30_lineWidthOrRota;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue