21 |
|
#include "view.h" |
22 |
|
|
23 |
|
#define MAXINP 32 /* maximum number of input files */ |
24 |
< |
#define WINSIZ 9 /* scanline window size */ |
25 |
< |
#define MIDSCN 4 /* current scan position */ |
24 |
> |
#define WINSIZ 17 /* scanline window size */ |
25 |
> |
#define MIDSCN ((WINSIZ-1)/2+1) |
26 |
|
|
27 |
|
struct { |
28 |
|
char *name; /* file or command name */ |
484 |
|
lorg[fn][0] = lorg[fn][1] = lorg[fn][2] = 0.0; |
485 |
|
ldir[fn][0] = ldir[fn][1] = ldir[fn][2] = 0.0; |
486 |
|
if (input[fn].vw.type == 0) |
487 |
< |
errno = ERANGE; |
487 |
> |
errno = EDOM; |
488 |
|
else { |
489 |
< |
pix2loc(loc, &input[fn].rs, xpos, ypos); |
489 |
> |
pix2loc(loc, &input[fn].rs, xscan, ymax-1-yscan); |
490 |
|
if (viewray(lorg[fn], ldir[fn], |
491 |
|
&input[fn].vw, loc[0], loc[1]) < 0) |
492 |
|
errno = ERANGE; |