2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CENERGYPROJECTILE
|
|
|
|
#define _CENERGYPROJECTILE
|
2022-10-04 00:00:46 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#include "MetroidPrime/Cameras/CCameraShakeData.hpp"
|
|
|
|
#include "MetroidPrime/Weapons/CGameProjectile.hpp"
|
|
|
|
|
|
|
|
#include "Kyoto/Audio/CSfxHandle.hpp"
|
|
|
|
#include "Kyoto/Math/CVector3f.hpp"
|
|
|
|
|
|
|
|
class CEnergyProjectile : public CGameProjectile {
|
|
|
|
public:
|
2022-11-03 18:14:41 +00:00
|
|
|
CEnergyProjectile(bool active, const TToken< CWeaponDescription >& desc, EWeaponType type,
|
|
|
|
const CTransform4f& xf, EMaterialTypes excludeMat, const CDamageInfo& damage,
|
|
|
|
TUniqueId uid, TAreaId aid, TUniqueId owner, TUniqueId homingTarget,
|
|
|
|
uint attribs, bool underwater, const CVector3f& scale,
|
|
|
|
const rstl::optional_object< TLockedToken< CGenDescription > >& visorParticle,
|
|
|
|
ushort visorSfx, bool sendCollideMsg);
|
2022-10-04 00:00:46 +00:00
|
|
|
|
|
|
|
// CEntity
|
2023-02-06 17:01:01 +00:00
|
|
|
~CEnergyProjectile() override;
|
|
|
|
void Accept(IVisitor& visitor) override;
|
|
|
|
void Think(float dt, CStateManager& mgr) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
2022-10-04 00:00:46 +00:00
|
|
|
|
|
|
|
// CActor
|
2023-02-06 17:01:01 +00:00
|
|
|
void AddToRenderer(const CFrustumPlanes&, const CStateManager&) const override;
|
|
|
|
void Render(const CStateManager&) const override;
|
|
|
|
void Touch(CActor&, CStateManager&) override;
|
2022-10-04 00:00:46 +00:00
|
|
|
|
|
|
|
// CGameProjectile
|
|
|
|
void ResolveCollisionWithActor(const CRayCastResult& res, CActor& act,
|
2023-02-06 17:01:01 +00:00
|
|
|
CStateManager& mgr) override;
|
2022-10-04 00:00:46 +00:00
|
|
|
|
|
|
|
// CEnergyProjectile
|
|
|
|
virtual bool Explode(const CVector3f& pos, const CVector3f& normal,
|
|
|
|
EWeaponCollisionResponseTypes type, CStateManager& mgr,
|
|
|
|
const CDamageVulnerability& dVuln, TUniqueId hitActor);
|
|
|
|
|
|
|
|
void Set3d0_26(bool v) { x3d0_26_ = v; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
CSfxHandle x2e8_sfx;
|
|
|
|
CVector3f x2ec_dir;
|
|
|
|
float x2f8_mag;
|
|
|
|
CCameraShakeData x2fc_camShake;
|
|
|
|
bool x3d0_24_dead : 1;
|
|
|
|
bool x3d0_25_ : 1;
|
|
|
|
bool x3d0_26_ : 1;
|
|
|
|
bool x3d0_27_camShakeDirty : 1;
|
|
|
|
float x3d4_curTime;
|
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CEnergyProjectile, 0x3d8);
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CENERGYPROJECTILE
|