1 |
|
#ifndef lint |
2 |
< |
static const char RCSid[] = "$Id$"; |
2 |
> |
static const char RCSid[] = "$Id"; |
3 |
|
#endif |
4 |
|
/* |
5 |
|
* Radiance object animation program |
11 |
|
|
12 |
|
#include "copyright.h" |
13 |
|
|
14 |
< |
#include "ranimove.h" |
15 |
< |
#include <sys/time.h> |
14 |
> |
#include <time.h> |
15 |
> |
#ifndef _WIN32 |
16 |
> |
#include <sys/time.h> |
17 |
> |
#endif |
18 |
|
#include <ctype.h> |
19 |
+ |
#include <string.h> |
20 |
|
|
21 |
+ |
#include "paths.h" |
22 |
+ |
#include "ranimove.h" |
23 |
+ |
|
24 |
|
int NVARS = NV_INIT; /* total number of variables */ |
25 |
|
|
26 |
|
VARIABLE vv[] = VV_INIT; /* variable-value pairs */ |
97 |
|
case 'f': /* frame range */ |
98 |
|
switch (sscanf(argv[++i], "%d,%d", &fbeg, &fend)) { |
99 |
|
case 2: |
100 |
< |
if ((fbeg <= 0 | fend < fbeg)) |
100 |
> |
if ((fbeg <= 0) | (fend < fbeg)) |
101 |
|
goto userr; |
102 |
|
break; |
103 |
|
case 1: |
247 |
|
setrendparams(lorendoptf, vval(LOWQ)); |
248 |
|
ray_save(&lorendparams); |
249 |
|
curparams = &lorendparams; |
250 |
< |
twolevels = bcmp(&lorendparams, &hirendparams, sizeof(RAYPARAMS)); |
250 |
> |
twolevels = memcmp(&lorendparams, &hirendparams, sizeof(RAYPARAMS)); |
251 |
|
} |
252 |
|
|
253 |
|
|
299 |
|
if (isflt(om->prio_file)) { |
300 |
|
om->prio = atof(om->prio_file); |
301 |
|
om->prio_file[0] = '\0'; |
302 |
< |
haveprio |= (om->prio < 0.95 | om->prio > 1.05); |
302 |
> |
haveprio |= ((om->prio < 0.95) | (om->prio > 1.05)); |
303 |
|
} else |
304 |
|
haveprio = 1; |
305 |
|
} else |
388 |
|
pippt = NULL; |
389 |
|
} |
390 |
|
if (pippt != NULL) |
391 |
< |
strcpy(pippt, "> /dev/null"); /* nothing to match */ |
391 |
> |
strcpy(pippt, "> " NULL_DEVICE); /* nothing to match */ |
392 |
|
else { |
393 |
|
strcpy(cp, ")[ \t]*=' > ranimove.var"); |
394 |
|
cp += 11; /* point to file name */ |
456 |
|
fclose(viewfp); |
457 |
|
viewfp = NULL; |
458 |
|
viewnum = 0; |
459 |
< |
copystruct(&curview, &stdview); |
459 |
> |
curview = stdview; |
460 |
|
} |
461 |
|
return(NULL); |
462 |
|
} |
472 |
|
perror(vval(VIEWFILE)); |
473 |
|
quit(1); |
474 |
|
} |
475 |
< |
copystruct(&curview, &stdview); |
475 |
> |
curview = stdview; |
476 |
|
viewnum = 0; |
477 |
|
} |
478 |
|
if (n < 0) { /* get next view */ |
572 |
|
return(1.0); |
573 |
|
|
574 |
|
expval = atof(s); |
575 |
< |
if ((s[0] == '+' | s[0] == '-')) |
575 |
> |
if ((s[0] == '+') | (s[0] == '-')) |
576 |
|
return(pow(2.0, expval)); |
577 |
|
return(expval); |
578 |
|
} |
761 |
|
om->cprio = om->prio; |
762 |
|
} |
763 |
|
/* XXX bxfm relies on call order */ |
764 |
< |
if (framestep) |
764 |
> |
if (framestep) { |
765 |
|
if (invmat4(om->bxfm, om->cxfm)) |
766 |
|
multmat4(om->bxfm, om->bxfm, oxf.xfm); |
767 |
|
else |
768 |
|
setident4(om->bxfm); |
769 |
+ |
} |
770 |
|
/* all done */ |
771 |
|
return(xfp); |
772 |
|
} |
792 |
|
objnm = obj_move[i].name; |
793 |
|
len = strlen(objnm); |
794 |
|
if (!strncmp(onm, objnm, len)) { |
795 |
< |
if ((obj_move[i].parent < 0 & onm[len] == '.')) |
795 |
> |
if ((obj_move[i].parent < 0) & (onm[len] == '.')) |
796 |
|
break; |
797 |
|
objnm = getobjname(&obj_move[i]) + len; |
798 |
|
len2 = strlen(objnm); |