home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c011 / 3.ddi / MISC / FX_TP.PAS next >
Encoding:
Pascal/Delphi Source File  |  1989-06-01  |  8.7 KB  |  265 lines

  1. {* fx_TP.PAS                                                                *}
  2. {* Copyright (c) Genus Microprogramming, Inc. 1988-89  All Rights Reserved. *}
  3.  
  4. {****************************************************************************
  5.  
  6.   This file contains the TURBO Pascal 4.0/5.0 interface to PCX Effects.
  7.   It is compiled as a unit, and must have access to the pcx object files.
  8.  
  9.  
  10.  
  11.   TURBO Pascal 4.0/5.0                    Programmer: Chris Howard  5/07/89
  12.  
  13. *****************************************************************************}
  14.  
  15. unit fx_TP;
  16.  
  17.  
  18. interface
  19.  
  20. uses pcx_tp;
  21.  
  22. const
  23.   { Copyright ID's (DO NOT MODIFY!) }
  24.   fxID             :array[1..13] of char = ' PCX Effects ';
  25.   fxVer            :array[1.. 5] of char = '1.01 ';
  26.   fxGenusID        :array[1..51] of char = ' Copyright (c) Genus Microprogramming, Inc. 1988-89';
  27.   fxRights         :array[1..21] of char = ' All Rights Reserved.';
  28.   fxProgID         :array[1..23] of char = ' Christopher A. Howard ';
  29.  
  30.   { Effects }
  31.   fxMINEFFECT      = 0;
  32.   fxWIPE           = 0;                     { Wipe                        }
  33.   fxSPLIT          = 1;                     { Split                       }
  34.   fxCRUSH          = 2;                     { Crush                       }
  35.   fxSLIDE          = 3;                     { Slide                       }
  36.   fxSAND           = 4;                     { Sand                        }
  37.   fxDRIP           = 5;                     { Drip                        }
  38.   fxEXPLODE        = 6;                     { Explode                     }
  39.   fxDIAGONAL       = 7;                     { Spiral                      }
  40.   fxSPIRAL         = 8;                     { Diagonal                    }
  41.   fxRANDOM         = 9;                     { Random                      }
  42.   fxMAXEFFECT      = 9;
  43.  
  44.   { Palette }
  45.   fxFADEOUT        = 1000;                  { Fade out                    }
  46.   fxFADEIN         = 1001;                  { Fade in                     }
  47.  
  48.   { Directions }
  49.   fxNONE           = 0;                     { No direction                }
  50.   fxLEFT           = 1;                     { Left                        }
  51.   fxRIGHT          = 2;                     { Right                       }
  52.   fxUP             = 4;                     { Up                          }
  53.   fxDOWN           = 8;                     { Down                        }
  54.   fxHORIZ          = 1;                     { Horizontal                  }
  55.   fxVERT           = 2;                     { Vertical                    }
  56.   fxOUT            = 1;                     { Out                         }
  57.   fxIN             = 2;                     { In                          }
  58.  
  59.   { Grain }
  60.   fxMINGRAIN       = 2;                     { Minimum grain               }
  61.   fxMAXGRAIN       = 64;                    { Maximum grain               }
  62.  
  63.   { Delay }
  64.   fxMINDELAY       = 0;                     { Minimum delay               }
  65.   fxMAXDELAY       = 500;                   { Maximum delay               }
  66.  
  67.   { Miscellaneous }
  68.   fxTRUE           = 1;                     { True                        }
  69.   fxFALSE          = 0;                     { False                       }
  70.   fxON             = fxTRUE;                { On                          }
  71.   fxOFF            = fxFALSE;               { Off                         }
  72.  
  73.   { Error codes }
  74.   fxSUCCESS        = pcxSUCCESS;            { Successful                  }
  75.   fxERR_ESCAPE     = pcxERR_ESCAPE;         { Escape key was pressed      }
  76.   fxERR_BADEFFECT  = -1000;                 { Effect not defined/invalid  }
  77.   fxERR_BADGRAIN   = -1001;                 { Grain  not defined/invalid  }
  78.   fxERR_BADDELAY   = -1002;                 { Delay  not defined/invalid  }
  79.  
  80.  
  81. var
  82.   fx100th          :word;
  83.   fxKeyChk         :word;
  84.   fxRand           :longint;
  85.  
  86.   fxVinit          :byte;
  87.  
  88. {fxSE.asm}
  89. function   fxSetEffect          (effect:integer):integer;
  90. function   fxGetEffect          :integer;
  91. function   fxSetGrain           (grain:integer):integer;
  92. function   fxGetGrain           :integer;
  93. function   fxSetDelay           (delay:integer):integer;
  94. function   fxGetDelay           :integer;
  95. function   fxGetVersion         (verbuf:pointer):integer;
  96. function   fxGetEffectStruc     (effect:integer):pointer;
  97. procedure  fxInitData           ;
  98.  
  99. {fxVI.asm}
  100. function   fxVirtualInit        (vptr:longint):integer;
  101. procedure  fxVirtualBump        ;
  102.  
  103. {fxVE.asm}
  104. function   fxVirtualEffect      (vptr:longint;x,y,dir:integer):integer;
  105.  
  106. {fxVW.asm}
  107. procedure  fxVirtualWipe        ;
  108.  
  109. {fxVL.asm}
  110. procedure  fxVirtualSlide       ;
  111.  
  112. {fxVS.asm}
  113. procedure  fxVirtualSplit       ;
  114.  
  115. {fxVC.asm}
  116. procedure  fxVirtualCrush       ;
  117.  
  118. {fxVA.asm}
  119. procedure  fxVirtualSand        ;
  120.  
  121. {fxVR.asm}
  122. procedure  fxVirtualDrip        ;
  123.  
  124. {fxVX.asm}
  125. procedure  fxVirtualExplode     ;
  126.  
  127. {fxVD.asm}
  128. procedure  fxVirtualGrid        ;
  129. procedure  fxVirtualBox         ;
  130. procedure  fxVirtualDiag        ;
  131.  
  132. {fxVP.asm}
  133. procedure  fxVirtualSpiral      ;
  134.  
  135. {fxVN.asm}
  136. procedure  fxVirtualRandom      ;
  137.  
  138. {fxDK.asm}
  139. function   fxLoopDelay          (delay:integer):integer;
  140. function   fxCalibrateDelay     :integer;
  141. function   fxEffectDelay        (delay:integer):integer;
  142. function   fxKeyCheck           (flag:integer):integer;
  143.  
  144. {fxTP.asm}
  145. function   fxSetSpeaker         (flag:integer):integer;
  146. function   fxSetFrequency       (freq:integer):integer;
  147. function   fxTone               (freq,dur:integer):integer;
  148. function   fxPlay               (playstr:string):integer;
  149. function   fxPlayLeft           :integer;
  150. function   fxPlayKill           :integer;
  151. function   fxPlayLoop           (loopnum:integer):integer;
  152. procedure  fxInitPData          ;
  153.  
  154. {fxPC.asm}
  155. function   fxPaletteCycle       (palptr:pointer;start,total,rep,delay:integer):integer;
  156. function   fxPaletteFade        (palptr:pointer;start,total,inc,rep,delay:integer):integer;
  157.  
  158. {fxSR.asm}
  159. function   fxSetRand            (seed:integer):integer;
  160. function   fxGetRand            (range:integer):integer;
  161.  
  162. {fxFI.asm}
  163. function   fxFileImage          (vtype:integer;vptr:pointer;filename:string):integer;
  164. function   fxLibImage           (vtype:integer;vptr:pointer;libname,filename:string):integer;
  165. function   fxFreeImage          (vptr:longint):integer;
  166.  
  167.  
  168. implementation
  169.  
  170. {$L fxSE.obj}
  171. function   fxSetEffect          ;external;
  172. function   fxGetEffect          ;external;
  173. function   fxSetGrain           ;external;
  174. function   fxGetGrain           ;external;
  175. function   fxSetDelay           ;external;
  176. function   fxGetDelay           ;external;
  177. function   fxGetVersion         ;external;
  178. function   fxGetEffectStruc     ;external;
  179. procedure  fxInitData           ;external;
  180.  
  181. {$L fxVI.obj}
  182. function   fxVirtualInit        ;external;
  183. procedure  fxVirtualBump        ;external;
  184.  
  185. {$L fxVE.obj}
  186. function   fxVirtualEffect      ;external;
  187.  
  188. {$L fxVW.obj}
  189. procedure  fxVirtualWipe        ;external;
  190.  
  191. {$L fxVL.obj}
  192. procedure  fxVirtualSlide       ;external;
  193.  
  194. {$L fxVS.obj}
  195. procedure  fxVirtualSplit       ;external;
  196.  
  197. {$L fxVC.obj}
  198. procedure  fxVirtualCrush       ;external;
  199.  
  200. {$L fxVA.obj}
  201. procedure  fxVirtualSand        ;external;
  202.  
  203. {$L fxVR.obj}
  204. procedure  fxVirtualDrip        ;external;
  205.  
  206. {$L fxVX.obj}
  207. procedure  fxVirtualExplode     ;external;
  208.  
  209. {$L fxVD.obj}
  210. procedure  fxVirtualGrid        ;external;
  211. procedure  fxVirtualBox         ;external;
  212. procedure  fxVirtualDiag        ;external;
  213.  
  214. {$L fxVP.obj}
  215. procedure  fxVirtualSpiral      ;external;
  216.  
  217. {$L fxVN.obj}
  218. procedure  fxVirtualRandom      ;external;
  219.  
  220. {$L fxDK.obj}
  221. function   fxLoopDelay          ;external;
  222. function   fxCalibrateDelay     ;external;
  223. function   fxEffectDelay        ;external;
  224. function   fxKeyCheck           ;external;
  225.  
  226. {$L fxTP.obj}
  227. function   fxSetSpeaker         ;external;
  228. function   fxSetFrequency       ;external;
  229. function   fxTone               ;external;
  230. function   fxPlay               ;external;
  231. function   fxPlayLeft           ;external;
  232. function   fxPlayKill           ;external;
  233. function   fxPlayLoop           ;external;
  234. procedure  fxInitPData          ;external;
  235.  
  236. {$L fxPC.obj}
  237. function   fxPaletteCycle       ;external;
  238. function   fxPaletteFade        ;external;
  239.  
  240. {$L fxSR.obj}
  241. function   fxSetRand            ;external;
  242. function   fxGetRand            ;external;
  243.  
  244. {$L fxFI.obj}
  245. function   fxFileImage          ;external;
  246. function   fxLibImage           ;external;
  247. function   fxFreeImage          ;external;
  248.  
  249. {**********}
  250.  
  251. { This section is the initialization code, automatically run when the unit
  252.   is 'used'.
  253. }
  254.  
  255. begin
  256.  
  257.   { Call the general data initialization procedure }
  258.   fxInitData;
  259.  
  260.   { and the music data initialization procedure }
  261.   fxInitPData;
  262.  
  263. end.
  264.  
  265.