| 162 |
|
return 0; |
| 163 |
|
|
| 164 |
|
while (scanf("%d %d", &xy[0], &xy[1]) == 2) { |
| 165 |
< |
|
| 166 |
< |
loc2pix(xy, &dcp->res, |
| 167 |
< |
(xy[0]+.5)/dcp->res.xr, (xy[1]+.5)/dcp->res.yr); |
| 168 |
< |
|
| 165 |
> |
loc2pix(xy, &dcp->res, xy[0]/(double)dcp->res.xr, |
| 166 |
> |
xy[1]/(double)dcp->res.yr); |
| 167 |
|
d = decode_depth_pix(dcp, xy[0], xy[1]); |
| 168 |
|
if (d < -FTINY) |
| 169 |
|
return 0; |
| 172 |
– |
|
| 170 |
|
output_depth(dcp, d); |
| 174 |
– |
|
| 171 |
|
if (unbuf && fflush(stdout) == EOF) { |
| 172 |
|
fputs(progname, stderr); |
| 173 |
|
fputs(": write error on output\n", stderr); |
| 256 |
|
return 0; |
| 257 |
|
|
| 258 |
|
while (scanf("%d %d", &xy[0], &xy[1]) == 2) { |
| 259 |
< |
loc2pix(xy, &dcp->res, |
| 260 |
< |
(xy[0]+.5)/dcp->res.xr, (xy[1]+.5)/dcp->res.yr); |
| 259 |
> |
loc2pix(xy, &dcp->res, xy[0]/(double)dcp->res.xr, |
| 260 |
> |
xy[1]/(double)dcp->res.yr); |
| 261 |
|
if (get_worldpos_pix(wpos, dcp, xy[0], xy[1]) < 0) |
| 262 |
|
return 0; |
| 263 |
|
output_worldpos(dcp, wpos); |