22 |
|
int siz |
23 |
|
) |
24 |
|
{ |
25 |
< |
if (siz == 0) { |
25 |
> |
if (siz <= 0) { |
26 |
|
if (distsiz > 0) |
27 |
|
free((void *)distarr); |
28 |
|
distarr = NULL; |
46 |
|
{ |
47 |
|
COLORV *colp; |
48 |
|
|
49 |
< |
if (rv == 0) |
49 |
> |
if (rv == 0) /* no result ready */ |
50 |
|
return(0); |
51 |
|
if (rv < 0) |
52 |
|
error(USER, "ray tracing process died"); |
127 |
|
} |
128 |
|
|
129 |
|
|
130 |
< |
static void |
130 |
> |
void |
131 |
|
flatdir( /* compute uniform hemispherical direction */ |
132 |
< |
register FVECT dv, |
132 |
> |
FVECT dv, |
133 |
|
double alt, |
134 |
|
double azi |
135 |
|
) |
413 |
|
r2 = (dim[1] - alti*nazi + sp[1] - .5)/nazi; |
414 |
|
flatdir(dn, r1, r2); |
415 |
|
for (j = 0; j < 3; j++) |
416 |
< |
dir[j] = -dn[0]*u[j] - dn[1]*v[j] - dn[2]*co->ad[j]; |
416 |
> |
dir[j] = -dn[0]*u[j] - dn[1]*v[j] - dn[2]*co->ad[j]; |
417 |
|
} |
418 |
|
/* randomize location */ |
419 |
|
multisamp(sp, 2, urand(h+8371)); |