metaforce/Runtime/World/CScriptActor.hpp

52 lines
2.1 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-04-19 00:17:49 +00:00
#include "CPhysicsActor.hpp"
2017-02-03 23:32:15 +00:00
#include "CHealthInfo.hpp"
#include "CDamageVulnerability.hpp"
2016-04-19 00:17:49 +00:00
namespace urde
{
class CScriptActor : public CPhysicsActor
{
2017-02-03 23:32:15 +00:00
protected:
CHealthInfo x258_initialHealth;
CHealthInfo x260_currentHealth;
CDamageVulnerability x268_damageVulnerability;
2018-06-02 06:06:25 +00:00
float x2d0_fadeInTime;
float x2d4_fadeOutTime;
2018-02-08 06:18:27 +00:00
s32 x2d8_shaderIdx;
2017-02-11 00:52:52 +00:00
float x2dc_xrayAlpha;
TUniqueId x2e0_triggerId = kInvalidUniqueId;
2018-02-08 06:18:27 +00:00
bool x2e2_24_noThermalHotZ : 1;
2017-02-13 00:00:07 +00:00
bool x2e2_25_dead : 1;
bool x2e2_26_animating : 1;
2018-02-08 06:18:27 +00:00
bool x2e2_27_xrayAlphaEnabled : 1;
bool x2e2_28_inXrayAlpha : 1;
bool x2e2_29_processModelFlags : 1;
bool x2e2_30_scaleAdvancementDelta : 1;
bool x2e2_31_materialFlag54 : 1;
2018-05-14 04:38:58 +00:00
bool x2e3_24_isPlayerActor : 1;
2017-02-03 23:32:15 +00:00
2016-04-19 00:17:49 +00:00
public:
2018-02-08 06:18:27 +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,
2018-02-08 06:18:27 +00:00
bool noThermalHotZ, bool castsShadow, bool scaleAdvancementDelta, bool materialFlag54);
2017-01-15 03:07:01 +00:00
void Accept(IVisitor& visitor);
2017-02-03 23:32:15 +00:00
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
void Think(float, CStateManager&);
2017-02-11 00:52:52 +00:00
void PreRender(CStateManager&, const zeus::CFrustum&);
2017-02-03 23:32:15 +00:00
zeus::CAABox GetSortingBounds(const CStateManager&) const;
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
2018-02-12 05:30:21 +00:00
const CWeaponMode&, EProjectileAttrib) const;
std::experimental::optional<zeus::CAABox> GetTouchBounds() const;
2017-02-03 23:32:15 +00:00
void Touch(CActor&, CStateManager&);
2017-08-13 05:26:14 +00:00
const CDamageVulnerability* GetDamageVulnerability() const { return &x268_damageVulnerability; }
2017-08-20 05:23:22 +00:00
CHealthInfo* HealthInfo(CStateManager&) { return &x260_currentHealth; }
2018-05-14 04:38:58 +00:00
bool IsPlayerActor() const { return x2e3_24_isPlayerActor; }
};
2016-04-19 00:17:49 +00:00
};