diff options
Diffstat (limited to 'src/modelinfo/BaseModelInfo.h')
-rw-r--r-- | src/modelinfo/BaseModelInfo.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/modelinfo/BaseModelInfo.h b/src/modelinfo/BaseModelInfo.h index f767e0e7..9f828e7f 100644 --- a/src/modelinfo/BaseModelInfo.h +++ b/src/modelinfo/BaseModelInfo.h @@ -4,7 +4,7 @@ #define MAX_MODEL_NAME (24) -enum ModeInfoType : uint8 +enum ModelInfoType : uint8 { MITYPE_NA = 0, MITYPE_SIMPLE = 1, @@ -15,7 +15,7 @@ enum ModeInfoType : uint8 MITYPE_PED = 6, MITYPE_XTRACOMPS = 7, }; -static_assert(sizeof(ModeInfoType) == 1, "ModeInfoType: error"); +static_assert(sizeof(ModelInfoType) == 1, "ModeInfoType: error"); class C2dEffect; @@ -28,12 +28,12 @@ protected: int16 m_objectId; uint16 m_refCount; int16 m_txdSlot; - ModeInfoType m_type; + ModelInfoType m_type; uint8 m_num2dEffects; - bool m_freeCol; + bool m_bOwnsColModel; public: - CBaseModelInfo(ModeInfoType type); + CBaseModelInfo(ModelInfoType type); virtual ~CBaseModelInfo() {} virtual void Shutdown(void); virtual void DeleteRwObject(void) = 0; @@ -42,16 +42,17 @@ public: virtual RwObject *GetRwObject(void) = 0; // one day it becomes virtual - ModeInfoType GetModelType() const { return m_type; } + ModelInfoType GetModelType() const { return m_type; } bool IsSimple(void) { return m_type == MITYPE_SIMPLE || m_type == MITYPE_TIME; } bool IsClump(void) { return m_type == MITYPE_CLUMP || m_type == MITYPE_PED || m_type == MITYPE_VEHICLE || m_type == MITYPE_MLO || m_type == MITYPE_XTRACOMPS; // unused but what the heck } char *GetName(void) { return m_name; } void SetName(const char *name) { strncpy(m_name, name, 24); } - void SetColModel(CColModel *col, bool free = false){ - m_colModel = col; m_freeCol = free; } + void SetColModel(CColModel *col, bool owns = false){ + m_colModel = col; m_bOwnsColModel = owns; } CColModel *GetColModel(void) { return m_colModel; } + bool DoesOwnColModel(void) { return m_bOwnsColModel; } void DeleteCollisionModel(void); void ClearTexDictionary(void) { m_txdSlot = -1; } short GetObjectID(void) { return m_objectId; } |