90 |
|
* same as the defaults for rtrace.) |
91 |
|
*/ |
92 |
|
|
93 |
< |
#include "ray.h" |
93 |
> |
#include <string.h> |
94 |
|
|
95 |
+ |
#include "ray.h" |
96 |
|
#include "source.h" |
96 |
– |
|
97 |
|
#include "ambient.h" |
98 |
– |
|
98 |
|
#include "otypes.h" |
100 |
– |
|
99 |
|
#include "random.h" |
102 |
– |
|
100 |
|
#include "data.h" |
104 |
– |
|
101 |
|
#include "font.h" |
102 |
|
|
103 |
|
char *progname = "unknown_app"; /* caller sets to argv[0] */ |
238 |
|
rp->maxdepth = maxdepth; |
239 |
|
rp->minweight = minweight; |
240 |
|
copycolor(rp->ambval, ambval); |
241 |
< |
bzero(rp->ambfile, sizeof(rp->ambfile)); |
241 |
> |
memset(rp->ambfile, '\0', sizeof(rp->ambfile)); |
242 |
|
if (ambfile != NULL) |
243 |
|
strncpy(rp->ambfile, ambfile, sizeof(rp->ambfile)-1); |
244 |
|
rp->ambvwt = ambvwt; |
248 |
|
rp->ambssamp = ambssamp; |
249 |
|
rp->ambounce = ambounce; |
250 |
|
rp->ambincl = ambincl; |
251 |
< |
bzero(rp->amblval, sizeof(rp->amblval)); |
251 |
> |
memset(rp->amblval, '\0', sizeof(rp->amblval)); |
252 |
|
ndx = 0; |
253 |
|
for (i = 0; i < AMBLLEN && amblist[i] != NULL; i++) { |
254 |
|
int len = strlen(amblist[i]); |
356 |
|
rp->maxdepth = 6; |
357 |
|
rp->minweight = 4e-3; |
358 |
|
setcolor(rp->ambval, 0., 0., 0.); |
359 |
< |
bzero(rp->ambfile, sizeof(rp->ambfile)); |
359 |
> |
memset(rp->ambfile, '\0', sizeof(rp->ambfile)); |
360 |
|
rp->ambvwt = 0; |
361 |
|
rp->ambres = 128; |
362 |
|
rp->ambacc = 0.2; |
364 |
|
rp->ambssamp = 0; |
365 |
|
rp->ambounce = 0; |
366 |
|
rp->ambincl = -1; |
367 |
< |
bzero(rp->amblval, sizeof(rp->amblval)); |
367 |
> |
memset(rp->amblval, '\0', sizeof(rp->amblval)); |
368 |
|
for (i = AMBLLEN+1; i--; ) |
369 |
|
rp->amblndx[i] = -1; |
370 |
|
} |