205 |
|
XFlush(theDisplay); |
206 |
|
return; |
207 |
|
} |
208 |
< |
if (sscanf(linbuf, "%lf %lf %lf %lf %lf", |
209 |
< |
&dir[0], &dir[1], &dir[2], |
210 |
< |
&dom, &lum) != 5) |
208 |
> |
if (sscanf(linbuf, FVFORMAT, |
209 |
> |
&dir[0], &dir[1], &dir[2]) != 3 || |
210 |
> |
sscanf(sskip2(linbuf, 3), "%lf %lf", |
211 |
> |
&dom, &lum) != 2) |
212 |
|
break; |
213 |
|
circle(dir, dom); |
214 |
|
value(dir, lum); |
241 |
|
cur[0] += ourview.vp[0]; |
242 |
|
cur[1] += ourview.vp[1]; |
243 |
|
cur[2] += ourview.vp[2]; |
244 |
< |
viewloc(pp, &ourview, cur); |
244 |
< |
if (pp[2] <= 0.0) |
244 |
> |
if (viewloc(pp, &ourview, cur) != VL_GOOD) |
245 |
|
goto fail; |
246 |
|
loc2pix(ip, &pres, pp[0], pp[1]); |
247 |
|
pt[i].x = ip[0]; |
269 |
|
pos[0] = ourview.vp[0] + dir[0]; |
270 |
|
pos[1] = ourview.vp[1] + dir[1]; |
271 |
|
pos[2] = ourview.vp[2] + dir[2]; |
272 |
< |
viewloc(pp, &ourview, pos); |
273 |
< |
if (pp[2] <= 0.0) |
272 |
> |
if (viewloc(pp, &ourview, pos) != VL_GOOD) |
273 |
|
return; |
274 |
|
loc2pix(ip, &pres, pp[0], pp[1]); |
275 |
|
sprintf(buf, "%.0f", v); |