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

Macros for accessing data in the QFO address space. More...

Macros

#define QFO_FLOAT(q, s, o)
 Access a float variable in the object file. More...
 
#define QFO_FUNCTION(q, s, o)
 Access a function variable in the object file. More...
 
#define QFO_GETSTR(q, s)
 Retrieve a string from the object file, converting it to a C string. More...
 
#define QFO_GSTRING(q, s, o)
 Access a string global, converting it to a C string. More...
 
#define QFO_INT(q, s, o)
 Access a integer variable in the object file. More...
 
#define QFO_POINTER(q, s, t, o)
 Access a block of memory in the object file as a C struct. More...
 
#define QFO_STATEMENT(q, s)   ((q)->spaces[qfo_code_space].d.code + (s))
 
#define QFO_STRING(q, s, o)
 Access a string index variable in the object file. More...
 
#define QFO_STRUCT(q, s, t, o)
 Access a structure variable in the object file. More...
 
#define QFO_TYPE(q, t)
 
#define QFO_TYPEMETA(q, t)   QFO_INT (q, qfo_type_space, (t) + 0)
 
#define QFO_TYPESTR(q, t)
 Retrieve a type string from the object file, converting it to a C string. More...
 
#define QFO_TYPETYPE(q, t)   QFO_INT (q, qfo_type_space, (t) + 3)
 
#define QFO_var(q, s, t, o)   ((q)->spaces[s].d.data[o].t##_var)
 
#define QFO_VECTOR(q, s, o)
 Access a vector variable in the object file. More...
 

Detailed Description

Macros for accessing data in the QFO address space.

Macro Definition Documentation

#define QFO_FLOAT (   q,
  s,
 
)

Access a float variable in the object file.

Can be assigned to.

QC type:
float
Parameters
qpointer to qfo_t struct
sspace index
ooffset into object file data space
Returns
float lvalue
#define QFO_FUNCTION (   q,
  s,
 
)

Access a function variable in the object file.

Can be assigned to.

QC type:
void ()
Parameters
qpointer to qfo_t struct
sspace index
ooffset into object file data space
Returns
func_t lvalue
#define QFO_GETSTR (   q,
 
)

Retrieve a string from the object file, converting it to a C string.

Parameters
qpointer to qfo_t struct
sspace index
soffset into object file string space
Returns
(char *)
#define QFO_GSTRING (   q,
  s,
 
)

Access a string global, converting it to a C string.

Parameters
qpointer to qfo_t struct
sspace index
ooffset into object file data space
Returns
(char *)
#define QFO_INT (   q,
  s,
 
)

Access a integer variable in the object file.

Can be assigned to.

QC type:
integer
Parameters
qpointer to qfo_t struct
sspace index
ooffset into object file data space
Returns
int lvalue
#define QFO_POINTER (   q,
  s,
  t,
 
)

Access a block of memory in the object file as a C struct.

QC type:
void []
Parameters
qpointer to qfo_t struct
sspace index
tC type of the structure
ooffset into object file data space
Returns
C pointer to the struct at space:offset
#define QFO_STATEMENT (   q,
 
)    ((q)->spaces[qfo_code_space].d.code + (s))
#define QFO_STRING (   q,
  s,
 
)

Access a string index variable in the object file.

Can be assigned to.

QC type:
string
Parameters
qpointer to qfo_t struct
sspace index
ooffset into object file data space
Returns
string_t lvalue
#define QFO_STRUCT (   q,
  s,
  t,
 
)

Access a structure variable in the object file.

Can be assigned to.

QC type:
void [](?)
Parameters
qpointer to qfo_t struct
sspace index
tC type of the structure
ooffset into object file data space
Returns
structure lvalue. use & to make a pointer of the appropriate type.
#define QFO_TYPE (   q,
 
)
Value:
((qfot_type_t *) (char *) \
((q)->spaces[qfo_type_space].d.data + (t)))
Definition: obj_file.h:285
QFO type encoding.
Definition: obj_type.h:88
#define QFO_TYPEMETA (   q,
 
)    QFO_INT (q, qfo_type_space, (t) + 0)
#define QFO_TYPESTR (   q,
 
)

Retrieve a type string from the object file, converting it to a C string.

Parameters
qpointer to qfo_t struct
toffset to type encoding
Returns
(char *)
Note
Assumes standard space order.
#define QFO_TYPETYPE (   q,
 
)    QFO_INT (q, qfo_type_space, (t) + 3)
#define QFO_var (   q,
  s,
  t,
 
)    ((q)->spaces[s].d.data[o].t##_var)
#define QFO_VECTOR (   q,
  s,
 
)

Access a vector variable in the object file.

Can be assigned to.

QC type:
vector
Parameters
qpointer to qfo_t struct
sspace index
ooffset into object file data space
Returns
vec3_t lvalue