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

Comparing ray/src/hd/sm_samp.c (file contents):
Revision 3.4 by gwlarson, Wed Nov 11 12:05:40 1998 UTC vs.
Revision 3.5 by gwlarson, Sun Jan 10 10:27:46 1999 UTC

# Line 33 | Line 33 | sClear_all_flags(s)
33   SAMP *s;
34   {
35    if(samp_flag)
36 <    bzero((char *)samp_flag,FLAG_BYTES(S_MAX_SAMP(s)));
36 >    bzero((char *)samp_flag,FLAG_BYTES(S_MAX_BASE_PT(s)));
37   }
38  
39   sInit(s)
# Line 93 | Line 93 | int *nptr,extra_points;
93    S_MAX_BASE_PT(s) = n + extra_points;
94  
95    /* Allocate memory for a per/sample bit flag */
96 <  if(!(samp_flag = (int4 *)malloc(FLAG_BYTES(n))))
96 >  if(!(samp_flag = (int4 *)malloc(FLAG_BYTES(n+extra_points))))
97      error(SYSTEM,"sAlloc(): Unable to allocate flag memory");
98  
99    sInit(s);
# Line 166 | Line 166 | sCopy_samp(s,n_id,id)
166     the view sphere, and the direction value is set to -1
167   */
168   void
169 < sInit_samp(s,id,c,d,p,o_id,tonemap)
169 > sInit_samp(s,id,c,d,p,o_id)
170     SAMP *s;
171     int id;
172     COLR c;
173     FVECT d,p;
174 <   int o_id,tonemap;
174 >   int o_id;
175   {
176  
177    if(o_id != INVALID)
# Line 208 | Line 208 | sInit_samp(s,id,c,d,p,o_id,tonemap)
208      /* Set ACTIVE bit upon creation */
209      S_SET_FLAG(id);
210   #ifndef TEST_DRIVER
211 <  if(tonemap)
211 >  if(id < S_TONE_MAP(s))
212      tmMapPixels(S_NTH_RGB(s,id),&S_NTH_BRT(s,id),S_NTH_CHR(s,id),1);
213   #endif
214   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines