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) |
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); |
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) |
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 |
|
} |