Fixed typos and made all assert functions optional

This commit is contained in:
bigbossbro08
2020-05-10 21:49:33 +06:00
parent af6e132b37
commit c798e1bacd
73 changed files with 110 additions and 184 deletions

View File

@ -12,5 +12,5 @@ public:
void ProcessControl(void);
};
#ifndef PED_SKIN
static_assert(sizeof(CCivilianPed) == 0x53C, "CCivilianPed: error");
VALIDATE_SIZE(CCivilianPed, 0x53C);
#endif

View File

@ -37,5 +37,5 @@ public:
};
#ifndef PED_SKIN
static_assert(sizeof(CCopPed) == 0x558, "CCopPed: error");
VALIDATE_SIZE(CCopPed, 0x558);
#endif

View File

@ -9,6 +9,4 @@ class CDummyPed : CDummy
int32 unknown;
};
#ifdef CHECK_STRUCT_SIZES
static_assert(sizeof(CDummyPed) == 0x70, "CDummyPed: error");
#endif
VALIDATE_SIZE(CDummyPed, 0x70);

View File

@ -37,5 +37,5 @@ public:
void MedicAI(void);
};
#ifndef PED_SKIN
static_assert(sizeof(CEmergencyPed) == 0x554, "CEmergencyPed: error");
VALIDATE_SIZE(CEmergencyPed, 0x554);
#endif

View File

@ -10,7 +10,7 @@ struct CGangInfo
CGangInfo();
};
static_assert(sizeof(CGangInfo) == 0x10, "CGangInfo: error");
VALIDATE_SIZE(CGangInfo, 0x10);
enum {
GANG_MAFIA = 0,

View File

@ -82,7 +82,7 @@ struct FightMove
uint8 damage;
uint8 flags;
};
static_assert(sizeof(FightMove) == 0x18, "FightMove: error");
VALIDATE_SIZE(FightMove, 0x18);
// TODO: This is eFightState on mobile.
enum PedFightMoves
@ -896,6 +896,7 @@ public:
void FinishFuckUCB(CAnimBlendAssociation *assoc, void *arg);
#ifndef PED_SKIN
#ifdef CHECK_STRUCT_SIZES
static_assert(offsetof(CPed, m_nPedState) == 0x224, "CPed: error");
static_assert(offsetof(CPed, m_pCurSurface) == 0x2FC, "CPed: error");
static_assert(offsetof(CPed, m_pMyVehicle) == 0x310, "CPed: error");
@ -907,5 +908,6 @@ static_assert(offsetof(CPed, m_lookTimer) == 0x4CC, "CPed: error");
static_assert(offsetof(CPed, m_bodyPartBleeding) == 0x4F2, "CPed: error");
static_assert(offsetof(CPed, m_pedInObjective) == 0x16C, "CPed: error");
static_assert(offsetof(CPed, m_pEventEntity) == 0x19C, "CPed: error");
static_assert(sizeof(CPed) == 0x53C, "CPed: error");
#endif
VALIDATE_SIZE(CPed, 0x53C);
#endif

View File

@ -65,6 +65,4 @@ public:
bool RestoreLookAt(void);
};
#ifdef CHECK_STRUCT_SIZES
static_assert(sizeof(CPedIK) == 0x28, "CPedIK: error");
#endif
VALIDATE_SIZE(CPedIK, 0x28);

View File

@ -76,4 +76,5 @@ public:
static void LoadPedStats(void);
static ePedStats GetPedStatType(char *name);
};
static_assert(sizeof(CPedStats) == 0x34, "CPedStats: error");
VALIDATE_SIZE(CPedStats, 0x34);

View File

@ -91,4 +91,4 @@ public:
static bool IsThreat(int type, int threat) { return ms_apPedType[type]->m_threats & threat; }
};
static_assert(sizeof(CPedType) == 0x20, "CPedType: error");
VALIDATE_SIZE(CPedType, 0x20);

View File

@ -85,5 +85,5 @@ public:
};
#ifndef PED_SKIN
static_assert(sizeof(CPlayerPed) == 0x5F0, "CPlayerPed: error");
VALIDATE_SIZE(CPlayerPed, 0x5F0);
#endif