--- ray/src/hd/sm_samp.c 2003/02/22 02:07:25 3.7 +++ ray/src/hd/sm_samp.c 2003/06/30 14:59:12 3.9 @@ -1,22 +1,25 @@ #ifndef lint -static const char RCSid[] = "$Id: sm_samp.c,v 3.7 2003/02/22 02:07:25 greg Exp $"; +static const char RCSid[] = "$Id: sm_samp.c,v 3.9 2003/06/30 14:59:12 schorsch Exp $"; #endif /* * sm_samp.c */ + +#include + #include "standard.h" #include "sm_flag.h" #include "rhd_sample.h" SAMP rsL; -int4 *samp_flag=NULL; +int32 *samp_flag=NULL; /* Each sample has a world coord point, and direction, brightness,chrominance, and RGB triples */ #define TMSIZE sizeof(TMbright) -#define SAMPSIZ (3*sizeof(SFLOAT)+sizeof(int4)+ 6*sizeof(BYTE) + TMSIZE + 2*sizeof(int)) +#define SAMPSIZ (3*sizeof(SFLOAT)+sizeof(int32)+ 6*sizeof(BYTE) + TMSIZE + 2*sizeof(int)) /* Extra points world space point, vert flag and qt flag */ #define POINTSIZ (3*sizeof(SFLOAT) + 2*sizeof(int)) @@ -26,7 +29,7 @@ sClear_all_flags(s) SAMP *s; { if(samp_flag) - bzero((char *)samp_flag,FLAG_BYTES(S_MAX_BASE_PT(s))); + memset((char *)samp_flag, '\0', FLAG_BYTES(S_MAX_BASE_PT(s))); } sInit(s) @@ -82,7 +85,7 @@ int *nptr,extra_points; /* assign larger alignment types earlier */ S_W_PT(s) = (SFLOAT(*)[3])S_BASE(s); - S_W_DIR(s) = (int4 *)(S_W_PT(s) + n + extra_points); + S_W_DIR(s) = (int32 *)(S_W_PT(s) + n + extra_points); S_BRT(s) = (TMbright *)(S_W_DIR(s) + n); S_CHR(s) = (BYTE (*)[3])(S_BRT(s) + n); S_RGB(s) = (BYTE (*)[3])(S_CHR(s) + n); @@ -92,7 +95,7 @@ int *nptr,extra_points; S_MAX_BASE_PT(s) = n + extra_points; /* Allocate memory for a per/sample bit flag */ - if(!(samp_flag = (int4 *)malloc(FLAG_BYTES(n+extra_points)))) + if(!(samp_flag = (int32 *)malloc(FLAG_BYTES(n+extra_points)))) error(SYSTEM,"sAlloc(): Unable to allocate flag memory"); sInit(s); sClear_all_flags(s);