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:
authorCampbell Barton <ideasman42@gmail.com>2011-11-07 05:38:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-07 05:38:32 +0400
commit96d73bfdcfd74bfccd58bf02ae25b64577fce904 (patch)
tree76f1423cdb1fe3079bd6b17c071c3c4a496c6550 /source/blender/editors/sculpt_paint
parent85540d5aa7abb487e546b5483fffeef2e6075af5 (diff)
replace VECCOPY with copy_v3_v3, same for 2d copy, also added vec copy functions for int & char.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 3c9edb2fcfe..ce603ce80b6 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -105,12 +105,30 @@
#define IMAPAINT_CHAR_TO_FLOAT(c) ((c)/255.0f)
-#define IMAPAINT_FLOAT_RGB_TO_CHAR(c, f) { (c)[0]=FTOCHAR((f)[0]); (c)[1]=FTOCHAR((f)[1]); (c)[2]=FTOCHAR((f)[2]); }
-#define IMAPAINT_FLOAT_RGBA_TO_CHAR(c, f) { (c)[0]=FTOCHAR((f)[0]); (c)[1]=FTOCHAR((f)[1]); (c)[2]=FTOCHAR((f)[2]); (c)[3]=FTOCHAR((f)[3]); }
-
-#define IMAPAINT_CHAR_RGB_TO_FLOAT(f, c) { (f)[0]=IMAPAINT_CHAR_TO_FLOAT((c)[0]); (f)[1]=IMAPAINT_CHAR_TO_FLOAT((c)[1]); (f)[2]=IMAPAINT_CHAR_TO_FLOAT((c)[2]); }
-#define IMAPAINT_CHAR_RGBA_TO_FLOAT(f, c) { (f)[0]=IMAPAINT_CHAR_TO_FLOAT((c)[0]); (f)[1]=IMAPAINT_CHAR_TO_FLOAT((c)[1]); (f)[2]=IMAPAINT_CHAR_TO_FLOAT((c)[2]); (f)[3]=IMAPAINT_CHAR_TO_FLOAT((c)[3]); }
-#define IMAPAINT_FLOAT_RGB_COPY(a, b) VECCOPY(a, b)
+#define IMAPAINT_FLOAT_RGB_TO_CHAR(c, f) { \
+ (c)[0]= FTOCHAR((f)[0]); \
+ (c)[1]= FTOCHAR((f)[1]); \
+ (c)[2]= FTOCHAR((f)[2]); \
+}
+#define IMAPAINT_FLOAT_RGBA_TO_CHAR(c, f) { \
+ (c)[0]= FTOCHAR((f)[0]); \
+ (c)[1]= FTOCHAR((f)[1]); \
+ (c)[2]= FTOCHAR((f)[2]); \
+ (c)[3]= FTOCHAR((f)[3]); \
+}
+#define IMAPAINT_CHAR_RGB_TO_FLOAT(f, c) { \
+ (f)[0]= IMAPAINT_CHAR_TO_FLOAT((c)[0]); \
+ (f)[1]= IMAPAINT_CHAR_TO_FLOAT((c)[1]); \
+ (f)[2]= IMAPAINT_CHAR_TO_FLOAT((c)[2]); \
+}
+#define IMAPAINT_CHAR_RGBA_TO_FLOAT(f, c) { \
+ (f)[0]= IMAPAINT_CHAR_TO_FLOAT((c)[0]); \
+ (f)[1]= IMAPAINT_CHAR_TO_FLOAT((c)[1]); \
+ (f)[2]= IMAPAINT_CHAR_TO_FLOAT((c)[2]); \
+ (f)[3]= IMAPAINT_CHAR_TO_FLOAT((c)[3]); \
+}
+
+#define IMAPAINT_FLOAT_RGB_COPY(a, b) copy_v3_v3(a, b)
#define IMAPAINT_TILE_BITS 6
#define IMAPAINT_TILE_SIZE (1 << IMAPAINT_TILE_BITS)