home *** CD-ROM | disk | FTP | other *** search
- {* fx_TP.PAS *}
- {* Copyright (c) Genus Microprogramming, Inc. 1988-89 All Rights Reserved. *}
-
- {****************************************************************************
-
- This file contains the TURBO Pascal 4.0/5.0 interface to PCX Effects.
- It is compiled as a unit, and must have access to the pcx object files.
-
-
-
- TURBO Pascal 4.0/5.0 Programmer: Chris Howard 5/07/89
-
- *****************************************************************************}
-
- unit fx_TP;
-
-
- interface
-
- uses pcx_tp;
-
- const
- { Copyright ID's (DO NOT MODIFY!) }
- fxID :array[1..13] of char = ' PCX Effects ';
- fxVer :array[1.. 5] of char = '1.01 ';
- fxGenusID :array[1..51] of char = ' Copyright (c) Genus Microprogramming, Inc. 1988-89';
- fxRights :array[1..21] of char = ' All Rights Reserved.';
- fxProgID :array[1..23] of char = ' Christopher A. Howard ';
-
- { Effects }
- fxMINEFFECT = 0;
- fxWIPE = 0; { Wipe }
- fxSPLIT = 1; { Split }
- fxCRUSH = 2; { Crush }
- fxSLIDE = 3; { Slide }
- fxSAND = 4; { Sand }
- fxDRIP = 5; { Drip }
- fxEXPLODE = 6; { Explode }
- fxDIAGONAL = 7; { Spiral }
- fxSPIRAL = 8; { Diagonal }
- fxRANDOM = 9; { Random }
- fxMAXEFFECT = 9;
-
- { Palette }
- fxFADEOUT = 1000; { Fade out }
- fxFADEIN = 1001; { Fade in }
-
- { Directions }
- fxNONE = 0; { No direction }
- fxLEFT = 1; { Left }
- fxRIGHT = 2; { Right }
- fxUP = 4; { Up }
- fxDOWN = 8; { Down }
- fxHORIZ = 1; { Horizontal }
- fxVERT = 2; { Vertical }
- fxOUT = 1; { Out }
- fxIN = 2; { In }
-
- { Grain }
- fxMINGRAIN = 2; { Minimum grain }
- fxMAXGRAIN = 64; { Maximum grain }
-
- { Delay }
- fxMINDELAY = 0; { Minimum delay }
- fxMAXDELAY = 500; { Maximum delay }
-
- { Miscellaneous }
- fxTRUE = 1; { True }
- fxFALSE = 0; { False }
- fxON = fxTRUE; { On }
- fxOFF = fxFALSE; { Off }
-
- { Error codes }
- fxSUCCESS = pcxSUCCESS; { Successful }
- fxERR_ESCAPE = pcxERR_ESCAPE; { Escape key was pressed }
- fxERR_BADEFFECT = -1000; { Effect not defined/invalid }
- fxERR_BADGRAIN = -1001; { Grain not defined/invalid }
- fxERR_BADDELAY = -1002; { Delay not defined/invalid }
-
-
- var
- fx100th :word;
- fxKeyChk :word;
- fxRand :longint;
-
- fxVinit :byte;
-
- {fxSE.asm}
- function fxSetEffect (effect:integer):integer;
- function fxGetEffect :integer;
- function fxSetGrain (grain:integer):integer;
- function fxGetGrain :integer;
- function fxSetDelay (delay:integer):integer;
- function fxGetDelay :integer;
- function fxGetVersion (verbuf:pointer):integer;
- function fxGetEffectStruc (effect:integer):pointer;
- procedure fxInitData ;
-
- {fxVI.asm}
- function fxVirtualInit (vptr:longint):integer;
- procedure fxVirtualBump ;
-
- {fxVE.asm}
- function fxVirtualEffect (vptr:longint;x,y,dir:integer):integer;
-
- {fxVW.asm}
- procedure fxVirtualWipe ;
-
- {fxVL.asm}
- procedure fxVirtualSlide ;
-
- {fxVS.asm}
- procedure fxVirtualSplit ;
-
- {fxVC.asm}
- procedure fxVirtualCrush ;
-
- {fxVA.asm}
- procedure fxVirtualSand ;
-
- {fxVR.asm}
- procedure fxVirtualDrip ;
-
- {fxVX.asm}
- procedure fxVirtualExplode ;
-
- {fxVD.asm}
- procedure fxVirtualGrid ;
- procedure fxVirtualBox ;
- procedure fxVirtualDiag ;
-
- {fxVP.asm}
- procedure fxVirtualSpiral ;
-
- {fxVN.asm}
- procedure fxVirtualRandom ;
-
- {fxDK.asm}
- function fxLoopDelay (delay:integer):integer;
- function fxCalibrateDelay :integer;
- function fxEffectDelay (delay:integer):integer;
- function fxKeyCheck (flag:integer):integer;
-
- {fxTP.asm}
- function fxSetSpeaker (flag:integer):integer;
- function fxSetFrequency (freq:integer):integer;
- function fxTone (freq,dur:integer):integer;
- function fxPlay (playstr:string):integer;
- function fxPlayLeft :integer;
- function fxPlayKill :integer;
- function fxPlayLoop (loopnum:integer):integer;
- procedure fxInitPData ;
-
- {fxPC.asm}
- function fxPaletteCycle (palptr:pointer;start,total,rep,delay:integer):integer;
- function fxPaletteFade (palptr:pointer;start,total,inc,rep,delay:integer):integer;
-
- {fxSR.asm}
- function fxSetRand (seed:integer):integer;
- function fxGetRand (range:integer):integer;
-
- {fxFI.asm}
- function fxFileImage (vtype:integer;vptr:pointer;filename:string):integer;
- function fxLibImage (vtype:integer;vptr:pointer;libname,filename:string):integer;
- function fxFreeImage (vptr:longint):integer;
-
-
- implementation
-
- {$L fxSE.obj}
- function fxSetEffect ;external;
- function fxGetEffect ;external;
- function fxSetGrain ;external;
- function fxGetGrain ;external;
- function fxSetDelay ;external;
- function fxGetDelay ;external;
- function fxGetVersion ;external;
- function fxGetEffectStruc ;external;
- procedure fxInitData ;external;
-
- {$L fxVI.obj}
- function fxVirtualInit ;external;
- procedure fxVirtualBump ;external;
-
- {$L fxVE.obj}
- function fxVirtualEffect ;external;
-
- {$L fxVW.obj}
- procedure fxVirtualWipe ;external;
-
- {$L fxVL.obj}
- procedure fxVirtualSlide ;external;
-
- {$L fxVS.obj}
- procedure fxVirtualSplit ;external;
-
- {$L fxVC.obj}
- procedure fxVirtualCrush ;external;
-
- {$L fxVA.obj}
- procedure fxVirtualSand ;external;
-
- {$L fxVR.obj}
- procedure fxVirtualDrip ;external;
-
- {$L fxVX.obj}
- procedure fxVirtualExplode ;external;
-
- {$L fxVD.obj}
- procedure fxVirtualGrid ;external;
- procedure fxVirtualBox ;external;
- procedure fxVirtualDiag ;external;
-
- {$L fxVP.obj}
- procedure fxVirtualSpiral ;external;
-
- {$L fxVN.obj}
- procedure fxVirtualRandom ;external;
-
- {$L fxDK.obj}
- function fxLoopDelay ;external;
- function fxCalibrateDelay ;external;
- function fxEffectDelay ;external;
- function fxKeyCheck ;external;
-
- {$L fxTP.obj}
- function fxSetSpeaker ;external;
- function fxSetFrequency ;external;
- function fxTone ;external;
- function fxPlay ;external;
- function fxPlayLeft ;external;
- function fxPlayKill ;external;
- function fxPlayLoop ;external;
- procedure fxInitPData ;external;
-
- {$L fxPC.obj}
- function fxPaletteCycle ;external;
- function fxPaletteFade ;external;
-
- {$L fxSR.obj}
- function fxSetRand ;external;
- function fxGetRand ;external;
-
- {$L fxFI.obj}
- function fxFileImage ;external;
- function fxLibImage ;external;
- function fxFreeImage ;external;
-
- {**********}
-
- { This section is the initialization code, automatically run when the unit
- is 'used'.
- }
-
- begin
-
- { Call the general data initialization procedure }
- fxInitData;
-
- { and the music data initialization procedure }
- fxInitPData;
-
- end.
-