Cleanup: avoid returning a bit-flag as a float

Texture functions were returning a float which was cast back to an int
to use as a flag.
This commit is contained in:
Campbell Barton 2020-05-01 14:19:04 +10:00
parent f7d98d3582
commit b7117b5728
1 changed files with 5 additions and 5 deletions

View File

@ -533,7 +533,7 @@ static int stucci(Tex *tex, const float texvec[3], TexResult *texres)
/* ------------------------------------------------------------------------- */
/* newnoise: musgrave terrain noise types */
static float mg_mFractalOrfBmTex(Tex *tex, const float texvec[3], TexResult *texres)
static int mg_mFractalOrfBmTex(Tex *tex, const float texvec[3], TexResult *texres)
{
int rv = TEX_INT;
float (*mgravefunc)(float, float, float, float, float, float, int);
@ -588,7 +588,7 @@ static float mg_mFractalOrfBmTex(Tex *tex, const float texvec[3], TexResult *tex
return rv;
}
static float mg_ridgedOrHybridMFTex(Tex *tex, const float texvec[3], TexResult *texres)
static int mg_ridgedOrHybridMFTex(Tex *tex, const float texvec[3], TexResult *texres)
{
int rv = TEX_INT;
float (*mgravefunc)(float, float, float, float, float, float, float, float, int);
@ -651,7 +651,7 @@ static float mg_ridgedOrHybridMFTex(Tex *tex, const float texvec[3], TexResult *
return rv;
}
static float mg_HTerrainTex(Tex *tex, const float texvec[3], TexResult *texres)
static int mg_HTerrainTex(Tex *tex, const float texvec[3], TexResult *texres)
{
int rv = TEX_INT;
@ -702,7 +702,7 @@ static float mg_HTerrainTex(Tex *tex, const float texvec[3], TexResult *texres)
return rv;
}
static float mg_distNoiseTex(Tex *tex, const float texvec[3], TexResult *texres)
static int mg_distNoiseTex(Tex *tex, const float texvec[3], TexResult *texres)
{
int rv = TEX_INT;
@ -747,7 +747,7 @@ static float mg_distNoiseTex(Tex *tex, const float texvec[3], TexResult *texres)
* probably the slowest, especially with minkovsky, bumpmapping, could be done another way.
*/
static float voronoiTex(Tex *tex, const float texvec[3], TexResult *texres)
static int voronoiTex(Tex *tex, const float texvec[3], TexResult *texres)
{
int rv = TEX_INT;
float da[4], pa[12]; /* distance and point coordinate arrays of 4 nearest neighbors */