metaforce/Runtime/MP1/World/CNewIntroBoss.hpp

80 lines
3.2 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-04-25 05:03:38 +00:00
#include "World/CPatterned.hpp"
2018-11-17 05:05:57 +00:00
#include "Character/CBoneTracking.hpp"
#include "Weapon/CProjectileInfo.hpp"
2016-04-25 05:03:38 +00:00
2018-12-08 05:30:43 +00:00
namespace urde {
2016-04-25 05:03:38 +00:00
class CDamageInfo;
2018-11-17 05:05:57 +00:00
class CCollisionActorManager;
2016-04-25 05:03:38 +00:00
2018-12-08 05:30:43 +00:00
namespace MP1 {
class CNewIntroBoss : public CPatterned {
pas::ELocomotionType x568_locomotion = pas::ELocomotionType::Relaxed;
2019-01-03 03:47:28 +00:00
u32 x56c_stateProg = 0;
2019-01-05 08:34:09 +00:00
float x570_minTurnAngle;
2018-12-08 05:30:43 +00:00
CBoneTracking x574_boneTracking;
CProjectileInfo x5ac_projectileInfo;
TUniqueId x5d4_stage1Projectile = kInvalidUniqueId;
TUniqueId x5d6_stage2Projectile = kInvalidUniqueId;
TUniqueId x5d8_stage3Projectile = kInvalidUniqueId;
std::string x5dc_damageLocator; // ???
std::unique_ptr<CCollisionActorManager> x5ec_collisionManager;
2019-01-03 03:47:28 +00:00
CAssetId x5f0_beamContactFxId;
CAssetId x5f4_beamPulseFxId;
CAssetId x5f8_beamTextureId;
CAssetId x5fc_beamGlowTextureId;
2018-12-08 05:30:43 +00:00
TUniqueId x600_headActor = kInvalidUniqueId;
TUniqueId x602_pelvisActor = kInvalidUniqueId;
zeus::CVector3f x604_predictedPlayerPos;
zeus::CVector3f x610_lookPos;
2019-01-03 03:47:28 +00:00
zeus::CVector3f x61c_startPlayerPos;
float x628_firingTime = 0.f;
2018-12-08 05:30:43 +00:00
zeus::CVector3f x62c_targetPos;
float x638_ = 0.2f;
float x63c_attackTime = 8.f;
float x640_initialHp = 0.f;
2019-03-09 08:58:27 +00:00
zeus::CTransform x644_initialXf;
2018-12-08 05:30:43 +00:00
s16 x674_rumbleVoice = -1;
TUniqueId x676_curProjectile = kInvalidUniqueId;
bool x678_ = false;
pas::ELocomotionType GetLocoForHealth(const CStateManager&) const;
pas::EGenerateType GetGenerateForHealth(const CStateManager&) const;
float GetNextAttackTime(CStateManager&) const;
zeus::CVector3f PlayerPos(const CStateManager&) const;
void DeleteBeam(CStateManager&);
void StopRumble(CStateManager&);
2017-01-18 22:30:02 +00:00
2018-12-08 05:30:43 +00:00
public:
DEFINE_PATTERNED(NewIntroBoss)
CNewIntroBoss(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& actParms, float minTurnAngle,
CAssetId projectile, const CDamageInfo& dInfo, CAssetId beamContactFxId, CAssetId beamPulseFxId,
CAssetId beamTextureId, CAssetId beamGlowTextureId);
2018-11-17 05:05:57 +00:00
2018-12-08 05:30:43 +00:00
void Accept(IVisitor& visitor);
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager&);
void Think(float dt, CStateManager& mgr);
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const;
void OnScanStateChanged(EScanState, CStateManager&);
CProjectileInfo* GetProjectileInfo() { return &x5ac_projectileInfo; }
zeus::CAABox GetSortingBounds(const CStateManager&) const {
zeus::CAABox box = GetModelData()->GetBounds();
return zeus::CAABox({-0.5f, -0.5f, box.min.z()}, {0.5f, 0.5f, box.max.z()}).getTransformedAABox(x34_transform);
}
2018-11-17 05:05:57 +00:00
std::optional<zeus::CAABox> GetTouchBounds() const { return {}; }
2018-12-08 05:30:43 +00:00
void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt);
void Generate(CStateManager&, EStateMsg, float);
void Attack(CStateManager&, EStateMsg, float);
void Patrol(CStateManager&, EStateMsg, float);
bool ShouldTurn(CStateManager&, float);
bool ShouldAttack(CStateManager&, float);
bool AIStage(CStateManager&, float);
bool AnimOver(CStateManager&, float);
bool InAttackPosition(CStateManager&, float);
2016-04-25 05:03:38 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace MP1
} // namespace urde