mirror of https://github.com/AxioDL/metaforce.git
Initial CParticleElectric stubs
This commit is contained in:
parent
741ac2c0ca
commit
277455b072
|
@ -1099,6 +1099,19 @@ u32 CElementGen::GetParticleCountAllInternal() const
|
|||
return ret;
|
||||
}
|
||||
|
||||
void CElementGen::EndLifetime()
|
||||
{
|
||||
x214_PSLT = 0;
|
||||
for (std::unique_ptr<CElementGen>& ch : x234_activePartChildren)
|
||||
ch->EndLifetime();
|
||||
for (std::unique_ptr<CElementGen>& ch : x248_finishPartChildren)
|
||||
ch->EndLifetime();
|
||||
for (std::unique_ptr<CParticleSwoosh>& ch : x260_swhcChildren)
|
||||
ch->SetParticleEmission(false);
|
||||
for (std::unique_ptr<CParticleElectric>& ch : x280_elscChildren)
|
||||
ch->SetParticleEmission(false);
|
||||
}
|
||||
|
||||
void CElementGen::BuildParticleSystemBounds()
|
||||
{
|
||||
Zeus::CAABox aabb;
|
||||
|
|
|
@ -199,6 +199,8 @@ public:
|
|||
u32 GetSystemCount();
|
||||
u32 GetParticleCountAllInternal() const;
|
||||
u32 GetParticleCountAll() const {return x20c_recursiveParticleCount;}
|
||||
void EndLifetime();
|
||||
void ForceParticleCreation(int amount) { CreateNewParticles(amount); }
|
||||
|
||||
bool InternalUpdate(double);
|
||||
void RenderModels();
|
||||
|
|
|
@ -1,12 +1,32 @@
|
|||
#include "CParticleElectric.hpp"
|
||||
#include "CGraphics.hpp"
|
||||
|
||||
namespace pshag
|
||||
{
|
||||
|
||||
CParticleElectric::CParticleElectric(const TToken<CElectricDescription>& desc)
|
||||
: x1c_elecDesc(desc)
|
||||
{
|
||||
}
|
||||
|
||||
void CParticleElectric::RenderLines()
|
||||
{
|
||||
CGraphics::DisableAllLights();
|
||||
CGraphics::SetDepthWriteMode(true, ERglEnum::LEqual, false);
|
||||
CGraphics::SetBlendMode(ERglBlendMode::Blend, ERglBlendFactor::SrcAlpha, ERglBlendFactor::One, ERglLogicOp::Clear);
|
||||
|
||||
Zeus::CTransform viewXfrm = CGraphics::g_ViewMatrix;
|
||||
Zeus::CTransform scale;
|
||||
scale.Scale(xec_localScale);
|
||||
Zeus::CTransform globalScale;
|
||||
globalScale.Scale(xe0_globalScale);
|
||||
Zeus::CTransform localTranslate;
|
||||
localTranslate.Translate(x38_translation);
|
||||
Zeus::CTransform globalTranslate;
|
||||
globalTranslate.Translate(xa4_globalTranslation);
|
||||
Zeus::CTransform global = globalTranslate * xb0_globalOrientation;
|
||||
}
|
||||
|
||||
void CParticleElectric::Update(double)
|
||||
{
|
||||
}
|
||||
|
@ -15,72 +35,89 @@ void CParticleElectric::Render()
|
|||
{
|
||||
}
|
||||
|
||||
void CParticleElectric::SetOrientation(const Zeus::CTransform&)
|
||||
void CParticleElectric::SetOrientation(const Zeus::CTransform& orientation)
|
||||
{
|
||||
x44_orientation = orientation;
|
||||
x438_28 = true;
|
||||
}
|
||||
|
||||
void CParticleElectric::SetTranslation(const Zeus::CVector3f&)
|
||||
void CParticleElectric::SetTranslation(const Zeus::CVector3f& translation)
|
||||
{
|
||||
x38_translation = translation;
|
||||
x438_28 = true;
|
||||
}
|
||||
|
||||
void CParticleElectric::SetGlobalOrientation(const Zeus::CTransform&)
|
||||
void CParticleElectric::SetGlobalOrientation(const Zeus::CTransform& orientation)
|
||||
{
|
||||
xb0_globalOrientation = orientation;
|
||||
x438_28 = true;
|
||||
}
|
||||
|
||||
void CParticleElectric::SetGlobalTranslation(const Zeus::CVector3f&)
|
||||
void CParticleElectric::SetGlobalTranslation(const Zeus::CVector3f& translation)
|
||||
{
|
||||
xa4_globalTranslation = translation;
|
||||
x438_28 = true;
|
||||
}
|
||||
|
||||
void CParticleElectric::SetGlobalScale(const Zeus::CVector3f&)
|
||||
void CParticleElectric::SetGlobalScale(const Zeus::CVector3f& scale)
|
||||
{
|
||||
xe0_globalScale = scale;
|
||||
x438_28 = true;
|
||||
}
|
||||
|
||||
void CParticleElectric::SetLocalScale(const Zeus::CVector3f&)
|
||||
void CParticleElectric::SetLocalScale(const Zeus::CVector3f& scale)
|
||||
{
|
||||
xec_localScale = scale;
|
||||
x438_28 = true;
|
||||
if (x438_26)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void CParticleElectric::SetParticleEmission(bool)
|
||||
{
|
||||
}
|
||||
|
||||
void CParticleElectric::SetModulationColor(const Zeus::CColor&)
|
||||
void CParticleElectric::SetModulationColor(const Zeus::CColor& color)
|
||||
{
|
||||
if (!x1bc_hasModuColor)
|
||||
x1bc_hasModuColor = true;
|
||||
|
||||
x1b8_moduColor = color;
|
||||
/* TODO: Add child particle systems */
|
||||
}
|
||||
|
||||
const Zeus::CTransform& CParticleElectric::GetOrientation() const
|
||||
{
|
||||
static Zeus::CTransform dummy;
|
||||
return dummy;
|
||||
return x44_orientation;
|
||||
}
|
||||
|
||||
const Zeus::CVector3f& CParticleElectric::GetTranslation() const
|
||||
{
|
||||
static Zeus::CVector3f dummy;
|
||||
return dummy;
|
||||
return x38_translation;
|
||||
}
|
||||
|
||||
const Zeus::CTransform& CParticleElectric::GetGlobalOrientation() const
|
||||
{
|
||||
static Zeus::CTransform dummy;
|
||||
return dummy;
|
||||
return xb0_globalOrientation;
|
||||
}
|
||||
|
||||
const Zeus::CVector3f& CParticleElectric::GetGlobalTranslation() const
|
||||
{
|
||||
static Zeus::CVector3f dummy;
|
||||
return dummy;
|
||||
return xa4_globalTranslation;
|
||||
}
|
||||
|
||||
const Zeus::CVector3f& CParticleElectric::GetGlobalScale() const
|
||||
{
|
||||
static Zeus::CVector3f dummy;
|
||||
return dummy;
|
||||
return xe0_globalScale;
|
||||
}
|
||||
|
||||
const Zeus::CColor& CParticleElectric::GetModulationColor() const
|
||||
{
|
||||
static Zeus::CColor dummy;
|
||||
return dummy;
|
||||
if (!x1bc_hasModuColor)
|
||||
return Zeus::CColor::skWhite;
|
||||
return x1b8_moduColor;
|
||||
}
|
||||
|
||||
bool CParticleElectric::IsSystemDeletable() const
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "CParticleGen.hpp"
|
||||
#include "CToken.hpp"
|
||||
#include "CRandom16.hpp"
|
||||
|
||||
namespace pshag
|
||||
{
|
||||
|
@ -11,8 +12,48 @@ class CElectricDescription;
|
|||
class CParticleElectric : public CParticleGen
|
||||
{
|
||||
public:
|
||||
class CLineManager
|
||||
{
|
||||
|
||||
};
|
||||
private:
|
||||
TLockedToken<CElectricDescription> x1c_elecDesc;
|
||||
u32 x28 = 0;
|
||||
u32 x2c = 0;
|
||||
double x30 = 0.0;
|
||||
Zeus::CVector3f x38_translation;
|
||||
Zeus::CTransform x44_orientation;
|
||||
Zeus::CVector3f xa4_globalTranslation;
|
||||
Zeus::CTransform xb0_globalOrientation;
|
||||
Zeus::CVector3f xe0_globalScale;
|
||||
Zeus::CVector3f xec_localScale;
|
||||
float x128 = 0.f;
|
||||
float x12c = 0.f;
|
||||
Zeus::CVector3f x130;
|
||||
CRandom16 x14c_randState;
|
||||
u32 x150 = 0;
|
||||
u32 x154 = 1;
|
||||
u32 x158 = 0;
|
||||
float x15c = 0.f;
|
||||
Zeus::CAABox x160_systemBounds = Zeus::CAABox::skInvertedBox;
|
||||
bool x184 = false;
|
||||
bool x194 = false;
|
||||
bool x1b4 = false;
|
||||
Zeus::CColor x1b8_moduColor;
|
||||
bool x1bc_hasModuColor = false;
|
||||
rstl::reserved_vector<std::unique_ptr<CLineManager>, 32> x1c0_lineManagers;
|
||||
|
||||
union
|
||||
{
|
||||
struct { bool x438_25 : 1; bool x438_26 : 1; bool x438_28: 1; };
|
||||
u8 dummy = 0;
|
||||
};
|
||||
public:
|
||||
|
||||
|
||||
CParticleElectric(const TToken<CElectricDescription>& desc);
|
||||
|
||||
void RenderLines();
|
||||
void Update(double);
|
||||
void Render();
|
||||
void SetOrientation(const Zeus::CTransform&);
|
||||
|
|
Loading…
Reference in New Issue