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

Comparing ray/src/px/pcomb.c (file contents):
Revision 2.57 by greg, Sat Dec 9 23:46:51 2023 UTC vs.
Revision 2.58 by greg, Mon Dec 11 15:13:39 2023 UTC

# Line 453 | Line 453 | static void
453   combine(void)                   /* combine pictures */
454   {
455          EPNODE  *coldef[3], *brtdef;
456 +        int     set_x, set_y;
457          COLOR   *scanout;
458          double  d;
459          int     i, j;
# Line 467 | Line 468 | combine(void)                  /* combine pictures */
468                  brtdef = eparse(vbrtout);
469          else
470                  brtdef = NULL;
471 +                                                /* what to set */
472 +        set_x = varlookup(vxpos) != NULL && !vardefined(vxpos);
473 +        set_y = varlookup(vypos) != NULL && !vardefined(vypos);
474                                                  /* allocate scanline */
475          scanout = (COLOR *)emalloc(xres*sizeof(COLOR));
476                                                  /* set input position */
# Line 474 | Line 478 | combine(void)                  /* combine pictures */
478                                                  /* combine files */
479          for (ypos = yres-1; ypos >= 0; ypos--) {
480              advance();
481 <            varset(vypos, '=', (double)ypos);
481 >            if (set_y) varset(vypos, '=', (double)ypos);
482              for (xpos = 0; xpos < xres; xpos++) {
483                  xscan = (xpos+.5)*xmax/xres;
484 <                varset(vxpos, '=', (double)xpos);
484 >                if (set_x) varset(vxpos, '=', (double)xpos);
485                  eclock++;
486                  if (brtdef != NULL) {
487                      d = evalue(brtdef);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines