diff options
author | aap <aap@papnet.eu> | 2020-05-07 21:55:54 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-07 21:55:54 +0200 |
commit | c715569d1d52ebc2a99544a98bedbfdabf8fd3a7 (patch) | |
tree | 3040a6d3af78f844c430bcb10309d59da00f80bc /src/modelinfo/BaseModelInfo.h | |
parent | little script change (diff) | |
download | re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.gz re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.bz2 re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.lz re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.xz re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.zst re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.zip |
Diffstat (limited to '')
-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 4b880758..c196aa5a 100644 --- a/src/modelinfo/BaseModelInfo.h +++ b/src/modelinfo/BaseModelInfo.h @@ -2,7 +2,7 @@ #include "Collision.h" -#define MAX_MODEL_NAME (24) +#define MAX_MODEL_NAME (21) enum ModelInfoType : uint8 { @@ -25,14 +25,14 @@ class CBaseModelInfo { protected: char m_name[MAX_MODEL_NAME]; + ModelInfoType m_type; + uint8 m_num2dEffects; + bool m_bOwnsColModel; CColModel *m_colModel; - C2dEffect *m_twodEffects; + int16 m_2dEffectsID; int16 m_objectId; uint16 m_refCount; int16 m_txdSlot; - ModelInfoType m_type; - uint8 m_num2dEffects; - bool m_bOwnsColModel; public: CBaseModelInfo(ModelInfoType type); @@ -42,6 +42,9 @@ public: virtual RwObject *CreateInstance(RwMatrix *) = 0; virtual RwObject *CreateInstance(void) = 0; virtual RwObject *GetRwObject(void) = 0; + virtual void SetAnimFile(const char *file) {} + virtual void ConvertAnimFileIndex(void) {} + virtual int GetAnimFileIndex(void) { return -1; } // one day it becomes virtual ModelInfoType GetModelType() const { return m_type; } @@ -49,7 +52,7 @@ 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 *GetName(void) { return m_name; } - void SetName(const char *name) { strncpy(m_name, name, 24); } + void SetName(const char *name) { strncpy(m_name, name, MAX_MODEL_NAME); } void SetColModel(CColModel *col, bool owns = false){ m_colModel = col; m_bOwnsColModel = owns; } CColModel *GetColModel(void) { return m_colModel; } @@ -70,5 +73,3 @@ public: uint8 GetNum2dEffects() const { return m_num2dEffects; } uint16 GetNumRefs() const { return m_refCount; } }; - -static_assert(sizeof(CBaseModelInfo) == 0x30, "CBaseModelInfo: error"); |