30 |
|
{ |
31 |
|
FVECT rorg, rdir; |
32 |
|
double h, v; |
33 |
< |
register int x, y; |
33 |
> |
int x, y; |
34 |
|
|
35 |
|
if (raydir != NULL) /* already done? */ |
36 |
|
return; |
75 |
|
} |
76 |
|
|
77 |
|
|
78 |
< |
extern void |
78 |
> |
void |
79 |
|
compveil(void) /* compute veiling image */ |
80 |
|
{ |
81 |
|
double t2, t2sum; |
82 |
|
COLOR ctmp, vsum; |
83 |
|
int px, py; |
84 |
< |
register int x, y; |
84 |
> |
int x, y; |
85 |
|
|
86 |
|
if (veilimg != NULL) /* already done? */ |
87 |
|
return; |
137 |
|
* and added to the foveal image, and the mapping has been |
138 |
|
* determined. |
139 |
|
*/ |
140 |
< |
extern void |
140 |
> |
void |
141 |
|
adjveil(void) /* adjust veil image */ |
142 |
|
{ |
143 |
|
float *crfptr = crfimg; |
254 |
|
} |
255 |
|
#endif |
256 |
|
|
257 |
< |
extern void |
257 |
> |
void |
258 |
|
addveil( /* add veil to scanline */ |
259 |
|
COLOR *sl, |
260 |
|
int y |
263 |
|
int vx, vy; |
264 |
|
double dx, dy; |
265 |
|
double lv, uv; |
266 |
< |
register int x, i; |
266 |
> |
int x, i; |
267 |
|
|
268 |
|
vy = dy = (y+.5)/numscans(&inpres)*fvyr - .5; |
269 |
|
while (vy >= fvyr-1) vy--; |
307 |
|
static void ascanval(COLOR col, int x, int y, SCANBAR *sb); |
308 |
|
static SCANBAR *sballoc(int se, int ns, int sl); |
309 |
|
|
310 |
< |
extern double |
310 |
> |
double |
311 |
|
hacuity( /* return visual acuity in cycles/degree */ |
312 |
|
double La |
313 |
|
) |
319 |
|
|
320 |
|
static COLOR * |
321 |
|
getascan( /* find/read scanline y for scanbar sb */ |
322 |
< |
register SCANBAR *sb, |
322 |
> |
SCANBAR *sb, |
323 |
|
int y |
324 |
|
) |
325 |
|
{ |
326 |
< |
register COLOR *sl0, *sl1, *mysl; |
327 |
< |
register int i; |
326 |
> |
COLOR *sl0, *sl1, *mysl; |
327 |
> |
int i; |
328 |
|
|
329 |
|
if (y < sb->nread - sb->nscans) /* too far back? */ |
330 |
|
return(NULL); |
331 |
|
for ( ; y >= sb->nread; sb->nread++) { /* read as necessary */ |
332 |
|
mysl = bscan(sb, sb->nread); |
333 |
|
if (sb->sampe == 0) { |
334 |
< |
if (freadscan(mysl, sb->len, infp) < 0) { |
334 |
> |
if (fread2scan(mysl, sb->len, infp, NCSAMP, WLPART) < 0) { |
335 |
|
fprintf(stderr, "%s: %s: scanline read error\n", |
336 |
|
progname, infn); |
337 |
|
exit(1); |
354 |
|
} |
355 |
|
|
356 |
|
|
357 |
< |
extern void |
357 |
> |
void |
358 |
|
acuscan( /* get acuity-sampled scanline */ |
359 |
|
COLOR *scln, |
360 |
|
int y |
363 |
|
double sr; |
364 |
|
double dx, dy; |
365 |
|
int ix, iy; |
366 |
< |
register int x; |
366 |
> |
int x; |
367 |
|
|
368 |
|
if (inpacuD == NULL) |
369 |
|
return; |
395 |
|
{ |
396 |
|
COLOR c1; |
397 |
|
double d; |
398 |
< |
register SCANBAR *sb0; |
398 |
> |
SCANBAR *sb0; |
399 |
|
|
400 |
|
for (sb0 = rootbar; sb0->sampe != 0 && 1<<sb0[1].sampe > sr; sb0++) |
401 |
|
; |
469 |
|
) |
470 |
|
{ |
471 |
|
SCANBAR *sbarr; |
472 |
< |
register SCANBAR *sb; |
472 |
> |
SCANBAR *sb; |
473 |
|
|
474 |
|
sbarr = sb = (SCANBAR *)malloc((se+1)*sizeof(SCANBAR)); |
475 |
|
if (sb == NULL) |
491 |
|
} |
492 |
|
|
493 |
|
|
494 |
< |
extern void |
494 |
> |
void |
495 |
|
initacuity(void) /* initialize variable acuity sampling */ |
496 |
|
{ |
497 |
|
FVECT diffx, diffy, cp; |
498 |
|
double omega, maxsr; |
499 |
< |
register int x, y, i; |
499 |
> |
int x, y, i; |
500 |
|
|
501 |
|
compraydir(); /* compute ray directions */ |
502 |
|
|