home *** CD-ROM | disk | FTP | other *** search
- /*
- ** SimpleTwirl.fred.pre
- **
- ** $VER: SimpleTwirl.fred.pre 1.2.0 (23.10.93)
- **
- ** If the SimpleTwirl.fred scripts appears in the InvokeADPro list,
- ** this program will ask the user to enter the number of degrees to twirl.
- **
- ** Clips Exported:
- ** FREDOverrideLength - Override Length parameter flag
- ** (if 1, override the Length)
- ** FREDCurrentTwirlAmount - Current Twirl amount (degrees)
- ** FREDTwirlIncrement - Twirl increment per frame
- **
- ** NOTE: Clip names are case sensitive.
- **
- ** This script requires FRED v1.4.0 (or higher) to run. Also required is
- ** ADPro v2.5.0 (or higher).
- **
- ** Copyright © 1992-1993 ASDG, Incorporated
- ** All Rights Reserved
- */
-
-
- ADDRESS "ADPro"
- OPTIONS RESULTS
-
- PARSE ARG NumberOfCells NumberOfFrames
-
- NL = '0A'X
- SQ = '27'X
- DQ = '22'X
- TRUE = 1
- FALSE = 0
-
-
- /*
- ** Ensure that at least two frames are to be processed.
- */
-
- IF (NumberOfFrames < 2) THEN DO
- ADPRO_TO_FRONT
- OKAY1 "Frame count must be more than 2."
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
-
-
- /*
- ** Ask the user to enter the amount of twirl (in degrees).
- */
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Degrees to Twirl"' 0 (-360) 360 TRUE
- IF (RESULT = ((-360)-1)) THEN
- EXIT 10
- TwirlAmount = RESULT
-
-
- /*
- ** Update the clips.
- */
-
- SETCLIP( "FREDCurrentTwirlAmount", 0 )
- SETCLIP( "FREDTwirlIncrement", TwirlAmount / (NumberOfFrames - 1.0) )
- SETCLIP( "FREDOverrideLength", 0 )
-
- EXIT 0
-