ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rhd_qtree2c.c
(Generate patch)

Comparing ray/src/hd/rhd_qtree2c.c (file contents):
Revision 3.2 by greg, Sat Feb 22 02:07:24 2003 UTC vs.
Revision 3.3 by schorsch, Thu Jan 1 11:21:55 2004 UTC

# Line 8 | Line 8 | static const char      RCSid[] = "$Id$";
8   #include "standard.h"
9   #include "rhd_qtree.h"
10  
11 + static void redraw(RTREE *tp, int x0, int y0, int x1, int y1, int l[2][2]);
12 + static void cpaint(BYTE rgb[3], float *p, int x0, int y0, int x1, int y1);
13 + static void update(BYTE ca[3], RTREE *tp, int x0, int y0, int x1, int y1);
14  
15 < static
16 < redraw(tp, x0, y0, x1, y1, l)   /* mark portion of a tree for redraw */
17 < register RTREE  *tp;
18 < int     x0, y0, x1, y1;
19 < int     l[2][2];
15 >
16 >
17 > static void
18 > redraw( /* mark portion of a tree for redraw */
19 >        register RTREE  *tp,
20 >        int     x0,
21 >        int     y0,
22 >        int     x1,
23 >        int     y1,
24 >        int     l[2][2]
25 > )
26   {
27          int     quads = CH_ANY;
28          int     mx, my;
# Line 39 | Line 48 | int    l[2][2];
48   }
49  
50  
51 < static
52 < cpaint(rgb, p, x0, y0, x1, y1)  /* paint a cone within a rectangle */
53 < BYTE    rgb[3];
54 < register float  *p;
55 < int     x0, y0, x1, y1;
51 > static void
52 > cpaint( /* paint a cone within a rectangle */
53 >        BYTE    rgb[3],
54 >        register float  *p,
55 >        int     x0,
56 >        int     y0,
57 >        int     x1,
58 >        int     y1
59 > )
60   {
61          static FVECT    ip, wp;
62          double  rad;
# Line 80 | Line 93 | int    x0, y0, x1, y1;
93   }
94  
95  
96 < static
97 < update(ca, tp, x0, y0, x1, y1)  /* update tree display as needed */
98 < BYTE    ca[3];          /* returned average color */
99 < register RTREE  *tp;
100 < int     x0, y0, x1, y1;
96 > static void
97 > update( /* update tree display as needed */
98 >        BYTE    ca[3],          /* returned average color */
99 >        register RTREE  *tp,
100 >        int     x0,
101 >        int     y0,
102 >        int     x1,
103 >        int     y1
104 > )
105   {
106          int     csm[3], nc;
107          register BYTE   *cp;
# Line 132 | Line 149 | int    x0, y0, x1, y1;
149   }
150  
151  
152 < qtRedraw(x0, y0, x1, y1)        /* redraw part or all of our screen */
153 < int     x0, y0, x1, y1;
152 > extern void
153 > qtRedraw(       /* redraw part or all of our screen */
154 >        int     x0,
155 >        int     y0,
156 >        int     x1,
157 >        int     y1
158 > )
159   {
160          int     lim[2][2];
161  
162          if (is_stump(&qtrunk))
163                  return;
164 <        if (!qtMapLeaves((lim[0][0]=x0) <= 0 & (lim[1][0]=y0) <= 0 &
165 <                (lim[0][1]=x1) >= odev.hres-1 & (lim[1][1]=y1) >= odev.vres-1))
164 >        if (!(qtMapLeaves((lim[0][0]=x0) <= 0) & ((lim[1][0]=y0) <= 0) &
165 >                ((lim[0][1]=x1) >= odev.hres-1) & ((lim[1][1]=y1) >= odev.vres-1)))
166                  return;
167          redraw(&qtrunk, 0, 0, odev.hres, odev.vres, lim);
168   }
169  
170  
171 < qtUpdate()                      /* update our tree display */
171 > extern void
172 > qtUpdate(void)                  /* update our tree display */
173   {
174          BYTE    ca[3];
175  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines