13 |
|
#include "platform.h" |
14 |
|
#include "rtprocess.h" /* getpid() */ |
15 |
|
#include "ray.h" |
16 |
+ |
#include "func.h" |
17 |
|
#include "source.h" |
18 |
|
#include "ambient.h" |
19 |
|
#include "random.h" |
19 |
– |
#include "paths.h" |
20 |
|
#include "view.h" |
21 |
|
#include "pmapray.h" |
22 |
|
|
27 |
|
#define PCHILD 3 /* child of normal persist */ |
28 |
|
#endif |
29 |
|
|
30 |
– |
char *progname; /* argv[0] */ |
30 |
|
char *octname; /* octree name */ |
31 |
|
char *sigerr[NSIG]; /* signal error messages */ |
32 |
|
char *errfile = NULL; /* error output file */ |
33 |
|
|
35 |
– |
extern time_t time(); |
34 |
|
extern time_t tstart; /* start time */ |
35 |
|
|
36 |
|
extern int ralrm; /* seconds between reports */ |
107 |
|
strcat(RFeatureList, RPICT_FEATURES); |
108 |
|
if (argc > 1 && !strcmp(argv[1], "-features")) |
109 |
|
return feature_status(argc-2, argv+2); |
110 |
+ |
/* initialize calcomp routines */ |
111 |
+ |
initfunc(); |
112 |
|
/* option city */ |
113 |
|
for (i = 1; i < argc; i++) { |
114 |
|
/* expand arguments */ |
241 |
|
check(2,"s"); |
242 |
|
recover = argv[++i]; |
243 |
|
break; |
244 |
– |
case 't': /* timer */ |
245 |
– |
check(2,"i"); |
246 |
– |
ralrm = atoi(argv[++i]); |
247 |
– |
break; |
244 |
|
#ifdef PERSIST |
245 |
|
case 'P': /* persist file */ |
246 |
|
if (argv[i][2] == 'P') { |
253 |
|
persistfile(argv[++i]); |
254 |
|
break; |
255 |
|
#endif |
256 |
+ |
case 't': /* timer */ |
257 |
+ |
check(2,"i"); |
258 |
+ |
ralrm = atoi(argv[++i]); |
259 |
+ |
break; |
260 |
|
case 'w': /* warnings */ |
261 |
|
rval = erract[WARNING].pf != NULL; |
262 |
|
check_bool(2,rval); |
354 |
|
ray_init_pmap(); /* PMAP: set up & load photon maps */ |
355 |
|
|
356 |
|
marksources(); /* find and mark sources */ |
357 |
– |
|
357 |
|
setambient(); /* initialize ambient calculation */ |
358 |
|
|
359 |
|
fflush(stdout); /* in case we're duplicating header */ |