home *** CD-ROM | disk | FTP | other *** search
/ Nebula / nebula.bin / SourceCode / MiniExamples / Rotato / wraps.c < prev    next >
C/C++ Source or Header  |  1993-01-19  |  3KB  |  96 lines

  1. /* wraps.c generated from wraps.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 "wraps.psw"
  9. #line 10 "wraps.c"
  10. void PSW_transformToFit(int Rot, int angle, float w, float h)
  11. {
  12.   typedef struct {
  13.     unsigned char tokenType;
  14.     unsigned char topLevelCount;
  15.     unsigned short nBytes;
  16.  
  17.     DPSBinObjReal obj0;
  18.     DPSBinObjReal obj1;
  19.     DPSBinObjGeneric obj2;
  20.     DPSBinObjGeneric obj3;
  21.     DPSBinObjGeneric obj4;
  22.     DPSBinObjGeneric obj5;
  23.     DPSBinObjGeneric obj6;
  24.     DPSBinObjGeneric obj7;
  25.     DPSBinObjGeneric obj8;
  26.     DPSBinObjGeneric obj9;
  27.     DPSBinObjGeneric obj10;
  28.     DPSBinObjGeneric obj11;
  29.     } _dpsQ;
  30.   static const _dpsQ _dpsStat = {
  31.     DPS_DEF_TOKENTYPE, 12, 100,
  32.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: w */
  33.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: h */
  34.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  35.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  36.     {DPS_LITERAL|DPS_INT, 0, 0, 4},
  37.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: Rot */
  38.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 135},    /* roll */
  39.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 173},    /* translate */
  40.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117},    /* pop */
  41.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117},    /* pop */
  42.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: angle */
  43.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 136},    /* rotate */
  44.     }; /* _dpsQ */
  45.   _dpsQ _dpsF;    /* local copy  */
  46.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  47.   char pad[3];
  48.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  49.   _dpsF = _dpsStat;    /* assign automatic variable */
  50.  
  51.   _dpsP[5].val.integerVal = Rot;
  52.   _dpsP[10].val.integerVal = angle;
  53.   _dpsP[0].val.realVal = w;
  54.   _dpsP[1].val.realVal = h;
  55.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,100);
  56.   if (0) *pad = 0;    /* quiets compiler warnings */
  57. }
  58. #line 4 "wraps.psw"
  59.  
  60. #line 61 "wraps.c"
  61. void PSW_flipit(float w, float h)
  62. {
  63.   typedef struct {
  64.     unsigned char tokenType;
  65.     unsigned char topLevelCount;
  66.     unsigned short nBytes;
  67.  
  68.     DPSBinObjGeneric obj0;
  69.     DPSBinObjReal obj1;
  70.     DPSBinObjGeneric obj2;
  71.     DPSBinObjGeneric obj3;
  72.     DPSBinObjGeneric obj4;
  73.     DPSBinObjGeneric obj5;
  74.     } _dpsQ;
  75.   static const _dpsQ _dpsStat = {
  76.     DPS_DEF_TOKENTYPE, 6, 52,
  77.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  78.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: h */
  79.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 173},    /* translate */
  80.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  81.     {DPS_LITERAL|DPS_INT, 0, 0, -1},
  82.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 139},    /* scale */
  83.     }; /* _dpsQ */
  84.   _dpsQ _dpsF;    /* local copy  */
  85.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  86.   char pad[3];
  87.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  88.   _dpsF = _dpsStat;    /* assign automatic variable */
  89.  
  90.   _dpsP[1].val.realVal = h;
  91.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,52);
  92.   if (0) *pad = 0;    /* quiets compiler warnings */
  93. }
  94. #line 9 "wraps.psw"
  95.  
  96.