--- ray/src/common/dircode.c 2003/03/12 04:59:04 2.3 +++ ray/src/common/dircode.c 2003/06/20 00:25:49 2.5 @@ -1,8 +1,8 @@ #ifndef lint -static const char RCSid[] = "$Id: dircode.c,v 2.3 2003/03/12 04:59:04 greg Exp $"; +static const char RCSid[] = "$Id: dircode.c,v 2.5 2003/06/20 00:25:49 greg Exp $"; #endif /* - * Compute a 4-byte direction code (int4 type defined in standard.h). + * Compute a 4-byte direction code (int32 type defined in standard.h). * * Mean accuracy is 0.0022 degrees, with a maximum error of 0.0058 degrees. */ @@ -19,20 +19,20 @@ static const char RCSid[] = "$Id: dircode.c,v 2.3 2003 #define F2SFT 18 #define FMASK 0x1fff -int4 +int32 encodedir(dv) /* encode a normalized direction vector */ FVECT dv; { - register int4 dc = 0; + register int32 dc = 0; int cd[3], cm; register int i; for (i = 0; i < 3; i++) if (dv[i] < 0.) { - cd[i] = dv[i] * -DCSCALE; + cd[i] = (int)(dv[i] * -DCSCALE); dc |= FXNEG<