74 |
|
|
75 |
|
int backvis = 1; /* back face visibility */ |
76 |
|
|
77 |
< |
int maxdepth = 8; /* maximum recursion depth */ |
77 |
> |
int maxdepth = -10; /* maximum recursion depth */ |
78 |
|
double minweight = 2e-3; /* minimum ray weight */ |
79 |
|
|
80 |
|
char *ambfile = NULL; /* ambient file name */ |
97 |
|
|
98 |
|
typedef void oputf_t(RAY *r); |
99 |
|
static oputf_t oputo, oputd, oputv, oputl, oputL, oputc, oputp, |
100 |
< |
oputn, oputN, oputs, oputw, oputW, oputm, oputM, oputdash; |
100 |
> |
oputn, oputN, oputs, oputw, oputW, oputm, oputM, oputtilde; |
101 |
|
|
102 |
|
static void setoutput(char *vs); |
103 |
|
static void tranotify(OBJECT obj); |
160 |
|
sprintf(errmsg, "cannot open input file \"%s\"", fname); |
161 |
|
error(SYSTEM, errmsg); |
162 |
|
} |
163 |
– |
#ifdef _WIN32 |
163 |
|
if (inform != 'a') |
164 |
|
SET_FILE_BINARY(fp); |
166 |
– |
#endif |
165 |
|
/* set up output */ |
166 |
|
setoutput(outvals); |
167 |
|
switch (outform) { |
211 |
|
} |
212 |
|
fflush(stdout); |
213 |
|
if (vcount > 0) |
214 |
< |
error(USER, "read error"); |
214 |
> |
error(USER, "unexpected EOF on input"); |
215 |
|
if (fname != NULL) |
216 |
|
fclose(fp); |
217 |
|
} |
238 |
|
while (*vs) |
239 |
|
switch (*vs++) { |
240 |
|
case 'T': /* trace sources */ |
241 |
+ |
if (!*vs) break; |
242 |
|
trace_sources(); |
243 |
|
/* fall through */ |
244 |
|
case 't': /* trace */ |
245 |
+ |
if (!*vs) break; |
246 |
|
*table = NULL; |
247 |
|
table = every_out; |
248 |
|
trace = ourtrace; |
296 |
|
case 'M': /* material */ |
297 |
|
*table++ = oputM; |
298 |
|
break; |
299 |
< |
case '-': /* dash */ |
300 |
< |
*table++ = oputdash; |
299 |
> |
case '~': /* tilde */ |
300 |
> |
*table++ = oputtilde; |
301 |
|
break; |
302 |
|
} |
303 |
|
*table = NULL; |
677 |
|
|
678 |
|
|
679 |
|
static void |
680 |
< |
oputdash( /* output dash (spacer) */ |
680 |
> |
oputtilde( /* output tilde (spacer) */ |
681 |
|
RAY *r |
682 |
|
) |
683 |
|
{ |
684 |
< |
putchar('-'); |
685 |
< |
putchar('\t'); |
684 |
> |
fputs("~\t", stdout); |
685 |
|
} |
686 |
|
|
687 |
|
|