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

  1. #include "../h/rccl.h"
  2.  
  3. extern int completed;
  4.  
  5. real Y = 0.;
  6.  
  7. pumatask()
  8. {
  9.     TRSF_PTR z, e, circ, tilt, or, fl, b1, b2, conv1, conv2;
  10.     POS_PTR  pm1, pm2, pm3, pm4, pf, p0, p1, p2;
  11.     int conv1fn(), conv2fn();
  12.     int circfn(), tiltfn();
  13.     int i;
  14.  
  15.     circ = newtrans("CONV", circfn);
  16.     tilt = newtrans("TILT", tiltfn);
  17.     conv1 = newtrans("CONV1",conv1fn);
  18.     conv2 = newtrans("CONV2",conv2fn);
  19.     z = gentr_rot("Z",  0.,  0., 864., zunit, 0.); /* at the base */
  20.     e = gentr_eul("E" , 0. , 0. , 170. , 0. , 0.,  0.);
  21.     or = gentr_eul("OR", 300. ,  600., 600.,    0., 0., 90.);
  22.     fl = gentr_rot("FL", 0. , 0., 0., yunit, 180.);
  23.     b1 = gentr_rot("B1", 600. , -300., 500., yunit, 180.);
  24.     b2 = gentr_rot("B2", 600. , 500., 500., yunit, 180.);
  25.  
  26.     pm1 = makeposition("PM1" , z, t6, e, EQ, or, tilt, circ, fl, TL, e);
  27.     pm2 = makeposition("PM2" , z, t6, e, EQ, or, circ, tilt, fl, TL, e);
  28.     pm3 = makeposition("PM3" , z, t6, e, EQ, tilt, or, fl, TL, e);
  29.     pm4 = makeposition("PM4" , z, t6, e, EQ, circ, or, fl, TL, e);
  30.     pf = makeposition("PF" , z, t6, e, EQ, or, fl, TL, e);
  31.     p0 = makeposition("P0" , z, t6, e, EQ, b1, TL, e);
  32.     p1 = makeposition("P1", z, t6, e, EQ, conv1, b1, TL, e);
  33.     p2 = makeposition("P2", z, t6, e, EQ, conv2, b1, TL, e);
  34.  
  35.     movecart(p0, 200, 1500);
  36.     movecart(p1, 200, 3000);
  37.     movecart(pf, 200, 1500);
  38.     movecart(pm4, 200, 3000);
  39.     movecart(p2, 200, 3000);
  40.     movecart(pf, 200, 1500);
  41.     movecart(pm3, 200, 3000);
  42.     movecart(pm2, 200, 3000);
  43.     movecart(pm1, 200, 3000);
  44.     movecart(park, 200, 1500);
  45. }
  46.  
  47.  
  48.  
  49. circfn(t)
  50. TRSF_PTR t;
  51. {
  52.     double radius = 50.;
  53.     t->p.y = radius * sin(2. * goalpos->scal * PIT2);
  54.     t->p.z = radius * cos(2. * goalpos->scal * PIT2);
  55. }
  56.  
  57.  
  58. tiltfn(t)
  59. TRSF_PTR t;
  60. {
  61.     VECT k;
  62.  
  63.     k.x = sin(2. * goalpos->scal * PIT2);
  64.     k.y = cos(2. * goalpos->scal * PIT2);
  65.     k.z = 0.;
  66.     rot(t, &k, 5.);
  67. }
  68.  
  69.  
  70. conv1fn(t)
  71. TRSF_PTR t;
  72. {
  73.     t->p.y = (Y += 6.);
  74. }
  75.  
  76.  
  77. conv2fn(t)
  78. TRSF_PTR t;
  79. {
  80.     t->p.y = (Y -= 6.);
  81. }
  82.