2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:47:42 +00:00

Implement beam subclasses

This commit is contained in:
Jack Andersen
2017-09-06 17:55:31 -10:00
parent 361aa1512b
commit 0907c52ca3
18 changed files with 1080 additions and 91 deletions

View File

@@ -8,16 +8,35 @@ namespace urde
class CPowerBeam : public CGunWeapon
{
enum class ESmokeState
{
Inactive,
Active,
Done
};
TCachedToken<CGenDescription> x21c_shotSmoke;
TCachedToken<CGenDescription> x228_power2nd1;
std::unique_ptr<CElementGen> x234_shotSmokeGen;
float x23c_ = 0.f;
u32 x240_ = 0;
std::unique_ptr<CElementGen> x238_power2ndGen;
float x23c_smokeTimer = 0.f;
ESmokeState x240_smokeState = ESmokeState::Inactive;
bool x244_24 : 1;
bool x244_25 : 1;
bool x244_25_loaded : 1;
void ReInitVariables();
public:
CPowerBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId,
EMaterialTypes playerMaterial, const zeus::CVector3f& scale);
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 EnableSecondaryFx(ESecondaryFxType type);
void Update(float dt, CStateManager& mgr);
void Load(CStateManager& mgr, bool subtypeBasePose);
void Unload(CStateManager& mgr);
bool IsLoaded() const;
};
}