Game_Macros

Macros used in CryAction Game.

BREAK_LOGGING Macro
C++
#define BREAK_LOGGING 0
File

IGameFramework.h

Description

Define to control the logging of breakability code

BreakLogAlways Macro
C++
#define BreakLogAlways(...) ((void)0)
File

IGameFramework.h

CRY_SAVEGAME_FILE_EXT Macro
C++
#define CRY_SAVEGAME_FILE_EXT ".CSF"
File

IGame.h

CRY_SAVEGAME_FILENAME Macro
C++
#define CRY_SAVEGAME_FILENAME "CRYENGINE"
File

IGame.h

DECLARE_GAMEOBJECT_FACTORY Macro
C++
#define DECLARE_GAMEOBJECT_FACTORY(impl) \
public:                                                                                                                                        \
    virtual void RegisterFactory(const char *name, impl *(*)(), bool isAI) = 0;                \
    template <class T> void RegisterFactory(const char *name, impl *, bool isAI, T *)    \
    {                                                                                                                                                \
        struct Factory                                                                                                                \
        {                                                                                                                                            \
            static impl *Create()                                                                                                \
            {                                                                                                                                        \
                return new T();                                                                                                        \
            }                                                                                                                                        \
        };                                                                                                                                        \
        RegisterFactory(name, Factory::Create, isAI);                                                                \
    }
File

IGameFramework.h

DECLARE_GAMEOBJECTEXTENSION_FACTORY Macro
C++
#define DECLARE_GAMEOBJECTEXTENSION_FACTORY(name) \
    struct I##name##Creator : public IGameObjectExtensionCreatorBase \
    { \
    }; \
    template <class T> \
    struct C##name##Creator : public I##name##Creator \
    { \
        IGameObjectExtensionPtr Create() \
        { \
            return ComponentCreate_DeleteWithRelease(); \
        } \
        void GetGameObjectExtensionRMIData( void ** ppRMI, size_t * nCount ) \
        { \
            T::GetGameObjectExtensionRMIData( ppRMI, nCount ); \
        } \
    }; \
    virtual void RegisterFactory(const char *name, I##name##Creator*, bool isAI) = 0; \
    template <class T> void RegisterFactory(const char *name, I##name *, bool isAI, T *) \
    { \
        static C##name##Creator creator; \
        RegisterFactory(name, &creator, isAI); \
    }
File

IGameFramework.h

REGISTER_FACTORY Macro

Generic factory creation

C++
#define REGISTER_FACTORY(host, name, impl, isAI) \
    (host)->RegisterFactory((name), (impl *)0, (isAI), (impl *)0)                                \
File

IGameFramework.h

Description

This macro is used to register new game object extension classes.