2016-04-13 06:07:23 +00:00
|
|
|
#ifndef __URDE_CACTOR_HPP__
|
|
|
|
#define __URDE_CACTOR_HPP__
|
2015-08-22 01:58:41 +00:00
|
|
|
|
|
|
|
#include "CEntity.hpp"
|
2016-05-21 03:02:09 +00:00
|
|
|
#include "Graphics/CGraphics.hpp"
|
2016-08-31 00:33:59 +00:00
|
|
|
#include "Graphics/CSimpleShadow.hpp"
|
2016-03-04 23:04:53 +00:00
|
|
|
#include "zeus/zeus.hpp"
|
2016-04-25 05:46:28 +00:00
|
|
|
#include "Collision/CMaterialFilter.hpp"
|
2016-04-22 20:22:45 +00:00
|
|
|
#include "Character/CModelData.hpp"
|
2016-08-31 00:33:59 +00:00
|
|
|
#include "Character/CActorLights.hpp"
|
2016-07-28 07:33:55 +00:00
|
|
|
#include "Collision/CCollisionResponseData.hpp"
|
2016-12-29 05:53:00 +00:00
|
|
|
#include "Audio/CSfxManager.hpp"
|
2015-08-22 01:58:41 +00:00
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2015-08-22 01:58:41 +00:00
|
|
|
{
|
2015-11-02 18:45:39 +00:00
|
|
|
|
2015-08-22 01:58:41 +00:00
|
|
|
class CActorParameters;
|
2015-11-02 18:45:39 +00:00
|
|
|
class CWeaponMode;
|
2016-04-19 00:17:49 +00:00
|
|
|
class CHealthInfo;
|
2016-08-31 00:33:59 +00:00
|
|
|
class CDamageInfo;
|
2016-04-19 00:17:49 +00:00
|
|
|
class CDamageVulnerability;
|
|
|
|
class CLightParameters;
|
2016-08-31 00:33:59 +00:00
|
|
|
class CScannableObjectInfo;
|
|
|
|
class CScriptWater;
|
2016-05-03 08:27:28 +00:00
|
|
|
class CSimpleShadow;
|
|
|
|
|
2015-08-22 01:58:41 +00:00
|
|
|
class CActor : public CEntity
|
|
|
|
{
|
2015-11-02 18:45:39 +00:00
|
|
|
protected:
|
2016-03-04 23:04:53 +00:00
|
|
|
zeus::CTransform x34_transform;
|
2016-04-22 20:22:45 +00:00
|
|
|
std::unique_ptr<CModelData> x64_modelData;
|
2016-09-16 22:21:19 +00:00
|
|
|
CMaterialList x60_material;
|
2016-04-25 05:46:28 +00:00
|
|
|
CMaterialFilter x70_;
|
2016-05-03 08:27:28 +00:00
|
|
|
s16 x88_sfxId = -1;
|
2016-04-29 10:08:46 +00:00
|
|
|
std::unique_ptr<CSfxHandle> x8c_sfxHandle;
|
2016-08-31 00:33:59 +00:00
|
|
|
std::unique_ptr<CActorLights> x90_actorLights;
|
|
|
|
std::unique_ptr<CSimpleShadow> x94_simpleShadow;
|
|
|
|
std::unique_ptr<TToken<CScannableObjectInfo>> x98_scanObjectInfo;
|
2016-05-03 08:27:28 +00:00
|
|
|
zeus::CAABox x9c_aabox;
|
2016-08-31 00:33:59 +00:00
|
|
|
u8 xb4_ = 0;
|
|
|
|
u8 xb5_ = 0;
|
|
|
|
u16 xb6_ = 3;
|
|
|
|
zeus::CColor xb8_ = zeus::CColor::skWhite;
|
2016-05-03 08:27:28 +00:00
|
|
|
float xbc_time = 0.f;
|
|
|
|
s32 xc0_ = 0;
|
|
|
|
TUniqueId xc4_fluidId = kInvalidUniqueId;
|
2016-04-29 10:08:46 +00:00
|
|
|
TUniqueId xc6_ = kInvalidUniqueId;
|
2016-08-31 00:33:59 +00:00
|
|
|
s32 xc8_ = -1;
|
2016-11-20 21:53:15 +00:00
|
|
|
s32 xcc_addedToken = -1;
|
2016-08-31 00:33:59 +00:00
|
|
|
float xd0_;
|
2016-05-03 08:27:28 +00:00
|
|
|
u8 xd4_ = 0x7F;
|
2016-08-31 00:33:59 +00:00
|
|
|
u32 xd8_ = 2;
|
2016-12-19 18:27:58 +00:00
|
|
|
union {
|
2016-04-22 20:22:45 +00:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool xe4_27_ : 1;
|
|
|
|
bool xe4_28_ : 1;
|
|
|
|
bool xe4_29_ : 1;
|
2016-04-23 10:51:53 +00:00
|
|
|
bool xe4_30_ : 1;
|
2016-04-22 20:22:45 +00:00
|
|
|
bool xe5_26_muted : 1;
|
|
|
|
bool xe5_27_useInSortedLists : 1;
|
|
|
|
bool xe5_28_callTouch : 1;
|
2016-05-03 08:27:28 +00:00
|
|
|
bool xe6_26_inFluid : 1;
|
|
|
|
bool xe6_30_enablePitchBend : 1;
|
2016-04-22 20:22:45 +00:00
|
|
|
bool xe7_29_ : 1;
|
2016-12-10 02:35:20 +00:00
|
|
|
bool xe7_30_ : 1;
|
|
|
|
bool xe7_31_ : 1;
|
2016-04-22 20:22:45 +00:00
|
|
|
};
|
2016-08-10 00:46:53 +00:00
|
|
|
u32 dummy = 0;
|
2016-04-22 20:22:45 +00:00
|
|
|
};
|
2016-12-19 18:27:58 +00:00
|
|
|
|
2015-08-22 01:58:41 +00:00
|
|
|
public:
|
2016-07-22 22:22:36 +00:00
|
|
|
enum class EFluidState
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2016-08-10 00:46:53 +00:00
|
|
|
enum class EScanState
|
|
|
|
{
|
2016-11-22 20:43:16 +00:00
|
|
|
Start,
|
|
|
|
Processing,
|
|
|
|
Done,
|
2016-08-10 00:46:53 +00:00
|
|
|
};
|
|
|
|
|
2016-12-19 18:27:58 +00:00
|
|
|
CActor(TUniqueId, bool, const std::string&, const CEntityInfo&, const zeus::CTransform&, CModelData&&,
|
|
|
|
const CMaterialList&, const CActorParameters&, TUniqueId);
|
2015-10-29 07:52:15 +00:00
|
|
|
|
2016-04-29 10:08:46 +00:00
|
|
|
virtual void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
2016-04-22 20:22:45 +00:00
|
|
|
virtual void SetActive(bool active)
|
|
|
|
{
|
|
|
|
xe4_27_ = true;
|
|
|
|
xe4_28_ = true;
|
|
|
|
xe4_29_ = true;
|
|
|
|
xe7_29_ = true;
|
|
|
|
CEntity::SetActive(active);
|
|
|
|
}
|
2016-08-31 00:33:59 +00:00
|
|
|
virtual void PreRender(const zeus::CFrustum&, const CStateManager&) {}
|
|
|
|
virtual void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const {}
|
|
|
|
virtual void Render(const CStateManager&) const {}
|
|
|
|
virtual bool CanRenderUnsorted(const CStateManager&) const { return false; }
|
2016-11-20 21:53:15 +00:00
|
|
|
virtual void CalculateRenderBounds();
|
2016-11-22 20:43:16 +00:00
|
|
|
virtual CHealthInfo* HealthInfo();
|
2016-08-31 00:33:59 +00:00
|
|
|
virtual const CDamageVulnerability* GetDamageVulnerability() const;
|
2016-12-19 18:27:58 +00:00
|
|
|
virtual const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f&, const zeus::CVector3f&,
|
|
|
|
const CDamageInfo&) const;
|
2016-08-31 00:33:59 +00:00
|
|
|
virtual rstl::optional_object<zeus::CAABox> GetTouchBounds() const;
|
|
|
|
virtual void Touch(CActor&, CStateManager&);
|
|
|
|
virtual zeus::CVector3f GetOrbitPosition(const CStateManager&) const;
|
|
|
|
virtual zeus::CVector3f GetAimPosition(const CStateManager&, float) const;
|
|
|
|
virtual zeus::CVector3f GetHomingPosition(const CStateManager&, float) const;
|
|
|
|
virtual zeus::CVector3f GetScanObjectIndicatorPosition(const CStateManager&);
|
|
|
|
virtual EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
|
|
|
CWeaponMode&, int);
|
|
|
|
virtual void FluidFXThink(EFluidState, CScriptWater&, CStateManager&);
|
|
|
|
virtual void OnScanStateChanged(EScanState, CStateManager&);
|
2016-11-20 21:53:15 +00:00
|
|
|
virtual zeus::CAABox GetSortingBounds(const CStateManager&) const;
|
2016-08-31 00:33:59 +00:00
|
|
|
virtual void DoUserAnimEvent(CStateManager&, CInt32POINode&, EUserEventType);
|
2016-04-22 20:22:45 +00:00
|
|
|
|
2016-04-29 10:08:46 +00:00
|
|
|
void RemoveEmitter();
|
2016-12-19 18:27:58 +00:00
|
|
|
const zeus::CTransform& GetTransform() const { return x34_transform; }
|
2016-10-31 22:56:44 +00:00
|
|
|
const zeus::CTransform GetScaledLocatorTransform(const std::string& segName) const;
|
|
|
|
const zeus::CTransform GetLocatorTransform(const std::string& segName) const;
|
2016-04-22 20:22:45 +00:00
|
|
|
void RemoveMaterial(EMaterialTypes, EMaterialTypes, EMaterialTypes, EMaterialTypes, CStateManager&);
|
|
|
|
void RemoveMaterial(EMaterialTypes, EMaterialTypes, EMaterialTypes, CStateManager&);
|
|
|
|
void RemoveMaterial(EMaterialTypes, EMaterialTypes, CStateManager&);
|
|
|
|
void RemoveMaterial(EMaterialTypes, CStateManager&);
|
|
|
|
void AddMaterial(EMaterialTypes, EMaterialTypes, EMaterialTypes, EMaterialTypes, EMaterialTypes, CStateManager&);
|
|
|
|
void AddMaterial(EMaterialTypes, EMaterialTypes, EMaterialTypes, EMaterialTypes, CStateManager&);
|
|
|
|
void AddMaterial(EMaterialTypes, EMaterialTypes, EMaterialTypes, CStateManager&);
|
|
|
|
void AddMaterial(EMaterialTypes, EMaterialTypes, CStateManager&);
|
|
|
|
void AddMaterial(EMaterialTypes, CStateManager&);
|
2015-11-02 18:45:39 +00:00
|
|
|
|
2016-05-03 08:27:28 +00:00
|
|
|
void SetCallTouch(bool callTouch);
|
|
|
|
bool GetCallTouch() const;
|
|
|
|
void SetUseInSortedList(bool use);
|
|
|
|
bool GetUseInSortedLists() const;
|
2016-04-25 05:46:28 +00:00
|
|
|
const CMaterialFilter& GetMaterialFilter() const { return x70_; }
|
2016-09-16 22:21:19 +00:00
|
|
|
const CMaterialList& GetMaterialList() const { return x60_material; }
|
2016-05-03 08:27:28 +00:00
|
|
|
void SetInFluid(bool in, TUniqueId uid);
|
2016-04-29 10:08:46 +00:00
|
|
|
bool HasModelData() const;
|
2016-05-03 08:27:28 +00:00
|
|
|
const CSfxHandle* GetSfxHandle() const;
|
|
|
|
void SetSfxPitchBend(s32);
|
2016-09-01 04:10:08 +00:00
|
|
|
void SetTranslation(const zeus::CVector3f& tr);
|
2016-11-20 21:53:15 +00:00
|
|
|
void SetAddedToken(u32 tok);
|
2016-10-31 22:56:44 +00:00
|
|
|
float GetPitch() const;
|
|
|
|
float GetYaw() const;
|
2015-08-22 01:58:41 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2016-04-13 06:07:23 +00:00
|
|
|
#endif // __URDE_CACTOR_HPP__
|