home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Converter / AD2.55-C.DMS / in.adf / FREDScripts.lha / FREDOperators / SimpleRotate.fred.pre < prev    next >
Encoding:
Text File  |  1994-01-31  |  1.4 KB  |  68 lines

  1. /*
  2. ** SimpleRotate.fred.pre
  3. **
  4. ** $VER: SimpleRotate.fred.pre 1.2.0 (23.10.93)
  5. **
  6. ** If the SimpleRotate.fred scripts appears in the InvokeADPro list,
  7. ** this program will ask the user to enter the number of degrees to rotate.
  8. **
  9. ** Clips Exported:
  10. **    FREDOverrideLength    -    Override Length parameter flag
  11. **                    (if 1, override the Length)
  12. **    FREDCurrentRotateAmount    -    Current Rotate amount (degrees)
  13. **    FREDRotateIncrement    -    Rotate increment per frame
  14. **
  15. ** NOTE: Clip names are case sensitive.
  16. **
  17. ** This script requires FRED v1.4.0 (or higher) to run.  Also required is
  18. ** ADPro v2.5.0 (or higher).
  19. **
  20. ** Copyright © 1992-1993 ASDG, Incorporated
  21. ** All Rights Reserved
  22. */
  23.  
  24.  
  25. ADDRESS "ADPro"
  26. OPTIONS RESULTS
  27.  
  28. PARSE ARG NumberOfCells NumberOfFrames
  29.  
  30. NL = '0A'X
  31. SQ = '27'X
  32. DQ = '22'X
  33. TRUE  = 1
  34. FALSE = 0
  35.  
  36.  
  37. /*
  38. ** Ensure that at least two frames are to be processed.
  39. */
  40.  
  41. IF (NumberOfFrames < 2) THEN DO
  42.     ADPRO_TO_FRONT
  43.     OKAY1 "Frame count must be more than 2."
  44.     SCREEN_TO_FRONT "FRED"
  45.     EXIT 10
  46. END
  47.  
  48.  
  49. /*
  50. ** Ask the user to enter the amount of rotation (in degrees).
  51. */
  52.  
  53. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Degrees to Rotate"' 0 (-360) 360 TRUE
  54. IF (RESULT = ((-360)-1)) THEN
  55.     EXIT 10
  56. RotateAmount = RESULT
  57.  
  58.  
  59. /*
  60. ** Update the clips.
  61. */
  62.  
  63. SETCLIP( "FREDCurrentRotateAmount", 0 )
  64. SETCLIP( "FREDRotateIncrement", RotateAmount / (NumberOfFrames - 1.0) )
  65. SETCLIP( "FREDOverrideLength", 0 )
  66.  
  67. EXIT 0
  68.