Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2008-02-10 02:17:15 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2008-02-10 02:17:15 +0300
commit16514e3ddb8500242931650c93f1397147442eba (patch)
treec66895704889f7a42219fbcdf1b59d81e6858529 /source/blender/blenkernel/BKE_utildefines.h
parenta37d9470a7f4e042efb6ce873ee05308e9aec535 (diff)
* Merge of PyNodes to trunk. Finally!
See http://wiki.blender.org/index.php/BlenderDev/PyNodes and http://wiki.blender.org/index.php/BlenderDev/PyNodes/API For current documentation. Very very big thanks go to William Germano for fixing the memory issues left and for improving on the code. In the coming time documentation will be finalised and further stabilising of PyNodes is to be expected.
Diffstat (limited to 'source/blender/blenkernel/BKE_utildefines.h')
-rw-r--r--source/blender/blenkernel/BKE_utildefines.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h
index fc22f6787b1..aa2be236d36 100644
--- a/source/blender/blenkernel/BKE_utildefines.h
+++ b/source/blender/blenkernel/BKE_utildefines.h
@@ -171,20 +171,22 @@
/* This one rotates the bytes in an int */
#define SWITCH_INT(a) { \
- char s_i, *p_i; \
- p_i= (char *)&(a); \
- s_i=p_i[0]; p_i[0]=p_i[3]; p_i[3]=s_i; \
- s_i=p_i[1]; p_i[1]=p_i[2]; p_i[2]=s_i; }
+ char s_i, *p_i; \
+ p_i= (char *)&(a); \
+ s_i=p_i[0]; p_i[0]=p_i[3]; p_i[3]=s_i; \
+ s_i=p_i[1]; p_i[1]=p_i[2]; p_i[2]=s_i; }
#define SWITCH_SHORT(a) { \
- char s_i, *p_i; \
- p_i= (char *)&(a); \
- s_i=p_i[0]; p_i[0]=p_i[1]; p_i[1]=s_i; }
+ char s_i, *p_i; \
+ p_i= (char *)&(a); \
+ s_i=p_i[0]; p_i[0]=p_i[1]; p_i[1]=s_i; }
/* Bit operations */
-#define BTST(a,b) ( ( (a) & 1<<(b) )!=0 )
-#define BSET(a,b) ( (a) | 1<<(b) )
+#define BTST(a,b) ( ( (a) & 1<<(b) )!=0 )
+#define BNTST(a,b) ( ( (a) & 1<<(b) )==0 )
+#define BTST2(a,b,c) ( BTST( (a), (b) ) || BTST( (a), (c) ) )
+#define BSET(a,b) ( (a) | 1<<(b) )
#define BCLR(a,b) ( (a) & ~(1<<(b)) )
/* bit-row */
#define BROW(min, max) (((max)>=31? 0xFFFFFFFF: (1<<(max+1))-1) - ((min)? ((1<<(min))-1):0) )