summaryrefslogtreecommitdiffstats
path: root/src/entities/Entity.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-30 20:41:20 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-30 20:41:20 +0200
commitdc12718fc20b2e70fa27653b19dd57f7d141d606 (patch)
tree80667ad887360af7a6ed8d9500e2952d57c61bc0 /src/entities/Entity.h
parentMerge remote-tracking branch 'upstream/master' (diff)
parentRename m_phy_flagA80 to bSkipLineCol (diff)
downloadre3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.gz
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.bz2
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.lz
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.xz
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.zst
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.zip
Diffstat (limited to 'src/entities/Entity.h')
-rw-r--r--src/entities/Entity.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/entities/Entity.h b/src/entities/Entity.h
index 82a78779..9a0cd5cb 100644
--- a/src/entities/Entity.h
+++ b/src/entities/Entity.h
@@ -6,7 +6,7 @@
struct CReference;
class CPtrList;
-enum eEntityType
+enum eEntityType : uint8
{
ENTITY_TYPE_NOTHING = 0,
ENTITY_TYPE_BUILDING,
@@ -16,7 +16,7 @@ enum eEntityType
ENTITY_TYPE_DUMMY,
};
-enum eEntityStatus
+enum eEntityStatus : uint8
{
STATUS_PLAYER,
STATUS_PLAYER_PLAYBACKFROMBUFFER,
@@ -36,9 +36,11 @@ class CEntity : public CPlaceable
{
public:
RwObject *m_rwObject;
+protected:
uint32 m_type : 3;
+private:
uint32 m_status : 5;
-
+public:
// flagsA
uint32 bUsesCollision : 1; // does entity use collision
uint32 bCollisionProcessed : 1; // has object been processed by a ProcessEntityCollision function
@@ -90,6 +92,11 @@ public:
uint16 m_level; // int16
CReference *m_pFirstReference;
+public:
+ eEntityType GetType() const { return (eEntityType)m_type; }
+ void SetType(eEntityType type) { m_type = type; }
+ eEntityStatus GetStatus() const { return (eEntityStatus)m_status; }
+ void SetStatus(eEntityStatus status) { m_status = status; }
CColModel *GetColModel(void) { return CModelInfo::GetModelInfo(m_modelIndex)->GetColModel(); }
#ifndef COMPATIBLE_SAVES
uint32* GetAddressOfEntityProperties() { /* AWFUL */ return (uint32*)((char*)&m_rwObject + sizeof(m_rwObject)); }