Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
deglobalization.qh File Reference
#include "lib/accumulate.qh"
#include "lib/float.qh"
#include "lib/log.qh"
#include "lib/misc.qh"
#include "lib/static.qh"
#include "lib/vector.qh"
Include dependency graph for deglobalization.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ADD_DYNAMIC_LIGHT(org, radius, lightcolours, forward, right, up)
#define ADD_DYNAMIC_LIGHT2(org, radius, lightcolours, style, cubemapname, pflags, forward, right, up)
#define adddynamiclight(org, radius, lightcolours)
#define adddynamiclight2(org, radius, lightcolours, style, cubemapname, pflags)
#define CLEAR_V_GLOBALS()
#define DEGLOB_CLEAR   1
#define DEGLOB_LOG(kind, name, ...)
#define DEGLOB_LOGGING   1
#define GET_TAG_INFO(ent, tagindex, forward, right, up, origin)
 Note that this only avoids the v_* globals, not the gettaginfo_* ones.
#define GET_V_GLOBALS(forward, right, up)
#define gettaginfo(ent, tagindex)
#define MAKE_VECTORS(angles, forward, right, up)
 Same as the makevectors builtin but uses the provided locals instead of the v_* globals.
#define makevectors(angles)
#define SET_V_GLOBALS(forward, right, up)
#define SKEL_GET_BONE_ABS(skel, bonenum, forward, right, up, origin)
 Returns all 4 vectors by assigning to them (instead of returning a value) for consistency (and sanity).
#define skel_get_boneabs(skel, bonenum)
#define SKEL_SET_BONE(skel, bonenum, org, forward, right, up)
#define skel_set_bone(skel, bonenum, org)
#define VECTOR_VECTORS(forward_in, forward, right, up)

Functions

void deglob_log (int kind, string name, string file, int line, string func, string more_text)

Variables

const int DEGLOB_ORIGINAL = 1
const int DEGLOB_WRAPPED = 2

Macro Definition Documentation

◆ ADD_DYNAMIC_LIGHT

#define ADD_DYNAMIC_LIGHT ( org,
radius,
lightcolours,
forward,
right,
up )
Value:
MACRO_BEGIN \
DEGLOB_LOG(DEGLOB_WRAPPED, "ADD_DYNAMIC_LIGHT", #org, #radius, #lightcolours); \
SET_V_GLOBALS(forward, right, up); \
_adddynamiclight_hidden(org, radius, lightcolours); \
CLEAR_V_GLOBALS(); \
float radius
Definition impulse.qh:11
const int DEGLOB_WRAPPED
#define MACRO_END
Definition macro.qh:7
vector org
Definition self.qh:96

Definition at line 107 of file deglobalization.qh.

107#define ADD_DYNAMIC_LIGHT(org, radius, lightcolours, forward, right, up) MACRO_BEGIN \
108 DEGLOB_LOG(DEGLOB_WRAPPED, "ADD_DYNAMIC_LIGHT", #org, #radius, #lightcolours); \
109 SET_V_GLOBALS(forward, right, up); \
110 _adddynamiclight_hidden(org, radius, lightcolours); \
111 CLEAR_V_GLOBALS(); \
112MACRO_END

◆ ADD_DYNAMIC_LIGHT2

#define ADD_DYNAMIC_LIGHT2 ( org,
radius,
lightcolours,
style,
cubemapname,
pflags,
forward,
right,
up )
Value:
MACRO_BEGIN \
DEGLOB_LOG(DEGLOB_WRAPPED, "ADD_DYNAMIC_LIGHT2", #org, #radius, #lightcolours, #style, #cubemapname, #pflags); \
SET_V_GLOBALS(forward, right, up); \
_adddynamiclight2_hidden(org, radius, lightcolours, style, cubemapname, pflags); \
CLEAR_V_GLOBALS(); \
float style
float pflags

Definition at line 114 of file deglobalization.qh.

114#define ADD_DYNAMIC_LIGHT2(org, radius, lightcolours, style, cubemapname, pflags, forward, right, up) MACRO_BEGIN \
115 DEGLOB_LOG(DEGLOB_WRAPPED, "ADD_DYNAMIC_LIGHT2", #org, #radius, #lightcolours, #style, #cubemapname, #pflags); \
116 SET_V_GLOBALS(forward, right, up); \
117 _adddynamiclight2_hidden(org, radius, lightcolours, style, cubemapname, pflags); \
118 CLEAR_V_GLOBALS(); \
119MACRO_END

◆ adddynamiclight

#define adddynamiclight ( org,
radius,
lightcolours )
Value:
MACRO_BEGIN \
DEGLOB_LOG(DEGLOB_ORIGINAL, "adddynamiclight", #org, #radius, #lightcolours); \
_adddynamiclight_hidden(org, radius, lightcolours); \
const int DEGLOB_ORIGINAL

Definition at line 155 of file deglobalization.qh.

155#define adddynamiclight(org, radius, lightcolours) MACRO_BEGIN \
156 DEGLOB_LOG(DEGLOB_ORIGINAL, "adddynamiclight", #org, #radius, #lightcolours); \
157 _adddynamiclight_hidden(org, radius, lightcolours); \
158MACRO_END

◆ adddynamiclight2

#define adddynamiclight2 ( org,
radius,
lightcolours,
style,
cubemapname,
pflags )
Value:
MACRO_BEGIN \
DEGLOB_LOG(DEGLOB_ORIGINAL, "adddynamiclight2", #org, #radius, #lightcolours, #style, #cubemapname, #pflags); \
_adddynamiclight2_hidden(org, radius, lightcolours, style, cubemapname, pflags); \

Definition at line 161 of file deglobalization.qh.

161#define adddynamiclight2(org, radius, lightcolours, style, cubemapname, pflags) MACRO_BEGIN \
162 DEGLOB_LOG(DEGLOB_ORIGINAL, "adddynamiclight2", #org, #radius, #lightcolours, #style, #cubemapname, #pflags); \
163 _adddynamiclight2_hidden(org, radius, lightcolours, style, cubemapname, pflags); \
164MACRO_END

◆ CLEAR_V_GLOBALS

#define CLEAR_V_GLOBALS ( )

Definition at line 79 of file deglobalization.qh.

◆ DEGLOB_CLEAR

#define DEGLOB_CLEAR   1

Definition at line 38 of file deglobalization.qh.

◆ DEGLOB_LOG

#define DEGLOB_LOG ( kind,
name,
... )

Definition at line 56 of file deglobalization.qh.

◆ DEGLOB_LOGGING

#define DEGLOB_LOGGING   1

Definition at line 37 of file deglobalization.qh.

◆ GET_TAG_INFO

#define GET_TAG_INFO ( ent,
tagindex,
forward,
right,
up,
origin )
Value:
MACRO_BEGIN \
DEGLOB_LOG(DEGLOB_WRAPPED, "GET_TAG_INFO", #ent, #tagindex); \
origin = _gettaginfo_hidden(ent, tagindex); \
GET_V_GLOBALS(forward, right, up); \
CLEAR_V_GLOBALS(); \
vector origin

Note that this only avoids the v_* globals, not the gettaginfo_* ones.

Definition at line 129 of file deglobalization.qh.

129#define GET_TAG_INFO(ent, tagindex, forward, right, up, origin) MACRO_BEGIN \
130 DEGLOB_LOG(DEGLOB_WRAPPED, "GET_TAG_INFO", #ent, #tagindex); \
131 origin = _gettaginfo_hidden(ent, tagindex); \
132 GET_V_GLOBALS(forward, right, up); \
133 CLEAR_V_GLOBALS(); \
134MACRO_END

◆ GET_V_GLOBALS

#define GET_V_GLOBALS ( forward,
right,
up )
Value:
MACRO_BEGIN forward = v_forward; right = v_right; up = v_up; MACRO_END
vector v_up
vector v_right
vector v_forward
#define MACRO_BEGIN
Definition macro.qh:6

Definition at line 61 of file deglobalization.qh.

◆ gettaginfo

#define gettaginfo ( ent,
tagindex )
Value:
( \
deglob_log(DEGLOB_ORIGINAL, "gettaginfo", __FILE__, __LINE__, __FUNC__, #ent ", " #tagindex), \
_gettaginfo_hidden(ent, tagindex) \
)

Definition at line 167 of file deglobalization.qh.

167#define gettaginfo(ent, tagindex) ( \
168 deglob_log(DEGLOB_ORIGINAL, "gettaginfo", __FILE__, __LINE__, __FUNC__, #ent ", " #tagindex), \
169 _gettaginfo_hidden(ent, tagindex) \
170)

◆ MAKE_VECTORS

#define MAKE_VECTORS ( angles,
forward,
right,
up )
Value:
MACRO_BEGIN \
DEGLOB_LOG(DEGLOB_WRAPPED, "MAKE_VECTORS", #angles); \
_makevectors_hidden(angles); \
GET_V_GLOBALS(forward, right, up); \
CLEAR_V_GLOBALS(); \
ent angles
Definition ent_cs.qc:146

Same as the makevectors builtin but uses the provided locals instead of the v_* globals.

Always use this instead of raw makevectors to make the data flow clear. Note that you might prefer FIXED_MAKE_VECTORS for new code.

Definition at line 85 of file deglobalization.qh.

85#define MAKE_VECTORS(angles, forward, right, up) MACRO_BEGIN \
86 DEGLOB_LOG(DEGLOB_WRAPPED, "MAKE_VECTORS", #angles); \
87 _makevectors_hidden(angles); \
88 GET_V_GLOBALS(forward, right, up); \
89 CLEAR_V_GLOBALS(); \
90MACRO_END

Referenced by _Movetype_PushMove(), calc_followmodel_ofs(), CSQC_UpdateView(), DamageText::DamageText_draw2d(), Draw_ArcBeam(), draw_teamradar_player(), GetCurrentFov(), PlayerTouchWall(), PM_dodging(), PM_dodging_checkpressedkeys(), relocate_spawnpoint(), sys_phys_simulate(), View_EventChase(), W_WeaponFrame(), WarpZone_InitStep_UpdateTransform(), and WarpZoneLib_ExactTrigger_Init().

◆ makevectors

#define makevectors ( angles)
Value:
MACRO_BEGIN \
DEGLOB_LOG(DEGLOB_ORIGINAL, "makevectors", #angles); \
_makevectors_hidden(angles); \

Definition at line 137 of file deglobalization.qh.

137#define makevectors(angles) MACRO_BEGIN \
138 DEGLOB_LOG(DEGLOB_ORIGINAL, "makevectors", #angles); \
139 _makevectors_hidden(angles); \
140MACRO_END

◆ SET_V_GLOBALS

#define SET_V_GLOBALS ( forward,
right,
up )
Value:
MACRO_BEGIN v_forward = forward; v_right = right; v_up = up; MACRO_END

Definition at line 62 of file deglobalization.qh.

◆ SKEL_GET_BONE_ABS

#define SKEL_GET_BONE_ABS ( skel,
bonenum,
forward,
right,
up,
origin )
Value:
MACRO_BEGIN \
DEGLOB_LOG(DEGLOB_WRAPPED, "SKEL_GET_BONE_ABS", #skel, #bonenum); \
origin = _skel_get_boneabs_hidden(skel, bonenum) \
GET_V_GLOBALS(forward, right, up); \
CLEAR_V_GLOBALS(); \

Returns all 4 vectors by assigning to them (instead of returning a value) for consistency (and sanity).

Definition at line 93 of file deglobalization.qh.

93#define SKEL_GET_BONE_ABS(skel, bonenum, forward, right, up, origin) MACRO_BEGIN \
94 DEGLOB_LOG(DEGLOB_WRAPPED, "SKEL_GET_BONE_ABS", #skel, #bonenum); \
95 origin = _skel_get_boneabs_hidden(skel, bonenum) \
96 GET_V_GLOBALS(forward, right, up); \
97 CLEAR_V_GLOBALS(); \
98MACRO_END

◆ skel_get_boneabs

#define skel_get_boneabs ( skel,
bonenum )
Value:
( \
deglob_log(DEGLOB_ORIGINAL, "skel_get_boneabs", __FILE__, __LINE__, __FUNC__, #skel ", " #bonenum), \
_skel_get_boneabs_hidden(skel, bonenum) \
)

Definition at line 143 of file deglobalization.qh.

143#define skel_get_boneabs(skel, bonenum) ( \
144 deglob_log(DEGLOB_ORIGINAL, "skel_get_boneabs", __FILE__, __LINE__, __FUNC__, #skel ", " #bonenum), \
145 _skel_get_boneabs_hidden(skel, bonenum) \
146)

◆ SKEL_SET_BONE

#define SKEL_SET_BONE ( skel,
bonenum,
org,
forward,
right,
up )
Value:
MACRO_BEGIN \
DEGLOB_LOG(DEGLOB_WRAPPED, "SKEL_SET_BONE", #skel, #bonenum, #org); \
SET_V_GLOBALS(forward, right, up); \
_skel_set_bone_hidden(skel, bonenum, org); \
CLEAR_V_GLOBALS(); \

Definition at line 100 of file deglobalization.qh.

100#define SKEL_SET_BONE(skel, bonenum, org, forward, right, up) MACRO_BEGIN \
101 DEGLOB_LOG(DEGLOB_WRAPPED, "SKEL_SET_BONE", #skel, #bonenum, #org); \
102 SET_V_GLOBALS(forward, right, up); \
103 _skel_set_bone_hidden(skel, bonenum, org); \
104 CLEAR_V_GLOBALS(); \
105MACRO_END

◆ skel_set_bone

#define skel_set_bone ( skel,
bonenum,
org )
Value:
MACRO_BEGIN \
DEGLOB_LOG(DEGLOB_ORIGINAL, "skel_set_bone", #skel, #bonenum, #org); \
_skel_set_bone_hidden(skel, bonenum, org); \

Definition at line 149 of file deglobalization.qh.

149#define skel_set_bone(skel, bonenum, org) MACRO_BEGIN \
150 DEGLOB_LOG(DEGLOB_ORIGINAL, "skel_set_bone", #skel, #bonenum, #org); \
151 _skel_set_bone_hidden(skel, bonenum, org); \
152MACRO_END

◆ VECTOR_VECTORS

#define VECTOR_VECTORS ( forward_in,
forward,
right,
up )
Value:
MACRO_BEGIN \
DEGLOB_LOG(DEGLOB_WRAPPED, "VECTOR_VECTORS", #forward_in); \
_vectorvectors_hidden(forward_in); \
GET_V_GLOBALS(forward, right, up); \
CLEAR_V_GLOBALS(); \

Definition at line 121 of file deglobalization.qh.

121#define VECTOR_VECTORS(forward_in, forward, right, up) MACRO_BEGIN \
122 DEGLOB_LOG(DEGLOB_WRAPPED, "VECTOR_VECTORS", #forward_in); \
123 _vectorvectors_hidden(forward_in); \
124 GET_V_GLOBALS(forward, right, up); \
125 CLEAR_V_GLOBALS(); \
126MACRO_END

Function Documentation

◆ deglob_log()

void deglob_log ( int kind,
string name,
string file,
int line,
string func,
string more_text )

Definition at line 57 of file deglobalization.qh.

57{}

References name.

Variable Documentation

◆ DEGLOB_ORIGINAL

const int DEGLOB_ORIGINAL = 1

Definition at line 40 of file deglobalization.qh.

◆ DEGLOB_WRAPPED

const int DEGLOB_WRAPPED = 2

Definition at line 41 of file deglobalization.qh.