8 |
|
|
9 |
|
#include "standard.h" |
10 |
|
|
11 |
+ |
#include "platform.h" |
12 |
|
#include "view.h" |
13 |
|
|
14 |
|
extern int putf(), putd(), puta(); |
100 |
|
default: |
101 |
|
goto userr; |
102 |
|
} |
103 |
< |
if (i > argc | i+2 < argc) |
103 |
> |
if ((i > argc) | (i+2 < argc)) |
104 |
|
goto userr; |
105 |
|
if (i < argc) { |
106 |
|
rval = viewfile(argv[i], &vw, &rs); |
162 |
|
if (zfd >= 0) { |
163 |
|
loc2pix(pp, &rs, px/rs.xr, py/rs.yr); |
164 |
|
if (lseek(zfd, |
165 |
< |
(pp[1]*scanlen(&rs)+pp[0])*sizeof(float), 0) |
166 |
< |
< 0 || |
165 |
> |
(pp[1]*scanlen(&rs)+pp[0])*sizeof(float), |
166 |
> |
SEEK_SET) < 0 || |
167 |
|
read(zfd, &zval, sizeof(float)) |
168 |
< |
< sizeof(float)) { |
168 |
> |
< sizeof(float)) { |
169 |
|
fprintf(stderr, "%s: depth buffer read error\n", |
170 |
|
progname); |
171 |
|
exit(1); |
194 |
|
|
195 |
|
putrays() |
196 |
|
{ |
197 |
< |
static FLOAT loc[2]; |
197 |
> |
static RREAL loc[2]; |
198 |
|
static FVECT rorg, rdir; |
199 |
|
float *zbuf; |
200 |
|
int sc; |