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

Comparing ray/src/rt/ambcomp.c (file contents):
Revision 2.10 by greg, Tue Feb 25 02:47:22 2003 UTC vs.
Revision 2.12 by schorsch, Sun Jul 27 22:12:03 2003 UTC

# Line 34 | Line 34 | AMBSAMP  *d1, *d2;
34   {
35          register int  c;
36  
37 <        if (c = d1->t - d2->t)
37 >        if ( (c = d1->t - d2->t) )
38                  return(c);
39          return(d1->p - d2->p);
40   }
# Line 142 | Line 142 | FVECT  pg, dg;
142                  qsort(div, ndivs, sizeof(AMBSAMP), ambcmp);     /* sort divs */
143                                                  /* super-sample */
144                  for (i = ns; i > 0; i--) {
145 <                        copystruct(&dnew, div);
145 >                        dnew = *div;
146                          if (divsample(&dnew, &hemi, r) < 0)
147                                  goto oopsy;
148                                                          /* reinsert */
149                          dp = div;
150                          j = ndivs < i ? ndivs : i;
151                          while (--j > 0 && dnew.k < dp[1].k) {
152 <                                copystruct(dp, dp+1);
152 >                                *dp = *(dp+1);
153                                  dp++;
154                          }
155 <                        copystruct(dp, &dnew);
155 >                        *dp = dnew;
156                  }
157                  if (pg != NULL || dg != NULL)   /* restore order */
158                          qsort(div, ndivs, sizeof(AMBSAMP), ambnorm);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines