home *** CD-ROM | disk | FTP | other *** search
- * fxSimple.PRG *
- * Copyright (c) Genus Microprogramming, Inc. 1988-89 All Rights Reserved. *
-
- *****************************************************************************
- * *
- * This program is the simplest example of effect usage. It is an example *
- * Clipper routine for PCX Effects. *
- * *
- * NOTE: REQUIRES A CGA (or compatible) ADAPTER AND DISPLAY! *
- * *
- * Nantucket Clipper Programmer: Chris Howard 5/25/89 *
- * *
- *****************************************************************************
-
- * Include the PCX Toolkit defines
- SET PROCEDURE TO pcxlib
- DO pcxInit
- * and PCX Effects
- SET PROCEDURE TO fxlib
- DO fxInit
-
- PRIVATE pcximage,pcxtype
-
- * Globals
- pcximage = "fxSimple.PCX"
- pcxtype = pcxCGA_4
- vptr = SPACE(4)
-
- **********
-
- * Main
-
- * Display program header
- ?
- ? " Simple Example Clipper PCX Effects Program "
- ?
-
- * Get a key, to begin
- ? "Press a key to run . . ."
- INKEY(0)
-
- * Set the display type
- retcode = pcxSD(pcxtype)
-
- * Select our effect
- retcode = fxSE(fxSAND)
-
- * Calibrate the delay timer
- retcode = fxCD()
-
- * Load the image
- retcode = fxFI(pcxCMM,vptr,pcximage)
- IF (retcode = fxSUCCESS)
-
- * Set the mode we will be using
- retcode = pcxSM(pcxGRAPHICS)
- IF (retcode = pcxSUCCESS)
-
- * and do it
- retcode = fxVE(vptr,0,0,fxNONE)
-
- * Wait for a key
- INKEY(0)
-
- * Return to text mode
- tempret = pcxSM(pcxTEXT)
-
- ENDIF
-
- * Free the image from memory
- tempret = fxRI(vptr)
-
- ENDIF
-
- * Check if everything went OK
- IF (retcode <> pcxSUCCESS)
- ?
- ? "An error occurred: [",retcode,"]"
- ?
- ? "You may not have a CGA, or the image FXSIMPLE.PCX may not"
- ? "be in the current directory ..."
- ?
- ENDIF
-
- RETURN && Main
-
-