--- ray/src/hd/rhd_qtree2c.c 1998/01/09 13:57:07 3.1 +++ ray/src/hd/rhd_qtree2c.c 2011/05/20 02:06:39 3.4 @@ -1,9 +1,6 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ - #ifndef lint -static char SCCSid[] = "$SunId$ SGI"; +static const char RCSid[] = "$Id: rhd_qtree2c.c,v 3.4 2011/05/20 02:06:39 greg Exp $"; #endif - /* * Quadtree display support routines for cone output. */ @@ -11,12 +8,21 @@ static char SCCSid[] = "$SunId$ SGI"; #include "standard.h" #include "rhd_qtree.h" +static void redraw(RTREE *tp, int x0, int y0, int x1, int y1, int l[2][2]); +static void cpaint(uby8 rgb[3], float *p, int x0, int y0, int x1, int y1); +static void update(uby8 ca[3], RTREE *tp, int x0, int y0, int x1, int y1); -static -redraw(tp, x0, y0, x1, y1, l) /* mark portion of a tree for redraw */ -register RTREE *tp; -int x0, y0, x1, y1; -int l[2][2]; + + +static void +redraw( /* mark portion of a tree for redraw */ + register RTREE *tp, + int x0, + int y0, + int x1, + int y1, + int l[2][2] +) { int quads = CH_ANY; int mx, my; @@ -42,11 +48,15 @@ int l[2][2]; } -static -cpaint(rgb, p, x0, y0, x1, y1) /* paint a cone within a rectangle */ -BYTE rgb[3]; -register float *p; -int x0, y0, x1, y1; +static void +cpaint( /* paint a cone within a rectangle */ + uby8 rgb[3], + register float *p, + int x0, + int y0, + int x1, + int y1 +) { static FVECT ip, wp; double rad; @@ -83,15 +93,19 @@ int x0, y0, x1, y1; } -static -update(ca, tp, x0, y0, x1, y1) /* update tree display as needed */ -BYTE ca[3]; /* returned average color */ -register RTREE *tp; -int x0, y0, x1, y1; +static void +update( /* update tree display as needed */ + uby8 ca[3], /* returned average color */ + register RTREE *tp, + int x0, + int y0, + int x1, + int y1 +) { int csm[3], nc; - register BYTE *cp; - BYTE rgb[3]; + register uby8 *cp; + uby8 rgb[3]; int gaps = 0; int mx, my; register int i; @@ -135,23 +149,29 @@ int x0, y0, x1, y1; } -qtRedraw(x0, y0, x1, y1) /* redraw part or all of our screen */ -int x0, y0, x1, y1; +extern void +qtRedraw( /* redraw part or all of our screen */ + int x0, + int y0, + int x1, + int y1 +) { int lim[2][2]; if (is_stump(&qtrunk)) return; - if (!qtMapLeaves((lim[0][0]=x0) <= 0 & (lim[1][0]=y0) <= 0 & - (lim[0][1]=x1) >= odev.hres-1 & (lim[1][1]=y1) >= odev.vres-1)) + if (!(qtMapLeaves((lim[0][0]=x0) <= 0) & ((lim[1][0]=y0) <= 0) & + ((lim[0][1]=x1) >= odev.hres-1) & ((lim[1][1]=y1) >= odev.vres-1))) return; redraw(&qtrunk, 0, 0, odev.hres, odev.vres, lim); } -qtUpdate() /* update our tree display */ +extern void +qtUpdate(void) /* update our tree display */ { - BYTE ca[3]; + uby8 ca[3]; if (is_stump(&qtrunk)) return;