home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 500 / 471 / rccl207 < prev    next >
Text File  |  1987-03-02  |  945b  |  48 lines

  1. #include "../h/rccl.h"
  2. #include "../h/umac.h"
  3.  
  4.  
  5. pumatask()
  6. {
  7.     TRSF_PTR z, e , b1, conv;
  8.     POS_PTR  p0, p1;
  9.     int convfn();
  10.     int q;
  11.     double iy;
  12.  
  13.     conv = newtrans("CONV",convfn);
  14.     z = gentr_rot("Z",  0.,  0., 864., zunit, 0.); /* at the base */
  15.     e = gentr_eul("E" , 0. , 0. , 170. , 0. , 0.,  0.);/* finger tips */
  16.     b1 = gentr_rot("B1", 600. , 128., 800., yunit, 180.);
  17.  
  18.     b1->fn = hold;
  19.     p0 = makeposition("P1" , z, t6, e, EQ, b1, TL, e);
  20.     p1 = makeposition("P1" , z, t6, e, EQ, conv, b1, TL, e);
  21.  
  22.     setmod('c');
  23.     setvel(300, 100);
  24.     move(p1);
  25.     for (; ; ) {
  26.         move(p1);
  27.         waitfor(completed);
  28.         if (p1->end == LIMIT) {
  29.             printf("limit reached\n");
  30.         }
  31.         printf("more "); QUERY(q); if (q == 'n') break;
  32.         printf("enter Z increment ");
  33.         scanf("%f", &iy);
  34.         b1->p.z += iy;
  35.     }
  36.     setmod('j');
  37.     move(park);
  38. }
  39.  
  40. convfn(t)
  41. TRSF_PTR t;
  42. {
  43.     double time;
  44.  
  45.     time = rtime / 20000.;
  46.     t->p.y = 400. * cos(time * PIT2);
  47. }
  48.