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

Comparing ray/src/rt/rv2.c (file contents):
Revision 1.22 by greg, Fri Apr 19 12:45:34 1991 UTC vs.
Revision 1.23 by greg, Thu Jul 18 15:49:06 1991 UTC

# Line 318 | Line 318 | register char  *s;
318          extern int  ambdiv;
319          extern int  ambssamp;
320          extern int  ambounce;
321 +        extern int  directinvis;
322 +        extern int  do_irrad;
323          int  i0;
324          double  d0, d1, d2;
325 <        char  buf[128];
325 >        char  buf[128], ans[4];
326          
327          if (s[0] == '\0') {
328 <                (*dev->comout)("aa ab ad ar as av dc dj dt lr lw sp st: ");
328 >                (*dev->comout)(
329 >                        "aa ab ad ar as av b dc dj di dt i lr lw sp st: ");
330                  (*dev->comin)(buf, NULL);
331                  s = buf;
332          }
# Line 391 | Line 394 | register char  *s;
394                          }
395                          shadthresh = d0;
396                          break;
397 +                case 'i':                       /* invisibility */
398 +                        if (sscanf(s+2, "%1s", ans) != 1) {
399 +                                sprintf(buf, "direct invisibility (%c): ",
400 +                                                directinvis ? 'y' : 'n');
401 +                                (*dev->comout)(buf);
402 +                                (*dev->comin)(buf, NULL);
403 +                                if (sscanf(buf, "%1s", ans) != 1)
404 +                                        break;
405 +                        }
406 +                        directinvis = tolower(ans[0]) == 'y';
407 +                        break;
408                  default:
409                          goto badparam;
410                  }
411 +                break;
412 +        case 'b':                       /* black and white */
413 +                if (sscanf(s+1, "%1s", ans) != 1) {
414 +                        sprintf(buf, "black and white (%c): ",
415 +                                        greyscale ? 'y' : 'n');
416 +                        (*dev->comout)(buf);
417 +                        (*dev->comin)(buf, NULL);
418 +                        if (sscanf(buf, "%1s", ans) != 1)
419 +                                break;
420 +                }
421 +                greyscale = tolower(ans[0]) == 'y';
422 +                break;
423 +        case 'i':                       /* irradiance */
424 +                if (sscanf(s+1, "%1s", ans) != 1) {
425 +                        sprintf(buf, "irradiance (%c): ",
426 +                                        do_irrad ? 'y' : 'n');
427 +                        (*dev->comout)(buf);
428 +                        (*dev->comin)(buf, NULL);
429 +                        if (sscanf(buf, "%1s", ans) != 1)
430 +                                break;
431 +                }
432 +                do_irrad = tolower(ans[0]) == 'y';
433                  break;
434          case 'a':                       /* ambient */
435                  switch (s[1]) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines