2004-11-11 08:09:32 +01:00
|
|
|
// Supporting data types for CEntity and related
|
|
|
|
|
2005-05-01 21:09:13 +02:00
|
|
|
#ifndef ENTITY_SUPPORT_INCLUDED
|
|
|
|
#define ENTITY_SUPPORT_INCLUDED
|
|
|
|
|
2006-09-30 17:46:40 +02:00
|
|
|
#include "ps/CStr.h"
|
|
|
|
|
2005-05-01 21:09:13 +02:00
|
|
|
struct SEntityAction
|
|
|
|
{
|
2006-10-09 06:17:15 +02:00
|
|
|
int m_Id;
|
2005-05-01 21:09:13 +02:00
|
|
|
float m_MaxRange;
|
|
|
|
float m_MinRange;
|
|
|
|
size_t m_Speed;
|
2005-12-29 09:42:44 +01:00
|
|
|
CStr8 m_Animation;
|
2006-10-09 06:17:15 +02: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 21:09:13 +02:00
|
|
|
};
|
|
|
|
|
2006-07-24 03:33:26 +02:00
|
|
|
class CClassSet
|
2005-05-01 21:09:13 +02:00
|
|
|
{
|
2006-07-24 03:33:26 +02: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 21:09:13 +02:00
|
|
|
|
2006-07-24 03:33:26 +02:00
|
|
|
public:
|
|
|
|
CClassSet() : m_Parent(NULL) {}
|
2005-05-27 02:38:30 +02:00
|
|
|
|
2007-01-24 21:17:28 +01:00
|
|
|
bool IsMember(const CStrW& Test);
|
2006-07-24 03:33:26 +02:00
|
|
|
|
|
|
|
void Rebuild();
|
2005-05-01 21:09:13 +02:00
|
|
|
|
2007-01-24 21:17:28 +01:00
|
|
|
inline void SetParent(CClassSet* Parent)
|
2005-05-01 21:09:13 +02:00
|
|
|
{ m_Parent = Parent; Rebuild(); }
|
|
|
|
|
2007-05-02 14:07:08 +02:00
|
|
|
CStrW GetMemberList();
|
|
|
|
void SetFromMemberList(const CStrW& list);
|
2005-05-01 21:09:13 +02:00
|
|
|
};
|
|
|
|
|
2005-05-18 07:32:09 +02:00
|
|
|
#endif
|