2019-05-15 14:52:37 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ClumpModelInfo.h"
|
2020-02-16 02:15:58 +00:00
|
|
|
#include "PedType.h"
|
2020-03-17 18:03:13 +00:00
|
|
|
#include "PedStats.h"
|
2019-05-15 14:52:37 +00:00
|
|
|
|
|
|
|
enum PedNode {
|
2019-07-18 02:26:46 +00:00
|
|
|
PED_TORSO,
|
|
|
|
PED_MID, // Smid on PS2/PC, Storso on mobile/xbox
|
2019-05-15 14:52:37 +00:00
|
|
|
PED_HEAD,
|
|
|
|
PED_UPPERARML,
|
|
|
|
PED_UPPERARMR,
|
|
|
|
PED_HANDL,
|
|
|
|
PED_HANDR,
|
|
|
|
PED_UPPERLEGL,
|
|
|
|
PED_UPPERLEGR,
|
|
|
|
PED_FOOTL,
|
|
|
|
PED_FOOTR,
|
|
|
|
PED_LOWERLEGR,
|
2019-06-14 14:14:22 +00:00
|
|
|
PED_NODE_MAX// Not valid: PED_LOWERLEGL
|
2019-05-15 14:52:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CPedModelInfo : public CClumpModelInfo
|
|
|
|
{
|
|
|
|
public:
|
2019-07-03 16:34:42 +00:00
|
|
|
uint32 m_animGroup;
|
2020-02-16 02:15:58 +00:00
|
|
|
ePedType m_pedType;
|
2020-03-17 18:03:13 +00:00
|
|
|
ePedStats m_pedStatType;
|
2019-05-15 14:52:37 +00:00
|
|
|
uint32 m_carsCanDrive;
|
|
|
|
CColModel *m_hitColModel;
|
2020-04-23 20:25:18 +00:00
|
|
|
#ifdef PED_SKIN
|
2019-05-15 14:52:37 +00:00
|
|
|
RpAtomic *m_head;
|
|
|
|
RpAtomic *m_lhand;
|
|
|
|
RpAtomic *m_rhand;
|
2020-04-23 20:25:18 +00:00
|
|
|
#endif
|
2019-05-15 14:52:37 +00:00
|
|
|
|
2020-04-23 20:25:18 +00:00
|
|
|
static RwObjectNameIdAssocation m_pPedIds[PED_NODE_MAX];
|
2019-05-15 14:52:37 +00:00
|
|
|
|
2020-05-17 13:16:12 +00:00
|
|
|
CPedModelInfo(void) : CClumpModelInfo(MITYPE_PED) {
|
|
|
|
m_hitColModel = nil;
|
|
|
|
#ifdef PED_SKIN
|
|
|
|
m_head = nil;
|
|
|
|
m_lhand = nil;
|
|
|
|
m_rhand = nil;
|
|
|
|
#endif
|
|
|
|
}
|
2020-05-10 15:09:57 +00:00
|
|
|
~CPedModelInfo(void) { delete m_hitColModel; }
|
2019-05-15 14:52:37 +00:00
|
|
|
void DeleteRwObject(void);
|
|
|
|
void SetClump(RpClump *);
|
|
|
|
|
|
|
|
void SetLowDetailClump(RpClump*);
|
|
|
|
void CreateHitColModel(void);
|
2020-04-23 20:25:18 +00:00
|
|
|
void CreateHitColModelSkinned(RpClump *clump);
|
2019-06-22 23:01:21 +00:00
|
|
|
CColModel *GetHitColModel(void) { return m_hitColModel; }
|
2019-08-17 19:03:57 +00:00
|
|
|
static CColModel *AnimatePedColModel(CColModel* colmodel, RwFrame* frame);
|
2020-04-23 20:25:18 +00:00
|
|
|
CColModel *AnimatePedColModelSkinned(RpClump *clump);
|
|
|
|
|
|
|
|
#ifdef PED_SKIN
|
|
|
|
static RpAtomic *findLimbsCb(RpAtomic *atomic, void *data);
|
|
|
|
RpAtomic *getHead(void) { return m_head; }
|
|
|
|
RpAtomic *getLeftHand(void) { return m_lhand; }
|
|
|
|
RpAtomic *getRightHand(void) { return m_rhand; }
|
|
|
|
#endif
|
2019-05-15 14:52:37 +00:00
|
|
|
};
|
2020-04-23 20:25:18 +00:00
|
|
|
#ifndef PED_SKIN
|
2020-05-10 15:49:33 +00:00
|
|
|
VALIDATE_SIZE(CPedModelInfo, 0x48);
|
2020-04-23 20:25:18 +00:00
|
|
|
#endif
|