2004-11-10 23:09:32 -08:00
|
|
|
// Supporting data types for CEntity and related
|
|
|
|
|
|
2005-05-01 12:09:13 -07:00
|
|
|
#ifndef ENTITY_SUPPORT_INCLUDED
|
|
|
|
|
#define ENTITY_SUPPORT_INCLUDED
|
|
|
|
|
|
2006-09-30 08:46:40 -07:00
|
|
|
#include "ps/CStr.h"
|
|
|
|
|
|
2005-05-26 17:38:30 -07:00
|
|
|
#include "EntityHandles.h"
|
|
|
|
|
|
2004-11-10 23:09:32 -08:00
|
|
|
class CEntityManager;
|
|
|
|
|
|
2005-05-01 12:09:13 -07:00
|
|
|
struct SEntityAction
|
|
|
|
|
{
|
|
|
|
|
float m_MaxRange;
|
|
|
|
|
float m_MinRange;
|
|
|
|
|
size_t m_Speed;
|
2005-12-29 00:42:44 -08:00
|
|
|
CStr8 m_Animation;
|
|
|
|
|
SEntityAction() { m_MaxRange = m_MinRange = 0.0f; m_Speed = 1000; m_Animation = "walk"; }
|
|
|
|
|
SEntityAction(float minRange, float maxRange, size_t speed, CStr8& animation)
|
|
|
|
|
: m_MinRange(minRange), m_MaxRange(maxRange), m_Speed(speed), m_Animation(animation) {}
|
2005-05-01 12:09:13 -07:00
|
|
|
};
|
|
|
|
|
|
2006-07-23 18:33:26 -07:00
|
|
|
class CClassSet
|
2005-05-01 12:09:13 -07:00
|
|
|
{
|
2006-07-23 18:33:26 -07:00
|
|
|
CClassSet* m_Parent;
|
|
|
|
|
typedef std::vector<CStrW> Set;
|
|
|
|
|
Set m_Members;
|
|
|
|
|
Set m_AddedMembers; // Members that this set adds to on top of those in its parent
|
|
|
|
|
Set m_RemovedMembers; // Members that this set removes even if its parent has them
|
2005-05-01 12:09:13 -07:00
|
|
|
|
2006-07-23 18:33:26 -07:00
|
|
|
public:
|
|
|
|
|
CClassSet() : m_Parent(NULL) {}
|
2005-05-26 17:38:30 -07:00
|
|
|
|
2006-07-23 18:33:26 -07:00
|
|
|
bool IsMember( const CStrW& Test );
|
|
|
|
|
|
|
|
|
|
void Rebuild();
|
2005-05-01 12:09:13 -07:00
|
|
|
|
2006-07-23 18:33:26 -07:00
|
|
|
inline void SetParent( CClassSet* Parent )
|
2005-05-01 12:09:13 -07:00
|
|
|
{ m_Parent = Parent; Rebuild(); }
|
|
|
|
|
|
2006-07-23 18:33:26 -07:00
|
|
|
CStrW getMemberList();
|
|
|
|
|
void setFromMemberList(const CStrW& list);
|
2005-05-01 12:09:13 -07:00
|
|
|
};
|
|
|
|
|
|
2005-05-17 22:32:09 -07:00
|
|
|
#endif
|