Three cases of unitialized variables found.
Hopefully it fixes the black scanlines error, as reported in #1842, but need MSVC compiler to test it. ;)
This commit is contained in:
@@ -928,8 +928,9 @@ void RE_shadehalo(HaloRen *har, char *col, unsigned int zz, float dist, float xn
|
|||||||
|
|
||||||
/* texture? */
|
/* texture? */
|
||||||
if(har->tex) {
|
if(har->tex) {
|
||||||
|
colf[0]= colf[1]= colf[2]= 0.0;
|
||||||
colf[3]= dist;
|
colf[3]= dist;
|
||||||
do_halo_tex(har, xn, yn, colf);
|
do_halo_tex(har, xn, yn, colf); // can return without setting colf
|
||||||
|
|
||||||
/* dist== colf[3]; */
|
/* dist== colf[3]; */
|
||||||
|
|
||||||
@@ -2594,6 +2595,12 @@ void shade_input_set_coords(ShadeInput *shi, float u, float v, int i1, int i2, i
|
|||||||
shi->uv[0]= 2.0*(u+.5);
|
shi->uv[0]= 2.0*(u+.5);
|
||||||
shi->uv[1]= 2.0*(v+.5);
|
shi->uv[1]= 2.0*(v+.5);
|
||||||
shi->uv[2]= 0.0; // texture.c assumes there are 3 coords
|
shi->uv[2]= 0.0; // texture.c assumes there are 3 coords
|
||||||
|
if(mode & MA_FACETEXTURE) {
|
||||||
|
/* no tface? set at 1.0 */
|
||||||
|
shi->vcol[0]= 1.0;
|
||||||
|
shi->vcol[1]= 1.0;
|
||||||
|
shi->vcol[2]= 1.0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(texco & TEXCO_NORM) {
|
if(texco & TEXCO_NORM) {
|
||||||
|
|||||||
@@ -1689,17 +1689,19 @@ void do_halo_tex(HaloRen *har, float xn, float yn, float *colf)
|
|||||||
dxt[0]= mtex->size[0]*dx;
|
dxt[0]= mtex->size[0]*dx;
|
||||||
dyt[0]= mtex->size[0]*dx;
|
dyt[0]= mtex->size[0]*dx;
|
||||||
}
|
}
|
||||||
else dxt[0]= 0.0;
|
else dxt[0]= dyt[0]= 0.0;
|
||||||
|
|
||||||
if(mtex->projy) {
|
if(mtex->projy) {
|
||||||
dxt[1]= mtex->size[1]*dx;
|
dxt[1]= mtex->size[1]*dx;
|
||||||
dyt[1]= mtex->size[1]*dx;
|
dyt[1]= mtex->size[1]*dx;
|
||||||
}
|
}
|
||||||
else dxt[1]= 0.0;
|
else dxt[1]= dyt[1]= 0.0;
|
||||||
|
|
||||||
if(mtex->projz) {
|
if(mtex->projz) {
|
||||||
dxt[2]= 0.0;
|
dxt[2]= 0.0;
|
||||||
dyt[2]= 0.0;
|
dyt[2]= 0.0;
|
||||||
}
|
}
|
||||||
else dxt[2]= 0.0;
|
else dxt[2]= dyt[2]= 0.0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user