home *** CD-ROM | disk | FTP | other *** search
- /*
- ** BroadcastLimit.fred.pre
- **
- ** $VER: BroadcastLimit.fred.pre 1.3.0 (31.10.93)
- **
- ** If the BroadcastLimit.fred script appears in the InvokeADPro list,
- ** this program will ask the user to enter the settings for the Broadcast
- ** Limit operator.
- **
- ** Clips Exported:
- ** FREDTestMode - ~0 if only testing images
- ** 0 if doing actual operation
- ** FREDBroadcastStandard - Broadcast television standard
- ** FREDBroadcastLimitType - Broadcast limit type
- ** FREDBroadcastComposLim - Composite limit
- ** FREDBroadcastChromaLim - Chroma limit
- **
- ** 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 whether this is a test or the "real thing".
- */
-
- ADPRO_TO_FRONT
-
- OKAYN '"BroadcastLimit.fred"' '"Test or modify settings?"' '"Test|Modify|Cancel"'
- IF (RC = 0) THEN DO
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
- ELSE
- TestMode = 2 - RC
-
-
- /*
- ** Ask the user for the limiting factors.
- */
-
- ADPRO_TO_FRONT
-
- OKAYN '"BroadcastLimit.fred"' '"Television standard?"' '"NTSC|PAL|Cancel"'
- IF (RC = 0) THEN DO
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
- ELSE IF (RC = 1) THEN
- Standard = "NTSC"
- ELSE IF (RC = 2) THEN
- Standard = "PAL"
-
- ADPRO_TO_FRONT
-
- OKAYN '"BroadcastLimit.fred"' '"Limit type?"' '"Luminance|Saturation|Cancel"'
- IF (RC = 0) THEN DO
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
- ELSE IF (RC = 1 ) THEN
- LimitType = "LUMINANCE"
- ELSE IF (RC = 2 ) THEN
- LimitType = "SATURATION"
-
- CALL "FREDSCRIPTS:FREDFunctions/GetAFloat" '"Enter Composite Limit"' 110.0 0.0 199.99 TRUE
- IF (RESULT = "CANCEL") THEN
- EXIT 10
- ComposLim = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetAFloat" '"Enter Chroma Limit"' 50.0 0.0 99.99 TRUE
- IF (RESULT = "CANCEL") THEN
- EXIT 10
- ChromaLim = RESULT
-
-
- /*
- ** Update the clips.
- */
-
- SETCLIP( "FREDTestMode", TestMode )
- SETCLIP( "FREDBroadcastStandard", Standard )
- SETCLIP( "FREDBroadcastLimitType", LimitType )
- SETCLIP( "FREDBroadcastComposLim", ComposLim )
- SETCLIP( "FREDBroadcastChromaLim", ChromaLim )
-
- EXIT 0
-