home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / SourceCode / Tutorial / Cookbook / 27.Bounce / ball.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-19  |  1.4 KB  |  50 lines

  1. /* ball.c generated from ball.psw
  2.    by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
  3.  */
  4.  
  5. #include <dpsclient/dpsfriends.h>
  6. #include <string.h>
  7.  
  8. #line 1 "ball.psw"
  9. #line 10 "ball.c"
  10. void doBall(float x, float y, float width)
  11. {
  12.   typedef struct {
  13.     unsigned char tokenType;
  14.     unsigned char topLevelCount;
  15.     unsigned short nBytes;
  16.  
  17.     DPSBinObjReal obj0;
  18.     DPSBinObjReal obj1;
  19.     DPSBinObjReal obj2;
  20.     DPSBinObjReal obj3;
  21.     DPSBinObjReal obj4;
  22.     DPSBinObjGeneric obj5;
  23.     DPSBinObjGeneric obj6;
  24.     } _dpsQ;
  25.   static const _dpsQ _dpsStat = {
  26.     DPS_DEF_TOKENTYPE, 7, 60,
  27.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x */
  28.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y */
  29.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: width */
  30.     {DPS_LITERAL|DPS_REAL, 0, 0, 0.0},
  31.     {DPS_LITERAL|DPS_REAL, 0, 0, 360.0},
  32.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 5},    /* arc */
  33.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 66},    /* fill */
  34.     }; /* _dpsQ */
  35.   _dpsQ _dpsF;    /* local copy  */
  36.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  37.   char pad[3];
  38.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  39.   _dpsF = _dpsStat;    /* assign automatic variable */
  40.  
  41.   _dpsP[0].val.realVal = x;
  42.   _dpsP[1].val.realVal = y;
  43.   _dpsP[2].val.realVal = width;
  44.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,60);
  45.   if (0) *pad = 0;    /* quiets compiler warnings */
  46. }
  47. #line 3 "ball.psw"
  48.  
  49.  
  50.