defined out asserts.

This commit is contained in:
bigbossbro08
2020-05-10 19:54:37 +06:00
parent d9a3533438
commit af6e132b37
48 changed files with 156 additions and 6 deletions

View File

@ -197,7 +197,9 @@ public:
static void SetAllTaxiLights(bool set);
};
#ifdef CHECK_STRUCT_SIZES
static_assert(sizeof(CAutomobile) == 0x5A8, "CAutomobile: error");
#endif
inline uint8 GetCarDoorFlag(int32 carnode) {
switch (carnode) {

View File

@ -72,7 +72,9 @@ public:
};
#ifdef CHECK_STRUCT_SIZES
static_assert(sizeof(CBoat) == 0x484, "CBoat: error");
#endif
extern float MAX_WAKE_LENGTH;
extern float MIN_WAKE_INTERVAL;

View File

@ -72,7 +72,9 @@ public:
float GetHeightToDropoffHeight() { return m_fDropoffHeight + (m_bIsCrusher ? 7.0f : 2.0f); }
};
#ifdef CHECK_STRUCT_SIZES
static_assert(sizeof(CCrane) == 128, "CCrane: error");
#endif
class CCranes
{

View File

@ -95,4 +95,7 @@ public:
static void ActivateHeli(bool activate);
};
#ifdef CHECK_STRUCT_SIZES
static_assert(sizeof(CHeli) == 0x33C, "CHeli: error");
#endif

View File

@ -63,7 +63,10 @@ public:
static bool HasCesnaBeenDestroyed(void);
static bool HasDropOffCesnaBeenShotDown(void);
};
#ifdef CHECK_STRUCT_SIZES
static_assert(sizeof(CPlane) == 0x29C, "CPlane: error");
#endif
extern float LandingPoint;
extern float TakeOffPoint;

View File

@ -91,4 +91,7 @@ public:
float *totalLength, float *totalDuration, CTrainInterpolationLine *interpLines, bool rightRail);
static void UpdateTrains(void);
};
#ifdef CHECK_STRUCT_SIZES
static_assert(sizeof(CTrain) == 0x2E4, "CTrain: error");
#endif

View File

@ -291,9 +291,11 @@ public:
static bool m_bDisableMouseSteering;
};
#ifdef CHECK_STRUCT_SIZES
static_assert(sizeof(CVehicle) == 0x288, "CVehicle: error");
static_assert(offsetof(CVehicle, m_pCurGroundEntity) == 0x1E0, "CVehicle: error");
static_assert(offsetof(CVehicle, m_nAlarmState) == 0x1A0, "CVehicle: error");
static_assert(offsetof(CVehicle, m_nLastWeaponDamage) == 0x228, "CVehicle: error");
#endif
void DestroyVehicleAndDriverAndPassengers(CVehicle* pVehicle);