home *** CD-ROM | disk | FTP | other *** search
- /*
- ** SaveToA2410.fred.pre
- **
- ** $VER: SaveToA2410.fred.pre 1.0.0 (31.10.93)
- **
- ** If the SaveToA2410.fred script appears in the InvokeADPro list,
- ** this program will ask the user to select the A2410 settings to use.
- **
- ** Clips Exported:
- ** FREDA2410BoardNum - Number of board to use
- ** FREDA2410Resolution - Display resolution to use
- ** FREDA2410SrcXOff - X Offset into source image
- ** FREDA2410SrcYOff - Y Offset into source image
- ** FREDA2410DestXOff - X Offset into destination buffer
- ** FREDA2410DestYOff - Y Offset into destination buffer
- ** FREDA2410DestWidth - Width in destination buffer
- ** FREDA2410DestHeight - Height in destination buffer
- **
- ** 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 board and resolution to use.
- */
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Board number"' 1 1 5 TRUE
- IF (RESULT = (1-1)) THEN
- EXIT 10
- BoardNum = RESULT
-
- ResID.0 = "1024 x 768 NonLace"
- ResID.1 = " 800 x 600 NonLace"
- ResID.2 = " 640 x 400 Lace"
- ResID.3 = "1024 x 768 Lace"
- ResID.4 = "1024 x 1024 NonLace"
- ResID.5 = " 736 x 480 NonLace"
- ResID.6 = "1024 x 1024 NonLace"
- MinResID = 0
- MaxResID = 6
- DefResID = 0
-
- String = '"' || ResID.DefResID || '"'
- DO LoopCounter = MinResID TO MaxResID
- String = String '"' || ResID.LoopCounter || '"'
- END
-
- continue = FALSE
- DO UNTIL (continue = TRUE)
- ADPRO_TO_FRONT
-
- LISTVIEW '"Display Resolutions:"' 10 ITEMS String
- LISTVIEW_RC = RC
- PARSE VAR ADPRO_RESULT '"'ResStr'"' scratch
-
- IF (LISTVIEW_RC ~= 0) & (LISTVIEW_RC ~= 1) THEN DO
- ADPRO_TO_FRONT
-
- OKAYN '"SaveToA2410.fred"' '"This value is required."' '"Retry|Cancel"'
- IF (RC = 0) THEN
- EXIT 10
- END
- ELSE
- continue = TRUE
- END
-
- ResSelected = MinResID
- DO WHILE (ResSelected <= MaxResID) & (COMPARE( ResStr, ResID.ResSelected ) ~= 0)
- ResSelected = ResSelected + 1
- END
-
- Res = ResID.ResSelected
-
-
- /*
- ** Ask the user for the source image specifications.
- */
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Source X Offset"' 0 0 99999 TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- SrcXOff = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Source Y Offset"' 0 0 99999 TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- SrcYOff = RESULT
-
-
- /*
- ** Ask the user for the destination area specifications.
- */
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Destination X Offset"' 0 0 99999 TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- DestXOff = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Destination Y Offset"' 0 0 99999 TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- DestYOff = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Destination Width"' 1 1 99999 TRUE
- IF (RESULT = (1-1)) THEN
- EXIT 10
- DestWidth = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Destination Height"' 1 1 99999 TRUE
- IF (RESULT = (1-1)) THEN
- EXIT 10
- DestHeight = RESULT
-
-
- /*
- ** Update the clips.
- */
-
- SETCLIP( "FREDA2410BoardNum", BoardNum )
- SETCLIP( "FREDA2410Resolution", Res )
- SETCLIP( "FREDA2410SrcXOff", SrcXOff )
- SETCLIP( "FREDA2410SrcYOff", SrcYOff )
- SETCLIP( "FREDA2410DestXOff", DestXOff )
- SETCLIP( "FREDA2410DestYOff", DestYOff )
- SETCLIP( "FREDA2410DestWidth", DestWidth )
- SETCLIP( "FREDA2410DestHeight", DestHeight )
-
- EXIT 0
-