metaforce/Runtime/World/CAmbientAI.hpp

49 lines
1.5 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
#include <optional>
#include <string_view>
#include "Runtime/GCNTypes.hpp"
#include "Runtime/World/CDamageVulnerability.hpp"
#include "Runtime/World/CPhysicsActor.hpp"
#include <zeus/CAABox.hpp>
namespace zeus {
class CTransform;
}
2018-06-04 19:30:04 +00:00
2021-04-10 08:42:06 +00:00
namespace metaforce {
2018-12-08 05:30:43 +00:00
class CAmbientAI : public CPhysicsActor {
enum class EAnimationState { Ready, Alert, Impact };
2018-06-04 19:30:04 +00:00
2018-12-08 05:30:43 +00:00
CHealthInfo x258_initialHealthInfo;
CHealthInfo x260_healthInfo;
CDamageVulnerability x268_dVuln;
EAnimationState x2d0_animState = EAnimationState::Ready;
float x2d4_alertRange;
float x2d8_impactRange;
s32 x2dc_defaultAnim;
s32 x2e0_alertAnim;
s32 x2e4_impactAnim;
bool x2e8_24_dead : 1 = false;
bool x2e8_25_animating : 1 = false;
2018-06-04 19:30:04 +00:00
public:
2021-05-26 14:00:57 +00:00
DEFINE_ENTITY
2018-12-08 05:30:43 +00:00
CAmbientAI(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&,
const zeus::CAABox&, const CMaterialList&, float, const CHealthInfo&, const CDamageVulnerability&,
const CActorParameters&, float, float, s32, s32, bool);
2018-06-04 19:30:04 +00:00
void Accept(IVisitor&) override;
void Think(float, CStateManager&) override;
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
CHealthInfo* HealthInfo(CStateManager&) override{ return &x260_healthInfo; }
const CDamageVulnerability* GetDamageVulnerability() const override{ return &x268_dVuln; }
std::optional<zeus::CAABox> GetTouchBounds() const override;
void Touch(CActor&, CStateManager&) override{}
2018-12-08 05:30:43 +00:00
void RandomizePlaybackRate(CStateManager&);
2018-06-04 19:30:04 +00:00
};
2021-04-10 08:42:06 +00:00
} // namespace metaforce