get rid of all PED_SKIN defines

This commit is contained in:
aap 2020-12-18 17:27:18 +01:00
parent 75a9976cbc
commit c17ccc50ab
12 changed files with 7 additions and 47 deletions

View File

@ -17,19 +17,13 @@ struct AnimBlendFrameData
uint8 flag; uint8 flag;
RwV3d resetPos; RwV3d resetPos;
#ifdef PED_SKIN
union { union {
RwFrame *frame; RwFrame *frame;
RpHAnimStdInterpFrame *hanimFrame; RpHAnimStdInterpFrame *hanimFrame;
}; };
int32 nodeID; int32 nodeID;
#else
RwFrame *frame;
#endif
}; };
#ifndef PED_SKIN VALIDATE_SIZE(AnimBlendFrameData, 0x18);
VALIDATE_SIZE(AnimBlendFrameData, 0x14);
#endif
class CAnimBlendClumpData class CAnimBlendClumpData
@ -44,8 +38,6 @@ public:
CAnimBlendClumpData(void); CAnimBlendClumpData(void);
~CAnimBlendClumpData(void); ~CAnimBlendClumpData(void);
void SetNumberOfFrames(int n); void SetNumberOfFrames(int n);
#ifdef PED_SKIN
void SetNumberOfBones(int n) { SetNumberOfFrames(n); } void SetNumberOfBones(int n) { SetNumberOfFrames(n); }
#endif
void ForAllFrames(void (*cb)(AnimBlendFrameData*, void*), void *arg); void ForAllFrames(void (*cb)(AnimBlendFrameData*, void*), void *arg);
}; };

View File

@ -10,9 +10,7 @@ CAnimBlendSequence::CAnimBlendSequence(void)
numFrames = 0; numFrames = 0;
keyFrames = nil; keyFrames = nil;
keyFramesCompressed = nil; keyFramesCompressed = nil;
#ifdef PED_SKIN
boneTag = -1; boneTag = -1;
#endif
} }
CAnimBlendSequence::~CAnimBlendSequence(void) CAnimBlendSequence::~CAnimBlendSequence(void)

View File

@ -49,10 +49,6 @@ public:
// void CompressKeyframes(void); // void CompressKeyframes(void);
// void RemoveUncompressedData(void); // void RemoveUncompressedData(void);
#ifdef PED_SKIN
void SetBoneTag(int tag) { boneTag = tag; } void SetBoneTag(int tag) { boneTag = tag; }
#endif
}; };
#ifndef PED_SKIN VALIDATE_SIZE(CAnimBlendSequence, 0x30);
VALIDATE_SIZE(CAnimBlendSequence, 0x2C);
#endif

View File

@ -1255,13 +1255,10 @@ CAnimManager::CreateAnimAssocGroups(void)
group->firstAnimId = def->animDescs[0].animId; group->firstAnimId = def->animDescs[0].animId;
group->CreateAssociations(def->blockName, clump, def->animNames, def->numAnims); group->CreateAssociations(def->blockName, clump, def->animNames, def->numAnims);
for(j = 0; j < group->numAssociations; j++) for(j = 0; j < group->numAssociations; j++)
// GetAnimation(i) in III (but it's in LoadAnimFiles), GetAnimation(group->animDesc[j].animId) in VC // GetAnimation(i) in III (but it's in LoadAnimFiles), GetAnimation(group->animDesc[j].animId) in VC
group->GetAnimation(def->animDescs[j].animId)->flags |= def->animDescs[j].flags; group->GetAnimation(def->animDescs[j].animId)->flags |= def->animDescs[j].flags;
#ifdef PED_SKIN
if(IsClumpSkinned(clump)) if(IsClumpSkinned(clump))
RpClumpForAllAtomics(clump, AtomicRemoveAnimFromSkinCB, nil); RpClumpForAllAtomics(clump, AtomicRemoveAnimFromSkinCB, nil);
#endif
RpClumpDestroy(clump); RpClumpDestroy(clump);
} }
} }
@ -1352,10 +1349,8 @@ CAnimManager::LoadAnimFile(RwStream *stream, bool compress, char (*somename)[32]
ROUNDSIZE(anim.size); ROUNDSIZE(anim.size);
RwStreamRead(stream, buf, anim.size); RwStreamRead(stream, buf, anim.size);
int numFrames = *(int*)(buf+28); int numFrames = *(int*)(buf+28);
#ifdef PED_SKIN
if(anim.size == 44) if(anim.size == 44)
seq->SetBoneTag(*(int*)(buf+40)); seq->SetBoneTag(*(int*)(buf+40));
#endif
seq->SetName(buf); seq->SetName(buf);
if(numFrames == 0) if(numFrames == 0)
continue; continue;

View File

@ -84,10 +84,8 @@ typedef uint16_t wchar;
#include "config.h" #include "config.h"
#ifdef PED_SKIN
#include <rphanim.h> #include <rphanim.h>
#include <rpskin.h> #include <rpskin.h>
#endif
#ifdef __GNUC__ #ifdef __GNUC__
#define TYPEALIGN(n) __attribute__ ((aligned (n))) #define TYPEALIGN(n) __attribute__ ((aligned (n)))

View File

@ -346,7 +346,6 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
#define CAMERA_PICKUP #define CAMERA_PICKUP
// Peds // Peds
#define PED_SKIN // support for skinned geometry on peds
#define CANCELLABLE_CAR_ENTER #define CANCELLABLE_CAR_ENTER
// Camera // Camera

View File

@ -171,9 +171,7 @@ public:
void PruneReferences(void); void PruneReferences(void);
void CleanUpOldReference(CEntity **pent); void CleanUpOldReference(CEntity **pent);
#ifdef PED_SKIN
void UpdateRpHAnim(void); void UpdateRpHAnim(void);
#endif
void PreRenderForGlassWindow(void); void PreRenderForGlassWindow(void);
void AddSteamsFromGround(CVector *unused); void AddSteamsFromGround(CVector *unused);

View File

@ -23,6 +23,4 @@ public:
void EnterVacantNearbyCars(void); void EnterVacantNearbyCars(void);
bool IsOnStealWishList(int32); bool IsOnStealWishList(int32);
}; };
#ifndef PED_SKIN //VALIDATE_SIZE(CCivilianPed, 0x53C);
VALIDATE_SIZE(CCivilianPed, 0x53C);
#endif

View File

@ -48,6 +48,4 @@ public:
void ProcessStingerCop(void); void ProcessStingerCop(void);
}; };
#ifndef PED_SKIN VALIDATE_SIZE(CCopPed, 0x62C);
VALIDATE_SIZE(CCopPed, 0x558);
#endif

View File

@ -36,6 +36,4 @@ public:
void FiremanAI(void); void FiremanAI(void);
void MedicAI(void); void MedicAI(void);
}; };
#ifndef PED_SKIN //VALIDATE_SIZE(CEmergencyPed, 0x554);
VALIDATE_SIZE(CEmergencyPed, 0x554);
#endif

View File

@ -264,9 +264,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
bVehExitWillBeInstant = false; bVehExitWillBeInstant = false;
bHasAlreadyBeenRecorded = false; bHasAlreadyBeenRecorded = false;
bFallenDown = false; bFallenDown = false;
#ifdef PED_SKIN
bDontAcceptIKLookAts = false; bDontAcceptIKLookAts = false;
#endif
bReachedAttractorHeadingTarget = false; bReachedAttractorHeadingTarget = false;
bTurnedAroundOnAttractor = false; bTurnedAroundOnAttractor = false;
#ifdef KANGAROO_CHEAT #ifdef KANGAROO_CHEAT
@ -365,9 +363,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
m_vehicleInAccident = nil; m_vehicleInAccident = nil;
m_attractor = nil; m_attractor = nil;
m_positionInQueue = -1; m_positionInQueue = -1;
#ifdef PED_SKIN
m_pWeaponModel = nil; m_pWeaponModel = nil;
#endif
m_delayedSoundID = -1; m_delayedSoundID = -1;
m_delayedSoundTimer = 0; m_delayedSoundTimer = 0;
CPopulation::UpdatePedCount((ePedType)m_nPedType, false); CPopulation::UpdatePedCount((ePedType)m_nPedType, false);
@ -4797,11 +4793,7 @@ CPed::PreRender(void)
CTimeCycle::m_fShadowFrontX[CTimeCycle::m_CurrentStoredValue], CTimeCycle::m_fShadowFrontY[CTimeCycle::m_CurrentStoredValue], CTimeCycle::m_fShadowFrontX[CTimeCycle::m_CurrentStoredValue], CTimeCycle::m_fShadowFrontY[CTimeCycle::m_CurrentStoredValue],
CTimeCycle::m_fShadowSideX[CTimeCycle::m_CurrentStoredValue], CTimeCycle::m_fShadowSideY[CTimeCycle::m_CurrentStoredValue]); CTimeCycle::m_fShadowSideX[CTimeCycle::m_CurrentStoredValue], CTimeCycle::m_fShadowSideY[CTimeCycle::m_CurrentStoredValue]);
#ifdef PED_SKIN
if(IsClumpSkinned(GetClump())){
UpdateRpHAnim(); UpdateRpHAnim();
}
#endif
bool bIsWindModifierTurnedOn = false; bool bIsWindModifierTurnedOn = false;
float fAnyDirectionShift = 1.0f; float fAnyDirectionShift = 1.0f;

View File

@ -108,6 +108,4 @@ public:
static const uint32 nSaveStructSize; static const uint32 nSaveStructSize;
}; };
#ifndef PED_SKIN //VALIDATE_SIZE(CPlayerPed, 0x5F0);
VALIDATE_SIZE(CPlayerPed, 0x5F0);
#endif