29 |
|
#include "source.h" |
30 |
|
#include "otypes.h" |
31 |
|
#include "resolu.h" |
32 |
+ |
#include "random.h" |
33 |
|
|
34 |
|
CUBE thescene; /* our scene */ |
35 |
|
OBJECT nsceneobjs; /* number of objects in our scene */ |
215 |
|
if (vcount && !--vcount) /* check for end */ |
216 |
|
break; |
217 |
|
} |
218 |
< |
fflush(stdout); |
218 |
> |
if (fflush(stdout) < 0) |
219 |
> |
error(SYSTEM, "write error"); |
220 |
|
if (vcount) |
221 |
|
error(USER, "unexpected EOF on input"); |
222 |
|
if (fname != NULL) |
640 |
|
RAY *r |
641 |
|
) |
642 |
|
{ |
643 |
< |
COLOR contr; |
643 |
> |
double contr[3]; |
644 |
|
|
645 |
|
raycontrib(contr, r, PRIMARY); |
646 |
< |
(*putreal)(colval(contr,RED)); |
647 |
< |
(*putreal)(colval(contr,GRN)); |
648 |
< |
(*putreal)(colval(contr,BLU)); |
646 |
> |
(*putreal)(contr[RED]); |
647 |
> |
(*putreal)(contr[GRN]); |
648 |
> |
(*putreal)(contr[BLU]); |
649 |
|
} |
650 |
|
|
651 |
|
|