--- ray/src/hd/rhd_x11.c 2005/07/24 19:53:08 3.41 +++ ray/src/hd/rhd_x11.c 2012/09/06 00:07:43 3.44 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rhd_x11.c,v 3.41 2005/07/24 19:53:08 greg Exp $"; +static const char RCSid[] = "$Id: rhd_x11.c,v 3.44 2012/09/06 00:07:43 greg Exp $"; #endif /* * X11 driver for holodeck display. @@ -82,7 +82,7 @@ static int mytmflags(void); static void xnewcolr(int ndx, int r, int g, int b); static int getpixels(void); static void freepixels(void); -static unsigned long true_pixel(register BYTE rgb[3]); +static unsigned long true_pixel(register uby8 rgb[3]); static void getevent(void); static int ilclip(int dp[2][2], FVECT wp[2]); static void draw3dline(FVECT wp[2]); @@ -295,7 +295,8 @@ dev_view( /* assign new driver view */ extern void dev_section( /* add octree for geometry rendering */ - char *ofn + char *gfn, + char *pfn ) { /* unimplemented */ @@ -344,7 +345,7 @@ dev_input(void) /* get X11 input */ extern void dev_paintr( /* fill a rectangle */ - BYTE rgb[3], + uby8 rgb[3], int xmin, int ymin, int xmax, @@ -463,7 +464,7 @@ freepixels(void) /* free our pixels */ static unsigned long true_pixel( /* return true pixel value for color */ - register BYTE rgb[3] + register uby8 rgb[3] ) { register unsigned long rval; @@ -569,7 +570,7 @@ draw3dline( /* draw 3d line in world coordinates */ static void draw_grids(void) /* draw holodeck section grids */ { - static BYTE gridrgb[3] = {0x0, 0xff, 0xff}; + static uby8 gridrgb[3] = {0x0, 0xff, 0xff}; unsigned long pixel; if (ncolors > 0) @@ -611,12 +612,11 @@ moveview( /* move our view */ VSUM(nv.vp, qtL.wp[li], odir, -1.); spinvector(nv.vdir, nv.vdir, nv.vup, d); } else if (orb) { /* orbit up/down */ - fcross(v1, odir, nv.vup); - if (normalize(v1) == 0.) + if (geodesic(odir, odir, nv.vup, + d=MOVDEG*PI/180.*orb, GEOD_RAD) == 0.0) return(0); - spinvector(odir, odir, v1, d=MOVDEG*PI/180.*orb); VSUM(nv.vp, qtL.wp[li], odir, -1.); - spinvector(nv.vdir, nv.vdir, v1, d); + geodesic(nv.vdir, nv.vdir, nv.vup, d, GEOD_RAD); } else if (mov) { /* move forward/backward */ d = MOVPCT/100. * mov; VSUM(nv.vp, nv.vp, odir, d);