From de6af75d4d10c2f9b3321435cb669f75f471ff70 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 26 May 2012 16:04:31 +0000 Subject: code cleanup: use array size and const for vector args --- source/blender/render/intern/include/pixelblending.h | 12 ++++++------ source/blender/render/intern/include/shading.h | 2 +- source/blender/render/intern/include/sss.h | 8 ++++---- source/blender/render/intern/include/texture.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'source/blender/render/intern/include') diff --git a/source/blender/render/intern/include/pixelblending.h b/source/blender/render/intern/include/pixelblending.h index 97d41107856..bb2e7e7f9f9 100644 --- a/source/blender/render/intern/include/pixelblending.h +++ b/source/blender/render/intern/include/pixelblending.h @@ -36,30 +36,30 @@ * add 1 pixel to into filtered three lines * (float vecs to float vec) */ -void add_filt_fmask(unsigned int mask, float *col, float *rowbuf, int row_w); +void add_filt_fmask(unsigned int mask, const float col[4], float *rowbuf, int row_w); void add_filt_fmask_pixsize(unsigned int mask, float *in, float *rowbuf, int row_w, int pixsize); -void add_filt_fmask_coord(float filt[][3], float *col, float *rowbuf, int row_w, int col_h, int x, int y); +void add_filt_fmask_coord(float filt[][3], const float col[4], float *rowbuf, int row_w, int col_h, int x, int y); void mask_array(unsigned int mask, float filt[][3]); /** * Alpha-over blending for floats. */ -void addAlphaOverFloat(float *dest, float *source); +void addAlphaOverFloat(float dest[4], const float source[4]); /** * Alpha-under blending for floats. */ -void addAlphaUnderFloat(float *dest, float *source); +void addAlphaUnderFloat(float dest[4], const float source[4]); /** * Same for floats */ -void addalphaAddfacFloat(float *dest, float *source, char addfac); +void addalphaAddfacFloat(float dest[4], const float source[4], char addfac); /** * dest = dest + source */ -void addalphaAddFloat(float *dest, float *source); +void addalphaAddFloat(float dest[4], const float source[4]); #endif /* __PIXELBLENDING_H__ */ diff --git a/source/blender/render/intern/include/shading.h b/source/blender/render/intern/include/shading.h index 558342a46ab..a8519d8a7fb 100644 --- a/source/blender/render/intern/include/shading.h +++ b/source/blender/render/intern/include/shading.h @@ -96,7 +96,7 @@ ListBase *get_lights(struct ShadeInput *shi); float lamp_get_visibility(struct LampRen *lar, const float co[3], float lv[3], float *dist); void lamp_get_shadow(struct LampRen *lar, ShadeInput *shi, float inp, float shadfac[4], int do_real); -float fresnel_fac(float *view, float *vn, float fresnel, float fac); +float fresnel_fac(const float view[3], const float vn[3], float fresnel, float fac); /* rayshade.c */ extern void shade_ray(struct Isect *is, struct ShadeInput *shi, struct ShadeResult *shr); diff --git a/source/blender/render/intern/include/sss.h b/source/blender/render/intern/include/sss.h index 6a179d2f428..91a8b91e638 100644 --- a/source/blender/render/intern/include/sss.h +++ b/source/blender/render/intern/include/sss.h @@ -42,13 +42,13 @@ struct ScatterTree; typedef struct ScatterTree ScatterTree; ScatterSettings *scatter_settings_new(float refl, float radius, float ior, - float reflfac, float frontweight, float backweight); + float reflfac, float frontweight, float backweight); void scatter_settings_free(ScatterSettings *ss); ScatterTree *scatter_tree_new(ScatterSettings *ss[3], float scale, float error, - float (*co)[3], float (*color)[3], float *area, int totpoint); + float (*co)[3], float (*color)[3], float *area, int totpoint); void scatter_tree_build(ScatterTree *tree); -void scatter_tree_sample(ScatterTree *tree, float *co, float *color); +void scatter_tree_sample(ScatterTree *tree, const float co[3], float color[3]); void scatter_tree_free(ScatterTree *tree); /* Internal renderer API */ @@ -61,7 +61,7 @@ void make_sss_tree(struct Render *re); void sss_add_points(Render *re, float (*co)[3], float (*color)[3], float *area, int totpoint); void free_sss(struct Render *re); -int sample_sss(struct Render *re, struct Material *mat, float *co, float *col); +int sample_sss(struct Render *re, struct Material *mat, const float co[3], float color[3]); int sss_pass_done(struct Render *re, struct Material *mat); #endif /*__SSS_H__*/ diff --git a/source/blender/render/intern/include/texture.h b/source/blender/render/intern/include/texture.h index 33717d47c82..1c8a2552482 100644 --- a/source/blender/render/intern/include/texture.h +++ b/source/blender/render/intern/include/texture.h @@ -67,7 +67,7 @@ void do_halo_tex(struct HaloRen *har, float xn, float yn, float col_r[4]); void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float hor[3], float zen[3], float *blend, int skyflag, short thread); void do_material_tex(struct ShadeInput *shi, struct Render *re); void do_lamp_tex(LampRen *la, const float lavec[3], struct ShadeInput *shi, float col_r[3], int effect); -void do_volume_tex(struct ShadeInput *shi, const float xyz[3], int mapto_flag, float col[3], float *val, struct Render *re); +void do_volume_tex(struct ShadeInput *shi, const float xyz[3], int mapto_flag, float col_r[3], float *val, struct Render *re); void init_render_textures(Render *re); void end_render_textures(Render *re); -- cgit v1.2.3