home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Mosaic.fred.pre
- **
- ** $VER: Mosaic.fred.pre 1.0.0 (23.10.93)
- **
- ** If the Mosaic.fred script appears in the Invoke ADPro list, this
- ** program will ask the user to enter the X & Y Size of the Mosaic 'tiles'
- ** and asks for the X & Y offsets of the 'tiles'.
- **
- ** Clips Exported:
- ** FREDMosaicXSize - Width value of Mosaic 'tile'.
- ** FREDMosaicYSize - Height value of Mosaic 'tile'.
- ** FREDMosaicXOff - X offset of Mosaic 'tile'.
- ** FREDMosaicYOff - Y offset of Mosaic 'tile'.
- **
- ** NOTE: Clip name 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
-
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Tile Width"' 1 1 9999 TRUE
- IF (RESULT = (1-1)) THEN
- EXIT 10
- ELSE DO
- MosXSize = RESULT
- SETCLIP( "FREDMosaicXSize", RESULT )
- END
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Tile Height"' 1 1 9999 TRUE
- IF (RESULT = (1-1)) THEN
- EXIT 10
- ELSE DO
- MosYSize = RESULT
- SETCLIP( "FREDMosaicYSize", RESULT )
- END
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Width Offset"' 0 0 (MosXSize-1) TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- ELSE
- SETCLIP( "FREDMosaicXOff", RESULT )
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Height Offset"' 0 0 (MosYSize-1) TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- ELSE
- SETCLIP( "FREDMosaicYOff", RESULT )
-
- EXIT 0
-