--- ray/src/hd/rhpict2.c 2003/06/20 00:25:49 3.11 +++ ray/src/hd/rhpict2.c 2003/07/27 22:12:02 3.14 @@ -1,10 +1,12 @@ #ifndef lint -static const char RCSid[] = "$Id: rhpict2.c,v 3.11 2003/06/20 00:25:49 greg Exp $"; +static const char RCSid[] = "$Id: rhpict2.c,v 3.14 2003/07/27 22:12:02 schorsch Exp $"; #endif /* * Rendering routines for rhpict. */ +#include + #include "holo.h" #include "view.h" #include "random.h" @@ -35,7 +37,7 @@ static const char RCSid[] = "$Id: rhpict2.c,v 3.11 200 #define CLR4(f,i) FL4OP(f,i,&=~) #define TGL4(f,i) FL4OP(f,i,^=) #define FL4NELS(n) (((n)+0x1f)>>5) -#define CLR4ALL(f,n) bzero((char *)(f),FL4NELS(n)*sizeof(int32)) +#define CLR4ALL(f,n) memset((char *)(f),'\0',FL4NELS(n)*sizeof(int32)) #endif static int32 *pixFlags; /* pixel occupancy flags */ @@ -51,6 +53,7 @@ extern float *mydepth; /* depth values (visibility cul extern int hres, vres; /* current horizontal and vertical res. */ +void pixBeam(bp, hb) /* render a particular beam */ BEAM *bp; register HDBEAMI *hb; @@ -298,13 +301,13 @@ register short (*rnl)[NNEIGH]; nd[NNEIGH-1] = MAXRAD2; for (hoff = 0; hoff < hres; hoff = (hoff<=0) - hoff) { h2 = h + hoff; - if (h2 < 0 | h2 >= hres) + if ((h2 < 0) | (h2 >= hres)) continue; if ((h2-h)*(h2-h) >= nd[NNEIGH-1]) break; for (n = 0; n < NNEIGH && rnl[h2][n] < NINF; n++) { d = (h2-h)*(h2-h) + (v-rnl[h2][n])*(v-rnl[h2][n]); - if (d == 0 | d >= nd[NNEIGH-1]) + if ((d == 0) | (d >= nd[NNEIGH-1])) continue; if (nn < NNEIGH) /* insert neighbor */ nn++;