| 9 |
|
|
| 10 |
|
#include "copyright.h" |
| 11 |
|
|
| 12 |
< |
#include "ray.h" |
| 12 |
> |
#include <signal.h> |
| 13 |
> |
#include <ctype.h> |
| 14 |
|
|
| 15 |
+ |
#include "ray.h" |
| 16 |
|
#include "rpaint.h" |
| 17 |
|
|
| 16 |
– |
#include <signal.h> |
| 18 |
|
|
| 18 |
– |
#include <ctype.h> |
| 19 |
– |
|
| 19 |
|
CUBE thescene; /* our scene */ |
| 20 |
|
OBJECT nsceneobjs; /* number of objects in our scene */ |
| 21 |
|
|
| 56 |
|
|
| 57 |
|
int backvis = 1; /* back face visibility */ |
| 58 |
|
|
| 59 |
< |
int maxdepth = 4; /* maximum recursion depth */ |
| 59 |
> |
int maxdepth = 6; /* maximum recursion depth */ |
| 60 |
|
double minweight = 1e-2; /* minimum ray weight */ |
| 61 |
|
|
| 62 |
|
char *ambfile = NULL; /* ambient file name */ |
| 63 |
|
COLOR ambval = BLKCOLOR; /* ambient value */ |
| 64 |
|
int ambvwt = 0; /* initial weight for ambient value */ |
| 65 |
< |
double ambacc = 0.2; /* ambient accuracy */ |
| 66 |
< |
int ambres = 8; /* ambient resolution */ |
| 67 |
< |
int ambdiv = 32; /* ambient divisions */ |
| 68 |
< |
int ambssamp = 0; /* ambient super-samples */ |
| 65 |
> |
double ambacc = 0.3; /* ambient accuracy */ |
| 66 |
> |
int ambres = 32; /* ambient resolution */ |
| 67 |
> |
int ambdiv = 256; /* ambient divisions */ |
| 68 |
> |
int ambssamp = 64; /* ambient super-samples */ |
| 69 |
|
int ambounce = 0; /* ambient bounces */ |
| 70 |
< |
char *amblist[128]; /* ambient include/exclude list */ |
| 70 |
> |
char *amblist[AMBLLEN]; /* ambient include/exclude list */ |
| 71 |
|
int ambincl = -1; /* include == 1, exclude == 0 */ |
| 72 |
|
|
| 73 |
|
int greyscale = 0; /* map colors to brightness? */ |
| 114 |
|
id = octname!=NULL ? octname : progname; |
| 115 |
|
/* check device table */ |
| 116 |
|
for (i = 0; devtable[i].name; i++) |
| 117 |
< |
if (!strcmp(dname, devtable[i].name)) |
| 117 |
> |
if (!strcmp(dname, devtable[i].name)) { |
| 118 |
|
if ((dev = (*devtable[i].init)(dname, id)) == NULL) { |
| 119 |
|
sprintf(errmsg, "cannot initialize %s", dname); |
| 120 |
|
error(USER, errmsg); |
| 121 |
|
} else |
| 122 |
|
return; |
| 123 |
< |
#ifndef NIX |
| 123 |
> |
} |
| 124 |
|
/* not there, try exec */ |
| 125 |
|
if ((dev = comm_init(dname, id)) == NULL) { |
| 126 |
|
sprintf(errmsg, "cannot start device \"%s\"", dname); |
| 127 |
|
error(USER, errmsg); |
| 128 |
|
} |
| 130 |
– |
#endif |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
|
| 215 |
|
else *++args = '\0'; |
| 216 |
|
|
| 217 |
|
switch (inpbuf[0]) { |
| 218 |
< |
case 'f': /* new frame (or free mem.) */ |
| 218 |
> |
case 'f': /* new frame (|focus|free) */ |
| 219 |
|
if (badcom("frame")) { |
| 220 |
< |
if (badcom("free")) |
| 221 |
< |
goto commerr; |
| 222 |
< |
free_objmem(); |
| 220 |
> |
if (badcom("focus")) { |
| 221 |
> |
if (badcom("free")) |
| 222 |
> |
goto commerr; |
| 223 |
> |
free_objmem(); |
| 224 |
> |
break; |
| 225 |
> |
} |
| 226 |
> |
getfocus(args); |
| 227 |
|
break; |
| 228 |
|
} |
| 229 |
|
getframe(args); |