home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c011 / 1.ddi / CLIPPER / FXTP_C.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-06-01  |  3.5 KB  |  214 lines

  1. /* fxTP_c.C                                                                 */
  2. /* Copyright (c) Genus Microprogramming, Inc. 1988-89  All Rights Reserved. */
  3.  
  4. /****************************************************************************
  5.  
  6.   This file provides the Clipper interface to PCX Effects.             
  7.   It makes calls to the PCX LARGE model C library.
  8.  
  9.  
  10.   NOTE: Compile as "CL /c /W3 /AL /Zl /Oalt /FPa /Gs fxTP_c.C"
  11.         as per the Clipper documentation for the EXTEND system
  12.  
  13.   Microsoft C version 5.1                 Programmer: Chris Howard  5/08/89
  14.  
  15. *****************************************************************************/
  16.  
  17. #include <stdio.h>
  18.  
  19. #include "..\h\nandef.h"
  20. #include "..\h\extend.h"
  21. #include "..\h\pcxlib.h"
  22. #include "..\h\fxlib.h"
  23. #include "..\h\fxclip.h"
  24.  
  25. /**********/
  26.  
  27. CLIPPER fxSS()
  28.  
  29. /*
  30.  * retcode = fxSetSpeaker(int flag)
  31.  *
  32.  */
  33.  
  34. {
  35.   int  retcode;
  36.  
  37.   /* Verify parameters */
  38.   if (PCOUNT == 1) {
  39.     /* Pass call on to toolkit */
  40.     retcode = fxSetSpeaker(_parni(1));
  41.   }
  42.   else {
  43.     /* Error in parameter list */
  44.     retcode = fxERR_CLIPPARM;
  45.   }
  46.  
  47.   /* Return code to Clipper */
  48.   _retni(retcode);
  49.  
  50. } /* end of fxSS */
  51.  
  52. /**********/
  53.  
  54. CLIPPER fxSF()
  55.  
  56. /*
  57.  * retcode = fxSetFrequency(int freq)
  58.  *
  59.  */
  60.  
  61. {
  62.   int  retcode;
  63.  
  64.   /* Verify parameters */
  65.   if (PCOUNT == 1) {
  66.     /* Pass call on to toolkit */
  67.     retcode = fxSetFrequency(_parni(1));
  68.   }
  69.   else {
  70.     /* Error in parameter list */
  71.     retcode = fxERR_CLIPPARM;
  72.   }
  73.  
  74.   /* Return code to Clipper */
  75.   _retni(retcode);
  76.  
  77. } /* end of fxSF */
  78.  
  79. /**********/
  80.  
  81. CLIPPER fxST()
  82.  
  83. /*
  84.  * retcode = fxST(int freq,dur)
  85.  *
  86.  */
  87.  
  88. {
  89.   int  retcode;
  90.  
  91.   /* Verify parameters */
  92.   if (PCOUNT == 2) {
  93.     /* Pass call on to toolkit */
  94.     retcode = fxTone(_parni(1),_parni(2));
  95.   }
  96.   else {
  97.     /* Error in parameter list */
  98.     retcode = fxERR_CLIPPARM;
  99.   }
  100.  
  101.   /* Return code to Clipper */
  102.   _retni(retcode);
  103.  
  104. } /* end of fxST */
  105.  
  106. /**********/
  107.  
  108. CLIPPER fxPT()
  109.  
  110. /*
  111.  * retcode = fxPlay(char *playstr)
  112.  *
  113.  */
  114.  
  115. {
  116.   int  retcode;
  117.  
  118.   /* Verify parameters */
  119.   if (PCOUNT == 1) {
  120.     /* Pass call on to toolkit */
  121.     retcode = fxPlay(_parc(1));
  122.   }
  123.   else {
  124.     /* Error in parameter list */
  125.     retcode = fxERR_CLIPPARM;
  126.   }
  127.  
  128.   /* Return code to Clipper */
  129.   _retni(retcode);
  130.  
  131. } /* end of fxPT */
  132.  
  133. /**********/
  134.  
  135. CLIPPER fxPL()
  136.  
  137. /*
  138.  * retcode = fxPlayLeft()
  139.  *
  140.  */
  141.  
  142. {
  143.   int  retcode;
  144.  
  145.   /* Verify parameters */
  146.   if (PCOUNT == 0) {
  147.     /* Pass call on to toolkit */
  148.     retcode = fxPlayLeft();
  149.   }
  150.   else {
  151.     /* Error in parameter list */
  152.     retcode = fxERR_CLIPPARM;
  153.   }
  154.  
  155.   /* Return code to Clipper */
  156.   _retni(retcode);
  157.  
  158. } /* end of fxPL */
  159.  
  160. /**********/
  161.  
  162. CLIPPER fxPK()
  163.  
  164. /*
  165.  * retcode = fxPlayKill()
  166.  *
  167.  */
  168.  
  169. {
  170.   int  retcode;
  171.  
  172.   /* Verify parameters */
  173.   if (PCOUNT == 0) {
  174.     /* Pass call on to toolkit */
  175.     retcode = fxPlayKill();
  176.   }
  177.   else {
  178.     /* Error in parameter list */
  179.     retcode = fxERR_CLIPPARM;
  180.   }
  181.  
  182.   /* Return code to Clipper */
  183.   _retni(retcode);
  184.  
  185. } /* end of fxPK */
  186.  
  187. /**********/
  188.  
  189. CLIPPER fxPO()
  190.  
  191. /*
  192.  * retcode = fxPlayLoop(int loopnum)
  193.  *
  194.  */
  195.  
  196. {
  197.   int  retcode;
  198.  
  199.   /* Verify parameters */
  200.   if (PCOUNT == 1) {
  201.     /* Pass call on to toolkit */
  202.     retcode = fxPlayLoop(_parni(1));
  203.   }
  204.   else {
  205.     /* Error in parameter list */
  206.     retcode = fxERR_CLIPPARM;
  207.   }
  208.  
  209.   /* Return code to Clipper */
  210.   _retni(retcode);
  211.  
  212. } /* end of fxPO */
  213.  
  214.