57 |
|
unsigned long tick; /* clock tick for LRU replacement */ |
58 |
|
} BEAM; /* followed by nrm RAYVAL's */ |
59 |
|
|
60 |
< |
#define hdbray(bp) (RAYVAL *)((bp)+1) |
60 |
> |
#define hdbray(bp) ((RAYVAL *)((bp)+1)) |
61 |
|
#define hdbsiz(nr) (sizeof(BEAM)+(nr)*sizeof(RAYVAL)) |
62 |
|
|
63 |
|
typedef struct { |
74 |
|
short dirty; /* beam index needs update to file */ |
75 |
|
double tlin; /* linear range for depth encoding */ |
76 |
|
FVECT wn[3]; /* wall normals (derived) */ |
77 |
+ |
double wg[3]; /* wall grid multipliers (derived) */ |
78 |
|
double wo[6]; /* wall offsets (derived) */ |
78 |
– |
FVECT gv[3][2]; /* grid coordinate vectors (derived) */ |
79 |
|
int wi[6]; /* wall super-indices (derived) */ |
80 |
|
char *priv; /* pointer to private client data */ |
81 |
|
BEAM **bl; /* beam pointers (memory cache) */ |
88 |
|
|
89 |
|
#define bnrays(hp,i) ((hp)->bl[i]!=NULL ? (hp)->bl[i]->nrm : (hp)->bi[i].nrd) |
90 |
|
|
91 |
< |
#define hdflush(hp) (hdfreebeam(hp,0) && hdsync(hp)) |
91 |
> |
#define hdflush(hp) (hdfreebeam(hp,0) && hdsync(hp,0)) |
92 |
> |
#define hdclobber(hp) (hdkillbeam(hp,0) && hdsync(hp,0)) |
93 |
|
|
94 |
< |
extern HOLO *hdinit(); |
94 |
> |
extern HOLO *hdinit(), *hdalloc(); |
95 |
|
extern BEAM *hdgetbeam(); |
96 |
|
extern RAYVAL *hdnewrays(); |
97 |
|
extern long hdmemuse(), hdfiluse(); |
118 |
|
* blank line, with "FORMAT=Holodeck" somewhere in it. |
119 |
|
* The first integer after the information header is the |
120 |
|
* above magic number, which includes the file format version number. |
121 |
< |
* The first longword after the magic number is the position |
122 |
< |
* of the SECOND holodeck section, or 0 if there is only one. |
121 |
> |
* The first longword after the magic number is a pointer to the pointer |
122 |
> |
* just before the SECOND holodeck section, or 0 if there is only one. |
123 |
|
* This longword is immediately followed by the first holodeck |
124 |
|
* section header and directory. |
125 |
|
* Similarly, every holodeck section in the file is preceeded by |