diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-01-12 12:22:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-12 12:22:44 +0100 |
commit | 8888ee3974587cfb6172e420210df75e5c5de3f7 (patch) | |
tree | 10294da8d82bcdedaaf64cee35897a7fe08b64ea /src/modelinfo/BaseModelInfo.h | |
parent | Merge branch 'miami' into lcs (diff) | |
parent | More fix (diff) | |
download | re3-8888ee3974587cfb6172e420210df75e5c5de3f7.tar re3-8888ee3974587cfb6172e420210df75e5c5de3f7.tar.gz re3-8888ee3974587cfb6172e420210df75e5c5de3f7.tar.bz2 re3-8888ee3974587cfb6172e420210df75e5c5de3f7.tar.lz re3-8888ee3974587cfb6172e420210df75e5c5de3f7.tar.xz re3-8888ee3974587cfb6172e420210df75e5c5de3f7.tar.zst re3-8888ee3974587cfb6172e420210df75e5c5de3f7.zip |
Diffstat (limited to 'src/modelinfo/BaseModelInfo.h')
-rw-r--r-- | src/modelinfo/BaseModelInfo.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/modelinfo/BaseModelInfo.h b/src/modelinfo/BaseModelInfo.h index a4906fc9..b76736c0 100644 --- a/src/modelinfo/BaseModelInfo.h +++ b/src/modelinfo/BaseModelInfo.h @@ -23,7 +23,9 @@ class C2dEffect; class CBaseModelInfo { protected: - char m_name[MAX_MODEL_NAME]; + char *m_name; + uint32 m_nameKey; + RwObject *m_object; uint8 m_type; uint8 m_num2dEffects; bool m_bOwnsColModel; @@ -35,7 +37,11 @@ protected: public: CBaseModelInfo(ModelInfoType type); +#ifdef FIX_BUGS + virtual ~CBaseModelInfo() { delete []m_name; } +#else virtual ~CBaseModelInfo() {} +#endif virtual void Shutdown(void); virtual void DeleteRwObject(void) = 0; virtual RwObject *CreateInstance(RwMatrix *) = 0; @@ -51,7 +57,8 @@ public: bool IsSimple(void) { return m_type == MITYPE_SIMPLE || m_type == MITYPE_TIME || m_type == MITYPE_WEAPON; } bool IsClump(void) { return m_type == MITYPE_CLUMP || m_type == MITYPE_PED || m_type == MITYPE_VEHICLE; } char *GetModelName(void) { return m_name; } - void SetModelName(const char *name) { strncpy(m_name, name, MAX_MODEL_NAME); } + void SetModelName(const char *name); + uint32 GetNameHashKey() { return m_nameKey; } void SetColModel(CColModel *col, bool owns = false){ m_colModel = col; m_bOwnsColModel = owns; } CColModel *GetColModel(void) { return m_colModel; } |