metaforce/Runtime/World/CActor.hpp

121 lines
3.2 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-03-04 23:04:53 +00:00
#include "zeus/zeus.hpp"
2016-04-22 20:22:45 +00:00
#include "Collision/CMaterialList.hpp"
#include "Character/CModelData.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-21 01:16:07 +00:00
enum class ECollisionResponseType
{
2015-11-21 01:16:07 +00:00
Unknown12 = 0xC,
};
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;
2015-08-22 01:58:41 +00:00
class CActor : public CEntity
{
protected:
2015-11-21 01:16:07 +00:00
enum class Flags
{
Unknown5 = (1 << 5),
Unknown6 = (1 << 6),
Unknown7 = (1 << 7),
};
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;
CMaterialList x68_;
CMaterialList x70_;
union
{
struct
{
bool xe4_27_ : 1;
bool xe4_28_ : 1;
bool xe4_29_ : 1;
bool xe5_0_opaque : 1;
bool xe5_26_muted : 1;
bool xe5_27_useInSortedLists : 1;
bool xe5_28_callTouch : 1;
};
u32 dummy1 = 0;
};
union
{
struct
{
bool xe7_29_ : 1;
};
u32 dummy2 = 0;
};
2015-08-22 01:58:41 +00:00
public:
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);
2016-04-22 20:22:45 +00:00
virtual void Accept(IVisitor&) /*= 0*/;
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-22 20:22:45 +00:00
{ return x34_transform.m_origin; }
virtual bool ValidAimTarget() { return true; }
virtual bool ValidOrbitTarget() { return true; }
virtual bool GetOrbitDistanceCheck() { return true; }
2016-03-04 23:04:53 +00:00
virtual zeus::CVector3f GetOrbitPosition()
2016-04-22 20:22:45 +00:00
{ return x34_transform.m_origin; }
2016-03-04 23:04:53 +00:00
virtual ECollisionResponseType GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, CWeaponMode&, int) { return ECollisionResponseType::Unknown12; }
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-04-22 20:22:45 +00:00
void SetCallTouch(bool callTouch)
{
2016-04-22 20:22:45 +00:00
xe5_28_callTouch = callTouch;
}
2016-04-22 20:22:45 +00:00
bool GetCallTouch() const
{
2016-04-22 20:22:45 +00:00
return xe5_28_callTouch;
}
2016-04-22 20:22:45 +00:00
void SetUseInSortedList(bool use)
{
xe5_27_useInSortedLists = use;
}
bool GetUseInSortedLists() const
{
return xe5_27_useInSortedLists;
}
2015-08-22 01:58:41 +00:00
};
}
2016-04-13 06:07:23 +00:00
#endif // __URDE_CACTOR_HPP__