metaforce/Runtime/World/CWallCrawlerSwarm.hpp

79 lines
2.6 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2017-01-24 17:23:10 +00:00
#include "World/CActor.hpp"
#include "Collision/CCollisionSurface.hpp"
namespace urde
{
class CWallCrawlerSwarm : public CActor
{
public:
class CBoid
{
zeus::CTransform x0_;
float x30_ = 0.f;
float x34_ = 0.f;
float x38_ = 0.f;
TUniqueId x3c_ = kInvalidUniqueId;
zeus::CColor x40_ = zeus::CColor(0.3f, 0.3f, 0.3f, 1.f);
u32 x44_ = 0;
float x48_ = 0.f;
float x4c_ = 0.f;
CCollisionSurface x50_ = CCollisionSurface(zeus::CVector3f(0.f, 0.f, 1.f), zeus::CVector3f(0.f, 1.f, 0.f),
zeus::CVector3f(1.f, 0.f, 0.f), -1);
union
{
struct
{
u32 x7c_unk1 : 8;
u32 x7c_unk2 : 10;
};
u32 x7c_;
};
union
{
struct
{
2017-04-07 05:35:09 +00:00
bool x80_24_active : 1;
2017-01-24 17:23:10 +00:00
bool x80_25_ : 1;
bool x80_26_ : 1;
bool x80_27_ : 1;
bool x80_28_ : 1;
};
u32 x80_;
};
2017-04-07 05:35:09 +00:00
public:
const zeus::CTransform& GetTransform() const { return x0_; }
const zeus::CVector3f& GetTranslation() const { return x0_.origin; }
bool GetActive() const { return x80_24_active; }
2017-01-24 17:23:10 +00:00
};
2017-04-07 05:35:09 +00:00
private:
2017-01-24 17:23:10 +00:00
zeus::CAABox xe8_aabox = zeus::CAABox::skNullBox;
2017-04-07 05:35:09 +00:00
std::vector<CBoid> x108_boids;
2017-01-24 17:23:10 +00:00
zeus::CVector3f x130_lastKilledOffset;
2018-02-09 07:12:26 +00:00
int x42c_lockOnId = -1;
2017-04-07 05:35:09 +00:00
2017-01-24 17:23:10 +00:00
public:
2017-11-13 06:19:18 +00:00
CWallCrawlerSwarm(TUniqueId, bool, std::string_view, const CEntityInfo&, const zeus::CVector3f&,
2017-01-24 17:23:10 +00:00
const zeus::CTransform&, u32, const CAnimRes&, u32, u32, u32, u32, u32, u32, const CDamageInfo&,
const CDamageInfo&, float, float, float, float, u32, u32, float, float, float, float, float,
float, float, float, float, u32, float, float, float, const CHealthInfo&, const CDamageVulnerability&,
u32, u32, const CActorParameters&);
void Accept(IVisitor &visitor);
zeus::CVector3f GetLastKilledOffset() const { return x130_lastKilledOffset; }
2017-03-29 02:51:12 +00:00
void ApplyRadiusDamage(const zeus::CVector3f& pos, const CDamageInfo& info,
CStateManager& stateMgr) {}
2017-04-07 05:35:09 +00:00
const std::vector<CBoid>& GetBoids() const { return x108_boids; }
2018-02-09 07:12:26 +00:00
int GetCurrentLockOnId() const { return x42c_lockOnId; }
bool GetLockOnLocationValid(int id) const
{ return id >= 0 && id < x108_boids.size() && x108_boids[id].GetActive(); }
const zeus::CVector3f& GetLockOnLocation(int id) const
{ return x108_boids[id].GetTranslation(); }
2017-01-24 17:23:10 +00:00
};
}