ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rtmain.c
(Generate patch)

Comparing ray/src/rt/rtmain.c (file contents):
Revision 2.9 by schorsch, Tue Mar 30 16:13:01 2004 UTC vs.
Revision 2.14 by greg, Wed Apr 5 06:22:57 2006 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7  
8   #include "copyright.h"
9  
10 #include  <sys/types.h>
10   #include  <signal.h>
11  
12   #include  "platform.h"
# Line 46 | Line 45 | extern int  lim_dist;                  /* limit distance? */
45   extern char  *tralist[];                /* list of modifers to trace (or no) */
46   extern int  traincl;                    /* include == 1, exclude == 0 */
47  
48 + static int  loadflags = ~IO_FILES;      /* what to load from octree */
49 +
50   static void onsig(int  signo);
51   static void sigdie(int  signo, char  *msg);
52   static void printdefaults(void);
# Line 64 | Line 65 | main(int  argc, char  *argv[])
65                                  case 'n': case 'N': case 'f': case 'F': \
66                                  case '-': case '0': var = 0; break; \
67                                  default: goto badopt; }
67        int  loadflags = ~IO_FILES;
68          int  persist = 0;
69          char  **tralp;
70          int  duped1;
# Line 227 | Line 227 | main(int  argc, char  *argv[])
227                                          /* initialize object types */
228          initotypes();
229                                          /* initialize urand */
230 <        initurand(2048);
230 >        if (rand_samp) {
231 >                srandom((long)time(0));
232 >                initurand(0);
233 >        } else {
234 >                srandom(0L);
235 >                initurand(2048);
236 >        }
237                                          /* set up signal handling */
238          sigdie(SIGINT, "Interrupt");
239   #ifdef SIGHUP
# Line 273 | Line 279 | main(int  argc, char  *argv[])
279                  openheader();
280          }
281   #endif
276 #ifdef  _WIN32
282          if (outform != 'a')
283                  SET_FILE_BINARY(stdout);
279        if (octname == NULL)
280                SET_FILE_BINARY(stdin);
281 #endif
284          readoct(octname, loadflags, &thescene, NULL);
285          nsceneobjs = nobjects;
286  
# Line 423 | Line 425 | printdefaults(void)                    /* print default values to stdou
425  
426          if (imm_irrad)
427                  printf("-I+\t\t\t\t# immediate irradiance on\n");
428 <        printf("-x  %-9d\t\t\t# x resolution\n", hresolu);
428 >        printf("-x  %-9d\t\t\t# x resolution (flush interval)\n", hresolu);
429          printf("-y  %-9d\t\t\t# y resolution\n", vresolu);
430          printf(lim_dist ? "-ld+\t\t\t\t# limit distance on\n" :
431                          "-ld-\t\t\t\t# limit distance off\n");
432 +        printf("-h%c\t\t\t\t# %s header\n", loadflags & IO_INFO ? '+' : '-',
433 +                        loadflags & IO_INFO ? "output" : "no");
434          printf("-f%c%c\t\t\t\t# format input/output = %s/%s\n",
435                          inform, outform, formstr(inform), formstr(outform));
436 <        printf("-o%s\t\t\t\t# output", outvals);
436 >        printf("-o%-9s\t\t\t# output", outvals);
437          for (cp = outvals; *cp; cp++)
438                  switch (*cp) {
439 <                case 't': printf(" trace"); break;
439 >                case 't': case 'T': printf(" trace"); break;
440                  case 'o': printf(" origin"); break;
441                  case 'd': printf(" direction"); break;
442                  case 'v': printf(" value"); break;
443 +                case 'V': printf(" contribution"); break;
444                  case 'l': printf(" length"); break;
445                  case 'L': printf(" first_length"); break;
446                  case 'p': printf(" point"); break;
# Line 443 | Line 448 | printdefaults(void)                    /* print default values to stdou
448                  case 'N': printf(" unperturbed_normal"); break;
449                  case 's': printf(" surface"); break;
450                  case 'w': printf(" weight"); break;
451 +                case 'W': printf(" coefficient"); break;
452                  case 'm': printf(" modifier"); break;
453 +                case 'M': printf(" material"); break;
454 +                case '-': printf(" stroke"); break;
455                  }
456          putchar('\n');
457          printf(erract[WARNING].pf != NULL ?

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines