mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 01:07:43 +00:00
Implement beam subclasses
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define __URDE_CPHAZONBEAM_HPP__
|
||||
|
||||
#include "CGunWeapon.hpp"
|
||||
#include "Graphics/Shaders/CAABoxShader.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
@@ -9,28 +10,48 @@ namespace urde
|
||||
class CPhazonBeam : public CGunWeapon
|
||||
{
|
||||
TCachedToken<CModel> x21c_phazonVeins;
|
||||
std::unique_ptr<CModelData> x224_phazonVeinsData;
|
||||
TCachedToken<CGenDescription> x228_phazon2nd1;
|
||||
u32 x234_ = 0;
|
||||
zeus::CAABox x238_;
|
||||
zeus::CAABox x250_;
|
||||
float x268_ = 0.f;
|
||||
float x26c_ = 0.f;
|
||||
float x270_ = 1.f;
|
||||
bool x274_24 : 1;
|
||||
bool x274_25 : 1;
|
||||
bool x274_26 : 1;
|
||||
bool x274_27 : 1;
|
||||
float x278_ = 1.f / 3.f;
|
||||
std::unique_ptr<CElementGen> x234_chargeFxGen;
|
||||
zeus::CAABox x238_aaBoxScale;
|
||||
zeus::CAABox x250_aaBoxTranslate;
|
||||
float x268_clipWipeScale = 0.f;
|
||||
float x26c_clipWipeTranslate = 0.f;
|
||||
float x270_indirectAlpha = 1.f;
|
||||
bool x274_24_loaded : 1;
|
||||
bool x274_25_clipWipeActive : 1;
|
||||
bool x274_26_veinsAlphaActive : 1;
|
||||
bool x274_27_phazonVeinsIdx : 1;
|
||||
float x278_fireTime = 1.f / 3.f;
|
||||
mutable CAABoxShader m_aaboxShaderScale = {true};
|
||||
mutable CAABoxShader m_aaboxShaderTranslate = {true};
|
||||
void ReInitVariables();
|
||||
void DrawClipScaleCube() const;
|
||||
void DrawClipTranslateCube() const;
|
||||
public:
|
||||
CPhazonBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId,
|
||||
EMaterialTypes playerMaterial, const zeus::CVector3f& scale);
|
||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
||||
bool IsFiring() const { return x278_ < 1.f / 6.f; }
|
||||
void SetX274_25(bool b) { x274_25 = b; }
|
||||
void SetX274_26(bool b) { x274_26 = b; }
|
||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr);
|
||||
bool IsFiring() const { return x278_fireTime < 1.f / 6.f; }
|
||||
void SetClipWipeActive(bool b) { x274_25_clipWipeActive = b; }
|
||||
void SetVeinsAlphaActive(bool b) { x274_26_veinsAlphaActive = b; }
|
||||
void StopBeam(CStateManager& mgr, bool b1);
|
||||
void UpdateBeam(float dt, const zeus::CTransform& targetXf,
|
||||
const zeus::CVector3f& localBeamPos, CStateManager& mgr);
|
||||
void CreateBeam(CStateManager& mgr);
|
||||
|
||||
void PreRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf);
|
||||
void PostRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf);
|
||||
void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const zeus::CTransform& xf);
|
||||
void Fire(bool underwater, float dt, EChargeState chargeState, const zeus::CTransform& xf,
|
||||
CStateManager& mgr, TUniqueId homingTarget, float chargeFactor1, float chargeFactor2);
|
||||
void Update(float dt, CStateManager& mgr);
|
||||
void Load(CStateManager& mgr, bool subtypeBasePose);
|
||||
void Unload(CStateManager& mgr);
|
||||
bool IsLoaded() const;
|
||||
void Draw(bool drawSuitArm, const CStateManager& mgr, const zeus::CTransform& xf,
|
||||
const CModelFlags& flags, const CActorLights* lights) const;
|
||||
void DrawMuzzleFx(const CStateManager& mgr) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user