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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-10 17:26:06 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-10 17:26:06 +0300
commitacadb8c39f83a4b4112c8c77bac1eb39584ad100 (patch)
tree6e6249a3b1a8ef81bf74efb4dacfb2be8fa37c24 /source/blender/blenkernel/BKE_utildefines.h
parent6639ba6b867581ece49423f2c92651727fd4552f (diff)
Sculpt Branch:
Revised external multires file saving. Now it is more manual in that you have to specify where to save it, like an image file, but still saved at the same time as the .blend. It would ideally be automatic, but this is difficult to implement, so for now this should at least be more reliable.
Diffstat (limited to 'source/blender/blenkernel/BKE_utildefines.h')
-rw-r--r--source/blender/blenkernel/BKE_utildefines.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h
index c0ed8430177..c052af775f2 100644
--- a/source/blender/blenkernel/BKE_utildefines.h
+++ b/source/blender/blenkernel/BKE_utildefines.h
@@ -168,7 +168,15 @@
#define ENDB MAKE_ID('E','N','D','B')
-/* This one rotates the bytes in an int */
+/* This one rotates the bytes in an int64, int (32) and short (16) */
+#define SWITCH_INT64(a) { \
+ char s_i, *p_i; \
+ p_i= (char *)&(a); \
+ s_i=p_i[0]; p_i[0]=p_i[7]; p_i[7]=s_i; \
+ s_i=p_i[1]; p_i[1]=p_i[6]; p_i[6]=s_i; \
+ s_i=p_i[2]; p_i[2]=p_i[5]; p_i[5]=s_i; \
+ s_i=p_i[3]; p_i[3]=p_i[4]; p_i[4]=s_i; }
+
#define SWITCH_INT(a) { \
char s_i, *p_i; \
p_i= (char *)&(a); \