2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-04-19 00:17:49 +00:00
|
|
|
|
2019-09-23 19:00:23 +00:00
|
|
|
#include "Runtime/GCNTypes.hpp"
|
|
|
|
#include "Runtime/World/CDamageVulnerability.hpp"
|
|
|
|
#include "Runtime/World/CHealthInfo.hpp"
|
|
|
|
#include "Runtime/World/CPhysicsActor.hpp"
|
2016-04-19 00:17:49 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2016-04-19 00:17:49 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CScriptActor : public CPhysicsActor {
|
2017-02-03 23:32:15 +00:00
|
|
|
protected:
|
2018-12-08 05:30:43 +00:00
|
|
|
CHealthInfo x258_initialHealth;
|
|
|
|
CHealthInfo x260_currentHealth;
|
|
|
|
CDamageVulnerability x268_damageVulnerability;
|
|
|
|
float x2d0_fadeInTime;
|
|
|
|
float x2d4_fadeOutTime;
|
|
|
|
s32 x2d8_shaderIdx;
|
|
|
|
float x2dc_xrayAlpha;
|
|
|
|
TUniqueId x2e0_triggerId = kInvalidUniqueId;
|
|
|
|
bool x2e2_24_noThermalHotZ : 1;
|
2020-04-20 04:57:50 +00:00
|
|
|
bool x2e2_25_dead : 1 = false;
|
|
|
|
bool x2e2_26_animating : 1 = true;
|
2018-12-08 05:30:43 +00:00
|
|
|
bool x2e2_27_xrayAlphaEnabled : 1;
|
2020-04-20 04:57:50 +00:00
|
|
|
bool x2e2_28_inXrayAlpha : 1 = false;
|
2018-12-08 05:30:43 +00:00
|
|
|
bool x2e2_29_processModelFlags : 1;
|
|
|
|
bool x2e2_30_scaleAdvancementDelta : 1;
|
|
|
|
bool x2e2_31_materialFlag54 : 1;
|
2020-04-20 04:57:50 +00:00
|
|
|
bool x2e3_24_isPlayerActor : 1 = false;
|
2017-02-03 23:32:15 +00:00
|
|
|
|
2016-04-19 00:17:49 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CScriptActor(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
|
|
|
|
CModelData&& mData, const zeus::CAABox& aabb, float mass, float zMomentum, const CMaterialList& matList,
|
|
|
|
const CHealthInfo& hInfo, const CDamageVulnerability& dVuln, const CActorParameters& actParms,
|
|
|
|
bool looping, bool active, s32 shaderIdx, float xrayAlpha, bool noThermalHotZ, bool castsShadow,
|
|
|
|
bool scaleAdvancementDelta, bool materialFlag54);
|
2019-08-09 12:45:18 +00:00
|
|
|
void Accept(IVisitor& visitor) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
|
|
|
void Think(float, CStateManager&) override;
|
|
|
|
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
|
|
|
zeus::CAABox GetSortingBounds(const CStateManager&) const override;
|
2018-12-08 05:30:43 +00:00
|
|
|
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
2019-08-09 12:45:18 +00:00
|
|
|
const CWeaponMode&, EProjectileAttrib) const override;
|
|
|
|
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
|
|
|
void Touch(CActor&, CStateManager&) override;
|
|
|
|
const CDamageVulnerability* GetDamageVulnerability() const override { return &x268_damageVulnerability; }
|
|
|
|
CHealthInfo* HealthInfo(CStateManager&) override { return &x260_currentHealth; }
|
2018-12-08 05:30:43 +00:00
|
|
|
bool IsPlayerActor() const { return x2e3_24_isPlayerActor; }
|
2017-11-23 02:15:09 +00:00
|
|
|
};
|
2021-04-10 08:42:06 +00:00
|
|
|
}; // namespace metaforce
|