summaryrefslogtreecommitdiffstats
path: root/src/modelinfo/BaseModelInfo.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-05 14:21:13 +0200
committeraap <aap@papnet.eu>2020-05-05 14:21:13 +0200
commitb3b9be5e8cc5ac5d1ec262fc95ac094d10b02257 (patch)
treec300d6c36323e27226fe7ad0782cf945a26859f8 /src/modelinfo/BaseModelInfo.h
parentimplemented most of streamed collisions and big buildings (diff)
parentMake CBaseModelInfo fields protected (diff)
downloadre3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.tar
re3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.tar.gz
re3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.tar.bz2
re3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.tar.lz
re3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.tar.xz
re3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.tar.zst
re3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.zip
Diffstat (limited to 'src/modelinfo/BaseModelInfo.h')
-rw-r--r--src/modelinfo/BaseModelInfo.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modelinfo/BaseModelInfo.h b/src/modelinfo/BaseModelInfo.h
index 44f4c47a..9f828e7f 100644
--- a/src/modelinfo/BaseModelInfo.h
+++ b/src/modelinfo/BaseModelInfo.h
@@ -22,18 +22,17 @@ class C2dEffect;
class CBaseModelInfo
{
protected:
- // TODO?: make more things protected
char m_name[MAX_MODEL_NAME];
CColModel *m_colModel;
C2dEffect *m_twodEffects;
int16 m_objectId;
-public:
uint16 m_refCount;
int16 m_txdSlot;
ModelInfoType m_type;
uint8 m_num2dEffects;
bool m_bOwnsColModel;
+public:
CBaseModelInfo(ModelInfoType type);
virtual ~CBaseModelInfo() {}
virtual void Shutdown(void);
@@ -42,6 +41,8 @@ public:
virtual RwObject *CreateInstance(void) = 0;
virtual RwObject *GetRwObject(void) = 0;
+ // one day it becomes virtual
+ 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
@@ -51,6 +52,7 @@ public:
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; }
@@ -64,6 +66,8 @@ public:
void Init2dEffects(void);
void Add2dEffect(C2dEffect *fx);
C2dEffect *Get2dEffect(int n);
+ uint8 GetNum2dEffects() const { return m_num2dEffects; }
+ uint16 GetNumRefs() const { return m_refCount; }
};
static_assert(sizeof(CBaseModelInfo) == 0x30, "CBaseModelInfo: error");