home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Saturation.fred.pre
- **
- ** $VER: Saturation.fred.pre 1.1.0 (23.10.93)
- **
- ** If the Saturation.fred script appears in the InvokeADPro list,
- ** this program will ask the user for the type and amount of saturation.
- **
- ** Clips Exported:
- ** FREDSaturationType - Type of saturation.
- ** FREDSaturationAmt - Amount of saturation.
- **
- ** 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 which type of saturation should be used.
- */
-
- SaturationID.0 = "HSV"
- SaturationID.1 = "HLS"
- SaturationID.2 = "YUV"
- MinSaturationID = 0
- MaxSaturationID = 2
- DefSaturationID = 0
-
- String = '"' || SaturationID.DefSaturationID || '"'
- DO LoopCounter = MinSaturationID TO MaxSaturationID
- String = String '"' || SaturationID.LoopCounter || '"'
- END
-
- continue = 0
- DO UNTIL (continue = 1)
- ADPRO_TO_FRONT
-
- LISTVIEW '"Saturation Types:"' (MaxSaturationID-MinSaturationID+1) ITEMS String
- LISTVIEW_RC = RC
- PARSE VAR ADPRO_RESULT '"'SaturationTypeStr'"' scratch
-
- IF (LISTVIEW_RC ~= 0) & (LISTVIEW_RC ~= 1) THEN DO
- ADPRO_TO_FRONT
-
- OKAYN '"Saturation.fred"' '"This value is required."' '"Retry|Cancel"'
- IF (RC = 0) THEN
- EXIT 10
- END
- ELSE
- continue = 1
- END
-
- SaturationSelected = MinSaturationID
- DO WHILE (SaturationSelected <= MaxSaturationID) & (COMPARE( SaturationTypeStr, SaturationID.SaturationSelected ) ~= 0)
- SaturationSelected = SaturationSelected + 1
- END
-
- SaturationType = SaturationID.SaturationSelected
-
- SCREEN_TO_FRONT "FRED"
-
-
- /*
- ** Ask the user for the amount of saturation.
- */
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Saturation Amount?"' 0 (-100) 9999 TRUE
- IF (RESULT = ((-100)-1)) THEN
- EXIT
- ELSE
- SaturationAmt = RESULT
-
-
- /*
- ** Update the clips.
- */
-
- SETCLIP( "FREDSaturationType", SaturationType )
- SETCLIP( "FREDSaturationAmt", SaturationAmt )
-
- EXIT 0
-