2016-02-13 09:02:47 +00:00
|
|
|
#ifndef __PSHAG_CPARTICLEELECTRIC_HPP__
|
|
|
|
#define __PSHAG_CPARTICLEELECTRIC_HPP__
|
2015-08-21 00:06:39 +00:00
|
|
|
|
2016-02-13 05:49:59 +00:00
|
|
|
#include "CParticleGen.hpp"
|
|
|
|
#include "CToken.hpp"
|
2016-02-26 03:31:00 +00:00
|
|
|
#include "CRandom16.hpp"
|
2015-08-21 00:06:39 +00:00
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2015-08-21 00:06:39 +00:00
|
|
|
{
|
2016-02-11 22:38:25 +00:00
|
|
|
class CElectricDescription;
|
2016-03-06 02:55:09 +00:00
|
|
|
class CParticleSwoosh;
|
|
|
|
class CElementGen;
|
2015-08-21 00:06:39 +00:00
|
|
|
|
2016-02-13 05:49:59 +00:00
|
|
|
class CParticleElectric : public CParticleGen
|
2015-08-21 00:06:39 +00:00
|
|
|
{
|
2016-02-11 22:38:25 +00:00
|
|
|
public:
|
2016-03-07 08:07:55 +00:00
|
|
|
struct CLineManager
|
2016-02-26 03:31:00 +00:00
|
|
|
{
|
2016-03-07 08:07:55 +00:00
|
|
|
std::unique_ptr<CParticleSwoosh> SSWH;
|
|
|
|
std::unique_ptr<CElementGen> GPSM;
|
|
|
|
std::unique_ptr<CElementGen> EPSM;
|
2016-02-26 03:31:00 +00:00
|
|
|
};
|
|
|
|
private:
|
|
|
|
TLockedToken<CElectricDescription> x1c_elecDesc;
|
2016-03-06 02:55:09 +00:00
|
|
|
int x28_currentFrame = 0;
|
|
|
|
int x2c_LIFE = 0x7FFFFF;
|
2016-02-26 03:31:00 +00:00
|
|
|
double x30 = 0.0;
|
2016-03-04 23:04:53 +00:00
|
|
|
zeus::CVector3f x38_translation;
|
|
|
|
zeus::CTransform x44_orientation;
|
|
|
|
zeus::CVector3f xa4_globalTranslation;
|
|
|
|
zeus::CTransform xb0_globalOrientation;
|
|
|
|
zeus::CVector3f xe0_globalScale;
|
|
|
|
zeus::CVector3f xec_localScale;
|
2016-02-26 03:31:00 +00:00
|
|
|
float x128 = 0.f;
|
|
|
|
float x12c = 0.f;
|
2016-03-04 23:04:53 +00:00
|
|
|
zeus::CVector3f x130;
|
2016-02-26 03:31:00 +00:00
|
|
|
CRandom16 x14c_randState;
|
2016-03-06 02:55:09 +00:00
|
|
|
int x150_SSEG = 8;
|
|
|
|
int x154_SCNT = 1;
|
|
|
|
int x158 = 0;
|
2016-02-26 03:31:00 +00:00
|
|
|
float x15c = 0.f;
|
2016-03-04 23:04:53 +00:00
|
|
|
zeus::CAABox x160_systemBounds = zeus::CAABox::skInvertedBox;
|
2016-02-26 03:31:00 +00:00
|
|
|
bool x184 = false;
|
|
|
|
bool x194 = false;
|
|
|
|
bool x1b4 = false;
|
2016-03-04 23:04:53 +00:00
|
|
|
zeus::CColor x1b8_moduColor;
|
2016-02-26 03:31:00 +00:00
|
|
|
bool x1bc_hasModuColor = false;
|
2016-03-06 02:55:09 +00:00
|
|
|
int x1c0 = 32;
|
|
|
|
char x1c4[4][8];
|
2016-03-07 08:07:55 +00:00
|
|
|
rstl::reserved_vector<CLineManager, 32> x1e0_lineManagers;
|
2016-03-06 02:55:09 +00:00
|
|
|
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
|
2016-02-26 03:31:00 +00:00
|
|
|
|
|
|
|
union
|
|
|
|
{
|
2016-03-06 02:55:09 +00:00
|
|
|
struct
|
|
|
|
{
|
2016-03-07 08:07:55 +00:00
|
|
|
bool x438_24_x450_24 : 1; bool x438_25_x450_25_HaveGPSM : 1; bool x438_26_x450_26_HaveEPSM : 1; bool x438_27_x450_27_HaveSSWH : 1;
|
2016-03-06 02:55:09 +00:00
|
|
|
bool x438_28_x450_28: 1; bool x450_29 : 1;
|
|
|
|
};
|
2016-02-26 03:31:00 +00:00
|
|
|
u8 dummy = 0;
|
|
|
|
};
|
2016-03-15 23:44:59 +00:00
|
|
|
|
2016-02-26 03:31:00 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
|
2016-02-11 22:38:25 +00:00
|
|
|
CParticleElectric(const TToken<CElectricDescription>& desc);
|
2016-02-13 05:49:59 +00:00
|
|
|
|
2016-02-26 03:45:36 +00:00
|
|
|
void SetupLineGXMaterial();
|
2016-02-13 05:49:59 +00:00
|
|
|
void Update(double);
|
2016-04-07 07:10:08 +00:00
|
|
|
void RenderLines();
|
|
|
|
void RenderSwooshes();
|
2016-02-13 05:49:59 +00:00
|
|
|
void Render();
|
2016-04-07 07:10:08 +00:00
|
|
|
void CalculateFractal(s32, s32, float, float);
|
|
|
|
void CalculatePoints();
|
2016-03-04 23:04:53 +00:00
|
|
|
void SetOrientation(const zeus::CTransform&);
|
|
|
|
void SetTranslation(const zeus::CVector3f&);
|
|
|
|
void SetGlobalOrientation(const zeus::CTransform&);
|
|
|
|
void SetGlobalTranslation(const zeus::CVector3f&);
|
|
|
|
void SetGlobalScale(const zeus::CVector3f&);
|
|
|
|
void SetLocalScale(const zeus::CVector3f&);
|
2016-02-13 05:49:59 +00:00
|
|
|
void SetParticleEmission(bool);
|
2016-03-04 23:04:53 +00:00
|
|
|
void SetModulationColor(const zeus::CColor&);
|
|
|
|
const zeus::CTransform& GetOrientation() const;
|
|
|
|
const zeus::CVector3f& GetTranslation() const;
|
|
|
|
const zeus::CTransform& GetGlobalOrientation() const;
|
|
|
|
const zeus::CVector3f& GetGlobalTranslation() const;
|
|
|
|
const zeus::CVector3f& GetGlobalScale() const;
|
|
|
|
const zeus::CColor& GetModulationColor() const;
|
2016-02-13 05:49:59 +00:00
|
|
|
bool IsSystemDeletable() const;
|
2016-03-04 23:04:53 +00:00
|
|
|
std::pair<zeus::CAABox, bool> GetBounds() const;
|
2016-02-13 05:49:59 +00:00
|
|
|
u32 GetParticleCount() const;
|
|
|
|
bool SystemHasLight() const;
|
|
|
|
CLight GetLight() const;
|
|
|
|
bool GetParticleEmission() const;
|
|
|
|
void DestroyParticles();
|
2016-02-18 04:44:06 +00:00
|
|
|
void Reset() {}
|
2015-08-21 00:06:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-02-13 09:02:47 +00:00
|
|
|
#endif // __PSHAG_CPARTICLEELECTRIC_HPP__
|