1 |
< |
/* Copyright (c) 1997 Silicon Graphics, Inc. */ |
1 |
> |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
|
|
3 |
|
/* SCCSid "$SunId$ SGI" */ |
4 |
|
|
14 |
|
#ifndef HDMAX |
15 |
|
#define HDMAX 128 /* maximum active holodeck sections */ |
16 |
|
#endif |
17 |
– |
#ifndef int2 |
18 |
– |
#define int2 short |
19 |
– |
#endif |
20 |
– |
#ifndef int4 |
21 |
– |
#define int4 int |
22 |
– |
#endif |
17 |
|
|
18 |
|
#define DCINF (unsigned)((1L<<16)-1) /* special value for infinity */ |
19 |
|
#define DCLIN (unsigned)(1L<<11) /* linear depth limit */ |
20 |
|
|
21 |
|
typedef struct { |
22 |
|
BYTE r[2][2]; /* ray direction index */ |
23 |
< |
COLR v; /* value */ |
24 |
< |
unsigned int2 d; /* depth code */ |
25 |
< |
} RAYVAL; /* ray value (from second wall) */ |
23 |
> |
COLR v; /* color value */ |
24 |
> |
unsigned int2 d; /* depth code (from entry wall) */ |
25 |
> |
} RAYVAL; /* ray value */ |
26 |
|
|
27 |
|
/* |
28 |
|
* Walls are ordered: X0 X1 X2 WN |
80 |
|
int b; /* beam index */ |
81 |
|
} HDBEAMI; /* holodeck beam index */ |
82 |
|
|
83 |
< |
#define nbeams(hp) (2*((hp)->wi[5]-1)) |
83 |
> |
#define nbeams(hp) (((hp)->wi[5]-1)<<1) |
84 |
|
#define biglob(hp) ((hp)->bi) |
85 |
|
#define blglob(hp) (*(hp)->bl) |
86 |
|
|
87 |
|
#define bnrays(hp,i) ((hp)->bl[i]!=NULL ? (hp)->bl[i]->nrm : (hp)->bi[i].nrd) |
88 |
|
|
89 |
< |
#define hdflush(hp) (hdfreebeam(hp,0) && hdsync(hp,0)) |
90 |
< |
#define hdclobber(hp) (hdkillbeam(hp,0) && hdsync(hp,0)) |
89 |
> |
#define hdflush(hp) (hdfreebeam(hp,0), hdsync(hp,0)) |
90 |
> |
#define hdclobber(hp) (hdkillbeam(hp,0), hdsync(hp,0)) |
91 |
|
|
92 |
|
extern HOLO *hdinit(), *hdalloc(); |
93 |
|
extern BEAM *hdgetbeam(); |
96 |
|
extern long hdfiluse(), hdfilen(), hdallocfrag(); |
97 |
|
extern double hdray(), hdinter(); |
98 |
|
extern unsigned hdcode(); |
99 |
+ |
extern int hdfilord(); |
100 |
|
|
101 |
|
extern unsigned hdcachesize; /* target cache size (bytes) */ |
102 |
|
extern unsigned long hdclock; /* holodeck system clock */ |