X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Futil.qh;h=3a4dff798c83c9f947f702950bf9e85feb5b6d5c;hb=1b130c7ceb9f035ba250a879967d8356552bb914;hp=ad612f954f459ca0aaba9e2e553dbd72b8293122;hpb=5e8c7dbbd884ca0650d1e241f1a2af560c17ca2d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index ad612f954..3a4dff798 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -1,3 +1,8 @@ +#define WANT_CONST +// commonly used, but better make them macros +#define TRUE 1 +#define FALSE 0 + // a dummy macro that prevents the "hanging ;" warning #define ENDS_WITH_CURLY_BRACE @@ -151,7 +156,7 @@ float almost_in_bounds(float a, float b, float c); float power2of(float e); float log2of(float x); -string HEXDIGITS = "0123456789ABCDEF0123456789abcdef"; +const string HEXDIGITS = "0123456789ABCDEF0123456789abcdef"; #define HEXDIGIT_TO_DEC_RAW(d) (strstrofs(HEXDIGITS, (d), 0)) #define HEXDIGIT_TO_DEC(d) ((HEXDIGIT_TO_DEC_RAW(d) | 0x10) - 0x10) #define DEC_TO_HEXDIGIT(d) (substring(HEXDIGITS, (d), 1)) @@ -223,8 +228,12 @@ string getcurrentmod(); #ifndef MENUQC #ifdef CSQC float ReadInt24_t(); +vector ReadInt48_t(); +vector ReadInt72_t(); #else void WriteInt24_t(float dest, float val); +void WriteInt48_t(float dest, vector val); +void WriteInt72_t(float dest, vector val); #endif #endif