2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CPLASMABEAM
|
|
|
|
#define _CPLASMABEAM
|
|
|
|
|
|
|
|
#include "types.h"
|
2022-10-06 10:38:13 +00:00
|
|
|
|
|
|
|
#include "MetroidPrime/Weapons/CGunWeapon.hpp"
|
2022-11-25 00:01:26 +00:00
|
|
|
#include "MetroidPrime/CEntityInfo.hpp"
|
2022-10-06 10:38:13 +00:00
|
|
|
|
|
|
|
class CPlasmaBeam : public CGunWeapon {
|
|
|
|
public:
|
|
|
|
CPlasmaBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId,
|
2022-10-09 05:13:17 +00:00
|
|
|
EMaterialTypes playerMaterial, const CVector3f& scale);
|
2022-11-25 00:01:26 +00:00
|
|
|
|
2023-02-06 07:21:28 +00:00
|
|
|
~CPlasmaBeam();
|
2022-11-25 00:01:26 +00:00
|
|
|
|
|
|
|
// CGunWeapon
|
2023-02-06 07:21:28 +00:00
|
|
|
void PostRenderGunFx(const CStateManager& mgr, const CTransform4f& xf);
|
2022-11-25 00:01:26 +00:00
|
|
|
void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr,
|
2023-02-06 07:21:28 +00:00
|
|
|
const CTransform4f& xf);
|
|
|
|
void Update(float dt, CStateManager& mgr);
|
2022-11-25 00:01:26 +00:00
|
|
|
void Fire(bool underwater, float dt, CPlayerState::EChargeStage chargeState,
|
|
|
|
const CTransform4f& xf, CStateManager& mgr, TUniqueId homingTarget, float chargeFactor1,
|
2023-02-06 07:21:28 +00:00
|
|
|
float chargeFactor2);
|
2022-11-25 00:01:26 +00:00
|
|
|
|
2023-02-06 07:21:28 +00:00
|
|
|
void Load(CStateManager& mgr, bool subtypeBasePose);
|
|
|
|
void Unload(CStateManager& mgr);
|
|
|
|
bool IsLoaded() const;
|
|
|
|
void EnableSecondaryFx(ESecondaryFxType type);
|
2022-11-25 00:01:26 +00:00
|
|
|
|
|
|
|
bool IsFiring(const CStateManager& mgr) const;
|
|
|
|
void StopBeam(CStateManager& mgr, bool b1);
|
|
|
|
void CreateBeam(CStateManager& mgr);
|
|
|
|
void UpdateBeam(float dt, const CTransform4f& targetXf, const CVector3f& localBeamPos, CStateManager& mgr);
|
|
|
|
void DeleteBeam(CStateManager& mgr);
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr);
|
2022-10-09 05:13:17 +00:00
|
|
|
|
2022-10-06 10:38:13 +00:00
|
|
|
private:
|
2022-11-25 00:01:26 +00:00
|
|
|
TCachedToken< CGenDescription > x21c_plasma2nd1;
|
|
|
|
rstl::single_ptr< CElementGen > x228_chargeFx;
|
|
|
|
bool x22c_24_loaded : 1;
|
|
|
|
bool x22c_25_worldLighingDim : 1;
|
|
|
|
float x230_fireShotDelayTimer;
|
|
|
|
float x234_fireShotDelay;
|
|
|
|
float x238_lightingResetDelayTimer;
|
|
|
|
TAreaId x23c_stateArea;
|
|
|
|
|
|
|
|
void ReInitVariables();
|
|
|
|
void SetWorldLighting(CStateManager& mgr, TAreaId aid, float speed, float target);
|
2022-10-06 10:38:13 +00:00
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CPlasmaBeam, 0x240)
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CPLASMABEAM
|