mirror of
https://github.com/GTAmodding/re3.git
synced 2025-10-13 07:10:34 +00:00
CBaseModelInfo done
This commit is contained in:
parent
f80474f590
commit
c715569d1d
9 changed files with 37 additions and 23 deletions
|
@ -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];
|
||||
CColModel *m_colModel;
|
||||
C2dEffect *m_twodEffects;
|
||||
int16 m_objectId;
|
||||
uint16 m_refCount;
|
||||
int16 m_txdSlot;
|
||||
ModelInfoType m_type;
|
||||
uint8 m_num2dEffects;
|
||||
bool m_bOwnsColModel;
|
||||
CColModel *m_colModel;
|
||||
int16 m_2dEffectsID;
|
||||
int16 m_objectId;
|
||||
uint16 m_refCount;
|
||||
int16 m_txdSlot;
|
||||
|
||||
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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue