5 |
|
* Compute rays corresponding to a given picture or view. |
6 |
|
*/ |
7 |
|
|
8 |
< |
|
8 |
> |
#include "platform.h" |
9 |
|
#include "standard.h" |
10 |
– |
|
10 |
|
#include "view.h" |
11 |
|
|
12 |
|
extern int putf(), putd(), puta(); |
98 |
|
default: |
99 |
|
goto userr; |
100 |
|
} |
101 |
< |
if (i > argc | i+2 < argc) |
101 |
> |
if ((i > argc) | (i+2 < argc)) |
102 |
|
goto userr; |
103 |
|
if (i < argc) { |
104 |
|
rval = viewfile(argv[i], &vw, &rs); |
160 |
|
if (zfd >= 0) { |
161 |
|
loc2pix(pp, &rs, px/rs.xr, py/rs.yr); |
162 |
|
if (lseek(zfd, |
163 |
< |
(pp[1]*scanlen(&rs)+pp[0])*sizeof(float), 0) |
164 |
< |
< 0 || |
163 |
> |
(pp[1]*scanlen(&rs)+pp[0])*sizeof(float), |
164 |
> |
SEEK_SET) < 0 || |
165 |
|
read(zfd, &zval, sizeof(float)) |
166 |
< |
< sizeof(float)) { |
166 |
> |
< sizeof(float)) { |
167 |
|
fprintf(stderr, "%s: depth buffer read error\n", |
168 |
|
progname); |
169 |
|
exit(1); |
192 |
|
|
193 |
|
putrays() |
194 |
|
{ |
195 |
< |
static FLOAT loc[2]; |
195 |
> |
static RREAL loc[2]; |
196 |
|
static FVECT rorg, rdir; |
197 |
|
float *zbuf; |
198 |
|
int sc; |