Macros used in CryAction Game.
#define BREAK_LOGGING 0
IGameFramework.h
Define to control the logging of breakability code
#define BreakLogAlways(...) ((void)0)
IGameFramework.h
#define CRY_SAVEGAME_FILE_EXT ".CSF"
IGame.h
#define CRY_SAVEGAME_FILENAME "CRYENGINE"
IGame.h
#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); \ }
IGameFramework.h
#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); \ }
IGameFramework.h
Generic factory creation
#define REGISTER_FACTORY(host, name, impl, isAI) \ (host)->RegisterFactory((name), (impl *)0, (isAI), (impl *)0) \
IGameFramework.h
This macro is used to register new game object extension classes.