]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add two useful macros
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 6 May 2015 09:30:38 +0000 (19:30 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 6 May 2015 09:38:41 +0000 (19:38 +1000)
qcsrc/common/util-pre.qh

index b3aacfa974858b0efe9318867231fd8739a70769..a1ac7dc7adeabd5793fd129a19e19a366431d67e 100644 (file)
@@ -51,4 +51,7 @@
 [[deprecated("use true")]] [[alias("true")]] const bool TRUE;
 [[deprecated("use false")]] [[alias("false")]] const bool FALSE;
 
+#define BIT(n) (1 << (n))
+#define BITSET(var, mask, flag) (flag ? (var) | (mask) : (var) &~ (mask))
+
 #endif