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

Comparing ray/src/rt/ambient.c (file contents):
Revision 2.87 by greg, Fri May 9 16:40:01 2014 UTC vs.
Revision 2.88 by greg, Fri May 9 23:08:50 2014 UTC

# Line 165 | Line 165 | setambient(void)                               /* initialize calculation */
165                  initambfile(0);                 /* file exists */
166                  lastpos = ftell(ambfp);
167                  while (readambval(&amb, ambfp))
168 <                        avinsert(avstore(&amb));
168 >                        avstore(&amb);
169                  nambshare = nambvals;           /* share loaded values */
170                  if (readonly) {
171                          sprintf(errmsg,
# Line 960 | Line 960 | avsave(                                /* insert and save an ambient value */
960          AMBVAL  *av
961   )
962   {
963 <        avinsert(avstore(av));
963 >        avstore(av);
964          if (ambfp == NULL)
965                  return;
966          if (writambval(av, ambfp) < 0)
# Line 975 | Line 975 | writerr:
975  
976  
977   static AMBVAL *
978 < avstore(                                /* allocate memory and store aval */
978 > avstore(                                /* allocate memory and save aval */
979          AMBVAL  *aval
980   )
981   {
# Line 993 | Line 993 | avstore(                               /* allocate memory and store aval */
993                  avsum += log(d);
994                  navsum++;
995          }
996 +        avinsert(av);                   /* insert in our cache tree */
997          return(av);
998   }
999  
# Line 1275 | Line 1276 | ambsync(void)                  /* synchronize ambient file */
1276                                  error(WARNING, errmsg);
1277                                  break;
1278                          }
1279 <                        avinsert(avstore(&avs));
1279 >                        avstore(&avs);
1280                          n -= AMBVALSIZ;
1281                  }
1282                  lastpos = flen - n;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines