--- ray/src/hd/holo.h 2004/01/01 11:21:55 3.24 +++ ray/src/hd/holo.h 2011/05/20 02:06:39 3.28 @@ -1,4 +1,4 @@ -/* RCSid: $Id: holo.h,v 3.24 2004/01/01 11:21:55 schorsch Exp $ */ +/* RCSid: $Id: holo.h,v 3.28 2011/05/20 02:06:39 greg Exp $ */ /* * Header file for holodeck programs * @@ -26,7 +26,7 @@ extern "C" { #define DCLIN (unsigned)(1L<<11) /* linear depth limit */ typedef struct { - BYTE r[2][2]; /* ray direction index */ + uby8 r[2][2]; /* ray direction index */ COLR v; /* color value */ uint16 d; /* depth code (from entry wall) */ } RAYVAL; /* ray value */ @@ -55,7 +55,7 @@ typedef struct { typedef struct { uint32 nrm; /* number of beam rays bundled in memory */ - unsigned long tick; /* clock tick for LRU replacement */ + uint32 tick; /* clock tick for LRU replacement */ } BEAM; /* followed by nrm RAYVAL's */ #define hdbray(bp) ((RAYVAL *)((bp)+1)) @@ -132,15 +132,15 @@ extern int hdwg1[6]; /* wall grid 1 index */ #define HOLOFMT "Holodeck" /* file format identifier */ #define HOLOVERS 0 /* file format version number */ -#define HOLOMAGIC (323+sizeof(off_t)+8*HOLOVERS) /* file magic number */ +#define HOLOMAGIC (324+sizeof(BEAMI)+16*HOLOVERS) /* file magic number */ /* * A holodeck file consists of an information header terminated by a * blank line, with "FORMAT=Holodeck" somewhere in it. * The first integer after the information header is the * above magic number, which includes the file format version number. - * The first longword after the magic number is a pointer to the pointer - * just before the SECOND holodeck section, or 0 if there is only one. + * The first longword (off_t) after the magic number is a pointer to the + * pointer just before the SECOND holodeck section, or 0 if there is only one. * This longword is immediately followed by the first holodeck * section header and directory. * Similarly, every holodeck section in the file is preceeded by @@ -165,15 +165,15 @@ extern int hdlseg(int lseg[2][3], HOLO *hp, GCOORD gc[ extern unsigned int hdcode(HOLO *hp, double d); extern void hdgrid( FVECT gp, HOLO *hp, FVECT wp); extern void hdworld(FVECT wp, HOLO *hp, FVECT gp); -extern double hdray(FVECT ro, FVECT rd, HOLO *hp, GCOORD gc[2], BYTE r[2][2]); -extern double hdinter(GCOORD gc[2], BYTE r[2][2], double *ed, HOLO *hp, +extern double hdray(FVECT ro, FVECT rd, HOLO *hp, GCOORD gc[2], uby8 r[2][2]); +extern double hdinter(GCOORD gc[2], uby8 r[2][2], double *ed, HOLO *hp, FVECT ro, FVECT rd); /* holofile.c */ extern HOLO * hdinit(int fd, HDGRID *hproto); extern void hddone(HOLO *hp); extern int hdsync(HOLO *hp, int all); extern off_t hdfilen(int fd); -extern off_t hdfiluse(int fd, int all); +extern off_t hdfiluse(int fd); extern RAYVAL * hdnewrays(HOLO *hp, int i, int nr); extern BEAM * hdgetbeam(HOLO *hp, int i); extern void hdloadbeams(HDBEAMI *hb, int n, void (*bf)(BEAM *bp, HDBEAMI *hb));