mirror of https://github.com/AxioDL/metaforce.git
More constructor RE
This commit is contained in:
parent
d85c9ecfa8
commit
b0873ccc55
|
@ -1,16 +1,56 @@
|
|||
#include "CParticleElectric.hpp"
|
||||
#include "CElectricDescription.hpp"
|
||||
#include "CGenDescription.hpp"
|
||||
#include "CSwooshDescription.hpp"
|
||||
#include "CElectricDescription.hpp"
|
||||
#include "CParticleSwoosh.hpp"
|
||||
#include "CElementGen.hpp"
|
||||
#include "Graphics/CModel.hpp"
|
||||
#include "Graphics/CGraphics.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
CParticleElectric::CParticleElectric(const TToken<CElectricDescription>& desc)
|
||||
: x1c_elecDesc(desc)
|
||||
CParticleElectric::CParticleElectric(const TToken<CElectricDescription>& token)
|
||||
: x1c_elecDesc(token)
|
||||
{
|
||||
x438_24_x450_24 = true;
|
||||
/* x438_28_x450_28 = true; demo */
|
||||
x450_29 = true; // are 28 and 29 the same between retail and demo?
|
||||
CElectricDescription* desc = x1c_elecDesc.GetObj();
|
||||
if (desc->x10_SSEG)
|
||||
desc->x10_SSEG->GetValue(x28_currentFrame, x150_SSEG);
|
||||
else
|
||||
{
|
||||
x150_SSEG++;
|
||||
x154_SCNT = 1;
|
||||
}
|
||||
|
||||
if (desc->xc_SCNT)
|
||||
desc->xc_SCNT->GetValue(x28_currentFrame, x154_SCNT);
|
||||
std::max(0, std::min(x154_SCNT, 32));
|
||||
|
||||
if (desc->x0_LIFE)
|
||||
desc->x0_LIFE->GetValue(x28_currentFrame, x2c_LIFE);
|
||||
else
|
||||
x2c_LIFE = 0x7FFFFF;
|
||||
/* TODO: figure this out more */
|
||||
if (desc->x40_SSWH.m_found)
|
||||
{
|
||||
x438_27_x450_27 = true;
|
||||
//x1e0_SSWH.reset(new CParticleSwoosh(desc->x40_SSWH.m_token
|
||||
}
|
||||
|
||||
if (desc->x50_GPSM.m_found)
|
||||
{
|
||||
x438_25_x450_25 = true;
|
||||
//x400_GPSM.reset(new CElementGen(desc->x50_GPSM.m_token
|
||||
}
|
||||
|
||||
if (desc->x60_EPSM.m_found)
|
||||
{
|
||||
x438_26_x450_26 = true;
|
||||
//x410_GPSM.reset(new CElementGen(desc->x60_EPSM.m_token
|
||||
}
|
||||
}
|
||||
|
||||
void CParticleElectric::SetupLineGXMaterial()
|
||||
|
@ -54,38 +94,38 @@ void CParticleElectric::Render()
|
|||
void CParticleElectric::SetOrientation(const zeus::CTransform& orientation)
|
||||
{
|
||||
x44_orientation = orientation;
|
||||
x438_28 = true;
|
||||
x438_28_x450_28 = true;
|
||||
}
|
||||
|
||||
void CParticleElectric::SetTranslation(const zeus::CVector3f& translation)
|
||||
{
|
||||
x38_translation = translation;
|
||||
x438_28 = true;
|
||||
x438_28_x450_28 = true;
|
||||
}
|
||||
|
||||
void CParticleElectric::SetGlobalOrientation(const zeus::CTransform& orientation)
|
||||
{
|
||||
xb0_globalOrientation = orientation;
|
||||
x438_28 = true;
|
||||
x438_28_x450_28 = true;
|
||||
}
|
||||
|
||||
void CParticleElectric::SetGlobalTranslation(const zeus::CVector3f& translation)
|
||||
{
|
||||
xa4_globalTranslation = translation;
|
||||
x438_28 = true;
|
||||
x438_28_x450_28 = true;
|
||||
}
|
||||
|
||||
void CParticleElectric::SetGlobalScale(const zeus::CVector3f& scale)
|
||||
{
|
||||
xe0_globalScale = scale;
|
||||
x438_28 = true;
|
||||
x438_28_x450_28 = true;
|
||||
}
|
||||
|
||||
void CParticleElectric::SetLocalScale(const zeus::CVector3f& scale)
|
||||
{
|
||||
xec_localScale = scale;
|
||||
x438_28 = true;
|
||||
if (x438_26)
|
||||
x438_28_x450_28 = true;
|
||||
if (x438_26_x450_26)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
namespace urde
|
||||
{
|
||||
class CElectricDescription;
|
||||
class CParticleSwoosh;
|
||||
class CElementGen;
|
||||
|
||||
class CParticleElectric : public CParticleGen
|
||||
{
|
||||
|
@ -18,8 +20,8 @@ public:
|
|||
};
|
||||
private:
|
||||
TLockedToken<CElectricDescription> x1c_elecDesc;
|
||||
u32 x28 = 0;
|
||||
u32 x2c = 0;
|
||||
int x28_currentFrame = 0;
|
||||
int x2c_LIFE = 0x7FFFFF;
|
||||
double x30 = 0.0;
|
||||
zeus::CVector3f x38_translation;
|
||||
zeus::CTransform x44_orientation;
|
||||
|
@ -31,9 +33,9 @@ private:
|
|||
float x12c = 0.f;
|
||||
zeus::CVector3f x130;
|
||||
CRandom16 x14c_randState;
|
||||
u32 x150 = 0;
|
||||
u32 x154 = 1;
|
||||
u32 x158 = 0;
|
||||
int x150_SSEG = 8;
|
||||
int x154_SCNT = 1;
|
||||
int x158 = 0;
|
||||
float x15c = 0.f;
|
||||
zeus::CAABox x160_systemBounds = zeus::CAABox::skInvertedBox;
|
||||
bool x184 = false;
|
||||
|
@ -41,11 +43,39 @@ private:
|
|||
bool x1b4 = false;
|
||||
zeus::CColor x1b8_moduColor;
|
||||
bool x1bc_hasModuColor = false;
|
||||
rstl::reserved_vector<std::unique_ptr<CLineManager>, 32> x1c0_lineManagers;
|
||||
int x1c0 = 32;
|
||||
char x1c4[4][8];
|
||||
std::unique_ptr<CParticleSwoosh> x1e0_SSWH;
|
||||
int x2e4 = 0;
|
||||
int x3ec = 0;
|
||||
int x3f4 = 0; // actually the offset of itself
|
||||
int x3f0 = x3f4;
|
||||
int x3f8 = x3f4;
|
||||
int x3fc = 0;
|
||||
std::unique_ptr<CElementGen> x400_GPSM;
|
||||
int x404 = 0;
|
||||
int x408 = 0;
|
||||
int x40c = 0;
|
||||
int x414 = 0;
|
||||
int x418 = 0;
|
||||
int x41c = 0;
|
||||
int x424 = 0;
|
||||
int x428 = 0;
|
||||
int x42c = 0;
|
||||
int x434 = 0;
|
||||
int x438 = 0;
|
||||
int x43c = 0;
|
||||
int x444 = 0;
|
||||
int x448 = 0; // retail
|
||||
int x44c = 0; // retail
|
||||
|
||||
union
|
||||
{
|
||||
struct { bool x438_25 : 1; bool x438_26 : 1; bool x438_28: 1; };
|
||||
struct
|
||||
{
|
||||
bool x438_24_x450_24 : 1; bool x438_25_x450_25 : 1; bool x438_26_x450_26 : 1; bool x438_27_x450_27 : 1;
|
||||
bool x438_28_x450_28: 1; bool x450_29 : 1;
|
||||
};
|
||||
u8 dummy = 0;
|
||||
};
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue