System_Interface_Macros

Macros used in system interfaces.

AllocateConstFloatCVar Macro
C++
#define AllocateConstFloatCVar(scope,name) float scope:: name
File

ISystem.h

AllocateConstIntCVar Macro
C++
#define AllocateConstIntCVar(scope,name) int scope:: name
File

ISystem.h

ASSERT_CONSOLE_EXISTS Macro
C++
#define ASSERT_CONSOLE_EXISTS 0
File

ISystem.h

CONST_CVAR_FLAGS Macro
C++
#define CONST_CVAR_FLAGS (VF_NULL)
File

ISystem.h

Description

if (defined(XENON) || defined(PS3))

CRY_ASYNC_MEMCPY_API Macro
C++
#define CRY_ASYNC_MEMCPY_API extern "C"
File

ISystem.h

CRY_ASYNC_MEMCPY_DELEGATE_TO_CRYSYSTEM Macro
C++
#define CRY_ASYNC_MEMCPY_DELEGATE_TO_CRYSYSTEM 
File

ISystem.h

Description

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.

CryFatalError Macro
C++
#define CryFatalError printf
File

ISystem.h

CRYSYSTEM_API Macro
C++
#define CRYSYSTEM_API DLL_IMPORT
File

ISystem.h

CVARHELP Macro
C++
#define CVARHELP(_comment) _comment
File

ISystem.h

DeclareConstFloatCVar Macro
C++
#define DeclareConstFloatCVar(name) float name
File

ISystem.h

DeclareConstIntCVar Macro
C++
#define DeclareConstIntCVar(name, defaultValue) int name
File

ISystem.h

DeclareStaticConstFloatCVar Macro
C++
#define DeclareStaticConstFloatCVar(name) static float name
File

ISystem.h

DeclareStaticConstIntCVar Macro
C++
#define DeclareStaticConstIntCVar(name, defaultValue) static int name
File

ISystem.h

DefineConstFloatCVar Macro
C++
#define DefineConstFloatCVar(name, flags, help) \
        (gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register((#name), &name, name ## Default, flags|CONST_CVAR_FLAGS, CVARHELP(help), 0, false))
File

ISystem.h

DefineConstIntCVar Macro
C++
#define DefineConstIntCVar(name, defaultValue, flags, help) \
        (gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register((#name), &name, defaultValue, flags|CONST_CVAR_FLAGS, CVARHELP(help), 0, false))
File

ISystem.h

DefineConstIntCVar2 Macro
C++
#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))
File

ISystem.h

DefineConstIntCVar3 Macro
C++
#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))
File

ISystem.h

DefineConstIntCVarName Macro
C++
#define DefineConstIntCVarName(strname, name, defaultValue, flags, help) \
        (gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(strname, &name, defaultValue, flags|CONST_CVAR_FLAGS, CVARHELP(help)))
File

ISystem.h

ILLEGAL_DEV_FLAGS Macro
C++
#define ILLEGAL_DEV_FLAGS (VF_NET_SYNCED | VF_CHEAT | VF_CHEAT_ALWAYS_CHECK | VF_CHEAT_NOCHECK | VF_READONLY | VF_CONST_CVAR)
File

ISystem.h

Description

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.

LOADING_TIME_PROFILE_SECTION Macro
C++
#define LOADING_TIME_PROFILE_SECTION 
File

ISystem.h

LOADING_TIME_PROFILE_SECTION_NAMED Macro
C++
#define LOADING_TIME_PROFILE_SECTION_NAMED(sectionName) 
File

ISystem.h

PROC_3DENGINE Macro
C++
#define PROC_3DENGINE 2
File

ISystem.h

PROC_MENU Macro
C++
#define PROC_MENU 1
File

ISystem.h

REGISTER_COMMAND Macro

Preferred way to register a console command

C++
#define REGISTER_COMMAND(_name,_func,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? (void)0 : gEnv->pConsole->AddCommand(_name,_func,(_flags), CVARHELP(_comment)))
File

ISystem.h

REGISTER_COMMAND_DEDI_ONLY Macro
C++
#define REGISTER_COMMAND_DEDI_ONLY(_name,_func,_flags,_comment) REGISTER_COMMAND_DEV_ONLY(_name,_func,((_flags) | VF_DEDI_ONLY),_comment)
File

ISystem.h

REGISTER_COMMAND_DEV_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_CVAR Macro

Preferred way to register a CVar

C++
#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)))
File

ISystem.h

REGISTER_CVAR_CB Macro

Preferred way to register a CVar with a callback

C++
#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))
File

ISystem.h

REGISTER_CVAR_CB_DEDI_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_CVAR_CB_DEV_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_CVAR_DEDI_ONLY Macro
C++
#define REGISTER_CVAR_DEDI_ONLY(_var,_def_val,_flags,_comment) REGISTER_CVAR_DEV_ONLY(_var,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
File

ISystem.h

REGISTER_CVAR_DEV_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_CVAR2 Macro

Offers more flexibility but more code is required

C++
#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)))
File

ISystem.h

REGISTER_CVAR2_CB Macro

Offers more flexibility but more code is required

C++
#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))
File

ISystem.h

REGISTER_CVAR2_CB_DEDI_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_CVAR2_CB_DEV_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_CVAR2_DEDI_ONLY Macro
C++
#define REGISTER_CVAR2_DEDI_ONLY(_name,_var,_def_val,_flags,_comment) REGISTER_CVAR2_DEV_ONLY(_name,_var,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
File

ISystem.h

REGISTER_CVAR2_DEV_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_CVAR3 Macro

Offers more flexibility but more code is required, explicit address taking of destination variable

C++
#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)))
File

ISystem.h

REGISTER_CVAR3_CB Macro

Offers more flexibility but more code is required, explicit address taking of destination variable

C++
#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))
File

ISystem.h

REGISTER_CVAR3_CB_DEDI_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_CVAR3_CB_DEV_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_CVAR3_DEDI_ONLY Macro
C++
#define REGISTER_CVAR3_DEDI_ONLY(_name,_var,_def_val,_flags,_comment) REGISTER_CVAR3_DEV_ONLY(_name,_var,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
File

ISystem.h

REGISTER_CVAR3_DEV_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_FLOAT Macro

Preferred way to register a float CVar

C++
#define REGISTER_FLOAT(_name,_def_val,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterFloat(_name,(_def_val), (_flags), CVARHELP(_comment)))
File

ISystem.h

REGISTER_FLOAT_DEDI_ONLY Macro
C++
#define REGISTER_FLOAT_DEDI_ONLY(_name,_def_val,_flags,_comment) REGISTER_FLOAT_DEV_ONLY(_name,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
File

ISystem.h

REGISTER_FLOAT_DEV_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_INT Macro

Preferred way to register an int CVar

C++
#define REGISTER_INT(_name,_def_val,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterInt(_name,(_def_val), (_flags), CVARHELP(_comment)))
File

ISystem.h

REGISTER_INT_CB Macro

Preferred way to register an int CVar with a callback

C++
#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))
File

ISystem.h

REGISTER_INT_CB_DEDI_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_INT_CB_DEV_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_INT_DEDI_ONLY Macro
C++
#define REGISTER_INT_DEDI_ONLY(_name,_def_val,_flags,_comment) REGISTER_INT_DEV_ONLY(_name,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
File

ISystem.h

REGISTER_INT_DEV_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_INT64 Macro

Preferred way to register an int64 CVar

C++
#define REGISTER_INT64(_name,_def_val,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterInt64(_name,(_def_val), (_flags), CVARHELP(_comment)))
File

ISystem.h

REGISTER_INT64_DEDI_ONLY Macro
C++
#define REGISTER_INT64_DEDI_ONLY(_name,_def_val,_flags,_comment) REGISTER_INT64_DEV_ONLY(_name,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
File

ISystem.h

REGISTER_INT64_DEV_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_STRING Macro

Preferred way to register a string CVar

C++
#define REGISTER_STRING(_name,_def_val,_flags,_comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterString(_name,(_def_val), (_flags), CVARHELP(_comment)))
File

ISystem.h

REGISTER_STRING_CB Macro

Preferred way to register a string CVar with a callback

C++
#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))
File

ISystem.h

REGISTER_STRING_CB_DEDI_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_STRING_CB_DEV_ONLY Macro
C++
#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)
File

ISystem.h

REGISTER_STRING_DEDI_ONLY Macro
C++
#define REGISTER_STRING_DEDI_ONLY(_name,_def_val,_flags,_comment) REGISTER_STRING_DEV_ONLY(_name,_def_val,((_flags) | VF_DEDI_ONLY),_comment)
File

ISystem.h

REGISTER_STRING_DEV_ONLY Macro
C++
#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)
File

ISystem.h

SYNCHRONOUS_LOADING_TICK Macro
C++
#define SYNCHRONOUS_LOADING_TICK do { if (gEnv && gEnv->pSystem) gEnv->pSystem->SynchronousLoadingTick( __FUNC__, __LINE__ ); } while(0)
File

ISystem.h

Description

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

USER_DATA_BONEHANDLER Macro
C++
#define USER_DATA_BONEHANDLER 5
File

ISystem.h

USER_DATA_LIGHT Macro
C++
#define USER_DATA_LIGHT 4
File

ISystem.h

USER_DATA_OBJECT Macro
C++
#define USER_DATA_OBJECT 3
File

ISystem.h

USER_DATA_POINTER Macro
C++
#define USER_DATA_POINTER 6
File

ISystem.h

USER_DATA_SOUND Macro

IDs for script userdata typing.

C++
#define USER_DATA_SOUND 1
File

ISystem.h

Remarks

Maybe they should be moved into the game.dll .

USER_DATA_TEXTURE Macro
C++
#define USER_DATA_TEXTURE 2
File

ISystem.h

LOADING_TIME_PROFILE_SECTION_ARGS Macro
C++
#define LOADING_TIME_PROFILE_SECTION_ARGS(args) 
File

ISystem.h

LOADING_TIME_PROFILE_SECTION_NAMED_ARGS Macro
C++
#define LOADING_TIME_PROFILE_SECTION_NAMED_ARGS(sectionName, args) 
File

ISystem.h

LOADING_TIME_PROFILE_SESSION_SECTION Macro
C++
#define LOADING_TIME_PROFILE_SESSION_SECTION(sessionName) 
File

ISystem.h

LOADING_TIME_PROFILE_SESSION_START Macro
C++
#define LOADING_TIME_PROFILE_SESSION_START(sessionName) 
File

ISystem.h

LOADING_TIME_PROFILE_SESSION_STOP Macro
C++
#define LOADING_TIME_PROFILE_SESSION_STOP(sessionName) 
File

ISystem.h