1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-25 06:21:54 +00:00
re3/src/modelinfo/ClumpModelInfo.h

61 lines
1.5 KiB
C
Raw Normal View History

2019-05-15 14:52:37 +00:00
#pragma once
#include "BaseModelInfo.h"
struct RwObjectNameIdAssocation
{
2019-08-16 18:17:15 +00:00
const char *name;
2019-05-15 14:52:37 +00:00
int32 hierId;
uint32 flags;
};
struct RwObjectNameAssociation
{
2019-08-16 18:17:15 +00:00
const char *name;
2019-05-15 14:52:37 +00:00
RwFrame *frame;
};
struct RwObjectIdAssociation
{
int32 id;
RwFrame *frame;
};
enum {
CLUMP_FLAG_NO_HIERID = 0x1,
};
class CClumpModelInfo : public CBaseModelInfo
{
public:
RpClump *m_clump;
2020-05-10 09:20:27 +00:00
union {
int32 m_animFileIndex;
char *m_animFileName;
};
2019-05-15 14:52:37 +00:00
2020-05-10 09:20:27 +00:00
CClumpModelInfo(void) : CBaseModelInfo(MITYPE_CLUMP) { m_animFileIndex = -1; }
CClumpModelInfo(ModelInfoType id) : CBaseModelInfo(id) { m_animFileIndex = -1; }
2019-05-15 14:52:37 +00:00
~CClumpModelInfo() {}
void DeleteRwObject(void);
RwObject *CreateInstance(void);
RwObject *CreateInstance(RwMatrix *);
RwObject *GetRwObject(void) { return (RwObject*)m_clump; }
virtual void SetClump(RpClump *);
2020-05-10 09:20:27 +00:00
virtual void SetAnimFile(const char *file);
virtual void ConvertAnimFileIndex(void);
virtual int GetAnimFileIndex(void) { return m_animFileIndex; }
2019-05-15 14:52:37 +00:00
static RpAtomic *SetAtomicRendererCB(RpAtomic *atomic, void *data);
void SetFrameIds(RwObjectNameIdAssocation *assocs);
static RwFrame *FindFrameFromNameCB(RwFrame *frame, void *data);
static RwFrame *FindFrameFromNameWithoutIdCB(RwFrame *frame, void *data);
static RwFrame *FindFrameFromIdCB(RwFrame *frame, void *data);
static void FillFrameArray(RpClump *clump, RwFrame **frames);
static RwFrame *FillFrameArrayCB(RwFrame *frame, void *data);
static RwFrame *GetFrameFromId(RpClump *clump, int32 id);
};
2020-05-07 19:55:54 +00:00
//static_assert(sizeof(CClumpModelInfo) == 0x34, "CClumpModelInfo: error");