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-01 12:09:13 -07:00
|
|
|
struct SEntityAction
|
|
|
|
|
{
|
2006-10-08 21:17:15 -07:00
|
|
|
int m_Id;
|
2005-05-01 12:09:13 -07:00
|
|
|
float m_MaxRange;
|
|
|
|
|
float m_MinRange;
|
|
|
|
|
size_t m_Speed;
|
2005-12-29 00:42:44 -08:00
|
|
|
CStr8 m_Animation;
|
2006-10-08 21:17:15 -07:00
|
|
|
SEntityAction()
|
|
|
|
|
: m_Id(0), m_MinRange(0), m_MaxRange(0), m_Speed(1000), m_Animation("walk") {}
|
|
|
|
|
SEntityAction(int id, float minRange, float maxRange, size_t speed, CStr8& animation)
|
|
|
|
|
: m_Id(id), 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
|
|
|
|
2007-01-24 12:17:28 -08:00
|
|
|
bool IsMember(const CStrW& Test);
|
2006-07-23 18:33:26 -07:00
|
|
|
|
|
|
|
|
void Rebuild();
|
2005-05-01 12:09:13 -07:00
|
|
|
|
2007-01-24 12:17:28 -08: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
|