| 8 |
|
#include "copyright.h" |
| 9 |
|
|
| 10 |
|
#include <signal.h> |
| 11 |
+ |
#include <time.h> |
| 12 |
|
#include "rcontrib.h" |
| 13 |
|
#include "random.h" |
| 14 |
|
#include "source.h" |
| 46 |
|
|
| 47 |
|
void (*addobjnotify[8])() = {ambnotify, NULL}; |
| 48 |
|
|
| 49 |
< |
char RCCONTEXT[] = "RCONTRIB"; /* our special evaluation context */ |
| 49 |
> |
char RCCONTEXT[] = "RC"; /* our special evaluation context */ |
| 50 |
|
|
| 51 |
|
|
| 52 |
|
static void |
| 53 |
|
printdefaults(void) /* print default values to stdout */ |
| 54 |
|
{ |
| 54 |
– |
char *cp; |
| 55 |
– |
|
| 55 |
|
printf("-c %-5d\t\t\t# accumulated rays per record\n", accumulate); |
| 56 |
|
printf("-V%c\t\t\t\t# output %s\n", contrib ? '+' : '-', |
| 57 |
|
contrib ? "contributions" : "coefficients"); |
| 289 |
|
goto badopt; |
| 290 |
|
} |
| 291 |
|
} |
| 292 |
+ |
if (nmods <= 0) |
| 293 |
+ |
error(USER, "missing required modifier argument"); |
| 294 |
|
/* override some option settings */ |
| 295 |
|
override_options(); |
| 296 |
|
/* initialize object types */ |
| 336 |
|
nsceneobjs = nobjects; |
| 337 |
|
|
| 338 |
|
marksources(); /* find and mark sources */ |
| 338 |
– |
for (i = 0; i < nsources; i++) /* tracing to sources as well */ |
| 339 |
– |
source[i].sflags |= SFOLLOW; |
| 339 |
|
|
| 340 |
|
setambient(); /* initialize ambient calculation */ |
| 341 |
|
|