25 |
|
#define RAYQLEN 50000 /* max. rays to queue before flush */ |
26 |
|
#endif |
27 |
|
|
28 |
– |
#ifndef FEQ |
29 |
– |
#define FEQ(a,b) ((a)-(b) <= FTINY && (a)-(b) >= -FTINY) |
30 |
– |
#endif |
31 |
– |
|
28 |
|
#define GAMMA 2.2 /* default gamma correction */ |
29 |
|
|
30 |
|
#define FRAMESTATE(s) (((s)&(ShiftMask|ControlMask))==(ShiftMask|ControlMask)) |
112 |
|
} |
113 |
|
|
114 |
|
|
115 |
< |
extern void |
115 |
> |
void |
116 |
|
dev_open( /* initialize X11 driver */ |
117 |
|
char *id |
118 |
|
) |
213 |
|
} |
214 |
|
|
215 |
|
|
216 |
< |
extern void |
216 |
> |
void |
217 |
|
dev_close(void) /* close our display */ |
218 |
|
{ |
219 |
|
freepixels(); |
231 |
|
} |
232 |
|
|
233 |
|
|
234 |
< |
extern void |
234 |
> |
void |
235 |
|
dev_clear(void) /* clear our quadtree */ |
236 |
|
{ |
237 |
|
qtCompost(100); |
241 |
|
} |
242 |
|
|
243 |
|
|
244 |
< |
extern int |
244 |
> |
int |
245 |
|
dev_view( /* assign new driver view */ |
246 |
|
VIEW *nv |
247 |
|
) |
260 |
|
return(0); |
261 |
|
} |
262 |
|
if (nv != &odev.v) { |
263 |
< |
if (!FEQ(nv->horiz,odev.v.horiz) || /* resize window? */ |
264 |
< |
!FEQ(nv->vert,odev.v.vert)) { |
263 |
> |
if (!FABSEQ(nv->horiz,odev.v.horiz) || /* resize window? */ |
264 |
> |
!FABSEQ(nv->vert,odev.v.vert)) { |
265 |
|
int dw = DisplayWidth(ourdisplay,ourscreen); |
266 |
|
int dh = DisplayHeight(ourdisplay,ourscreen); |
267 |
|
|
289 |
|
} |
290 |
|
|
291 |
|
|
292 |
< |
extern void |
292 |
> |
void |
293 |
|
dev_section( /* add octree for geometry rendering */ |
294 |
|
char *gfn, |
295 |
|
char *pfn |
299 |
|
} |
300 |
|
|
301 |
|
|
302 |
< |
extern void |
302 |
> |
void |
303 |
|
dev_auxcom( /* process an auxiliary command */ |
304 |
|
char *cmd, |
305 |
|
char *args |
310 |
|
} |
311 |
|
|
312 |
|
|
313 |
< |
extern VIEW * |
313 |
> |
VIEW * |
314 |
|
dev_auxview( /* return nth auxiliary view */ |
315 |
|
int n, |
316 |
|
int hvres[2] |
323 |
|
} |
324 |
|
|
325 |
|
|
326 |
< |
extern int |
326 |
> |
int |
327 |
|
dev_input(void) /* get X11 input */ |
328 |
|
{ |
329 |
|
inpresflags = 0; |
339 |
|
} |
340 |
|
|
341 |
|
|
342 |
< |
extern void |
342 |
> |
void |
343 |
|
dev_paintr( /* fill a rectangle */ |
344 |
|
uby8 rgb[3], |
345 |
|
int xmin, |
362 |
|
} |
363 |
|
|
364 |
|
|
365 |
< |
extern int |
365 |
> |
int |
366 |
|
dev_flush(void) /* flush output */ |
367 |
|
{ |
368 |
|
qtUpdate(); |