Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
unsafe.qh File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _strid(s)
#define ARRAY_INDEX(T, arr, idx)
#define FTOI(f)
#define ITOF(i)
#define reinterpret_cast(T, it)
#define strid(s)
#define X(T)

Functions

 STATIC_INIT (INTEGER_ONE)
 X (bool) X(int) X(float) X(vector) X(entity) X(string) using rawfunc
 X (rawfunc) .int _unsafe_fld1

Variables

 _unsafe_fld2
int INTEGER_ONE

Macro Definition Documentation

◆ _strid

#define _strid ( s)
Value:
#define reinterpret_cast(T, it)
Definition unsafe.qh:3
#define ITOF(i)
Definition unsafe.qh:24

◆ ARRAY_INDEX

#define ARRAY_INDEX ( T,
arr,
idx )
Value:
(reinterpret_cast(T##_fld, reinterpret_cast(int, arr[0]) + FTOI(idx)))
#define FTOI(f)
Definition unsafe.qh:23

Definition at line 31 of file unsafe.qh.

◆ FTOI

#define FTOI ( f)
Value:
((f) * INTEGER_ONE)
int INTEGER_ONE
Definition unsafe.qh:21

Definition at line 23 of file unsafe.qh.

◆ ITOF

#define ITOF ( i)
Value:
((i) / INTEGER_ONE)

Definition at line 24 of file unsafe.qh.

◆ reinterpret_cast

#define reinterpret_cast ( T,
it )
Value:
_unsafe_cast_##T(0, it)

Definition at line 3 of file unsafe.qh.

Referenced by STATIC_INIT().

◆ strid

#define strid ( s)
Value:
stof(sprintf("%i", s))
float stof(string val,...)

◆ X

#define X ( T)
Value:
T _unsafe_cast_##T(int dummy, ...) { return ...(0, T); } \
USING(T##_fld, .T); T##_fld _unsafe_cast_##T##_fld(int dummy, ...) { return ...(0, T##_fld); }

Definition at line 4 of file unsafe.qh.

4#define X(T) \
5 T _unsafe_cast_##T(int dummy, ...) { return ...(0, T); } \
6 USING(T##_fld, .T); T##_fld _unsafe_cast_##T##_fld(int dummy, ...) { return ...(0, T##_fld); }

Function Documentation

◆ STATIC_INIT()

STATIC_INIT ( INTEGER_ONE )

Definition at line 26 of file unsafe.qh.

27{
28 INTEGER_ONE = reinterpret_cast(int, _unsafe_fld2) - reinterpret_cast(int, _unsafe_fld1);
29}
_unsafe_fld2
Definition unsafe.qh:20

References _unsafe_fld2, INTEGER_ONE, and reinterpret_cast.

◆ X() [1/2]

X ( bool )

References entity(), and vector.

◆ X() [2/2]

X ( rawfunc )

Variable Documentation

◆ _unsafe_fld2

_unsafe_fld2

Definition at line 20 of file unsafe.qh.

Referenced by STATIC_INIT().

◆ INTEGER_ONE

int INTEGER_ONE

Definition at line 21 of file unsafe.qh.

Referenced by STATIC_INIT().