Macros used in CryAction GameObject.
#define CHANGED_NETWORK_STATE(object,aspects) do {/* IEntity * pEntity = object->GetGameObject()->GetEntity(); CryLogAlways("%s changed aspect %x (%s %d)", pEntity ? pEntity->GetName() : "NULL", aspects, __FILE__, __LINE__); */ object->GetGameObject()->ChangedNetworkState(aspects);} while (0)
IGameObject.h
#define CHANGED_NETWORK_STATE_GO(object,aspects) do {/* IEntity * pEntity = object->GetEntity(); CryLogAlways("%s changed aspect %x (%s %d)", pEntity ? pEntity->GetName() : "NULL", aspects, __FILE__, __LINE__); */ object->ChangedNetworkState(aspects);} while (0)
IGameObject.h
#define CHANGED_NETWORK_STATE_REF(object,aspects) do {/* IEntity * pEntity = object.GetGameObject()->GetEntity(); CryLogAlways("%s changed aspect %x (%s %d)", pEntity ? pEntity->GetName() : "NULL", aspects, __FILE__, __LINE__); */ object.GetGameObject()->ChangedNetworkState(aspects);} while (0)
IGameObject.h
#define DECLARE_CLIENT_RMI_INDEPENDENT(name, params, reliability) DECLARE_CLIENT_RMI_NOATTACH(name, params, reliability)
IGameObject.h
#define DECLARE_CLIENT_RMI_NOATTACH(name, params, reliability) DECLARE_RMI(name, params, reliability, eRAT_NoAttach, false, false)
IGameObject.h
#define DECLARE_CLIENT_RMI_NOATTACH_FAST(name, params, reliability) DECLARE_RMI(name, params, reliability, eRAT_NoAttach, false, true)
IGameObject.h
#define DECLARE_CLIENT_RMI_POSTATTACH(name, params) DECLARE_RMI(name, params, eNRT_UnreliableOrdered, eRAT_PostAttach, false, false)
IGameObject.h
#define DECLARE_CLIENT_RMI_POSTATTACH_FAST(name, params) DECLARE_RMI(name, params, eNRT_UnreliableOrdered, eRAT_PostAttach, false, true)
IGameObject.h
#define DECLARE_CLIENT_RMI_PREATTACH(name, params) DECLARE_RMI(name, params, eNRT_UnreliableOrdered, eRAT_PreAttach, false, false)
IGameObject.h
#define DECLARE_CLIENT_RMI_PREATTACH_FAST(name, params) DECLARE_RMI(name, params, eNRT_UnreliableOrdered, eRAT_PreAttach, false, true)
IGameObject.h
#define DECLARE_CLIENT_RMI_URGENT(name, params, reliability) DECLARE_CLIENT_RMI_NOATTACH(name, params, reliability)
IGameObject.h
#define DECLARE_IMPLEMENTATION_RMI(name) \ private: \ INetAtSyncItem * Decode_##name( TSerialize, EntityId, INetChannel* ); \ static bool Handle_##name( const Params_##name&, INetChannel* ); \ static MethodInfo_##name m_info##name; \ public: \ const MethodInfo_##name& name() { return m_info##name; }
IGameObject.h
#define DECLARE_INTERFACE_CLIENT_RMI_POSTATTACH(name, params, reliability) DECLARE_INTERFACE_RMI(name, params, reliability, eRAT_PostAttach, false, false)
IGameObject.h
#define DECLARE_INTERFACE_CLIENT_RMI_POSTATTACH_FAST(name, params, reliability) DECLARE_INTERFACE_RMI(name, params, reliability, eRAT_PostAttach, false, true)
IGameObject.h
#define DECLARE_INTERFACE_CLIENT_RMI_PREATTACH(name, params, reliability) DECLARE_INTERFACE_RMI(name, params, reliability, eRAT_PreAttach, false, false)
IGameObject.h
#define DECLARE_INTERFACE_CLIENT_RMI_PREATTACH_FAST(name, params, reliability) DECLARE_INTERFACE_RMI(name, params, reliability, eRAT_PreAttach, false, true)
IGameObject.h
#define DECLARE_INTERFACE_RMI(name, params, reliability, attachment, isServer, lowDelay) \ protected: \ static const ERMIAttachmentType Attach_##name = attachment; \ static const bool ServerCall_##name = isServer; \ static const ENetReliabilityType Reliability_##name = reliability; \ static const bool LowDelay_##name = lowDelay; \ typedef params Params_##name; \ public: \ struct MethodInfo_##name \ { \ MethodInfo_##name( const SGameObjectExtensionRMI * pMethodInfo ) { this->pMethodInfo = pMethodInfo; } \ const SGameObjectExtensionRMI * pMethodInfo; \ ILINE void Verify( const params& p ) const \ { \ } \ }; \ virtual const MethodInfo_##name& name() = 0
IGameObject.h
#define DECLARE_INTERFACE_SERVER_RMI_POSTATTACH(name, params, reliability) DECLARE_INTERFACE_RMI(name, params, reliability, eRAT_PostAttach, true, false)
IGameObject.h
#define DECLARE_INTERFACE_SERVER_RMI_POSTATTACH_FAST(name, params, reliability) DECLARE_INTERFACE_RMI(name, params, reliability, eRAT_PostAttach, true, true)
IGameObject.h
#define DECLARE_INTERFACE_SERVER_RMI_PREATTACH(name, params, reliability) DECLARE_INTERFACE_RMI(name, params, reliability, eRAT_PreAttach, true, false)
IGameObject.h
#define DECLARE_INTERFACE_SERVER_RMI_PREATTACH_FAST(name, params, reliability) DECLARE_INTERFACE_RMI(name, params, reliability, eRAT_PreAttach, true, true)
IGameObject.h
#define DECLARE_RMI(name, params, reliability, attachment, isServer, lowDelay) \ public: \ struct MethodInfo_##name \ { \ MethodInfo_##name( const SGameObjectExtensionRMI * pMethodInfo ) { this->pMethodInfo = pMethodInfo; } \ const SGameObjectExtensionRMI * pMethodInfo; \ ILINE void Verify( const params& p ) const \ { \ } \ }; \ private: \ static INetAtSyncItem * Decode_##name( TSerialize, EntityId*, INetChannel* ); \ bool Handle_##name( const params&, INetChannel* ); \ static const ERMIAttachmentType Attach_##name = attachment; \ static const bool ServerCall_##name = isServer; \ static const ENetReliabilityType Reliability_##name = reliability; \ static const bool LowDelay_##name = lowDelay; \ typedef params Params_##name; \ static MethodInfo_##name m_info##name; \ public: \ static const MethodInfo_##name& name() { return m_info##name; }
IGameObject.h
#define DECLARE_SERVER_RMI_INDEPENDENT(name, params, reliability) DECLARE_SERVER_RMI_NOATTACH(name, params, reliability)
IGameObject.h
#define DECLARE_SERVER_RMI_NOATTACH(name, params, reliability) DECLARE_RMI(name, params, reliability, eRAT_NoAttach, true, false)
IGameObject.h
#define DECLARE_SERVER_RMI_NOATTACH_FAST(name, params, reliability) DECLARE_RMI(name, params, reliability, eRAT_NoAttach, true, true)
IGameObject.h
#define DECLARE_SERVER_RMI_POSTATTACH(name, params) DECLARE_RMI(name, params, eNRT_UnreliableOrdered, eRAT_PostAttach, true, false)
IGameObject.h
#define DECLARE_SERVER_RMI_POSTATTACH_FAST(name, params) DECLARE_RMI(name, params, eNRT_UnreliableOrdered, eRAT_PostAttach, true, true)
IGameObject.h
#define DECLARE_SERVER_RMI_PREATTACH(name, params) DECLARE_RMI(name, params, eNRT_UnreliableOrdered, eRAT_PreAttach, true, false)
IGameObject.h
PreAttach/PostAttach RMI's cannot have their reliability specified (see CGameObjectDispatch::RegisterInterface() for details)
#define DECLARE_SERVER_RMI_PREATTACH_FAST(name, params) DECLARE_RMI(name, params, eNRT_UnreliableOrdered, eRAT_PreAttach, true, true)
IGameObject.h
PreAttach/PostAttach RMI's cannot have their reliability specified (see CGameObjectDispatch::RegisterInterface() for details)
#define DECLARE_SERVER_RMI_URGENT(name, params, reliability) DECLARE_SERVER_RMI_NOATTACH(name, params, reliability)
IGameObject.h
#define IMPLEMENT_INTERFACE_RMI(cls, name) \ cls::MethodInfo_##name cls::m_info##name = cls::Helper_AddMessage( &cls::Decode_##name, "RMI:" #cls ":" #name, cls::Attach_##name, cls::ServerCall_##name, cls::Reliability_##name, cls::LowDelay_##name ); \ INetAtSyncItem * cls::Decode_##name( TSerialize ser, INetChannel * pChannel ) \ { \ Params_##name params; \ params.SerializeWith( ser ); \ return CRMIAtSyncItem::Create( params, id, m_info##name.pMethodInfo, &cls::Handle_##name, pChannel ); \ } \ ILINE bool cls::Handle_##name( const Params_##name& params, INetChannel* pNetChannel )
IGameObject.h
#define IMPLEMENT_RMI(cls, name) \ cls::MethodInfo_##name cls::m_info##name = cls::Helper_AddMessage( &cls::Decode_##name, "RMI:" #cls ":" #name, cls::Attach_##name, cls::ServerCall_##name, cls::Reliability_##name, cls::LowDelay_##name ); \ INetAtSyncItem * cls::Decode_##name( TSerialize ser, EntityId * pID, INetChannel* pChannel ) \ { \ CRY_ASSERT(pID); \ Params_##name params; \ params.SerializeWith( ser ); \ NetLogRMIReceived( params, pChannel ); \ return CRMIAtSyncItem::Create( params, *pID, m_info##name.pMethodInfo, &cls::Handle_##name, pChannel ); \ } \ ILINE bool cls::Handle_##name( const Params_##name& params, INetChannel* pNetChannel )
IGameObject.h