home *** CD-ROM | disk | FTP | other *** search
- /*
- ** ScaleToSize.fred.pre
- **
- ** $VER: ScaleToSize.fred.pre 1.2.1 (17.1.94)
- **
- ** If the ScaleToSize.fred script appears in the InvokeADPro list,
- ** this program will ask the user to enter a width and height value.
- **
- ** Clips Exported:
- ** FREDDesiredWidth - Width user entered
- ** FREDDesiredHeight - Height user entered
- **
- ** 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-1994 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
-
-
- /*
- ** Set some default values.
- */
-
- CurrentWidth = 320
- CurrentHeight = 200
-
-
- /*
- ** See what type of data is loaded in ADPro/MorphPlus.
- */
-
- CALL "FREDSCRIPTS:FREDFunctions/CheckForImageData" FALSE
- IF (RESULT = 0) THEN DO
- XSIZE
- CurrentWidth = ADPRO_RESULT
-
- YSIZE
- CurrentHeight = ADPRO_RESULT
- END
-
-
- /*
- ** Ask the user for a size using the currently loaded width as default.
- */
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Enter Scale Width"' CurrentWidth 1 999999 TRUE
- IF (RESULT = (1-1)) THEN
- EXIT 10
- DesiredWidth = RESULT
-
-
- /*
- ** Ask the user for a size using the currently loaded height as default.
- */
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Enter Scale Height"' CurrentHeight 1 999999 TRUE
- IF (RESULT = (1-1)) THEN
- EXIT 10
- DesiredHeight = RESULT
-
-
- /*
- ** Update the clips.
- */
-
- SETCLIP( "FREDDesiredWidth", DesiredWidth )
- SETCLIP( "FREDDesiredHeight", DesiredHeight )
-
- EXIT 0
-