/* fxLib.H */ /* Copyright (c) Genus Microprogramming, Inc. 1988-92 All Rights Reserved. */ /**************************************************************************** Function declarations for GX Effects v2.02, for C. Microsoft C version 6.x Programmer: Daniel Sie 05/22/91 *****************************************************************************/ /* Supported GX display types */ #define fxMINDISP 0 /* Don't use gxMAXDISP, since */ #define fxMAXDISP gxVESA_105 /* it may not supported */ /* F/X ID's */ #define fxIHID 0xCA20 /* F/X image header ID value */ #define fxSHID 0xCA21 /* F/X sprite header ID value */ #define fxSDID 0xCA22 /* F/X sound header ID value */ /* Effects */ #define fxMINEFFECT 0 #define fxBLIND 0 /* Blind */ #define fxCRUSH 1 /* Crush */ #define fxDIAGONAL 2 /* Diagonal */ #define fxDRIP 3 /* Drip */ #define fxEXPLODE 4 /* Explode */ #define fxRANDOM 5 /* Random */ #define fxSAND 6 /* Sand */ #define fxSLIDE 7 /* Slide */ #define fxSPIRAL 8 /* Spiral */ #define fxSPLIT 9 /* Split */ #define fxWEAVE 10 /* Weave */ #define fxWIPE 11 /* Wipe */ #define fxMAXEFFECT 11 /* Palette */ #define fxFADEOUT 1000 /* Fade out */ #define fxFADEIN 1001 /* Fade in */ /* Directions */ #define fxNONE 0 /* No direction */ #define fxLEFT 1 /* Left */ #define fxRIGHT 2 /* Right */ #define fxUP 4 /* Up */ #define fxDOWN 8 /* Down */ #define fxHORIZ 1 /* Horizontal */ #define fxVERT 2 /* Vertical */ #define fxOUT 1 /* Out */ #define fxIN 2 /* In */ /* Grain */ #define fxMINGRAIN 1 /* Minimum grain */ #define fxMAXGRAIN 1024 /* Maximum grain */ /* Delay */ #define fxMINDELAY 0 /* Minimum delay */ #define fxMAXDELAY 5000 /* Maximum delay */ /* Miscellaneous */ #define fxTRUE 1 /* True */ #define fxFALSE 0 /* False */ #define fxON 1 /* On */ #define fxOFF 0 /* Off */ #define fxFORE 0 /* Foreground */ #define fxBACK 1 /* Background */ #define fxINFINITE 0 /* Infinite loops */ #define fxRESTORE 0 /* Restore */ #define fxNORESTORE 1 /* No restore */ #define fxLEAVELAST 2 /* Leave last image on screen */ /* Sound device type */ #define fxMINSOUND 0 /* Minimum sound device type */ #define fxPCSPEAKER 0 /* Music/PC Speaker type */ #define fxSOUNDBLASTER 1 /* SoundBlaster type */ #define fxMAXSOUND 1 /* Maximum sound device type */ /* Sound feature chip/data format */ #define fxSNG 0x0001 /* PC Speaker PPI/SNG format */ #define fxVOC 0x0101 /* SoundBlaster DSP/VOC format */ /* Sound I/O Status */ #define fxDORMANT 0 /* Sound I/O is dormant */ #define fxACTIVE 1 /* Sound I/O is active */ #define fxPAUSED 2 /* Sound I/O has been paused */ /* Error codes */ #define fxSUCCESS 0 /* Successful */ #define fxERR_BADEFFECT -2000 /* Effect not defined/invalid */ #define fxERR_BADGRAIN -2001 /* Grain not defined/invalid */ #define fxERR_BADDELAY -2002 /* Delay not defined/invalid */ #define fxERR_BADSIZE -2003 /* Size of image masks invalid */ #define fxERR_NOTIMAGE -2004 /* Not a image header */ #define fxERR_NOTSPRITE -2005 /* Not a sprite header */ #define fxERR_NOSOUND -2006 /* Sound card/driver not found */ #define fxERR_NOVOC -2007 /* Voice feature not available */ #define fxERR_NOCMF -2008 /* FM feature not available */ #define fxERR_NOMID -2009 /* MIDI feature not available */ #define fxERR_BADPORT -2010 /* Bad sound card port address */ #define fxERR_BADIRQ -2011 /* Bad sound card IRQ line */ #define fxERR_BADSOUND -2012 /* Bad device/format/feature */ #define fxERR_NOTSOUND -2013 /* Not a sound header */ #define fxERR_NOTSNG -2014 /* Not a SNG file/buffer */ #define fxERR_NOTVOC -2015 /* Not a VOC file/buffer */ #define fxERR_NOTCMF -2016 /* Not a CMF file/buffer */ #define fxERR_NOTMID -2017 /* Not a MID file/buffer */ #define fxERR_DORMANT -2018 /* Sound I/O is dormant */ #define fxERR_ACTIVE -2019 /* Sound I/O is active */ /* F/X Image header */ typedef struct fximage { unsigned id; /* F/X image header ID (CA20H) */ int kcolor; /* Key color of image */ GXHEADER far * xorvhptr; /* Pointer to XORmask header */ GXHEADER andmask; /* ANDmask virtual header */ char reserved[6]; /* Reserved for F/X */ } FXIMAGE; /* F/X Sprite header */ typedef struct fxsprite { unsigned id; /* F/X sprite header ID (CA21H)*/ unsigned nimages; /* Number of images in sprite */ FXIMAGE far * ihptr; /* Pointer to first image */ GXHEADER savearea; /* Save area virtual header */ GXHEADER workarea; /* work area virtual header */ char reserved[18]; /* Reserved for F/X */ } FXSPRITE; /* F/X Sound header */ typedef struct fxsound { unsigned id; /* F/X sound header ID (CA22H) */ int format; /* Sound data format type */ int marker; /* Marker value of sound data */ long size; /* Sound buffer size */ char far * bptr; /* Pointer to sound buffer */ unsigned loopnum; /* Current loop count */ long count; /* Bytes processed so far */ char reserved[12]; /* Reserved for F/X */ } FXSOUND; /* F/X Sound device configuration */ typedef struct fxsconfig { int device; /* Sound device */ int port; /* Sound device base I/O port */ int irq; /* Interrupt IRQ number */ int features; /* Features available */ } FXSCONFIG; /* F/X Voice header */ typedef struct fxvochdr { char description[20]; /* File description string */ unsigned offset; /* Voice dta block offset */ unsigned version; /* VOC version number */ unsigned id; /* VOC ID code */ } FXVOCHDR; /* Functions */ #ifdef __cplusplus extern "C" { #endif extern int far pascal fxBeginSprite (FXSPRITE far *,int far *,int); extern int far pascal fxBreakSoundLoop (int); extern int far pascal fxClearDisplay (int,int,int,int,int,int); extern int far pascal fxContinueSound (int); extern int far pascal fxConvertColor (GXHEADER far *,int,int,int); extern int far pascal fxConvertSong (char far *,char far *); extern int far pascal fxCreateImage (FXIMAGE far *,GXHEADER far *,int); extern int far pascal fxCreateMask (GXHEADER far *,GXHEADER far *); extern int far pascal fxCreateSound (FXSOUND far *,int,long); extern int far pascal fxCreateSprite (FXSPRITE far *,FXIMAGE far *,int); extern int far pascal fxDestroyImage (FXIMAGE far *); extern int far pascal fxDestroySound (FXSOUND far *); extern int far pascal fxDestroySprite (FXSPRITE far *); extern int far pascal fxEndSprite (FXSPRITE far *,int); extern int far pascal fxFileSound (char far *,FXSOUND far *); extern long far pascal fxFileSoundSize (char far *,int); extern int far pascal fxFlySprite (FXSPRITE far *,int,int,int,int,int,int); extern long far pascal fxGetDelay (void); extern int far pascal fxGetEffect (void); extern int far pascal fxGetGrain (int far *,int far *,int far *); extern int far pascal fxGetKeyColor (void); extern int far pascal fxGetSoundConfig (int,FXSCONFIG far *); extern int far pascal fxGetSoundStatus (int); extern int far pascal fxGetTile (void); extern int far pascal fxGetVersion (int far *,int far *); extern int far pascal fxInstallSound (int); extern int far pascal fxImageVirtual (FXIMAGE far *,GXHEADER far *,int,int); extern int far pascal fxKillSound (int); extern int far pascal fxLibSound (GXLIB far *,char far *,FXSOUND far *); extern long far pascal fxLibSoundSize (GXLIB far *,char far *,int); extern int far pascal fxLinkSprite (FXSPRITE far *,FXIMAGE far *); extern int far pascal fxPaletteCycle (char far *,int,int,int); extern int far pascal fxPaletteFade (char far *,int,int,int,int); extern int far pascal fxPauseSound (int); extern int far pascal fxPlaySong (char far *,int); extern int far pascal fxPlaySound (FXSOUND far *,long,unsigned,int); extern int far pascal fxPlaySprite (FXSPRITE far *,int,int); extern int far pascal fxPlayTone (int,int,long); extern int far pascal fxPutImage (FXIMAGE far *,int,int,int); extern int far pascal fxRemoveSound (int); extern int far pascal fxResetSound (int); extern int far pascal fxSBInstalled (void); extern int far pascal fxScanSoundIRQ (int); extern int far pascal fxSetDelay (long); extern int far pascal fxSetEffect (int); extern int far pascal fxSetFrequency (int); extern int far pascal fxSetGrain (int,int,int); extern int far pascal fxSetImageHeader (FXIMAGE far *,GXHEADER far *,GXHEADER far *); extern int far pascal fxSetKeyColor (int); extern int far pascal fxSetSoundConfig (int,FXSCONFIG far *); extern int far pascal fxSetSoundHeader (FXSOUND far *,int,char far *,long); extern int far pascal fxSetSpeaker (int,int); extern int far pascal fxSetSpriteHeader (FXSPRITE far *,FXIMAGE far *,GXHEADER far *,GXHEADER far *); extern int far pascal fxSetTile (int); extern long far pascal fxSoundLeft (int); extern int far pascal fxSoundInstalled (int); extern int far pascal fxVirtualDisplay (GXHEADER far *,int,int,int,int,int,int,int); #ifdef __cplusplus } #endif