home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Rectangle.fred.pre
- **
- ** $VER: Rectangle.fred.pre 1.0.0 (28.11.93)
- **
- ** If the Rectangle.fred script appears in the InvokeADPro list, this
- ** program will ask the user to enter the values for creating a
- ** rectangle.
- **
- ** Clips Exported:
- ** FREDRectXOff - Left offset of rectangle
- ** FREDRectYOff - Top offset of rectangle
- ** FREDRectWidth - Width of rectangle
- ** FREDRectHeight - Height of rectangle
- ** FREDRectThick - Thickness of rectangle
- ** FREDRectR - Red color
- ** FREDRectG - Green color
- ** FREDRectB - Blue color
- ** FREDRectMix - Mix amount
- **
- ** 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 © 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
-
-
- /*
- ** Ask the user to enter the rectangle settings.
- */
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"X Offset"' 0 0 29999 TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- RectXOff = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Y Offset"' 0 0 29999 TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- RectYOff = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Width"' 1 1 30000 TRUE
- IF (RESULT = (1-1)) THEN
- EXIT 10
- RectWidth = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Height"' 1 1 30000 TRUE
- IF (RESULT = (1-1)) THEN
- EXIT 10
- RectHeight = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Thickness"' (-1) (-1) 30000 TRUE
- IF (RESULT = ((-1)-1)) THEN
- EXIT 10
- RectThick = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Red color"' 0 0 255 TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- RectR = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Green color"' 0 0 255 TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- RectG = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Blue color"' 0 0 255 TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- RectB = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Mix percentage"' 100 1 100 TRUE
- IF (RESULT = (1-1)) THEN
- EXIT 10
- RectMix = RESULT
-
-
- /*
- ** Update the clips.
- */
-
- SETCLIP( "FREDRectXOff", RectXOff )
- SETCLIP( "FREDRectYOff", RectYOff )
- SETCLIP( "FREDRectWidth", RectWidth )
- SETCLIP( "FREDRectHeight", RectHeight )
- SETCLIP( "FREDRectThick", RectThick )
- SETCLIP( "FREDRectR", RectR )
- SETCLIP( "FREDRectG", RectG )
- SETCLIP( "FREDRectB", RectB )
- SETCLIP( "FREDRectMix", RectMix )
-
- EXIT 0
-