home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / ADPro251-3.DMS / ADPro251-3.adf / FREDScripts.lha / FREDOperators / Rectangle.fred.pre < prev    next >
Encoding:
Text File  |  1994-01-31  |  2.4 KB  |  108 lines

  1. /*
  2. ** Rectangle.fred.pre
  3. **
  4. ** $VER: Rectangle.fred.pre 1.0.0 (28.11.93)
  5. **
  6. ** If the Rectangle.fred script appears in the InvokeADPro list, this
  7. ** program will ask the user to enter the values for creating a
  8. ** rectangle.
  9. **
  10. ** Clips Exported:
  11. **    FREDRectXOff    -    Left offset of rectangle
  12. **    FREDRectYOff    -    Top offset of rectangle
  13. **    FREDRectWidth    -    Width of rectangle
  14. **    FREDRectHeight    -    Height of rectangle
  15. **    FREDRectThick    -    Thickness of rectangle
  16. **    FREDRectR    -    Red color
  17. **    FREDRectG    -    Green color
  18. **    FREDRectB    -    Blue color
  19. **    FREDRectMix    -    Mix amount
  20. **
  21. ** NOTE: Clip names are case sensitive.
  22. **
  23. ** This script requires FRED v1.4.0 (or higher) to run.  Also required is
  24. ** ADPro v2.5.0 (or higher).
  25. **
  26. ** Copyright © 1993 ASDG, Incorporated
  27. ** All Rights Reserved
  28. */
  29.  
  30.  
  31. ADDRESS "ADPro"
  32. OPTIONS RESULTS
  33.  
  34. PARSE ARG NumberOfCells NumberOfFrames
  35.  
  36. NL = '0A'X
  37. SQ = '27'X
  38. DQ = '22'X
  39. TRUE  = 1
  40. FALSE = 0
  41.  
  42.  
  43. /*
  44. ** Ask the user to enter the rectangle settings.
  45. */
  46.  
  47. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"X Offset"' 0 0 29999 TRUE
  48. IF (RESULT = (0-1)) THEN
  49.     EXIT 10
  50. RectXOff = RESULT
  51.  
  52. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Y Offset"' 0 0 29999 TRUE
  53. IF (RESULT = (0-1)) THEN
  54.     EXIT 10
  55. RectYOff = RESULT
  56.  
  57. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Width"' 1 1 30000 TRUE
  58. IF (RESULT = (1-1)) THEN
  59.     EXIT 10
  60. RectWidth = RESULT
  61.  
  62. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Height"' 1 1 30000 TRUE
  63. IF (RESULT = (1-1)) THEN
  64.     EXIT 10
  65. RectHeight = RESULT
  66.  
  67. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Thickness"' (-1) (-1) 30000 TRUE
  68. IF (RESULT = ((-1)-1)) THEN
  69.     EXIT 10
  70. RectThick = RESULT
  71.  
  72. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Red color"' 0 0 255 TRUE
  73. IF (RESULT = (0-1)) THEN
  74.     EXIT 10
  75. RectR = RESULT
  76.  
  77. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Green color"' 0 0 255 TRUE
  78. IF (RESULT = (0-1)) THEN
  79.     EXIT 10
  80. RectG = RESULT
  81.  
  82. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Blue color"' 0 0 255 TRUE
  83. IF (RESULT = (0-1)) THEN
  84.     EXIT 10
  85. RectB = RESULT
  86.  
  87. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Mix percentage"' 100 1 100 TRUE
  88. IF (RESULT = (1-1)) THEN
  89.     EXIT 10
  90. RectMix = RESULT
  91.  
  92.  
  93. /*
  94. ** Update the clips.
  95. */
  96.  
  97. SETCLIP( "FREDRectXOff", RectXOff )
  98. SETCLIP( "FREDRectYOff", RectYOff )
  99. SETCLIP( "FREDRectWidth", RectWidth )
  100. SETCLIP( "FREDRectHeight", RectHeight )
  101. SETCLIP( "FREDRectThick", RectThick )
  102. SETCLIP( "FREDRectR", RectR )
  103. SETCLIP( "FREDRectG", RectG )
  104. SETCLIP( "FREDRectB", RectB )
  105. SETCLIP( "FREDRectMix", RectMix )
  106.  
  107. EXIT 0
  108.