Macros used in system interfaces.
#define AllocateConstFloatCVar(scope,name) float scope:: name
ISystem.h
#define AllocateConstIntCVar(scope,name) int scope:: name
ISystem.h
#define ASSERT_CONSOLE_EXISTS 0
ISystem.h
#define CONST_CVAR_FLAGS (VF_NULL)
ISystem.h
if (defined(XENON) || defined(PS3))
#define CRY_ASYNC_MEMCPY_API extern "C"
ISystem.h
#define CRY_ASYNC_MEMCPY_DELEGATE_TO_CRYSYSTEM
ISystem.h
Complex delegation required because it is not really easy to export a external standalone symbol like a memcpy function when building with modules. Dll pay an extra indirection cost for calling this function.
#define CryFatalError printf
ISystem.h
#define CRYSYSTEM_API DLL_IMPORT
ISystem.h
#define CVARHELP(_comment) _comment
ISystem.h
#define DeclareConstFloatCVar(name) float name
ISystem.h
#define DeclareConstIntCVar(name, defaultValue) int name
ISystem.h
#define DeclareStaticConstFloatCVar(name) static float name
ISystem.h
#define DeclareStaticConstIntCVar(name, defaultValue) static int name
ISystem.h
#define DefineConstFloatCVar(name, flags, help) \ (gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register((#name), &name, name ## Default, flags|CONST_CVAR_FLAGS, CVARHELP(help), 0, false))
ISystem.h
#define DefineConstIntCVar(name, defaultValue, flags, help) \ (gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register((#name), &name, defaultValue, flags|CONST_CVAR_FLAGS, CVARHELP(help), 0, false))
ISystem.h
#define DefineConstIntCVar2(_name, _var, _def_val, _flags, help) \ (gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(_name, _var, (_def_val), (_flags)|CONST_CVAR_FLAGS, CVARHELP(help), 0, false))
ISystem.h
#define DefineConstIntCVar3(_name, _var, _def_val, _flags, help) \ (gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(_name, &(_var), (_def_val), (_flags)|CONST_CVAR_FLAGS, CVARHELP(help), 0, false))
ISystem.h
#define DefineConstIntCVarName(strname, name, defaultValue, flags, help) \ (gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(strname, &name, defaultValue, flags|CONST_CVAR_FLAGS, CVARHELP(help)))
ISystem.h
#define ILLEGAL_DEV_FLAGS (VF_NET_SYNCED | VF_CHEAT | VF_CHEAT_ALWAYS_CHECK | VF_CHEAT_NOCHECK | VF_READONLY | VF_CONST_CVAR)
ISystem.h
Development only cvars
N.B: (1) Registered as real cvars *in non release builds only*. (2) Can still be manipulated in release by the mapped variable, so not the same as const cvars. (3) Any 'OnChanged' callback will need guarding against in release builds since the cvar won't exist (4) Any code that tries to get ICVar* will need guarding against in release builds since the cvar won't exist
ILLEGAL_DEV_FLAGS is a mask of all those flags which make no sense in a _DEV_ONLY or _DEDI_ONLY cvar since the cvar potentially won't exist in a release build.
#define LOADING_TIME_PROFILE_SECTION
ISystem.h
#define LOADING_TIME_PROFILE_SECTION_NAMED(sectionName)
ISystem.h
#define PROC_3DENGINE 2
ISystem.h
#define PROC_MENU 1
ISystem.h
Preferred way to register a console command
#define REGISTER_COMMAND(_name,_func,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? (void)0 : gEnv->pConsole->AddCommand(_name,_func,(_flags), CVARHELP(_comment)))
ISystem.h
#define REGISTER_COMMAND_DEDI_ONLY(_name,_func,_flags,_comment) REGISTER_COMMAND_DEV_ONLY(_name,_func,((_flags) | VF_DEDI_ONLY),_comment)
ISystem.h
#define REGISTER_COMMAND_DEV_ONLY(_name,_func,_flags,_comment) REGISTER_COMMAND(_name,_func,((_flags) | VF_DEV_ONLY),_comment); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
Preferred way to register a CVar
#define REGISTER_CVAR(_var,_def_val,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register((#_var), &(_var), (_def_val), (_flags), CVARHELP(_comment)))
ISystem.h
Preferred way to register a CVar with a callback
#define REGISTER_CVAR_CB(_var,_def_val,_flags,_comment,_onchangefunction) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register((#_var), &(_var), (_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
ISystem.h
#define REGISTER_CVAR_CB_DEDI_ONLY(_var,_def_val,_flags,_comment,_onchangefunction) REGISTER_CVAR_CB_DEV_ONLY(_var,_def_val,((_flags) | VF_DEDI_ONLY),_comment,_onchangefunction)
ISystem.h
#define REGISTER_CVAR_CB_DEV_ONLY(_var,_def_val,_flags,_comment,_onchangefunction) REGISTER_CVAR_CB(_var,_def_val,((_flags) | VF_DEV_ONLY),_comment,_onchangefunction); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
#define REGISTER_CVAR_DEDI_ONLY(_var,_def_val,_flags,_comment) REGISTER_CVAR_DEV_ONLY(_var,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
ISystem.h
#define REGISTER_CVAR_DEV_ONLY(_var,_def_val,_flags,_comment) REGISTER_CVAR(_var,_def_val,((_flags) | VF_DEV_ONLY),_comment); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
Offers more flexibility but more code is required
#define REGISTER_CVAR2(_name,_var,_def_val,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(_name, _var, (_def_val), (_flags), CVARHELP(_comment)))
ISystem.h
Offers more flexibility but more code is required
#define REGISTER_CVAR2_CB(_name,_var,_def_val,_flags,_comment,_onchangefunction) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(_name, _var, (_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
ISystem.h
#define REGISTER_CVAR2_CB_DEDI_ONLY(_name,_var,_def_val,_flags,_comment,_onchangefunction) REGISTER_CVAR2_CB_DEV_ONLY(_name,_var,_def_val,((_flags) | VF_DEDI_ONLY),_comment,_onchangefunction)
ISystem.h
#define REGISTER_CVAR2_CB_DEV_ONLY(_name,_var,_def_val,_flags,_comment,_onchangefunction) REGISTER_CVAR2_CB(_name,_var,_def_val,((_flags) | VF_DEV_ONLY),_comment,_onchangefunction); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
#define REGISTER_CVAR2_DEDI_ONLY(_name,_var,_def_val,_flags,_comment) REGISTER_CVAR2_DEV_ONLY(_name,_var,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
ISystem.h
#define REGISTER_CVAR2_DEV_ONLY(_name,_var,_def_val,_flags,_comment) REGISTER_CVAR2(_name,_var,_def_val,((_flags) | VF_DEV_ONLY),_comment); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
Offers more flexibility but more code is required, explicit address taking of destination variable
#define REGISTER_CVAR3(_name,_var,_def_val,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(_name, &(_var), (_def_val), (_flags), CVARHELP(_comment)))
ISystem.h
Offers more flexibility but more code is required, explicit address taking of destination variable
#define REGISTER_CVAR3_CB(_name,_var,_def_val,_flags,_comment,_onchangefunction) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(_name, &(_var), (_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
ISystem.h
#define REGISTER_CVAR3_CB_DEDI_ONLY(_name,_var,_def_val,_flags,_comment,_onchangefunction) REGISTER_CVAR3_CB_DEV_ONLY(_name,_var,_def_val,((_flags) | VF_DEDI_ONLY),_comment,_onchangefunction)
ISystem.h
#define REGISTER_CVAR3_CB_DEV_ONLY(_name,_var,_def_val,_flags,_comment,_onchangefunction) REGISTER_CVAR3_CB(_name,_var,_def_val,((_flags) | VF_DEV_ONLY),_comment,_onchangefunction); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
#define REGISTER_CVAR3_DEDI_ONLY(_name,_var,_def_val,_flags,_comment) REGISTER_CVAR3_DEV_ONLY(_name,_var,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
ISystem.h
#define REGISTER_CVAR3_DEV_ONLY(_name,_var,_def_val,_flags,_comment) REGISTER_CVAR3(_name,_var,_def_val,((_flags) | VF_DEV_ONLY),_comment); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
Preferred way to register a float CVar
#define REGISTER_FLOAT(_name,_def_val,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterFloat(_name,(_def_val), (_flags), CVARHELP(_comment)))
ISystem.h
#define REGISTER_FLOAT_DEDI_ONLY(_name,_def_val,_flags,_comment) REGISTER_FLOAT_DEV_ONLY(_name,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
ISystem.h
#define REGISTER_FLOAT_DEV_ONLY(_name,_def_val,_flags,_comment) REGISTER_FLOAT(_name,_def_val,((_flags) | VF_DEV_ONLY),_comment); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
Preferred way to register an int CVar
#define REGISTER_INT(_name,_def_val,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterInt(_name,(_def_val), (_flags), CVARHELP(_comment)))
ISystem.h
Preferred way to register an int CVar with a callback
#define REGISTER_INT_CB(_name,_def_val,_flags,_comment,_onchangefunction) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterInt(_name,(_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
ISystem.h
#define REGISTER_INT_CB_DEDI_ONLY(_name,_def_val,_flags,_comment,_onchangefunction) REGISTER_INT_CB_DEV_ONLY(_name,_def_val,((_flags) | VF_DEDI_ONLY),_comment,_onchangefunction)
ISystem.h
#define REGISTER_INT_CB_DEV_ONLY(_name,_def_val,_flags,_comment,_onchangefunction) REGISTER_INT_CB(_name,_def_val,((_flags) | VF_DEV_ONLY),_comment,_onchangefunction); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
#define REGISTER_INT_DEDI_ONLY(_name,_def_val,_flags,_comment) REGISTER_INT_DEV_ONLY(_name,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
ISystem.h
#define REGISTER_INT_DEV_ONLY(_name,_def_val,_flags,_comment) REGISTER_INT(_name,_def_val,((_flags) | VF_DEV_ONLY),_comment); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
Preferred way to register an int64 CVar
#define REGISTER_INT64(_name,_def_val,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterInt64(_name,(_def_val), (_flags), CVARHELP(_comment)))
ISystem.h
#define REGISTER_INT64_DEDI_ONLY(_name,_def_val,_flags,_comment) REGISTER_INT64_DEV_ONLY(_name,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
ISystem.h
#define REGISTER_INT64_DEV_ONLY(_name,_def_val,_flags,_comment) REGISTER_INT64(_name,_def_val,((_flags) | VF_DEV_ONLY),_comment); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
Preferred way to register a string CVar
#define REGISTER_STRING(_name,_def_val,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterString(_name,(_def_val), (_flags), CVARHELP(_comment)))
ISystem.h
Preferred way to register a string CVar with a callback
#define REGISTER_STRING_CB(_name,_def_val,_flags,_comment,_onchangefunction) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterString(_name,(_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
ISystem.h
#define REGISTER_STRING_CB_DEDI_ONLY(_name,_def_val,_flags,_comment,_onchangefunction) REGISTER_STRING_CB_DEV_ONLY(_name,_def_val,((_flags) | VF_DEDI_ONLY),_comment,_onchangefunction)
ISystem.h
#define REGISTER_STRING_CB_DEV_ONLY(_name,_def_val,_flags,_comment,_onchangefunction) REGISTER_STRING_CB(_name,_def_val,((_flags) | VF_DEV_ONLY),_comment,_onchangefunction); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
#define REGISTER_STRING_DEDI_ONLY(_name,_def_val,_flags,_comment) REGISTER_STRING_DEV_ONLY(_name,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
ISystem.h
#define REGISTER_STRING_DEV_ONLY(_name,_def_val,_flags,_comment) REGISTER_STRING(_name,_def_val,((_flags) | VF_DEV_ONLY),_comment); COMPILE_TIME_ASSERT(((_flags) & ILLEGAL_DEV_FLAGS) == 0)
ISystem.h
ISystem.h
JAT - this is a very important function for the dedicated server - it lets us run >1000 players per piece of server hardware JAT - this saves us lots of money on the dedicated server hardware
#define USER_DATA_BONEHANDLER 5
ISystem.h
#define USER_DATA_LIGHT 4
ISystem.h
#define USER_DATA_OBJECT 3
ISystem.h
#define USER_DATA_POINTER 6
ISystem.h
IDs for script userdata typing.
#define USER_DATA_SOUND 1
ISystem.h
Maybe they should be moved into the game.dll .
#define USER_DATA_TEXTURE 2
ISystem.h
#define LOADING_TIME_PROFILE_SECTION_ARGS(args)
ISystem.h
#define LOADING_TIME_PROFILE_SECTION_NAMED_ARGS(sectionName, args)
ISystem.h
#define LOADING_TIME_PROFILE_SESSION_SECTION(sessionName)
ISystem.h
#define LOADING_TIME_PROFILE_SESSION_START(sessionName)
ISystem.h
#define LOADING_TIME_PROFILE_SESSION_STOP(sessionName)
ISystem.h