2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CPOWERBEAM
|
|
|
|
#define _CPOWERBEAM
|
|
|
|
|
|
|
|
#include "types.h"
|
2022-10-06 10:38:13 +00:00
|
|
|
|
|
|
|
#include "MetroidPrime/Weapons/CGunWeapon.hpp"
|
|
|
|
|
2022-11-15 20:06:18 +00:00
|
|
|
#include "rstl/single_ptr.hpp"
|
|
|
|
|
2022-10-06 10:38:13 +00:00
|
|
|
class CPowerBeam : public CGunWeapon {
|
|
|
|
public:
|
|
|
|
CPowerBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId,
|
|
|
|
EMaterialTypes playerMaterial, const CVector3f& scale);
|
2022-10-06 11:37:57 +00:00
|
|
|
~CPowerBeam();
|
2022-10-06 10:38:13 +00:00
|
|
|
|
2023-02-06 07:21:28 +00:00
|
|
|
void PreRenderGunFx(const CStateManager& mgr, const CTransform4f& xf);
|
|
|
|
void PostRenderGunFx(const CStateManager& mgr, const CTransform4f& xf);
|
|
|
|
void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const CTransform4f& xf);
|
2022-11-15 20:06:18 +00:00
|
|
|
void Fire(bool underwater, float dt, CPlayerState::EChargeStage chargeState, const CTransform4f& xf, CStateManager& mgr,
|
2023-02-06 07:21:28 +00:00
|
|
|
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;
|
2022-11-15 20:06:18 +00:00
|
|
|
|
2022-10-06 10:38:13 +00:00
|
|
|
private:
|
2022-11-15 20:06:18 +00:00
|
|
|
enum ESmokeState { kSS_Inactive, kSS_Active, kSS_Done };
|
|
|
|
TCachedToken<CGenDescription> x21c_shotSmoke;
|
|
|
|
TCachedToken<CGenDescription> x228_power2nd1;
|
|
|
|
rstl::single_ptr<CElementGen> x234_shotSmokeGen;
|
|
|
|
rstl::single_ptr<CElementGen> x238_power2ndGen;
|
|
|
|
float x23c_smokeTimer;
|
|
|
|
ESmokeState x240_smokeState;
|
|
|
|
bool x244_24 : 1;
|
|
|
|
bool x244_25_loaded : 1;
|
|
|
|
|
|
|
|
void ReInitVariables();
|
2022-10-06 10:38:13 +00:00
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CPowerBeam, 0x248)
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CPOWERBEAM
|