29 |
|
{ |
30 |
|
if (siz <= 0) { |
31 |
|
if (distsiz > 0) |
32 |
< |
free((void *)distarr); |
32 |
> |
free(distarr); |
33 |
|
distarr = NULL; |
34 |
|
distsiz = 0; |
35 |
|
return; |
36 |
|
} |
37 |
|
if (distsiz < siz) { |
38 |
|
if (distsiz > 0) |
39 |
< |
free((void *)distarr); |
39 |
> |
free(distarr); |
40 |
|
distarr = (COLORV *)malloc(sizeof(COLOR)*siz); |
41 |
|
if (distarr == NULL) |
42 |
|
error(SYSTEM, "out of memory in newdist"); |
62 |
|
{ |
63 |
|
if (direct_discount == NULL) |
64 |
|
return; |
65 |
< |
free((void *)direct_discount); |
65 |
> |
free(direct_discount); |
66 |
|
direct_discount = NULL; |
67 |
|
} |
68 |
|
|
108 |
|
VCOPY(myRay.rorg, org); |
109 |
|
VCOPY(myRay.rdir, dir); |
110 |
|
myRay.rmax = .0; |
111 |
< |
rayorigin(&myRay, PRIMARY, NULL, NULL); |
111 |
> |
rayorigin(&myRay, PRIMARY|SPECULAR, NULL, NULL); |
112 |
|
myRay.rno = ndx; |
113 |
|
/* queue ray, check result */ |
114 |
|
process_ray(&myRay, ray_pqueue(&myRay)); |
452 |
|
raysamp(dim[1], org, dir); |
453 |
|
} |
454 |
|
/* add in direct component? */ |
455 |
< |
if (!directvis && (il->flags & IL_LIGHT || il->sd != NULL)) { |
455 |
> |
if (il->flags & IL_LIGHT || il->sd != NULL) { |
456 |
|
MAT4 ixfm; |
457 |
|
if (il->sd == NULL) { |
458 |
|
for (i = 3; i--; ) { |
660 |
|
raysamp(dim[1], org, dir); |
661 |
|
} |
662 |
|
/* add in direct component? */ |
663 |
< |
if (!directvis && (il->flags & IL_LIGHT || il->sd != NULL)) { |
663 |
> |
if (il->flags & IL_LIGHT || il->sd != NULL) { |
664 |
|
MAT4 ixfm; |
665 |
|
if (il->sd == NULL) { |
666 |
|
for (i = 3; i--; ) { |