home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 500 / 471 / rccl209 < prev    next >
Text File  |  1987-03-02  |  1KB  |  51 lines

  1. #include "../h/rccl.h"
  2.  
  3. extern int completed;
  4.  
  5. pumatask()
  6. {
  7.     TRSF_PTR z, e, conv, tilt, or, fl;
  8.     POS_PTR  pm1, pm2, pf;
  9.     int convfn(), tiltfn();
  10.     int i;
  11.  
  12.     conv = newtrans("CONV", convfn);
  13.     tilt = newtrans("TILT", tiltfn);
  14.     z = gentr_rot("Z",  0.,  0., 864., zunit, 0.); /* at the base */
  15.     e = gentr_eul("E" , 0. , 0. , 170. , 0. , 0.,  0.);
  16.     or = gentr_eul("OR", 000. ,  600., 700.,    0., 0., 90.);
  17.     fl = gentr_rot("FL", 0. , 0., 0., yunit, 180.);
  18.  
  19.     pm1 = makeposition("PM1" , z, t6, e, EQ, tilt, or, conv, fl, TL, e);
  20.     pm2 = makeposition("PM2" , z, t6, e, EQ, conv, or, tilt, fl, TL, e);
  21.     pf = makeposition("PF" , z, t6, e, EQ, or, fl, TL, e);
  22.  
  23.     movecart(pf, 300, 1500);
  24.     movecart(pm1, 300, 2600);
  25.     movecart(pf, 300, 1500);
  26.     movecart(pm2, 300, 2600);
  27.     movecart(park, 300, 1500);
  28. }
  29.  
  30.  
  31.  
  32. convfn(t)
  33. TRSF_PTR t;
  34. {
  35.     double radius = 50.;
  36.     t->p.y = radius * sin(2. * goalpos->scal * PIT2);
  37.     t->p.z = radius * cos(2. * goalpos->scal * PIT2);
  38. }
  39.  
  40.  
  41. tiltfn(t)
  42. TRSF_PTR t;
  43. {
  44.     VECT k;
  45.  
  46.     k.x = sin(1. * goalpos->scal * PIT2);
  47.     k.y = cos(1. * goalpos->scal * PIT2);
  48.     k.z = 0.;
  49.     rot(t, &k, 10.);
  50. }
  51.