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

  1. /*
  2. ** BroadcastLimit.fred.pre
  3. **
  4. ** $VER: BroadcastLimit.fred.pre 1.3.0 (31.10.93)
  5. **
  6. ** If the BroadcastLimit.fred script appears in the InvokeADPro list,
  7. ** this program will ask the user to enter the settings for the Broadcast
  8. ** Limit operator.
  9. **
  10. ** Clips Exported:
  11. **    FREDTestMode        -    ~0 if only testing images
  12. **                    0 if doing actual operation
  13. **    FREDBroadcastStandard    -    Broadcast television standard
  14. **    FREDBroadcastLimitType    -    Broadcast limit type
  15. **    FREDBroadcastComposLim    -    Composite limit
  16. **    FREDBroadcastChromaLim    -    Chroma limit
  17. **
  18. ** NOTE: Clip names are case sensitive.
  19. **
  20. ** This script requires FRED v1.4.0 (or higher) to run.  Also required is
  21. ** ADPro v2.5.0 (or higher).
  22. **
  23. ** Copyright © 1993 ASDG, Incorporated
  24. ** All Rights Reserved
  25. */
  26.  
  27.  
  28. ADDRESS "ADPro"
  29. OPTIONS RESULTS
  30.  
  31. PARSE ARG NumberOfCells NumberOfFrames
  32.  
  33. NL = '0A'X
  34. SQ = '27'X
  35. DQ = '22'X
  36. TRUE  = 1
  37. FALSE = 0
  38.  
  39.  
  40. /*
  41. ** Ask the user whether this is a test or the "real thing".
  42. */
  43.  
  44. ADPRO_TO_FRONT
  45.  
  46. OKAYN '"BroadcastLimit.fred"' '"Test or modify settings?"' '"Test|Modify|Cancel"'
  47. IF (RC = 0) THEN DO
  48.     SCREEN_TO_FRONT "FRED"
  49.     EXIT 10
  50. END
  51. ELSE
  52.     TestMode = 2 - RC
  53.  
  54.  
  55. /*
  56. ** Ask the user for the limiting factors.
  57. */
  58.  
  59. ADPRO_TO_FRONT
  60.  
  61. OKAYN '"BroadcastLimit.fred"' '"Television standard?"' '"NTSC|PAL|Cancel"'
  62. IF (RC = 0) THEN DO
  63.     SCREEN_TO_FRONT "FRED"
  64.     EXIT 10
  65. END
  66. ELSE IF (RC = 1) THEN
  67.     Standard = "NTSC"
  68. ELSE IF (RC = 2) THEN
  69.     Standard = "PAL"
  70.  
  71. ADPRO_TO_FRONT
  72.  
  73. OKAYN '"BroadcastLimit.fred"' '"Limit type?"' '"Luminance|Saturation|Cancel"'
  74. IF (RC = 0) THEN DO
  75.     SCREEN_TO_FRONT "FRED"
  76.     EXIT 10
  77. END
  78. ELSE IF (RC = 1 ) THEN
  79.     LimitType = "LUMINANCE"
  80. ELSE IF (RC = 2 ) THEN
  81.     LimitType = "SATURATION"
  82.  
  83. CALL "FREDSCRIPTS:FREDFunctions/GetAFloat" '"Enter Composite Limit"' 110.0 0.0 199.99 TRUE
  84. IF (RESULT = "CANCEL") THEN
  85.     EXIT 10
  86. ComposLim = RESULT
  87.  
  88. CALL "FREDSCRIPTS:FREDFunctions/GetAFloat" '"Enter Chroma Limit"' 50.0 0.0 99.99 TRUE
  89. IF (RESULT = "CANCEL") THEN
  90.     EXIT 10
  91. ChromaLim = RESULT
  92.  
  93.  
  94. /*
  95. ** Update the clips.
  96. */
  97.  
  98. SETCLIP( "FREDTestMode", TestMode )
  99. SETCLIP( "FREDBroadcastStandard", Standard )
  100. SETCLIP( "FREDBroadcastLimitType", LimitType )
  101. SETCLIP( "FREDBroadcastComposLim", ComposLim )
  102. SETCLIP( "FREDBroadcastChromaLim", ChromaLim )
  103.  
  104. EXIT 0
  105.