2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 06:27:43 +00:00

Implement CHUDBillboardEffect, bug fixes

This commit is contained in:
Jack Andersen
2018-11-03 15:08:44 -10:00
parent d140f35886
commit 4c306e7e40
12 changed files with 129 additions and 49 deletions

View File

@@ -15,24 +15,29 @@ class CElectricDescription;
class CHUDBillboardEffect : public CEffect
{
std::unique_ptr<CParticleGen> xe8_generator;
zeus::CVector3f xec_v2;
zeus::CVector3f xf8_;
bool x104_24_ : 1;
bool x104_25_ : 1;
bool x104_26_ : 1;
bool x104_27_ : 1;
float x108_ = 0.f;
zeus::CVector3f xec_translation;
zeus::CVector3f xf8_localScale;
bool x104_24_renderAsParticleGen : 1;
bool x104_25_enableRender : 1;
bool x104_26_isElementGen : 1;
bool x104_27_runIndefinitely : 1;
float x108_timeoutTimer = 0.f;
static u32 g_IndirectTexturedBillboardCount;
static u32 g_BillboardCount;
static float CalcGenRate();
public:
CHUDBillboardEffect(const std::experimental::optional<TToken<CGenDescription>>& particle,
const std::experimental::optional<TToken<CElectricDescription>>& electric,
TUniqueId uid, bool active, std::string_view name, float, const zeus::CVector3f& v0,
const zeus::CColor& color, const zeus::CVector3f& v1, const zeus::CVector3f& v2);
TUniqueId uid, bool active, std::string_view name, float dist, const zeus::CVector3f& scale0,
const zeus::CColor& color, const zeus::CVector3f& scale1, const zeus::CVector3f& translation);
~CHUDBillboardEffect();
void Accept(IVisitor& visitor);
bool GetX104_26() const { return x104_26_; }
void SetX104_27(bool b) { x104_27_ = b; }
void Think(float dt, CStateManager& mgr);
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const;
void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum);
void Render(const CStateManager& mgr) const;
bool IsElementGen() const { return x104_26_isElementGen; }
void SetRunIndefinitely(bool b) { x104_27_runIndefinitely = b; }
CParticleGen* GetParticleGen() const { return xe8_generator.get(); }
static float GetNearClipDistance(CStateManager& mgr);