metaforce/Runtime/World/CActor.hpp

146 lines
4.0 KiB
C++
Raw Normal View History

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-04-29 10:08:46 +00:00
#include "Audio/CSfxHandle.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-07-28 07:33:55 +00:00
#include "Collision/CCollisionResponseData.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-08-22 01:58:41 +00:00
class CActorParameters;
class CWeaponMode;
2016-04-19 00:17:49 +00:00
class CHealthInfo;
class CDamageVulnerability;
class CLightParameters;
2016-04-29 10:08:46 +00:00
class CSfxHandle;
2016-05-03 08:27:28 +00:00
class CSimpleShadow;
2015-08-22 01:58:41 +00:00
class CActor : public CEntity
{
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-04-29 10:08:46 +00:00
CMaterialList x68_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-05-03 08:27:28 +00:00
//std::unique_ptr<CSimpleShadow> x94_simpleShadow;
zeus::CAABox x9c_aabox;
u32 xb8_ = 0;
float xbc_time = 0.f;
s32 xc0_ = 0;
TUniqueId xc4_fluidId = kInvalidUniqueId;
2016-04-29 10:08:46 +00:00
TUniqueId xc6_ = kInvalidUniqueId;
2016-05-03 08:27:28 +00:00
u8 xd4_ = 0x7F;
2016-04-22 20:22:45 +00:00
union
{
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-05-03 08:27:28 +00:00
};
2016-05-21 03:02:09 +00:00
u8 _dummy1 = 0;
2016-05-03 08:27:28 +00:00
};
union
{
struct
{
2016-04-22 20:22:45 +00:00
bool xe5_0_opaque : 1;
bool xe5_26_muted : 1;
bool xe5_27_useInSortedLists : 1;
bool xe5_28_callTouch : 1;
};
2016-05-21 03:02:09 +00:00
u8 _dummy2 = 0;
2016-05-03 08:27:28 +00:00
};
union
{
struct
{
bool xe6_26_inFluid : 1;
bool xe6_30_enablePitchBend : 1;
};
2016-05-21 03:02:09 +00:00
u8 _dummy3 = 0;
2016-04-22 20:22:45 +00:00
};
union
{
struct
{
bool xe7_29_ : 1;
};
2016-05-21 03:02:09 +00:00
u8 _dummy4 = 0;
2016-04-22 20:22:45 +00:00
};
2015-08-22 01:58:41 +00:00
public:
2016-07-22 22:22:36 +00:00
enum class EFluidState
{
};
2015-08-22 01:58:41 +00:00
CActor(TUniqueId, bool, const std::string&, const CEntityInfo&,
2016-04-22 20:22:45 +00:00
const zeus::CTransform&, CModelData&&, const CMaterialList&,
2015-08-22 01:58:41 +00:00
const CActorParameters&, TUniqueId);
const zeus::CTransform& GetTransform() const {return x34_transform;}
2016-04-23 10:51:53 +00:00
virtual void AddToRenderer(const zeus::CFrustum&, CStateManager&) {}
virtual void Render(CStateManager&) {}
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-03-04 23:04:53 +00:00
virtual zeus::CVector3f GetAimPosition(const CStateManager&, float)
2016-04-29 10:08:46 +00:00
{ return x34_transform.origin; }
virtual bool ValidAimTarget() { return true; }
virtual bool ValidOrbitTarget() { return true; }
virtual bool GetOrbitDistanceCheck() { return true; }
2016-05-03 08:27:28 +00:00
virtual zeus::CVector3f GetOrbitPosition(const CStateManager&);
2016-04-29 10:08:46 +00:00
void RemoveEmitter();
2016-05-21 03:02:09 +00:00
virtual rstl::optional_object<zeus::CAABox> GetTouchBounds() const { return {} ; }
2016-05-03 08:27:28 +00:00
virtual EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, CWeaponMode&, int);
2016-04-25 05:46:28 +00:00
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&);
2016-05-03 08:27:28 +00:00
void SetCallTouch(bool callTouch);
2016-05-03 08:27:28 +00:00
bool GetCallTouch() const;
2016-04-22 20:22:45 +00:00
2016-05-03 08:27:28 +00:00
void SetUseInSortedList(bool use);
2016-04-22 20:22:45 +00:00
2016-05-03 08:27:28 +00:00
bool GetUseInSortedLists() const;
2016-04-25 05:46:28 +00:00
const CMaterialFilter& GetMaterialFilter() const { return x70_; }
2016-04-29 10:08:46 +00:00
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);
2015-08-22 01:58:41 +00:00
};
}
2016-04-13 06:07:23 +00:00
#endif // __URDE_CACTOR_HPP__