17 |
|
#include "ambient.h" |
18 |
|
#include "random.h" |
19 |
|
#include "paths.h" |
20 |
+ |
#include "pmapray.h" |
21 |
|
|
22 |
|
extern char *progname; /* global argv[0] */ |
23 |
|
|
78 |
|
default: goto badopt; } |
79 |
|
int persist = 0; |
80 |
|
char *octnm = NULL; |
81 |
< |
char **tralp; |
82 |
< |
int duped1; |
81 |
> |
char **tralp = NULL; |
82 |
> |
int duped1 = -1; |
83 |
|
int rval; |
84 |
|
int i; |
85 |
|
/* global program name */ |
325 |
|
fputformat(formstr(outform), stdout); |
326 |
|
putchar('\n'); |
327 |
|
} |
328 |
< |
|
328 |
> |
|
329 |
> |
ray_init_pmap(); /* PMAP: set up & load photon maps */ |
330 |
> |
|
331 |
|
marksources(); /* find and mark sources */ |
332 |
|
|
333 |
|
setambient(); /* initialize ambient calculation */ |
334 |
< |
|
334 |
> |
|
335 |
|
#ifdef PERSIST |
336 |
|
if (persist) { |
337 |
|
fflush(stdout); |
377 |
|
goto runagain; |
378 |
|
} |
379 |
|
#endif |
380 |
+ |
|
381 |
+ |
ray_done_pmap(); /* PMAP: free photon maps */ |
382 |
+ |
|
383 |
|
quit(0); |
384 |
|
|
385 |
|
badopt: |