Vehicle_Macros

Macros used in CryAction Vehicle.

CAST_VEHICLEOBJECT Macro
C++
#define CAST_VEHICLEOBJECT(type, objptr) \
    (objptr->GetId() == type::m_objectId) ? (type*)objptr : NULL
File

IVehicleSystem.h

DEFINE_VEHICLEOBJECT Macro
C++
#define DEFINE_VEHICLEOBJECT(obj) \
    TVehicleObjectId obj::m_objectId = InvalidVehicleObjectId;
File

IVehicleSystem.h

ENABLE_VEHICLE_DEBUG Macro
C++
#define ENABLE_VEHICLE_DEBUG 1
File

IVehicleSystem.h

Description

compile out debug draw code in release builds

IMPLEMENT_VEHICLEOBJECT Macro
C++
#define IMPLEMENT_VEHICLEOBJECT \
    public: \
        static TVehicleObjectId m_objectId; \
        friend struct IVehicleSystem; \
        virtual TVehicleObjectId GetId() { return m_objectId; }
File

IVehicleSystem.h