QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

Typed entity field access macros. More...

Macros

#define E_DSTRING(p, e, o)
 Access a dstring entity field. More...
 
#define E_FLOAT(e, o)
 Access a float entity field. More...
 
#define E_FUNCTION(e, o)
 Access a function entity field. More...
 
#define E_GSTRING(p, e, o)
 Access a string entity field, converting it to a C string. More...
 
#define E_INT(e, o)
 Access an integer entity field. More...
 
#define E_POINTER(e, o)
 Access a pointer entity field. More...
 
#define E_QUAT(e, o)
 Access a quaternion entity field. More...
 
#define E_STRING(e, o)
 Access a string index entity field. More...
 
#define E_UINT(e, o)
 Access an unsigned integer entity field. More...
 
#define E_var(e, o, t)   ((e)->v[o].t##_var)
 
#define E_VECTOR(e, o)
 Access a vector entity field. More...
 

Detailed Description

Typed entity field access macros.

No checking is done against the QC type, but the appropriate C type will be used.

Macro Definition Documentation

#define E_DSTRING (   p,
  e,
 
)

Access a dstring entity field.

Kills the program if the dstring is invalid.

QC type:
string
Parameters
ppointer to progs_t VM struct
epointer to the entity
ofield offset into entity data space
Returns
dstring_t * to the dstring
#define E_FLOAT (   e,
 
)

Access a float entity field.

Can be assigned to.

QC type:
float
Parameters
epointer to the entity
ofield offset into entity data space
Returns
float lvalue
#define E_FUNCTION (   e,
 
)

Access a function entity field.

Can be assigned to.

QC type:
void()
Parameters
epointer to the entity
ofield offset into entity data space
Returns
func_t lvalue
#define E_GSTRING (   p,
  e,
 
)

Access a string entity field, converting it to a C string.

Kills the program if the string is invalid.

QC type:
string
Parameters
ppointer to progs_t VM struct
epointer to the entity
ofield offset into entity data space
Returns
const char * to the string
#define E_INT (   e,
 
)

Access an integer entity field.

Can be assigned to.

QC type:
integer
Parameters
epointer to the entity
ofield offset into entity data space
Returns
int lvalue
#define E_POINTER (   e,
 
)

Access a pointer entity field.

Can be assigned to.

QC type:
void *
Parameters
epointer to the entity
ofield offset into entity data space
Returns
pointer_t lvalue
#define E_QUAT (   e,
 
)

Access a quaternion entity field.

Can be used any way a quat_t variable can.

QC type:
quaterion
Parameters
epointer to the entity
ofield offset into entity data space
Returns
quat_t lvalue
#define E_STRING (   e,
 
)

Access a string index entity field.

Can be assigned to.

QC type:
string
Parameters
epointer to the entity
ofield offset into entity data space
Returns
string_t lvalue
#define E_UINT (   e,
 
)

Access an unsigned integer entity field.

Can be assigned to.

QC type:
uinteger
Parameters
epointer to the entity
ofield offset into entity data space
Returns
unsigned int lvalue
#define E_var (   e,
  o,
 
)    ((e)->v[o].t##_var)
#define E_VECTOR (   e,
 
)

Access a vector entity field.

Can be used any way a vec3_t variable can.

QC type:
vector
Parameters
epointer to the entity
ofield offset into entity data space
Returns
vec3_t lvalue