--- ray/src/hd/holo.h 2003/05/29 16:26:21 3.21 +++ ray/src/hd/holo.h 2003/07/14 22:24:00 3.23 @@ -1,13 +1,19 @@ -/* RCSid: $Id: holo.h,v 3.21 2003/05/29 16:26:21 greg Exp $ */ +/* RCSid: $Id: holo.h,v 3.23 2003/07/14 22:24:00 schorsch Exp $ */ /* * Header file for holodeck programs * * 9/29/97 GWLarson */ +#ifndef _RAD_HOLO_H_ +#define _RAD_HOLO_H_ #include "standard.h" #include "color.h" +#ifdef __cplusplus +extern "C" { +#endif + #ifndef HDMAX #define HDMAX 128 /* maximum active holodeck sections */ #endif @@ -22,7 +28,7 @@ typedef struct { BYTE r[2][2]; /* ray direction index */ COLR v; /* color value */ - unsigned int2 d; /* depth code (from entry wall) */ + uint16 d; /* depth code (from entry wall) */ } RAYVAL; /* ray value */ /* @@ -43,12 +49,12 @@ typedef struct { } GCOORD; /* grid coordinates (two for beam) */ typedef struct { - unsigned int4 nrd; /* number of beam rays bundled on disk */ + uint32 nrd; /* number of beam rays bundled on disk */ off_t fo; /* position in file */ } BEAMI; /* beam index */ typedef struct { - unsigned int4 nrm; /* number of beam rays bundled in memory */ + uint32 nrm; /* number of beam rays bundled in memory */ unsigned long tick; /* clock tick for LRU replacement */ } BEAM; /* followed by nrm RAYVAL's */ @@ -58,13 +64,13 @@ typedef struct { typedef struct { FVECT orig; /* prism origin (first) */ FVECT xv[3]; /* side vectors (second) */ - int2 grid[3]; /* grid resolution (third) */ + int16 grid[3]; /* grid resolution (third) */ } HDGRID; /* holodeck section grid (must match HOLO struct) */ typedef struct holo { FVECT orig; /* prism origin (first) */ FVECT xv[3]; /* side vectors (second) */ - int2 grid[3]; /* grid resolution (third) */ + int16 grid[3]; /* grid resolution (third) */ int fd; /* file descriptor */ struct { int s, n; /* dirty section start, length */ @@ -144,3 +150,10 @@ extern int hdwg1[6]; /* wall grid 1 index */ * in future versions, but we thought this would be best for paging speed * in our initial implementation. */ + + +#ifdef __cplusplus +} +#endif +#endif /* _RAD_HOLO_H_ */ +