| 26 |
|
#define DCLIN (unsigned)(1L<<11) /* linear depth limit */ |
| 27 |
|
|
| 28 |
|
typedef struct { |
| 29 |
< |
BYTE r[2][2]; /* ray direction index */ |
| 29 |
> |
uby8 r[2][2]; /* ray direction index */ |
| 30 |
|
COLR v; /* color value */ |
| 31 |
|
uint16 d; /* depth code (from entry wall) */ |
| 32 |
|
} RAYVAL; /* ray value */ |
| 98 |
|
#define hdflush(hp) (hdfreebeam(hp,0), hdsync(hp,0)) |
| 99 |
|
#define hdclobber(hp) (hdkillbeam(hp,0), hdsync(hp,0)) |
| 100 |
|
|
| 101 |
– |
/* |
| 102 |
– |
extern HOLO *hdinit(), *hdalloc(); |
| 103 |
– |
extern BEAM *hdgetbeam(); |
| 104 |
– |
extern RAYVAL *hdnewrays(); |
| 105 |
– |
extern unsigned hdmemuse(); |
| 106 |
– |
extern off_t hdfiluse(), hdfilen(), hdallocfrag(); |
| 107 |
– |
extern double hdray(), hdinter(); |
| 108 |
– |
extern unsigned hdcode(); |
| 109 |
– |
extern int hdfilord(); |
| 110 |
– |
*/ |
| 111 |
– |
|
| 101 |
|
#define FF_NEVER 0 /* never free fragments */ |
| 102 |
|
#define FF_WRITE 01 /* free fragment on write */ |
| 103 |
|
#define FF_ALLOC 02 /* free fragment on ray alloc */ |
| 121 |
|
|
| 122 |
|
#define HOLOFMT "Holodeck" /* file format identifier */ |
| 123 |
|
#define HOLOVERS 0 /* file format version number */ |
| 124 |
< |
#define HOLOMAGIC (323+sizeof(BEAMI)+16*HOLOVERS) /* file magic number */ |
| 124 |
> |
#define HOLOMAGIC (324+sizeof(BEAMI)+16*HOLOVERS) /* file magic number */ |
| 125 |
|
|
| 126 |
|
/* |
| 127 |
|
* A holodeck file consists of an information header terminated by a |
| 128 |
|
* blank line, with "FORMAT=Holodeck" somewhere in it. |
| 129 |
|
* The first integer after the information header is the |
| 130 |
|
* above magic number, which includes the file format version number. |
| 131 |
< |
* The first longword after the magic number is a pointer to the pointer |
| 132 |
< |
* just before the SECOND holodeck section, or 0 if there is only one. |
| 131 |
> |
* The first longword (off_t) after the magic number is a pointer to the |
| 132 |
> |
* pointer just before the SECOND holodeck section, or 0 if there is only one. |
| 133 |
|
* This longword is immediately followed by the first holodeck |
| 134 |
|
* section header and directory. |
| 135 |
|
* Similarly, every holodeck section in the file is preceeded by |
| 144 |
|
|
| 145 |
|
/* clumpbeams.c */ |
| 146 |
|
extern void clumpbeams(HOLO *hp, int maxcnt, int maxsiz, |
| 147 |
< |
int (*cf)(HOLO *hp, int *bqueue, int bqlen)); |
| 147 |
> |
int (*cf)(HOLO *hp, int *bqueue, int bqlen)); |
| 148 |
|
/* holo.c */ |
| 149 |
|
extern void hdcompgrid(HOLO *hp); |
| 150 |
|
extern int hdbcoord(GCOORD gc[2], HOLO *hp, int i); |
| 154 |
|
extern unsigned int hdcode(HOLO *hp, double d); |
| 155 |
|
extern void hdgrid( FVECT gp, HOLO *hp, FVECT wp); |
| 156 |
|
extern void hdworld(FVECT wp, HOLO *hp, FVECT gp); |
| 157 |
< |
extern double hdray(FVECT ro, FVECT rd, HOLO *hp, GCOORD gc[2], BYTE r[2][2]); |
| 158 |
< |
extern double hdinter(GCOORD gc[2], BYTE r[2][2], double *ed, HOLO *hp, |
| 159 |
< |
FVECT ro, FVECT rd); |
| 157 |
> |
extern double hdray(FVECT ro, FVECT rd, HOLO *hp, GCOORD gc[2], uby8 r[2][2]); |
| 158 |
> |
extern double hdinter(GCOORD gc[2], uby8 r[2][2], double *ed, HOLO *hp, |
| 159 |
> |
FVECT ro, FVECT rd); |
| 160 |
|
/* holofile.c */ |
| 161 |
|
extern HOLO * hdinit(int fd, HDGRID *hproto); |
| 162 |
|
extern void hddone(HOLO *hp); |