diff options
author | bigbossbro08 <bigbossbro08@gmail.com> | 2020-05-10 17:49:33 +0200 |
---|---|---|
committer | bigbossbro08 <bigbossbro08@gmail.com> | 2020-05-10 17:49:33 +0200 |
commit | c798e1bacdaabaf140ff3904948fd7cec46c09bb (patch) | |
tree | ef6d50874117bcc819b90dcd231d74f23fa0108d /src/peds | |
parent | defined out asserts. (diff) | |
download | re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.gz re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.bz2 re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.lz re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.xz re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.zst re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.zip |
Diffstat (limited to '')
-rw-r--r-- | src/peds/CivilianPed.h | 2 | ||||
-rw-r--r-- | src/peds/CopPed.h | 2 | ||||
-rw-r--r-- | src/peds/DummyPed.h | 4 | ||||
-rw-r--r-- | src/peds/EmergencyPed.h | 2 | ||||
-rw-r--r-- | src/peds/Gangs.h | 2 | ||||
-rw-r--r-- | src/peds/Ped.h | 6 | ||||
-rw-r--r-- | src/peds/PedIK.h | 4 | ||||
-rw-r--r-- | src/peds/PedStats.h | 3 | ||||
-rw-r--r-- | src/peds/PedType.h | 2 | ||||
-rw-r--r-- | src/peds/PlayerPed.h | 2 |
10 files changed, 14 insertions, 15 deletions
diff --git a/src/peds/CivilianPed.h b/src/peds/CivilianPed.h index 88d034c8..8418a99f 100644 --- a/src/peds/CivilianPed.h +++ b/src/peds/CivilianPed.h @@ -12,5 +12,5 @@ public: void ProcessControl(void); }; #ifndef PED_SKIN -static_assert(sizeof(CCivilianPed) == 0x53C, "CCivilianPed: error"); +VALIDATE_SIZE(CCivilianPed, 0x53C); #endif diff --git a/src/peds/CopPed.h b/src/peds/CopPed.h index d63aef06..5346d9a1 100644 --- a/src/peds/CopPed.h +++ b/src/peds/CopPed.h @@ -37,5 +37,5 @@ public: }; #ifndef PED_SKIN -static_assert(sizeof(CCopPed) == 0x558, "CCopPed: error"); +VALIDATE_SIZE(CCopPed, 0x558); #endif diff --git a/src/peds/DummyPed.h b/src/peds/DummyPed.h index 5bb72d87..ea617c76 100644 --- a/src/peds/DummyPed.h +++ b/src/peds/DummyPed.h @@ -9,6 +9,4 @@ class CDummyPed : CDummy int32 unknown; }; -#ifdef CHECK_STRUCT_SIZES -static_assert(sizeof(CDummyPed) == 0x70, "CDummyPed: error"); -#endif
\ No newline at end of file +VALIDATE_SIZE(CDummyPed, 0x70); diff --git a/src/peds/EmergencyPed.h b/src/peds/EmergencyPed.h index 6d3dac79..390ba0bd 100644 --- a/src/peds/EmergencyPed.h +++ b/src/peds/EmergencyPed.h @@ -37,5 +37,5 @@ public: void MedicAI(void); }; #ifndef PED_SKIN -static_assert(sizeof(CEmergencyPed) == 0x554, "CEmergencyPed: error"); +VALIDATE_SIZE(CEmergencyPed, 0x554); #endif diff --git a/src/peds/Gangs.h b/src/peds/Gangs.h index dd7a7f93..c8ea2916 100644 --- a/src/peds/Gangs.h +++ b/src/peds/Gangs.h @@ -10,7 +10,7 @@ struct CGangInfo CGangInfo(); }; -static_assert(sizeof(CGangInfo) == 0x10, "CGangInfo: error"); +VALIDATE_SIZE(CGangInfo, 0x10); enum { GANG_MAFIA = 0, diff --git a/src/peds/Ped.h b/src/peds/Ped.h index 9f105e7a..e399b7e4 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -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 diff --git a/src/peds/PedIK.h b/src/peds/PedIK.h index 566193d6..a1cb5d13 100644 --- a/src/peds/PedIK.h +++ b/src/peds/PedIK.h @@ -65,6 +65,4 @@ public: bool RestoreLookAt(void); }; -#ifdef CHECK_STRUCT_SIZES -static_assert(sizeof(CPedIK) == 0x28, "CPedIK: error"); -#endif +VALIDATE_SIZE(CPedIK, 0x28); diff --git a/src/peds/PedStats.h b/src/peds/PedStats.h index 4c35e8ee..df97bdb8 100644 --- a/src/peds/PedStats.h +++ b/src/peds/PedStats.h @@ -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); diff --git a/src/peds/PedType.h b/src/peds/PedType.h index c0c72550..3a765da1 100644 --- a/src/peds/PedType.h +++ b/src/peds/PedType.h @@ -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); diff --git a/src/peds/PlayerPed.h b/src/peds/PlayerPed.h index 61b70f89..e8173c8c 100644 --- a/src/peds/PlayerPed.h +++ b/src/peds/PlayerPed.h @@ -85,5 +85,5 @@ public: }; #ifndef PED_SKIN -static_assert(sizeof(CPlayerPed) == 0x5F0, "CPlayerPed: error"); +VALIDATE_SIZE(CPlayerPed, 0x5F0); #endif |