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

Comparing ray/src/hd/rhd_x11.c (file contents):
Revision 3.40 by greg, Tue Feb 8 01:03:27 2005 UTC vs.
Revision 3.44 by greg, Thu Sep 6 00:07:43 2012 UTC

# Line 82 | Line 82 | static int mytmflags(void);
82   static void xnewcolr(int  ndx, int r, int g, int b);
83   static int getpixels(void);
84   static void freepixels(void);
85 < static unsigned long true_pixel(register BYTE rgb[3]);
85 > static unsigned long true_pixel(register uby8 rgb[3]);
86   static void getevent(void);
87   static int ilclip(int dp[2][2], FVECT wp[2]);
88   static void draw3dline(FVECT wp[2]);
# Line 190 | Line 190 | dev_open(                      /* initialize X11 driver */
190                                          /* set window manager hints */
191          ourxwmhints.flags = InputHint|IconPixmapHint;
192          ourxwmhints.input = True;
193 <        ourxwmhints.icon_pixmap = XCreateBitmapFromData(ourdisplay,
194 <                        gwind, x11icon_bits, x11icon_width, x11icon_height);
193 >        ourxwmhints.icon_pixmap = XCreateBitmapFromData(ourdisplay, gwind,
194 >                        (char *)x11icon_bits, x11icon_width, x11icon_height);
195          XSetWMHints(ourdisplay, gwind, &ourxwmhints);
196          oursizhints.min_width = MINWIDTH;
197          oursizhints.min_height = MINHEIGHT;
# Line 295 | Line 295 | dev_view(                      /* assign new driver view */
295  
296   extern void
297   dev_section(            /* add octree for geometry rendering */
298 <        char    *ofn
298 >        char    *gfn,
299 >        char    *pfn
300   )
301   {
302          /* unimplemented */
# Line 344 | Line 345 | dev_input(void)                        /* get X11 input */
345  
346   extern void
347   dev_paintr(             /* fill a rectangle */
348 <        BYTE    rgb[3],
348 >        uby8    rgb[3],
349          int  xmin,
350          int  ymin,
351          int  xmax,
# Line 463 | Line 464 | freepixels(void)                               /* free our pixels */
464  
465   static unsigned long
466   true_pixel(                     /* return true pixel value for color */
467 <        register BYTE   rgb[3]
467 >        register uby8   rgb[3]
468   )
469   {
470          register unsigned long  rval;
# Line 569 | Line 570 | draw3dline(                    /* draw 3d line in world coordinates */
570   static void
571   draw_grids(void)                        /* draw holodeck section grids */
572   {
573 <        static BYTE     gridrgb[3] = {0x0, 0xff, 0xff};
573 >        static uby8     gridrgb[3] = {0x0, 0xff, 0xff};
574          unsigned long  pixel;
575  
576          if (ncolors > 0)
# Line 611 | Line 612 | moveview(      /* move our view */
612                  VSUM(nv.vp, qtL.wp[li], odir, -1.);
613                  spinvector(nv.vdir, nv.vdir, nv.vup, d);
614          } else if (orb) {               /* orbit up/down */
615 <                fcross(v1, odir, nv.vup);
616 <                if (normalize(v1) == 0.)
615 >                if (geodesic(odir, odir, nv.vup,
616 >                                d=MOVDEG*PI/180.*orb, GEOD_RAD) == 0.0)
617                          return(0);
617                spinvector(odir, odir, v1, d=MOVDEG*PI/180.*orb);
618                  VSUM(nv.vp, qtL.wp[li], odir, -1.);
619 <                spinvector(nv.vdir, nv.vdir, v1, d);
619 >                geodesic(nv.vdir, nv.vdir, nv.vup, d, GEOD_RAD);
620          } else if (mov) {               /* move forward/backward */
621                  d = MOVPCT/100. * mov;
622                  VSUM(nv.vp, nv.vp, odir, d);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines