home *** CD-ROM | disk | FTP | other *** search
- /*
- ** SaveToOPALVISION.fred
- **
- ** $VER: SaveToOPALVISION.fred 1.2.0 (24.10.93)
- **
- ** This program can be run from an InvokeADPro list to save images to
- ** the OPALVISION display board. Including this program automatically
- ** causes a pre script to be executed as well (to select display settings).
- **
- ** Clips Imported:
- ** FREDOVScreenType - Screen type to be used
- ** FREDOVDuration - Duration (in ticks)
- ** FREDOVUseRawData - Whether to use Raw image or not
- ** (if 1, use Raw instead of Rendered)
- **
- ** 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 FrameNum FrameFName Length LoadFlag FirstCallSeq FirstCallCell
-
- NL = '0A'X
- SQ = '27'X
- DQ = '22'X
- TRUE = 1
- FALSE = 0
-
-
- /*
- ** Get the required clips.
- */
-
- UseRawData = GETCLIP( "FREDOVUseRawData" )
- IF (UseRawData = "") THEN DO
- ADPRO_TO_FRONT
- OKAY1 "Required clip, FREDOVUseRawData," || NL ||,
- "is not specified."
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
-
- ScreenType = GETCLIP( "FREDOVScreenType" )
- IF (ScreenType = "") THEN DO
- ADPRO_TO_FRONT
- OKAY1 "Required clip, FREDOVScreenType," || NL ||,
- "is not specified."
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
-
- Duration = GETCLIP( "FREDOVDuration" )
- IF (Duration = "") THEN DO
- ADPRO_TO_FRONT
- OKAY1 "Required clip, FREDOVScreenType," || NL ||,
- "is not specified."
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
-
-
- /*
- ** See what type of data is loaded in ADPro/MorphPlus.
- */
-
- CALL "FREDSCRIPTS:FREDFunctions/CheckForImageData" TRUE
- IF (RESULT ~= 0) THEN
- EXIT 10
-
- IF (UseRawData = 1) THEN DO
- CALL "FREDSCRIPTS:FREDFunctions/CheckForRawImageData" TRUE
- IF (RESULT ~= 0) THEN
- EXIT 10
-
- ScreenType = "RAW"
- END
- ELSE IF (UseRawData = 0) THEN DO
- CALL "FREDSCRIPTS:FREDFunctions/CheckForRenderedImageData" TRUE
- IF (RESULT ~= 0) THEN
- EXIT 10
-
- ScreenType = "IMAGE"
- END
-
-
- /*
- ** Image it to the display board.
- */
-
- SAVER "OPALVISION" "XXX" ScreenType "SCREEN_TYPE" ScreenType "DURATION" Duration
- IF (RC ~= 0) THEN DO
- Why = ADPRO_RESULT
- ADPRO_TO_FRONT
- OKAY1 "OPALVISION save failed:" || NL || Why || NL ||,
- "Argument Information:" || NL ||,
- "ScreenType = " || ScreenType || NL ||,
- "Duration = " || Duration
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
-
- EXIT 0
-