449 |
|
/* set window manager hints */ |
450 |
|
ourxwmhints.flags = InputHint|IconPixmapHint; |
451 |
|
ourxwmhints.input = True; |
452 |
< |
ourxwmhints.icon_pixmap = XCreateBitmapFromData(ourdisplay, |
453 |
< |
gwind, glradicon_bits, glradicon_width, glradicon_height); |
452 |
> |
ourxwmhints.icon_pixmap = XCreateBitmapFromData(ourdisplay, gwind, |
453 |
> |
(char *)glradicon_bits, glradicon_width, glradicon_height); |
454 |
|
XSetWMHints(ourdisplay, gwind, &ourxwmhints); |
455 |
|
/* set GLX context */ |
456 |
|
glXMakeCurrent(ourdisplay, gwind, gctx); |
646 |
|
VSUM(nv.vp, wp, odir, -1.); |
647 |
|
spinvector(nv.vdir, nv.vdir, nv.vup, d); |
648 |
|
} else if (orb) { /* orbit up/down */ |
649 |
< |
fcross(v1, odir, nv.vup); |
650 |
< |
if (normalize(v1) == 0.) |
649 |
> |
if (geodesic(odir, odir, nv.vup, |
650 |
> |
d=MOVDEG*PI/180.*orb, GEOD_RAD) == 0.0) |
651 |
|
return(0); |
652 |
– |
spinvector(odir, odir, v1, d=MOVDEG*PI/180.*orb); |
652 |
|
VSUM(nv.vp, wp, odir, -1.); |
653 |
< |
spinvector(nv.vdir, nv.vdir, v1, d); |
653 |
> |
geodesic(nv.vdir, nv.vdir, nv.vup, d, GEOD_RAD); |
654 |
|
} else if (mov) { /* move forward/backward */ |
655 |
|
d = MOVPCT/100. * mov; |
656 |
|
VSUM(nv.vp, nv.vp, odir, d); |
672 |
|
{ |
673 |
|
struct timespec ts; |
674 |
|
ts.tv_sec = 0; |
675 |
< |
ts.tv_nsec = 5000000; |
675 |
> |
ts.tv_nsec = 50000000; |
676 |
|
nanosleep(&ts, NULL); |
677 |
|
} |
678 |
|
|