--- ray/src/hd/rhd_odraw.c 1998/12/29 09:51:07 3.11 +++ ray/src/hd/rhd_odraw.c 2003/06/20 00:25:49 3.15 @@ -1,16 +1,12 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ - #ifndef lint -static char SCCSid[] = "$SunId$ SGI"; +static const char RCSid[] = "$Id: rhd_odraw.c,v 3.15 2003/06/20 00:25:49 greg Exp $"; #endif - /* * Routines for drawing samples using depth buffer checks. */ #include "standard.h" -#include #include #include @@ -51,7 +47,7 @@ static int needmapping; /* what needs doing with tone #define SAMP32 (32*(2*sizeof(short)+sizeof(union ODfunion)+sizeof(TMbright)+\ - 6*sizeof(BYTE))+sizeof(int4)) + 6*sizeof(BYTE))+sizeof(int32)) int odInit(n) /* initialize drawing routines */ @@ -62,12 +58,12 @@ int n; if (odNViews > 0) { /* deallocate view structures */ for (i = odNViews; i--; ) { - free((char *)odView[i].bmap); - free((char *)odView[i].pmap); + free((void *)odView[i].bmap); + free((void *)odView[i].pmap); if (odView[i].emap != NULL) - free((char *)odView[i].emap); + free((void *)odView[i].emap); } - free((char *)odView); + free((void *)odView); odView = NULL; odNViews = 0; } @@ -91,7 +87,7 @@ int n; return(0); /* assign larger alignment types earlier */ odS.f = (union ODfunion *)odS.base; - odS.redraw = (int4 *)(odS.f + n); + odS.redraw = (int32 *)(odS.f + n); odS.ip = (short (*)[2])(odS.redraw + n/32); odS.brt = (TMbright *)(odS.ip + n); odS.chr = (BYTE (*)[3])(odS.brt + n); @@ -121,8 +117,8 @@ int n; if (odView[i].vlow < 1) odView[i].vlow = 1; odView[i].emap = NULL; odView[i].dmap = NULL; - odView[i].pmap = (int4 *)calloc(FL4NELS(res[0]*res[1]), - sizeof(int4)); + odView[i].pmap = (int32 *)calloc(FL4NELS(res[0]*res[1]), + sizeof(int32)); if (odView[i].pmap == NULL) return(0); j = odView[i].hlow*odView[i].vlow; @@ -301,7 +297,7 @@ FVECT d, p; if (id < 0) continue; /* not good enough */ /* convert color */ - tmCvColrs(&odS.brt[id], odS.chr[id], c, 1); + tmCvColrs(&odS.brt[id], odS.chr[id], (COLR *)c, 1); if (imm_mode | needmapping) /* if immediate mode */ needmapping |= NEWRGB; /* map it later */ else /* else map it now */ @@ -382,7 +378,7 @@ GLfloat *dm; if (vn<0 | vn>=odNViews) return; /* too late -- they're gone! */ if (odView[vn].emap != NULL) - free((char *)odView[vn].emap); + free((void *)odView[vn].emap); odView[vn].emap = NULL; odView[vn].dmap = NULL; return; @@ -391,8 +387,8 @@ GLfloat *dm; "bad view number in odDepthMap"); odView[vn].dmap = dm; /* initialize edge map */ if (odView[vn].emap == NULL) { - odView[vn].emap = (int4 *)malloc( - FL4NELS(odView[vn].hlow*odView[vn].vlow)*sizeof(int4)); + odView[vn].emap = (int32 *)malloc( + FL4NELS(odView[vn].hlow*odView[vn].vlow)*sizeof(int32)); if (odView[vn].emap == NULL) error(SYSTEM, "out of memory in odDepthMap"); } @@ -465,7 +461,8 @@ int vn; needmapping &= ~NEWMAP; odRedrawAll(); /* redraw everything */ } - if (tmMapPixels(odS.rgb,odS.brt,odS.chr,odS.nsamp) != TM_E_OK) + if (tmMapPixels((BYTE *)(odS.rgb), odS.brt, + (BYTE *)(odS.chr), odS.nsamp) != TM_E_OK) return; needmapping &= ~NEWRGB; }