home *** CD-ROM | disk | FTP | other *** search
- /*
- ** RenderAsDefined.fred.pre
- **
- ** $VER: RenderAsDefined.fred.pre 1.3.0 (30.10.93)
- **
- ** If the RenderAsDefined.fred script appears in the InvokeADPro list,
- ** this program will ask the user to select a screen mode, render mode, and
- ** dither type into which the images will be rendered.
- **
- ** Clips Exported:
- ** FREDRenderScreen - Render screen to use
- ** FREDDither - Dither to be used
- ** FREDDitherAmt - Dither amount to be used
- **
- ** 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 © 1992-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 to select the screen mode.
- */
-
- ADPRO_TO_FRONT
-
- GET_SCREEN_MODE '"Select Render Screen"' "Amiga" "XXX" 0 0 16
- IF (RC ~= 0) THEN DO
- ADPRO_TO_FRONT
- OKAY1 "Could not select render screen."
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
-
- RenderScreen = ADPRO_RESULT
-
-
- /*
- ** Ask the user to select the dither mode to use.
- */
-
- GETLIST DITHERS
- String = ADPRO_RESULT
- IF (RC ~= 0) THEN DO
- ADPRO_TO_FRONT
- OKAY1 "Could not retrieve" || NL ||,
- "dither list."
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
-
- continue = 0
- DO UNTIL (continue = 1)
- ADPRO_TO_FRONT
-
- LISTVIEW '"Dithers Available:"' 10 ITEMS String
- LISTVIEW_RC = RC
- PARSE VAR ADPRO_RESULT '"'DitherModeStr'"' scratch
-
- IF (LISTVIEW_RC ~= 0) & (LISTVIEW_RC ~= 1) THEN DO
- ADPRO_TO_FRONT
-
- OKAYN '"RenderAsDefined.fred"' '"This value is required."' '"Retry|Cancel"'
- IF (RC = 0) THEN
- EXIT 10
- END
- ELSE
- continue = 1
- END
-
- IF (DitherModeStr = "Off") THEN /* Off */
- DitherMode = 0
- ELSE IF (DitherModeStr = "Floyd (1)") THEN /* Floyd (1) */
- DitherMode = 1
- ELSE IF (DitherModeStr = "Burkes (2)") THEN /* Burkes (2) */
- DitherMode = 2
- ELSE IF (DitherModeStr = "Sierra (3)") THEN /* Sierra (3) */
- DitherMode = 3
- ELSE IF (DitherModeStr = "Jarvis (4)") THEN /* Jarvis (4) */
- DitherMode = 4
- ELSE IF (DitherModeStr = "Stucki (5)") THEN /* Stucki (5) */
- DitherMode = 5
- ELSE IF (DitherModeStr = "Random (6)") THEN /* Random (6) */
- DitherMode = 6
- ELSE IF (DitherModeStr = "Lg Ord (7)") THEN /* Lg Ord (7) */
- DitherMode = 7
- ELSE IF (DitherModeStr = "Sm Ord (8)") THEN /* Sm Ord (8) */
- DitherMode = 8
- ELSE
- DitherMode = 0
-
-
- /*
- ** If dither is Random or Ordered, get the Dither Amount.
- */
-
- IF (DitherMode = 6) | (DitherMode = 7) | (DitherMode = 8) THEN DO
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Enter Dither Amount"' 16 1 256 TRUE
- IF (RESULT = (1-1)) THEN
- EXIT 10
- DitherAmt = RESULT
-
- SETCLIP( "FREDDitherAmt", DitherAmt )
- END
-
- SCREEN_TO_FRONT "FRED"
-
-
- /*
- ** Update the clips.
- */
-
- SETCLIP( "FREDRenderScreen", RenderScreen )
- SETCLIP( "FREDDither", DitherMode )
-
- EXIT 0
-