| 344 |
|
|
| 345 |
|
extern void |
| 346 |
|
dev_cone( /* render a cone in view coordinates */ |
| 347 |
< |
BYTE rgb[3], |
| 347 |
> |
uby8 rgb[3], |
| 348 |
|
FVECT ip, |
| 349 |
|
double rad |
| 350 |
|
) |
| 465 |
|
getkey(levptr(XKeyPressedEvent)); |
| 466 |
|
break; |
| 467 |
|
case ButtonPress: |
| 468 |
< |
getmove(levptr(XButtonPressedEvent)); |
| 468 |
> |
switch (levptr(XButtonPressedEvent)->button) { |
| 469 |
> |
case Button4: /* wheel up */ |
| 470 |
> |
case Button5: /* wheel down */ |
| 471 |
> |
break; |
| 472 |
> |
default: |
| 473 |
> |
getmove(levptr(XButtonPressedEvent)); |
| 474 |
> |
break; |
| 475 |
> |
} |
| 476 |
|
break; |
| 477 |
|
} |
| 478 |
|
} |
| 491 |
|
static void |
| 492 |
|
draw_grids(void) /* draw holodeck section grids */ |
| 493 |
|
{ |
| 494 |
< |
static BYTE gridrgba[4] = {0x0, 0xff, 0xff, 0x00}; |
| 494 |
> |
static uby8 gridrgba[4] = {0x0, 0xff, 0xff, 0x00}; |
| 495 |
|
double xmin, xmax, ymin, ymax, zmin, zmax; |
| 496 |
|
double d; |
| 497 |
|
/* can we even do it? */ |
| 563 |
|
VSUM(nv.vp, qtL.wp[li], odir, -1.); |
| 564 |
|
spinvector(nv.vdir, nv.vdir, nv.vup, d); |
| 565 |
|
} else if (orb) { /* orbit up/down */ |
| 566 |
< |
fcross(v1, odir, nv.vup); |
| 567 |
< |
if (normalize(v1) == 0.) |
| 566 |
> |
if (geodesic(odir, odir, nv.vup, |
| 567 |
> |
d=MOVDEG*PI/180.*orb, GEOD_RAD) == 0.0) |
| 568 |
|
return(0); |
| 562 |
– |
spinvector(odir, odir, v1, d=MOVDEG*PI/180.*orb); |
| 569 |
|
VSUM(nv.vp, qtL.wp[li], odir, -1.); |
| 570 |
< |
spinvector(nv.vdir, nv.vdir, v1, d); |
| 570 |
> |
geodesic(nv.vdir, nv.vdir, nv.vup, d, GEOD_RAD); |
| 571 |
|
} else if (mov) { /* move forward/backward */ |
| 572 |
|
d = MOVPCT/100. * mov; |
| 573 |
|
VSUM(nv.vp, nv.vp, odir, d); |