]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
wrap the remaining globaals that i know how
authorMartin Taibr <taibr.martin@gmail.com>
Wed, 14 Nov 2018 13:39:31 +0000 (14:39 +0100)
committerMartin Taibr <taibr.martin@gmail.com>
Wed, 14 Nov 2018 13:39:31 +0000 (14:39 +0100)
qcsrc/dpdefs/csprogsdefs.qh
qcsrc/dpdefs/progsdefs.qh
qcsrc/lib/deglobalization.qh

index 0bd5c328ee2a48afea3f46a8a8834de46463bb8a..9453157f7000591bf273c07ed20aff7438404636 100644 (file)
@@ -49,6 +49,8 @@
 void(vector ang) _makevectors_hidden = #1;
 //#define makevectors DO_NOT_USE_GLOBALS_PREFER_MAKE_VECTORS_MACRO_INSTEAD
 
+#define makestatic DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+
 #define skel_get_bonerel DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
 
 vector(float skel, float bonenum) _skel_get_boneabs_hidden = #270;
@@ -61,6 +63,10 @@ void(float skel, float bonenum, vector org) _skel_set_bone_hidden = #271;
 
 #define skel_mul_bones DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
 
+void(vector org, float radius, vector lightcolours) _adddynamiclight_hidden = #305;
+//#define adddynamiclight DO_NOT_USE_GLOBALS_PREFER_ADD_DYNAMIC_LIGHT_MACRO_INSTEAD
+#define adddynamiclight2 DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+
 void(vector dir) _vectorvectors_hidden = #432;
 #define vectorvectors DO_NOT_USE_GLOBALS_PREFER_VECTOR_VECTORS_MACRO_INSTEAD
 
index 51f687a6a0d7564fdd0c64a701834f3ea7037ad3..a8d8a4a486a0824cb200182a176ebf856762f8ed 100644 (file)
@@ -36,3 +36,5 @@ void(vector ang) _makevectors_hidden = #1;
 //#define makevectors DO_NOT_USE_GLOBALS_PREFER_MAKE_VECTORS_MACRO_INSTEAD
 
 #define aim DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+
+#define makestatic DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
index 42c6f760ec235e156a5b43b81c562394c1c85574..5f5651064a84acd33da189e7b31722ea6da7f31e 100644 (file)
@@ -12,8 +12,6 @@
 //    - however RF_USEAXIS is only used if MF_ROTATE is used which is only set in one place
 //  - e.camera_transform / CL_VM_TransformView (in engine
 //    - this is the only used function that both sets and gets the globals (aim does too but isn't used in our code)
-//  - adddynamiclight
-//  - makestatic
 
 #define NEW_VECS(...) EVAL(OVERLOAD(NEW_VECS, __VA_ARGS__))
 #define NEW_VECS_3(forward, right, up) vector forward = '0 0 0'; vector right = '0 0 0'; vector up = '0 0 0';
@@ -72,6 +70,12 @@ STATIC_INIT(globals) {
        CLEAR_V_GLOBALS(); \
 } MACRO_END
 
+#define ADD_DYNAMIC_LIGHT(org, radius, lightcolours, forward, right, up) MACRO_BEGIN { \
+       SET_V_GLOBALS(forward, right, up); \
+       _adddynamiclight_hidden(org, radius, lightcolours); \
+       CLEAR_V_GLOBALS(); \
+} MACRO_END
+
 #define VECTOR_VECTORS(forward_in, forward, right, up) MACRO_BEGIN { \
        _vectorvectors_hidden(forward_in); \
        GET_V_GLOBALS(forward, right, up); \