/* ** SimpleRotate.fred.pre ** ** $VER: SimpleRotate.fred.pre 1.2.0 (23.10.93) ** ** If the SimpleRotate.fred scripts appears in the InvokeADPro list, ** this program will ask the user to enter the number of degrees to rotate. ** ** Clips Exported: ** FREDOverrideLength - Override Length parameter flag ** (if 1, override the Length) ** FREDCurrentRotateAmount - Current Rotate amount (degrees) ** FREDRotateIncrement - Rotate 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 rotation (in degrees). */ CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Degrees to Rotate"' 0 (-360) 360 TRUE IF (RESULT = ((-360)-1)) THEN EXIT 10 RotateAmount = RESULT /* ** Update the clips. */ SETCLIP( "FREDCurrentRotateAmount", 0 ) SETCLIP( "FREDRotateIncrement", RotateAmount / (NumberOfFrames - 1.0) ) SETCLIP( "FREDOverrideLength", 0 ) EXIT 0