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

Comparing ray/src/rt/rvmain.c (file contents):
Revision 2.14 by schorsch, Sun Mar 6 01:13:18 2016 UTC vs.
Revision 2.18 by greg, Tue Jan 24 21:54:49 2023 UTC

# Line 55 | Line 55 | static void onsig(int  signo);
55   static void sigdie(int  signo, char  *msg);
56   static void printdefaults(void);
57  
58
58   int
59   main(int argc, char *argv[])
60   {
61   #define  check(ol,al)           if (argv[i][ol] || \
62                                  badarg(argc-i-1,argv+i+1,al)) \
63                                  goto badopt
64 < #define  bool(olen,var)         switch (argv[i][olen]) { \
64 > #define  check_bool(olen,var)           switch (argv[i][olen]) { \
65                                  case '\0': var = !var; break; \
66                                  case 'y': case 'Y': case 't': case 'T': \
67                                  case '+': case '1': var = 1; break; \
# Line 84 | Line 83 | main(int argc, char *argv[])
83          specthresh = .3;
84          specjitter = 1.;
85          maxdepth = 6;
86 <        minweight = 1e-2;
86 >        minweight = 1e-3;
87          ambacc = 0.3;
88          ambres = 32;
89          ambdiv = 256;
# Line 148 | Line 147 | main(int argc, char *argv[])
147                          }
148                          break;
149                  case 'b':                               /* grayscale */
150 <                        bool(2,greyscale);
150 >                        check_bool(2,greyscale);
151                          break;
152                  case 'p':                               /* pixel */
153                          switch (argv[i][2]) {
# Line 172 | Line 171 | main(int argc, char *argv[])
171                          break;
172                  case 'w':                               /* warnings */
173                          rval = erract[WARNING].pf != NULL;
174 <                        bool(2,rval);
174 >                        check_bool(2,rval);
175                          if (rval) erract[WARNING].pf = wputs;
176                          else erract[WARNING].pf = NULL;
177                          break;
# Line 230 | Line 229 | main(int argc, char *argv[])
229          
230          ray_init(octnm);                /* also calls ray_init_pmap() */
231          
232 + /* temporary shortcut, until winrview is refactored into a "device" */
233 + #ifndef WIN_RVIEW
234          rview();                        /* run interactive viewer */
235  
236 +
237          devclose();                     /* close output device */
238 + #endif
239  
240          /* PMAP: free photon maps */
241          ray_done_pmap();
242          
243 + #ifdef WIN_RVIEW
244 +        return 1;
245 + #endif
246          quit(0);
247  
248   badopt:
# Line 245 | Line 251 | badopt:
251          return 1; /* pro forma return */
252  
253   #undef  check
254 < #undef  bool
254 > #undef  check_bool
255   }
256  
257  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines